@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apis/apis.ts +6 -2
- package/dist/apis/base/crypto.ts +4 -0
- package/dist/apis/base/debug.ts +5 -0
- package/dist/apis/base/index.ts +9 -1
- package/dist/apis/base/performance.ts +8 -0
- package/dist/apis/base/system.ts +1 -1
- package/dist/apis/base/update.ts +5 -0
- package/dist/apis/base/weapp/app-event.ts +75 -0
- package/dist/apis/base/weapp/life-cycle.ts +21 -0
- package/dist/apis/canvas/index.ts +18 -0
- package/dist/apis/data-analysis/index.ts +6 -0
- package/dist/apis/device/accelerometer.ts +2 -1
- package/dist/apis/device/accessibility.ts +4 -0
- package/dist/apis/device/battery.ts +2 -2
- package/dist/apis/device/bluetooth-ble.ts +19 -0
- package/dist/apis/device/bluetooth-peripheral.ts +6 -0
- package/dist/apis/device/bluetooth.ts +16 -0
- package/dist/apis/device/calendar.ts +5 -0
- package/dist/apis/device/clipboard.ts +1 -1
- package/dist/apis/device/compass.ts +21 -0
- package/dist/apis/device/contact.ts +5 -0
- package/dist/apis/device/crypto.ts +4 -0
- package/dist/apis/device/gyroscope.ts +7 -0
- package/dist/apis/device/iBeacon.ts +10 -0
- package/dist/apis/device/index.ts +15 -0
- package/dist/apis/device/keyboard.ts +2 -1
- package/dist/apis/device/motion.ts +6 -0
- package/dist/apis/device/network.ts +26 -9
- package/dist/apis/device/nfc.ts +10 -0
- package/dist/apis/device/phone.ts +2 -1
- package/dist/apis/device/scan.ts +4 -0
- package/dist/apis/device/screen.ts +2 -1
- package/dist/apis/device/sms.ts +4 -0
- package/dist/apis/device/vibrate.ts +19 -11
- package/dist/apis/device/wifi.ts +15 -0
- package/dist/apis/ext/index.ts +5 -0
- package/dist/apis/files/index.ts +2 -1
- package/dist/apis/files/manager.ts +2 -1
- package/dist/apis/framework/index.ts +5 -6
- package/dist/apis/location/index.ts +61 -68
- package/dist/apis/media/EditorContext.ts +32 -0
- package/dist/apis/media/audio/index.ts +18 -0
- package/dist/apis/media/background-audio/index.ts +16 -0
- package/dist/apis/media/camera.ts +16 -0
- package/dist/apis/media/common.ts +2 -1
- package/dist/apis/media/{image.ts → image/index.ts} +3 -2
- package/dist/apis/media/index.ts +10 -0
- package/dist/apis/media/live.ts +5 -0
- package/dist/apis/media/map.ts +4 -0
- package/dist/apis/media/media-recorder.ts +4 -0
- package/dist/apis/media/recorder.ts +6 -0
- package/dist/apis/media/video/VideoContext.ts +19 -0
- package/dist/apis/media/{video.ts → video/index.ts} +12 -2
- package/dist/apis/media/video-decoder.ts +4 -0
- package/dist/apis/media/video-processing.ts +4 -0
- package/dist/apis/media/voip.ts +19 -0
- package/dist/apis/network/index.ts +3 -0
- package/dist/apis/network/mdns.ts +13 -0
- package/dist/apis/network/request.ts +2 -1
- package/dist/apis/network/tcp.ts +4 -0
- package/dist/apis/network/udp.ts +4 -0
- package/dist/apis/network/webSocket.ts +2 -6
- package/dist/apis/open-api/account.ts +4 -0
- package/dist/apis/open-api/address.ts +4 -0
- package/dist/apis/open-api/authorize.ts +5 -0
- package/dist/apis/open-api/card.ts +5 -0
- package/dist/apis/open-api/channels-live.ts +11 -0
- package/dist/apis/open-api/customer-service.ts +4 -0
- package/dist/apis/open-api/device-voip.ts +5 -0
- package/dist/apis/open-api/facial.ts +7 -0
- package/dist/apis/open-api/favorites.ts +5 -0
- package/dist/apis/open-api/group.ts +4 -0
- package/dist/apis/open-api/index.ts +20 -6
- package/dist/apis/open-api/invoice.ts +5 -0
- package/dist/apis/open-api/license-plate.ts +4 -0
- package/dist/apis/open-api/login.ts +6 -0
- package/dist/apis/open-api/my-miniprogram.ts +4 -0
- package/dist/apis/open-api/privacy.ts +7 -0
- package/dist/apis/open-api/red-package.ts +4 -0
- package/dist/apis/open-api/settings.ts +5 -0
- package/dist/apis/open-api/soter.ts +6 -0
- package/dist/apis/open-api/subscribe-message.ts +6 -0
- package/dist/apis/open-api/{user-info/index.ts → user-info.ts} +1 -16
- package/dist/apis/open-api/werun.ts +5 -0
- package/dist/apis/payment/index.ts +6 -0
- package/dist/apis/route/index.ts +4 -28
- package/dist/apis/share/index.ts +33 -0
- package/dist/apis/storage/background-fetch.ts +7 -0
- package/dist/apis/storage/cache-manager.ts +4 -0
- package/dist/apis/storage/index.ts +20 -18
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +2 -2
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +2 -18
- package/dist/apis/ui/custom-component.ts +8 -0
- package/dist/apis/ui/fonts.ts +4 -0
- package/dist/apis/ui/index.ts +8 -10
- package/dist/apis/ui/interaction/index.ts +3 -0
- package/dist/apis/ui/menu.ts +4 -0
- package/dist/apis/ui/navigation-bar/index.ts +60 -21
- package/dist/apis/ui/pull-down-refresh.ts +1 -1
- package/dist/apis/{page → ui/scroll}/index.ts +27 -22
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +3 -5
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +12 -21
- package/dist/apis/wxml/index.ts +5 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +3 -4
- package/dist/components-harmony-ets/button.ets +90 -64
- package/dist/components-harmony-ets/checkbox.ets +53 -98
- package/dist/components-harmony-ets/form.ets +16 -112
- package/dist/components-harmony-ets/icon.ets +59 -46
- package/dist/components-harmony-ets/image.ets +15 -40
- package/dist/components-harmony-ets/innerHtml.ets +6 -74
- package/dist/components-harmony-ets/input.ets +58 -128
- package/dist/components-harmony-ets/label.ets +43 -69
- package/dist/components-harmony-ets/picker.ets +114 -137
- package/dist/components-harmony-ets/radio.ets +55 -103
- package/dist/components-harmony-ets/richText.ets +17 -41
- package/dist/components-harmony-ets/scrollView.ets +69 -101
- package/dist/components-harmony-ets/slider.ets +35 -58
- package/dist/components-harmony-ets/swiper.ets +24 -135
- package/dist/components-harmony-ets/switch.ets +25 -55
- package/dist/components-harmony-ets/text.ets +42 -46
- package/dist/components-harmony-ets/textArea.ets +39 -107
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +3 -88
- package/dist/components-harmony-ets/utils/helper.ets +2 -62
- package/dist/components-harmony-ets/utils/index.ts +1 -1
- package/dist/components-harmony-ets/utils/styles.ets +6 -9
- package/dist/components-harmony-ets/video.ets +63 -92
- package/dist/components-harmony-ets/view.ets +65 -40
- package/dist/index.js +33 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/getComputedStyle.ts +1 -1
- package/dist/runtime-ets/dom/bind.ts +80 -0
- package/dist/runtime-ets/dom/class-list.ts +2 -4
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +1 -1
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +14 -43
- package/dist/runtime-ets/dom/element/element.ts +162 -0
- package/dist/runtime-ets/dom/element/form.ts +397 -0
- package/dist/runtime-ets/dom/element/index.ts +89 -0
- package/dist/runtime-ets/dom/element/normal.ts +75 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +14 -0
- package/dist/runtime-ets/dom/element/text.ts +17 -0
- package/dist/runtime-ets/dom/element/video.ts +49 -0
- package/dist/runtime-ets/dom/event.ts +24 -1
- package/dist/runtime-ets/dom/eventTarget.ts +2 -1
- package/dist/runtime-ets/dom/node.ts +74 -44
- package/dist/runtime-ets/dom/stylesheet/index.ts +136 -23
- package/dist/runtime-ets/dom/stylesheet/type.ts +4 -3
- package/dist/runtime-ets/dom/stylesheet/util.ts +71 -1
- package/dist/runtime-ets/index.ts +0 -1
- package/dist/runtime-ets/utils/bind.ts +3 -14
- package/dist/runtime-ets/utils/index.ts +12 -7
- package/dist/runtime-ets/utils/info.ts +22 -50
- package/dist/runtime-framework/react/app.ts +3 -6
- package/dist/runtime-framework/react/page.ts +2 -9
- package/dist/runtime-framework/solid/page.ts +0 -6
- package/dist/runtime-utils.js +1150 -339
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +1150 -339
- package/dist/runtime.js.map +1 -1
- package/package.json +8 -8
- package/types/runtime.d.ts +4 -0
- package/LICENSE +0 -160
- package/dist/components-harmony-ets/base.ets +0 -63
- package/dist/components-harmony-ets/element.ets +0 -223
- package/dist/components-harmony-ets/utils/constant/icon.ts +0 -19
- package/dist/runtime-ets/dom/element.ts +0 -457
- package/dist/runtime-ets/dom/text.ts +0 -19
- package/types/api.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-harmony-ets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "OpenHarmony & 鸿蒙系统插件",
|
|
5
5
|
"author": "O2Team",
|
|
6
6
|
"homepage": "https://gitee.com/openharmony-sig/taro",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"webpack-sources": "^3.2.3",
|
|
27
|
-
"@tarojs/components": "
|
|
28
|
-
"@tarojs/helper": "
|
|
29
|
-
"@tarojs/
|
|
30
|
-
"@tarojs/runner-utils": "
|
|
31
|
-
"@tarojs/
|
|
32
|
-
"@tarojs/taro": "
|
|
33
|
-
"@tarojs/shared": "
|
|
27
|
+
"@tarojs/components": "4.0.0-alpha.0",
|
|
28
|
+
"@tarojs/helper": "4.0.0-alpha.0",
|
|
29
|
+
"@tarojs/runtime": "4.0.0-alpha.0",
|
|
30
|
+
"@tarojs/runner-utils": "4.0.0-alpha.0",
|
|
31
|
+
"@tarojs/service": "4.0.0-alpha.0",
|
|
32
|
+
"@tarojs/taro": "4.0.0-alpha.0",
|
|
33
|
+
"@tarojs/shared": "4.0.0-alpha.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@rollup/plugin-commonjs": "^20.0.0",
|
package/types/runtime.d.ts
CHANGED
|
@@ -12,4 +12,8 @@ declare module '@tarojs/runtime' {
|
|
|
12
12
|
|
|
13
13
|
export type TaroAny = any
|
|
14
14
|
export type ObjectAssign = typeof Object.assign
|
|
15
|
+
|
|
16
|
+
export function findChildNodeWithDFS<T extends TaroElement = TaroElement> (node: TaroElement, selector: string | ((ele: T) => boolean), selectAll: true): T[] | null
|
|
17
|
+
export function findChildNodeWithDFS<T extends TaroElement = TaroElement> (node: TaroElement, selector: string | ((ele: T) => boolean), selectAll?: false): T | null
|
|
18
|
+
export function findChildNodeWithDFS<T extends TaroElement = TaroElement> (node: TaroElement, selector: string | ((ele: T) => boolean), selectAll: boolean): T[] | T | null
|
|
15
19
|
}
|
package/LICENSE
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 O2Team
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
========================================================================
|
|
24
|
-
|
|
25
|
-
MIT (react-devtools):
|
|
26
|
-
The following files embed [react-devtools](https://github.com/facebook/react) MIT:
|
|
27
|
-
`/packages/taro-plugin-react-devtools/src/backend/index.js`
|
|
28
|
-
See `/LICENSE` for details of the license.
|
|
29
|
-
|
|
30
|
-
==================
|
|
31
|
-
|
|
32
|
-
MIT (vue-devtools):
|
|
33
|
-
The following files embed [vue-devtools](https://github.com/vuejs/devtools) MIT:
|
|
34
|
-
`/packages/taro-plugin-vue-devtools/src/backend/*`
|
|
35
|
-
See `/LICENSE` for details of the license.
|
|
36
|
-
|
|
37
|
-
==================
|
|
38
|
-
|
|
39
|
-
MIT (vite):
|
|
40
|
-
The following files embed [vite](https://github.com/vitejs/vite) MIT:
|
|
41
|
-
`/packages/taro-webpack5-prebundle/src/prebundle/scanImport.ts`,
|
|
42
|
-
`/packages/taro-webpack5-prebundle/src/prebundle/bundle.ts`,
|
|
43
|
-
`/packages/taro-webpack5-prebundle/src/h5.ts`,
|
|
44
|
-
`/packages/taro-webpack5-prebundle/src/min.ts`
|
|
45
|
-
See `/LICENSE` for details of the license.
|
|
46
|
-
|
|
47
|
-
==================
|
|
48
|
-
|
|
49
|
-
MIT (webpack):
|
|
50
|
-
The following files embed [webpack](https://github.com/webpack/webpack) MIT:
|
|
51
|
-
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerEntryModule.ts`,
|
|
52
|
-
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerPlugin.ts`,
|
|
53
|
-
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerReferencePlugin.ts`,
|
|
54
|
-
`/packages/taro-webpack5-prebundle/src/webpack/TaroModuleFederationPlugin.ts`
|
|
55
|
-
See `/LICENSE` for details of the license.
|
|
56
|
-
|
|
57
|
-
==================
|
|
58
|
-
|
|
59
|
-
MIT (sizzle):
|
|
60
|
-
The following files embed [sizzle](https://github.com/jquery/sizzle) MIT:
|
|
61
|
-
`/packages/taro-extends/src/jquery/sizzle.js`
|
|
62
|
-
See `/LICENSE.txt` for details of the license.
|
|
63
|
-
|
|
64
|
-
==================
|
|
65
|
-
|
|
66
|
-
MIT (zepto):
|
|
67
|
-
The following files embed [zepto](https://github.com/madrobby/zepto) MIT:
|
|
68
|
-
`/packages/taro-extends/src/jquery/zepto.js`,
|
|
69
|
-
`/packages/taro-extends/src/jquery/event.js`
|
|
70
|
-
See `/MIT-LICENSE` for details of the license.
|
|
71
|
-
|
|
72
|
-
==================
|
|
73
|
-
|
|
74
|
-
MIT (css-to-react-native):
|
|
75
|
-
The following files embed [css-to-react-native](https://github.com/styled-components/css-to-react-native) MIT:
|
|
76
|
-
`/packages/css-to-react-native/src/css-to-react-native/*`
|
|
77
|
-
See `/LICENSE.md` for details of the license.
|
|
78
|
-
|
|
79
|
-
==================
|
|
80
|
-
|
|
81
|
-
MIT (reactify-wc):
|
|
82
|
-
The following files embed [reactify-wc](https://github.com/BBKolton/reactify-wc) MIT:
|
|
83
|
-
`/packages/taro-components-library-react/src/component-lib/reactify-wc.ts`
|
|
84
|
-
See `/LICENSE` for details of the license.
|
|
85
|
-
|
|
86
|
-
==================
|
|
87
|
-
|
|
88
|
-
MIT (ant-design-mobile-rn):
|
|
89
|
-
The following files embed [ant-design-mobile-rn](https://github.com/ant-design/ant-design-mobile-rn) MIT:
|
|
90
|
-
`/packages/taro-components-rn/src/components/Swiper/carousel.tsx`
|
|
91
|
-
See `/LICENSE` for details of the license.
|
|
92
|
-
|
|
93
|
-
==================
|
|
94
|
-
|
|
95
|
-
MIT (react-wx-images-viewer):
|
|
96
|
-
The following files embed [react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer) MIT:
|
|
97
|
-
`/packages/taro-h5/src/api/media/image/previewImage.ts`
|
|
98
|
-
See `/LICENSE` for details of the license.
|
|
99
|
-
|
|
100
|
-
==================
|
|
101
|
-
|
|
102
|
-
MIT (webpack-contrib/css-loader):
|
|
103
|
-
The following files embed [webpack-contrib/css-loader](https://github.com/webpack-contrib/css-loader) MIT:
|
|
104
|
-
`/packages/taro-rn-style-transformer/src/utils/index.ts`
|
|
105
|
-
See `/LICENSE` for details of the license.
|
|
106
|
-
|
|
107
|
-
==================
|
|
108
|
-
|
|
109
|
-
MIT (react-native):
|
|
110
|
-
The following files embed [react-native](https://github.com/facebook/react-native) MIT:
|
|
111
|
-
`/packages/taro-rn-style-transformer/src/transforms/StyleSheet/*`
|
|
112
|
-
See `/LICENSE` for details of the license.
|
|
113
|
-
|
|
114
|
-
==================
|
|
115
|
-
|
|
116
|
-
MIT (myrne/performance-now):
|
|
117
|
-
The following files embed [myrne/performance-now](https://github.com/myrne/performance-now) MIT:
|
|
118
|
-
`/packages/taro-runtime/src/bom/raf.ts`
|
|
119
|
-
See `/LICENSE` for details of the license.
|
|
120
|
-
|
|
121
|
-
==================
|
|
122
|
-
|
|
123
|
-
Apache (chameleon-api):
|
|
124
|
-
The following files embed [chameleon-api](https://github.com/chameleon-team/chameleon-api) Apache:
|
|
125
|
-
`/packages/taro-h5/src/api/device/clipboard.ts`
|
|
126
|
-
|
|
127
|
-
==================
|
|
128
|
-
|
|
129
|
-
MIT (uni-app):
|
|
130
|
-
The following files embed [uni-app](https://github.com/dcloudio/uni-app) MIT:
|
|
131
|
-
`/packages/taro-components-rn/src/components/Video/index.tsx`
|
|
132
|
-
See `/LICENSE` for details of the license.
|
|
133
|
-
|
|
134
|
-
==================
|
|
135
|
-
|
|
136
|
-
MIT (miniprogram-render):
|
|
137
|
-
The following files embed [miniprogram-render](https://github.com/Tencent/kbone) MIT:
|
|
138
|
-
`/packages/taro-plugin-http/src/runtime/Cookie.ts`
|
|
139
|
-
See `/LICENSE` for details of the license.
|
|
140
|
-
|
|
141
|
-
==================
|
|
142
|
-
|
|
143
|
-
MIT (stencil-ds-output-targets):
|
|
144
|
-
The following files embed [stencil-ds-output-targets](https://github.com/ionic-team/stencil-ds-output-targets/) MIT:
|
|
145
|
-
`/packages/taro-components-library-react/src/react-component-lib/utils/attachProps.ts`
|
|
146
|
-
`/packages/taro-components-library-react/src/react-component-lib/utils/case.ts`
|
|
147
|
-
`/packages/taro-components-library-react/src/react-component-lib/utils/dev.ts`
|
|
148
|
-
`/packages/taro-components-library-react/src/react-component-lib/utils/index.tsx`
|
|
149
|
-
`/packages/taro-components-library-react/src/react-component-lib/createComponent.tsx`
|
|
150
|
-
`/packages/taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx`
|
|
151
|
-
`/packages/taro-components-library-react/src/react-component-lib/interfaces.ts`
|
|
152
|
-
`/packages/taro-components-library-vue3/src/vue-component-lib/utils.ts`
|
|
153
|
-
See `/LICENSE` for details of the license.
|
|
154
|
-
|
|
155
|
-
==================
|
|
156
|
-
|
|
157
|
-
MIT (stencil-vue2-output-target):
|
|
158
|
-
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
|
-
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
|
-
See `/LICENSE` for details of the license.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { convertNumber2VP } from '../runtime'
|
|
2
|
-
import { AttributeManager } from './utils/AttributeManager'
|
|
3
|
-
|
|
4
|
-
import type { TaroElement } from './element'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@Component
|
|
8
|
-
export default struct TaroComponentWrapper {
|
|
9
|
-
node?: TaroElement
|
|
10
|
-
|
|
11
|
-
@BuilderParam createElement: () => void
|
|
12
|
-
|
|
13
|
-
top(): Length {
|
|
14
|
-
return this.node?.hmStyle?.top || 0
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
left(): Length {
|
|
18
|
-
return this.node?.hmStyle?.left || 0
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Builder createFlexElementWithPosition () {
|
|
22
|
-
if (this.node?.hmStyle?.position === 'absolute') {
|
|
23
|
-
Stack({ alignContent: Alignment.TopStart }) {
|
|
24
|
-
this.createElement()
|
|
25
|
-
}
|
|
26
|
-
.position({
|
|
27
|
-
x: this.left(),
|
|
28
|
-
y: this.top()
|
|
29
|
-
})
|
|
30
|
-
.id(this.node?._attrs?.id || this.node?._nid)
|
|
31
|
-
.key(this.node?._attrs?.id || this.node?._nid)
|
|
32
|
-
.zIndex(Number(this.node?.hmStyle?.zIndex) || null)
|
|
33
|
-
} else if (this.node?.hmStyle?.position === 'fixed') {
|
|
34
|
-
Stack({ alignContent: Alignment.TopStart }) {
|
|
35
|
-
this.createElement()
|
|
36
|
-
}
|
|
37
|
-
.position({
|
|
38
|
-
x: this.left(),
|
|
39
|
-
y: this.top()
|
|
40
|
-
})
|
|
41
|
-
.id(this.node?._attrs?.id || this.node?._nid)
|
|
42
|
-
.key(this.node?._attrs?.id || this.node?._nid)
|
|
43
|
-
.zIndex(Number(this.node?.hmStyle?.zIndex) || null)
|
|
44
|
-
} else if ((this.node?.hmStyle?.position === 'relative')) {
|
|
45
|
-
Stack({ alignContent: Alignment.TopStart }) {
|
|
46
|
-
this.createElement()
|
|
47
|
-
}
|
|
48
|
-
.offset({
|
|
49
|
-
x: this.left(),
|
|
50
|
-
y: this.top()
|
|
51
|
-
})
|
|
52
|
-
.id(this.node?._attrs?.id || this.node?._nid)
|
|
53
|
-
.key(this.node?._attrs?.id || this.node?._nid)
|
|
54
|
-
.zIndex(Number(this.node?.hmStyle?.zIndex) || null)
|
|
55
|
-
} else {
|
|
56
|
-
this.createElement()
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
build () {
|
|
61
|
-
this.createFlexElementWithPosition()
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TaroButtonElement as _TaroButtonElement,
|
|
3
|
-
TaroCheckboxGroupElement as _TaroCheckboxGroupElement,
|
|
4
|
-
TaroScrollViewElement as _TaroScrollViewElement,
|
|
5
|
-
TaroElement as _TaroElement,
|
|
6
|
-
TaroFormWidgetElement as _TaroFormWidgetElement,
|
|
7
|
-
TaroIgnoreElement as _TaroIgnoreElement,
|
|
8
|
-
TaroImageElement as _TaroImageElement,
|
|
9
|
-
TaroInputElement as _TaroInputElement,
|
|
10
|
-
TaroPickerElement as _TaroPickerElement,
|
|
11
|
-
TaroRadioGroupElement as _TaroRadioGroupElement,
|
|
12
|
-
TaroSliderElement as _TaroSliderElement,
|
|
13
|
-
TaroSwitchElement as _TaroSwitchElement,
|
|
14
|
-
TaroTextElement as _TaroTextElement,
|
|
15
|
-
TaroVideoElement as _TaroVideoElement,
|
|
16
|
-
TaroViewElement as _TaroViewElement,
|
|
17
|
-
TaroCheckboxElement as _TaroCheckboxElement,
|
|
18
|
-
TaroRadioElement as _TaroRadioElement,
|
|
19
|
-
TaroIconElement as _TaroIconElement,
|
|
20
|
-
TaroLabelElement as _TaroLabelElement,
|
|
21
|
-
TaroRichTextElement as _TaroRichTextElement,
|
|
22
|
-
TaroSwiperElement as _TaroSwiperElement,
|
|
23
|
-
TaroSwiperItemElement as _TaroSwiperItemElement,
|
|
24
|
-
TaroTextAreaElement as _TaroTextAreaElement,
|
|
25
|
-
FormElement as _FormElement,
|
|
26
|
-
Current,
|
|
27
|
-
TaroAny
|
|
28
|
-
} from '@tarojs/runtime'
|
|
29
|
-
|
|
30
|
-
import { TaroCheckbox, TaroCheckboxGroup } from './checkbox'
|
|
31
|
-
import { TaroRadio, TaroRadioGroup } from './radio'
|
|
32
|
-
import TaroButton from './button'
|
|
33
|
-
import TaroView from './view'
|
|
34
|
-
import TaroForm from './form'
|
|
35
|
-
import TaroIcon from './icon'
|
|
36
|
-
import TaroText from './text'
|
|
37
|
-
import TaroImage from './image'
|
|
38
|
-
import TaroInput from './input'
|
|
39
|
-
import TaroScrollView from './scrollView'
|
|
40
|
-
import TaroTextArea from './textArea'
|
|
41
|
-
import TaroRichText from './richText'
|
|
42
|
-
import TaroLabel from './label'
|
|
43
|
-
import TaroVideo from './video'
|
|
44
|
-
import TaroPicker from './picker'
|
|
45
|
-
import TaroSwitch from './switch'
|
|
46
|
-
import TaroSlider from './slider'
|
|
47
|
-
import { TaroSwiper } from './swiper'
|
|
48
|
-
|
|
49
|
-
@Observed
|
|
50
|
-
class TaroElement extends _TaroElement {
|
|
51
|
-
constructor(tagName: string) {
|
|
52
|
-
super(tagName)
|
|
53
|
-
}
|
|
54
|
-
declare public _instance: TaroAny
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@Observed
|
|
58
|
-
class TaroViewElement extends _TaroViewElement {
|
|
59
|
-
declare public _instance: TaroView
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@Observed
|
|
63
|
-
class TaroTextElement extends _TaroTextElement {
|
|
64
|
-
declare public _instance: TaroText
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@Observed
|
|
68
|
-
class TaroImageElement extends _TaroImageElement {
|
|
69
|
-
declare public _instance: TaroImage
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@Observed
|
|
73
|
-
class TaroScrollViewElement extends _TaroScrollViewElement {
|
|
74
|
-
declare public _instance: TaroScrollView
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@Observed
|
|
78
|
-
class TaroButtonElement extends _TaroButtonElement {
|
|
79
|
-
declare public _instance: TaroButton
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@Observed
|
|
83
|
-
class TaroInputElement extends _TaroInputElement {
|
|
84
|
-
declare public _instance: TaroInput
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@Observed
|
|
88
|
-
class TaroSliderElement extends _TaroSliderElement {
|
|
89
|
-
declare public _instance: TaroSlider
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@Observed
|
|
93
|
-
class TaroSwitchElement extends _TaroSwitchElement {
|
|
94
|
-
declare public _instance: TaroSwitch
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@Observed
|
|
98
|
-
class TaroCheckboxGroupElement extends _TaroCheckboxGroupElement {
|
|
99
|
-
declare public _instance: TaroCheckboxGroup
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@Observed
|
|
103
|
-
class TaroRadioGroupElement extends _TaroRadioGroupElement {
|
|
104
|
-
declare public _instance: TaroRadioGroup
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@Observed
|
|
108
|
-
class TaroPickerElement extends _TaroPickerElement {
|
|
109
|
-
declare public _instance: TaroPicker
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@Observed
|
|
113
|
-
class TaroVideoElement extends _TaroVideoElement {
|
|
114
|
-
declare public _instance: TaroVideo
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@Observed
|
|
118
|
-
class TaroCheckboxElement extends _TaroCheckboxElement{
|
|
119
|
-
declare public _instance: TaroCheckbox
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@Observed
|
|
123
|
-
class TaroRadioElement extends _TaroRadioElement{
|
|
124
|
-
declare public _instance: TaroRadio
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@Observed
|
|
128
|
-
class TaroIconElement extends _TaroIconElement{
|
|
129
|
-
declare public _instance: TaroIcon
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@Observed
|
|
133
|
-
class TaroLabelElement extends _TaroLabelElement{
|
|
134
|
-
declare public _instance: TaroLabel
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@Observed
|
|
138
|
-
class TaroRichTextElement extends _TaroRichTextElement{
|
|
139
|
-
declare public _instance: TaroRichText
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@Observed
|
|
143
|
-
class TaroSwiperElement extends _TaroSwiperElement{
|
|
144
|
-
declare public _instance: TaroSwiper
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@Observed
|
|
148
|
-
class TaroSwiperItemElement extends _TaroSwiperItemElement{
|
|
149
|
-
declare public _instance: TaroSwiper
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
@Observed
|
|
153
|
-
class TaroTextAreaElement extends _TaroTextAreaElement{
|
|
154
|
-
declare public _instance: TaroTextArea
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@Observed
|
|
158
|
-
class TaroFormElement extends _FormElement {
|
|
159
|
-
declare public _instance: TaroForm
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@Observed
|
|
163
|
-
class TaroFormWidgetElement extends _TaroFormWidgetElement {}
|
|
164
|
-
|
|
165
|
-
@Observed
|
|
166
|
-
class TaroIgnoreElement extends _TaroIgnoreElement {}
|
|
167
|
-
|
|
168
|
-
export function initHarmonyElement () {
|
|
169
|
-
Current.createHarmonyElement = (tagName: string) => {
|
|
170
|
-
switch (tagName) {
|
|
171
|
-
case 'view': return new TaroViewElement()
|
|
172
|
-
case 'image': return new TaroImageElement()
|
|
173
|
-
case 'text': return new TaroTextElement()
|
|
174
|
-
case 'button': return new TaroButtonElement()
|
|
175
|
-
case 'scroll-view': return new TaroScrollViewElement()
|
|
176
|
-
case 'checkbox-group': return new TaroCheckboxGroupElement()
|
|
177
|
-
case 'ignore': return new TaroIgnoreElement()
|
|
178
|
-
case 'input': return new TaroInputElement()
|
|
179
|
-
case 'picker': return new TaroPickerElement()
|
|
180
|
-
case 'radio-group': return new TaroRadioGroupElement()
|
|
181
|
-
case 'slider': return new TaroSliderElement()
|
|
182
|
-
case 'switch': return new TaroSwitchElement()
|
|
183
|
-
case 'video': return new TaroVideoElement()
|
|
184
|
-
case 'checkbox': return new TaroCheckboxElement()
|
|
185
|
-
case 'radio': return new TaroRadioElement()
|
|
186
|
-
case 'icon': return new TaroIconElement()
|
|
187
|
-
case 'label': return new TaroLabelElement()
|
|
188
|
-
case 'rich-text': return new TaroRichTextElement()
|
|
189
|
-
case 'swiper': return new TaroSwiperElement()
|
|
190
|
-
case 'swiper-item': return new TaroSwiperItemElement()
|
|
191
|
-
case 'text-area': return new TaroTextAreaElement()
|
|
192
|
-
case 'form': return new TaroFormElement()
|
|
193
|
-
default: return new TaroElement(tagName)
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export {
|
|
199
|
-
TaroButtonElement,
|
|
200
|
-
TaroCheckboxGroupElement,
|
|
201
|
-
TaroElement,
|
|
202
|
-
TaroScrollViewElement,
|
|
203
|
-
TaroFormWidgetElement,
|
|
204
|
-
TaroIgnoreElement,
|
|
205
|
-
TaroImageElement,
|
|
206
|
-
TaroInputElement,
|
|
207
|
-
TaroPickerElement,
|
|
208
|
-
TaroRadioGroupElement,
|
|
209
|
-
TaroSliderElement,
|
|
210
|
-
TaroSwitchElement,
|
|
211
|
-
TaroTextElement,
|
|
212
|
-
TaroVideoElement,
|
|
213
|
-
TaroViewElement,
|
|
214
|
-
TaroCheckboxElement,
|
|
215
|
-
TaroRadioElement,
|
|
216
|
-
TaroIconElement,
|
|
217
|
-
TaroLabelElement,
|
|
218
|
-
TaroRichTextElement,
|
|
219
|
-
TaroSwiperElement,
|
|
220
|
-
TaroSwiperItemElement,
|
|
221
|
-
TaroTextAreaElement,
|
|
222
|
-
TaroFormElement
|
|
223
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const _ICON_SVG_MAP = {
|
|
2
|
-
success: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E',
|
|
3
|
-
success_no_circle: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.657%2018.435L3%2012.778l1.414-1.414%204.95%204.95L20.678%205l1.414%201.414-12.02%2012.021a1%201%200%2001-1.415%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E',
|
|
4
|
-
info: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.75-12v7h1.5v-7h-1.5zM12%209a1%201%200%20100-2%201%201%200%20000%202z%22%2F%3E%3C%2Fsvg%3E',
|
|
5
|
-
warn: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E',
|
|
6
|
-
waiting: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.75%2011.38V6h-1.5v6l4.243%204.243%201.06-1.06-3.803-3.804zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E',
|
|
7
|
-
cancel: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6z%22%20fill-rule%3D%22nonzero%22%2F%3E%3Cpath%20d%3D%22M12.849%2012l3.11%203.111-.848.849L12%2012.849l-3.111%203.11-.849-.848L11.151%2012l-3.11-3.111.848-.849L12%2011.151l3.111-3.11.849.848L12.849%2012z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',
|
|
8
|
-
download: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.25%2012.04l-1.72-1.72-1.06%201.06%202.828%202.83a1%201%200%20001.414-.001l2.828-2.828-1.06-1.061-1.73%201.73V7h-1.5v5.04zm0-5.04V2h1.5v5h6.251c.55%200%20.999.446.999.996v13.008a.998.998%200%2001-.996.996H4.996A.998.998%200%20014%2021.004V7.996A1%201%200%20014.999%207h6.251z%22%2F%3E%3C%2Fsvg%3E',
|
|
9
|
-
search: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M16.31%2015.561l4.114%204.115-.848.848-4.123-4.123a7%207%200%2011.857-.84zM16.8%2011a5.8%205.8%200%2010-11.6%200%205.8%205.8%200%200011.6%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E',
|
|
10
|
-
clear: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.06%2012l3.006-3.005-1.06-1.06L12%2010.938%208.995%207.934l-1.06%201.06L10.938%2012l-3.005%203.005%201.06%201.06L12%2013.062l3.005%203.005%201.06-1.06L13.062%2012zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%2F%3E%3C%2Fsvg%3E',
|
|
11
|
-
circle: 'data:image/svg+xml,%3Csvg%20width%3D%221000%22%20height%3D%221000%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M500%20916.667C269.881%20916.667%2083.333%20730.119%2083.333%20500%2083.333%20269.881%20269.881%2083.333%20500%2083.333c230.119%200%20416.667%20186.548%20416.667%20416.667%200%20230.119-186.548%20416.667-416.667%20416.667zm0-50c202.504%200%20366.667-164.163%20366.667-366.667%200-202.504-164.163-366.667-366.667-366.667-202.504%200-366.667%20164.163-366.667%20366.667%200%20202.504%20164.163%20366.667%20366.667%20366.667z%22%20fill-rule%3D%22evenodd%22%20fill-opacity%3D%22.9%22%2F%3E%3C%2Fsvg%3E',
|
|
12
|
-
info_circle: 'data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zM11.4%2010h1.2v7h-1.2v-7zm.6-1a1%201%200%20110-2%201%201%200%20010%202z%22%2F%3E%3C%2Fsvg%3E',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class ICON_SVG_MAP {
|
|
16
|
-
static get (key: string): string {
|
|
17
|
-
return _ICON_SVG_MAP[key]
|
|
18
|
-
}
|
|
19
|
-
}
|