@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-alpha.10
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 +74 -21
- 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 +27 -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 +17 -9
- 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/memory.ts +10 -3
- 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 +3 -8
- package/dist/apis/index.ts +27 -17
- 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} +4 -3
- 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 +68 -0
- package/dist/apis/media/{video.ts → video/index.ts} +13 -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 +7 -6
- 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 +19 -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 +158 -88
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +73 -31
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +4 -19
- 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 +45 -59
- 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 +10 -4
- package/dist/apis/{page → ui/scroll}/index.ts +32 -27
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +6 -8
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/utils/index.ts +1 -1
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +24 -25
- package/dist/apis/wxml/index.ts +7 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +29 -17
- package/dist/components-harmony-ets/button.ets +106 -80
- package/dist/components-harmony-ets/canvas.ets +51 -0
- package/dist/components-harmony-ets/checkbox.ets +82 -148
- package/dist/components-harmony-ets/form.ets +45 -132
- package/dist/components-harmony-ets/icon.ets +66 -69
- package/dist/components-harmony-ets/image.ets +26 -61
- package/dist/components-harmony-ets/index.ets +92 -0
- package/dist/components-harmony-ets/innerHtml.ets +7 -70
- package/dist/components-harmony-ets/input.ets +60 -146
- package/dist/components-harmony-ets/label.ets +86 -92
- package/dist/components-harmony-ets/listView.ets +26 -0
- package/dist/components-harmony-ets/movableArea.ets +124 -0
- package/dist/components-harmony-ets/movableView.ets +93 -0
- package/dist/components-harmony-ets/navigationBar.ets +65 -0
- package/dist/components-harmony-ets/pageMeta.ets +94 -0
- package/dist/components-harmony-ets/picker.ets +172 -198
- package/dist/components-harmony-ets/progress.ets +52 -0
- package/dist/components-harmony-ets/pseudo.ets +80 -0
- package/dist/components-harmony-ets/radio.ets +85 -155
- package/dist/components-harmony-ets/richText.ets +15 -87
- package/dist/components-harmony-ets/scrollList.ets +94 -0
- package/dist/components-harmony-ets/scrollView.ets +81 -149
- package/dist/components-harmony-ets/slider.ets +47 -94
- package/dist/components-harmony-ets/stickySection.ets +42 -0
- package/dist/components-harmony-ets/style.ets +396 -0
- package/dist/components-harmony-ets/swiper.ets +51 -151
- package/dist/components-harmony-ets/switch.ets +35 -76
- package/dist/components-harmony-ets/{index.ts → tag.ts} +6 -0
- package/dist/components-harmony-ets/text.ets +131 -76
- package/dist/components-harmony-ets/textArea.ets +64 -140
- package/dist/components-harmony-ets/utils/AttributeManager.ets +1 -1
- package/dist/components-harmony-ets/utils/DynamicCenter.ts +4 -13
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +68 -85
- package/dist/components-harmony-ets/utils/helper.ets +18 -65
- package/dist/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.ts +1 -2
- package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
- package/dist/components-harmony-ets/utils/index.ts +55 -51
- package/dist/components-harmony-ets/utils/styles.ets +177 -65
- package/dist/components-harmony-ets/video.ets +70 -116
- package/dist/components-harmony-ets/view.ets +58 -64
- package/dist/components-harmony-ets/webView.ets +56 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +230 -60
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/document.ts +6 -4
- package/dist/runtime-ets/bom/getComputedStyle.ts +2 -2
- package/dist/runtime-ets/bom/window.ts +9 -2
- package/dist/runtime-ets/current.ts +3 -0
- package/dist/runtime-ets/dom/bind.ts +96 -0
- package/dist/runtime-ets/dom/class-list.ts +4 -6
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssNesting.ts +409 -0
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +30 -20
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +36 -51
- package/dist/runtime-ets/dom/element/canvas.ts +136 -0
- package/dist/runtime-ets/dom/element/element.ts +439 -0
- package/dist/runtime-ets/dom/element/form.ts +403 -0
- package/dist/runtime-ets/dom/element/index.ts +120 -0
- package/dist/runtime-ets/dom/element/movableArea.ts +11 -0
- package/dist/runtime-ets/dom/element/movableView.ts +242 -0
- package/dist/runtime-ets/dom/element/normal.ts +103 -0
- package/dist/runtime-ets/dom/element/progress.ts +11 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +15 -0
- package/dist/runtime-ets/dom/element/text.ts +10 -0
- package/dist/runtime-ets/dom/element/video.ts +50 -0
- package/dist/runtime-ets/dom/element/webView.ts +68 -0
- package/dist/runtime-ets/dom/event.ts +26 -5
- package/dist/runtime-ets/dom/eventTarget.ts +3 -3
- package/dist/runtime-ets/dom/node.ts +114 -49
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +805 -0
- package/dist/runtime-ets/dom/stylesheet/index.ts +122 -429
- package/dist/runtime-ets/dom/stylesheet/type.ts +93 -17
- package/dist/runtime-ets/dom/stylesheet/util.ts +145 -17
- package/dist/runtime-ets/index.ts +2 -3
- package/dist/runtime-ets/interface/event.ts +3 -2
- package/dist/runtime-ets/utils/index.ts +87 -17
- package/dist/runtime-ets/utils/info.ts +21 -47
- package/dist/runtime-framework/react/app.ts +20 -28
- package/dist/runtime-framework/react/hooks.ts +3 -4
- package/dist/runtime-framework/react/index.ts +1 -2
- package/dist/runtime-framework/react/native-page.ts +421 -0
- package/dist/runtime-framework/react/page.ts +5 -17
- package/dist/runtime-framework/solid/app.ts +25 -45
- package/dist/runtime-framework/solid/connect.ts +21 -3
- package/dist/runtime-framework/solid/hooks.ts +17 -12
- package/dist/runtime-framework/solid/index.ts +6 -2
- package/dist/runtime-framework/solid/page.ts +84 -36
- package/dist/runtime-framework/solid/reconciler/props.ts +70 -25
- package/dist/runtime-framework/solid/reconciler/render.ts +16 -6
- package/dist/runtime-framework/solid/reconciler/use.ts +0 -1
- package/dist/runtime-framework/solid/utils/index.ts +0 -2
- package/dist/runtime-utils.d.ts +827 -0
- package/dist/runtime-utils.js +1633 -549
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1633 -549
- package/dist/runtime.js.map +1 -1
- package/index.js +3 -1
- package/package.json +14 -15
- package/static/media/cancel.svg +1 -0
- package/static/media/circle.svg +1 -0
- package/static/media/clear.svg +1 -0
- package/static/media/download.svg +1 -0
- package/static/media/info.svg +1 -0
- package/static/media/info_circle.svg +1 -0
- package/static/media/search.svg +1 -0
- package/static/media/success.svg +1 -0
- package/static/media/success_no_circle.svg +1 -0
- package/static/media/taro_arrow_left.svg +1 -0
- package/static/media/taro_home.svg +1 -0
- package/static/media/waiting.svg +1 -0
- package/static/media/warn.svg +1 -0
- package/types/harmony.d.ts +4 -0
- package/types/index.d.ts +4 -0
- package/types/runtime.d.ts +7 -1
- 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/dist/runtime-ets/utils/bind.ts +0 -35
- package/types/api.d.ts +0 -4
- /package/dist/runtime-framework/solid/{contant.ts → constant.ts} +0 -0
|
@@ -1,347 +1,154 @@
|
|
|
1
1
|
/* eslint-disable accessor-pairs */
|
|
2
2
|
// @ts-nocheck
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { ObjectAssign, TaroAny } from '../../'
|
|
6
|
-
import { FlexManager, getNodeMarginOrPaddingData, getUnit } from './util'
|
|
3
|
+
import { BORDER_STYLE_MAP, FlexManager } from './util'
|
|
7
4
|
|
|
8
5
|
import type { HarmonyStyle, HarmonyType, TaroStyleType, TaroTextStyleType } from './type'
|
|
9
6
|
|
|
10
7
|
export { HarmonyStyle, HarmonyType, TaroStyleType, TaroTextStyleType }
|
|
11
8
|
|
|
12
9
|
export default class StyleSheet {
|
|
13
|
-
|
|
14
10
|
public hmStyle: HarmonyStyle = {}
|
|
15
11
|
|
|
16
12
|
get display () {
|
|
17
13
|
return this.hmStyle.display
|
|
18
14
|
}
|
|
19
15
|
|
|
20
|
-
set display (value: string) {
|
|
21
|
-
this.hmStyle.display = value
|
|
22
|
-
}
|
|
23
|
-
|
|
24
16
|
get position () {
|
|
25
17
|
return this.hmStyle.position
|
|
26
18
|
}
|
|
27
19
|
|
|
28
|
-
set position (value: string) {
|
|
29
|
-
this.hmStyle.position = value
|
|
30
|
-
}
|
|
31
|
-
|
|
32
20
|
get padding () {
|
|
33
|
-
|
|
34
|
-
return `${top} ${right} ${bottom} ${left}`
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set padding (value: string) {
|
|
38
|
-
this.hmStyle.padding = getNodeMarginOrPaddingData(value)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
set _padding (value: Margin) {
|
|
42
|
-
this.hmStyle.padding = value
|
|
21
|
+
return `${this.hmStyle.paddingTop} ${this.hmStyle.paddingRight} ${this.hmStyle.paddingBottom} ${this.hmStyle.paddingLeft}`
|
|
43
22
|
}
|
|
44
23
|
|
|
45
24
|
get paddingTop () {
|
|
46
|
-
return this.hmStyle.
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
set paddingTop (value: string) {
|
|
50
|
-
this.hmStyle.padding = ObjectAssign({}, this.hmStyle.padding, { top: getUnit(value) })
|
|
25
|
+
return this.hmStyle.paddingTop
|
|
51
26
|
}
|
|
52
27
|
|
|
53
28
|
get paddingBottom () {
|
|
54
|
-
return this.hmStyle.
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
set paddingBottom (value: string) {
|
|
58
|
-
this.hmStyle.padding = ObjectAssign({}, this.hmStyle.padding, { bottom: getUnit(value) })
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get paddingRight () {
|
|
62
|
-
return this.hmStyle.padding?.right
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
set paddingRight (value: string) {
|
|
66
|
-
this.hmStyle.padding = ObjectAssign({}, this.hmStyle.padding, { right: getUnit(value) })
|
|
29
|
+
return this.hmStyle.paddingBottom
|
|
67
30
|
}
|
|
68
31
|
|
|
69
32
|
get paddingLeft () {
|
|
70
|
-
return this.hmStyle.
|
|
33
|
+
return this.hmStyle.paddingLeft
|
|
71
34
|
}
|
|
72
35
|
|
|
73
|
-
|
|
74
|
-
|
|
36
|
+
get paddingRight () {
|
|
37
|
+
return this.hmStyle.paddingRight
|
|
75
38
|
}
|
|
76
39
|
|
|
77
40
|
get margin () {
|
|
78
|
-
|
|
79
|
-
return `${top} ${right} ${bottom} ${left}`
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
set margin (value: string) {
|
|
83
|
-
this.hmStyle.margin = getNodeMarginOrPaddingData(value)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
set _margin (value: Margin) {
|
|
87
|
-
this.hmStyle.margin = value
|
|
41
|
+
return `${this.hmStyle.marginTop} ${this.hmStyle.marginRight} ${this.hmStyle.marginBottom} ${this.hmStyle.marginLeft}`
|
|
88
42
|
}
|
|
89
43
|
|
|
90
44
|
get marginTop () {
|
|
91
|
-
return this.hmStyle.
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
set marginTop (value: string) {
|
|
95
|
-
this.hmStyle.margin = ObjectAssign({}, this.hmStyle.margin, { top: getUnit(value) })
|
|
45
|
+
return this.hmStyle.marginTop
|
|
96
46
|
}
|
|
97
47
|
|
|
98
48
|
get marginBottom () {
|
|
99
|
-
return this.hmStyle.
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
set marginBottom (value: string) {
|
|
103
|
-
this.hmStyle.margin = ObjectAssign({}, this.hmStyle.margin, { bottom: getUnit(value) })
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
get marginRight () {
|
|
107
|
-
return this.hmStyle.margin?.right
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
set marginRight (value: string) {
|
|
111
|
-
this.hmStyle.margin = ObjectAssign({}, this.hmStyle.margin, { right: getUnit(value) })
|
|
49
|
+
return this.hmStyle.marginBottom
|
|
112
50
|
}
|
|
113
51
|
|
|
114
52
|
get marginLeft () {
|
|
115
|
-
return this.hmStyle.
|
|
53
|
+
return this.hmStyle.marginLeft
|
|
116
54
|
}
|
|
117
55
|
|
|
118
|
-
|
|
119
|
-
|
|
56
|
+
get marginRight () {
|
|
57
|
+
return this.hmStyle.marginRight
|
|
120
58
|
}
|
|
121
59
|
|
|
122
60
|
get top () {
|
|
123
61
|
return this.hmStyle.top
|
|
124
62
|
}
|
|
125
63
|
|
|
126
|
-
set top (value: string | number) {
|
|
127
|
-
this.hmStyle.top = getUnit(value)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
set _top (value: Length) {
|
|
131
|
-
this.hmStyle.top = value
|
|
132
|
-
}
|
|
133
|
-
|
|
134
64
|
get left () {
|
|
135
65
|
return this.hmStyle.left
|
|
136
66
|
}
|
|
137
67
|
|
|
138
|
-
|
|
139
|
-
this.hmStyle.
|
|
68
|
+
get right () {
|
|
69
|
+
return this.hmStyle.right
|
|
140
70
|
}
|
|
141
71
|
|
|
142
|
-
|
|
143
|
-
this.hmStyle.
|
|
72
|
+
get bottom () {
|
|
73
|
+
return this.hmStyle.bottom
|
|
144
74
|
}
|
|
145
75
|
|
|
146
|
-
get
|
|
147
|
-
return this.hmStyle.flexBasis
|
|
76
|
+
get flex () {
|
|
77
|
+
return `${this.hmStyle.flexGrow} ${this.hmStyle.flexShrink} ${this.hmStyle.flexBasis}`
|
|
148
78
|
}
|
|
149
79
|
|
|
150
|
-
|
|
151
|
-
this.hmStyle.flexBasis
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
set _flexBasis (value: number | string) {
|
|
155
|
-
this.hmStyle.flexBasis = value
|
|
80
|
+
get flexBasis () {
|
|
81
|
+
return this.hmStyle.flexBasis
|
|
156
82
|
}
|
|
157
83
|
|
|
158
84
|
get flexGrow () {
|
|
159
85
|
return Number(this.hmStyle.flexGrow)
|
|
160
86
|
}
|
|
161
87
|
|
|
162
|
-
set flexGrow (value: number | string) {
|
|
163
|
-
this.hmStyle.flexGrow = Number(value)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
set _flexGrow (value: number) {
|
|
167
|
-
this.hmStyle.flexGrow = value
|
|
168
|
-
}
|
|
169
|
-
|
|
170
88
|
get flexShrink () {
|
|
171
89
|
return Number(this.hmStyle.flexShrink)
|
|
172
90
|
}
|
|
173
91
|
|
|
174
|
-
set flexShrink (value: number | string) {
|
|
175
|
-
this.hmStyle.flexShrink = Number(value)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
set _flexShrink (value: number) {
|
|
179
|
-
this.hmStyle.flexShrink = value
|
|
180
|
-
}
|
|
181
|
-
|
|
182
92
|
get alignSelf () {
|
|
183
93
|
return FlexManager.reverseItemAlign(this.hmStyle.alignSelf)
|
|
184
94
|
}
|
|
185
95
|
|
|
186
|
-
set alignSelf (value: string | number) {
|
|
187
|
-
this.hmStyle.alignSelf = FlexManager.itemAlign(value)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
set _alignSelf (value: ItemAlign) {
|
|
191
|
-
this.hmStyle.alignSelf = value
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
set _flexOptions (value) {
|
|
195
|
-
if (typeof value.direction !== 'undefined') {
|
|
196
|
-
this.hmStyle.direction = value.direction
|
|
197
|
-
}
|
|
198
|
-
if (typeof value.justifyContent !== 'undefined') {
|
|
199
|
-
this.hmStyle.justifyContent = value.justifyContent
|
|
200
|
-
}
|
|
201
|
-
if (typeof value.alignItems !== 'undefined') {
|
|
202
|
-
this.hmStyle.alignItems = value.alignItems
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
96
|
get flexDirection () {
|
|
207
|
-
return FlexManager.reverseDirection(this.hmStyle.
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
set flexDirection (value: string) {
|
|
211
|
-
this.hmStyle.direction = FlexManager.direction(value)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
set _direction (value: FlexDirection) {
|
|
215
|
-
this.hmStyle.direction = value
|
|
97
|
+
return FlexManager.reverseDirection(this.hmStyle.flexDirection)
|
|
216
98
|
}
|
|
217
99
|
|
|
218
100
|
get justifyContent () {
|
|
219
101
|
return FlexManager.reverseFlexAlign(this.hmStyle.justifyContent)
|
|
220
102
|
}
|
|
221
103
|
|
|
222
|
-
set justifyContent (value: string) {
|
|
223
|
-
this.hmStyle.justifyContent = FlexManager.flexAlign(value)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
set _justifyContent (value: FlexAlign) {
|
|
227
|
-
this.hmStyle.justifyContent = value
|
|
228
|
-
}
|
|
229
|
-
|
|
230
104
|
get alignItems () {
|
|
231
105
|
return FlexManager.reverseItemAlign(this.hmStyle.alignItems)
|
|
232
106
|
}
|
|
233
107
|
|
|
234
|
-
|
|
235
|
-
this.hmStyle.
|
|
108
|
+
get alignContent () {
|
|
109
|
+
return FlexManager.reverseFlexAlign(this.hmStyle.alignContent)
|
|
236
110
|
}
|
|
237
111
|
|
|
238
|
-
|
|
239
|
-
this.hmStyle.
|
|
112
|
+
get flexWrap () {
|
|
113
|
+
return FlexManager.reverseFlexWrap(this.hmStyle.flexWrap)
|
|
240
114
|
}
|
|
241
115
|
|
|
242
116
|
get width () {
|
|
243
117
|
return this.hmStyle.width
|
|
244
118
|
}
|
|
245
119
|
|
|
246
|
-
set width (value: string | number) {
|
|
247
|
-
this.hmStyle.width = getUnit(value)
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
set _width (value: Length) {
|
|
251
|
-
this.hmStyle.width = value
|
|
252
|
-
}
|
|
253
|
-
|
|
254
120
|
get height () {
|
|
255
121
|
return this.hmStyle.height
|
|
256
122
|
}
|
|
257
123
|
|
|
258
|
-
set height (value: string | number) {
|
|
259
|
-
this.hmStyle.height = getUnit(value)
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
set _height (value: Length) {
|
|
263
|
-
this.hmStyle.height = value
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
set _constraintSize(value: ConstraintSizeOptions) {
|
|
267
|
-
this.hmStyle.constraintSize = value
|
|
268
|
-
}
|
|
269
|
-
|
|
270
124
|
get minHeight () {
|
|
271
|
-
return this.hmStyle.
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
set minHeight (value: string | number) {
|
|
275
|
-
this._minHeight = getUnit(value)
|
|
125
|
+
return this.hmStyle.minHeight
|
|
276
126
|
}
|
|
277
127
|
|
|
278
128
|
get maxHeight () {
|
|
279
|
-
return this.hmStyle.
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
set maxHeight (value: string | number) {
|
|
283
|
-
this._maxHeight = getUnit(value)
|
|
129
|
+
return this.hmStyle.maxHeight
|
|
284
130
|
}
|
|
285
131
|
|
|
286
132
|
get minWidth () {
|
|
287
|
-
return this.hmStyle.
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
set minWidth (value: string | number) {
|
|
291
|
-
this._minWidth = getUnit(value)
|
|
133
|
+
return this.hmStyle.minWidth
|
|
292
134
|
}
|
|
293
135
|
|
|
294
136
|
get maxWidth () {
|
|
295
|
-
return this.hmStyle.
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
set maxWidth (value: string | number) {
|
|
299
|
-
this._maxWidth = getUnit(value)
|
|
137
|
+
return this.hmStyle.maxWidth
|
|
300
138
|
}
|
|
301
139
|
|
|
302
140
|
get background () {
|
|
303
141
|
return `${this.backgroundColor} ${this.backgroundImage} ${this.backgroundRepeat} ${this.backgroundSize}`.trim()
|
|
304
142
|
}
|
|
305
143
|
|
|
306
|
-
// TODO: 未实现
|
|
307
|
-
set background (value: string) {
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
set _background (value: TaroAny) {
|
|
312
|
-
const _backgroundImage: HarmonyType.Background.backgroundImage = value?.image?.[0]
|
|
313
|
-
if (_backgroundImage) {
|
|
314
|
-
this.hmStyle.backgroundImage = _backgroundImage.src
|
|
315
|
-
if (_backgroundImage.repeat) {
|
|
316
|
-
this.hmStyle.backgroundRepeat = _backgroundImage.repeat
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
this.hmStyle.backgroundImageSize = value?.size?.[0]
|
|
320
|
-
this.hmStyle.backgroundColor = this.hmStyle.backgroundImage ? null : value?.color
|
|
321
|
-
}
|
|
322
|
-
|
|
323
144
|
get backgroundColor () {
|
|
324
145
|
return this.hmStyle.backgroundColor
|
|
325
146
|
}
|
|
326
147
|
|
|
327
|
-
set backgroundColor (value: string) {
|
|
328
|
-
this.hmStyle.backgroundColor = value
|
|
329
|
-
}
|
|
330
|
-
|
|
331
148
|
get backgroundImage () {
|
|
332
149
|
return this.hmStyle.backgroundImage && `url(${this.hmStyle.backgroundImage})`
|
|
333
150
|
}
|
|
334
151
|
|
|
335
|
-
set backgroundImage (value: string) {
|
|
336
|
-
if (typeof value === 'string' && value.indexOf('url(') !== -1 && value.indexOf(')') !== -1) {
|
|
337
|
-
// 如果包含 url(),则说明是 background-image 属性
|
|
338
|
-
const match = value.match(new RegExp('url\\([\'"]?(.*?)[\'"]?\\)'))
|
|
339
|
-
if (match) {
|
|
340
|
-
this.hmStyle.backgroundImage = match[1]
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
152
|
get backgroundRepeat () {
|
|
346
153
|
if (this.hmStyle.backgroundRepeat) {
|
|
347
154
|
switch (this.hmStyle.backgroundRepeat) {
|
|
@@ -349,34 +156,33 @@ export default class StyleSheet {
|
|
|
349
156
|
case ImageRepeat.Y: return 'repeat-y'; break
|
|
350
157
|
case ImageRepeat.XY: return 'repeat'; break
|
|
351
158
|
case ImageRepeat.NoRepeat: return 'no-repeat'; break
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
set backgroundRepeat (value: string) {
|
|
357
|
-
if (typeof value === 'string') {
|
|
358
|
-
switch (value) {
|
|
359
|
-
case 'repeat-x': this.hmStyle.backgroundRepeat = ImageRepeat.X; break
|
|
360
|
-
case 'repeat-y': this.hmStyle.backgroundRepeat = ImageRepeat.Y; break
|
|
361
|
-
case 'no-repeat': this.hmStyle.backgroundRepeat = ImageRepeat.NoRepeat; break
|
|
362
|
-
default: this.hmStyle.backgroundRepeat = ImageRepeat.XY; break
|
|
363
159
|
}
|
|
364
160
|
}
|
|
365
161
|
}
|
|
366
162
|
|
|
367
163
|
get backgroundSize () {
|
|
368
164
|
if (this.hmStyle.backgroundImage) {
|
|
369
|
-
return [this.hmStyle.
|
|
165
|
+
return [this.hmStyle.backgroundSize.width, this.hmStyle.backgroundSize.height].join(' ')
|
|
370
166
|
}
|
|
371
167
|
}
|
|
372
168
|
|
|
373
|
-
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
169
|
+
get backgroundPosition () {
|
|
170
|
+
if (this.hmStyle.backgroundPosition) {
|
|
171
|
+
switch (this.hmStyle.backgroundPosition) {
|
|
172
|
+
case Alignment.TopStart: return 'left top'; break
|
|
173
|
+
case Alignment.Top: return 'center top'; break
|
|
174
|
+
case Alignment.TopEnd: return 'right top'; break
|
|
175
|
+
case Alignment.Start: return 'left center'; break
|
|
176
|
+
case Alignment.Center: return 'center center'; break
|
|
177
|
+
case Alignment.End: return 'right center'; break
|
|
178
|
+
case Alignment.BottomStart: return 'left bottom'; break
|
|
179
|
+
case Alignment.Bottom: return 'center bottom'; break
|
|
180
|
+
case Alignment.BottomEnd: return 'right bottom'; break
|
|
181
|
+
default: {
|
|
182
|
+
if (this.hmStyle.backgroundPosition) {
|
|
183
|
+
return [this.hmStyle.backgroundPosition, this.hmStyle.backgroundPosition.y].join(' ')
|
|
184
|
+
}
|
|
185
|
+
}
|
|
380
186
|
}
|
|
381
187
|
}
|
|
382
188
|
}
|
|
@@ -385,99 +191,100 @@ export default class StyleSheet {
|
|
|
385
191
|
return [this.borderWidth, this.borderStyle, this.bordercolor].join(' ')
|
|
386
192
|
}
|
|
387
193
|
|
|
388
|
-
set border (value: string) {
|
|
389
|
-
const [width, style, color] = value.split(' ')
|
|
390
|
-
this.hmStyle.borderWidth = getUnit(width)
|
|
391
|
-
this.hmStyle.borderStyle = BORDERhmStyleYLE_MAP.get(style)
|
|
392
|
-
this.hmStyle.borderColor = color
|
|
393
|
-
}
|
|
394
|
-
|
|
395
194
|
get borderWidth () {
|
|
396
195
|
return this.hmStyle.borderWidth
|
|
397
196
|
}
|
|
398
197
|
|
|
399
|
-
|
|
400
|
-
this.hmStyle.
|
|
198
|
+
get borderLeftWidth () {
|
|
199
|
+
return this.hmStyle.borderLeftWidth
|
|
401
200
|
}
|
|
402
201
|
|
|
403
|
-
|
|
404
|
-
this.hmStyle.
|
|
202
|
+
get borderRightWidth () {
|
|
203
|
+
return this.hmStyle.borderRightWidth
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
get borderTopWidth () {
|
|
207
|
+
return this.hmStyle.borderTopWidth
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
get borderBottomWidth () {
|
|
211
|
+
return this.hmStyle.borderBottomWidth
|
|
405
212
|
}
|
|
406
213
|
|
|
407
214
|
get borderColor () {
|
|
408
215
|
return this.hmStyle.borderColor
|
|
409
216
|
}
|
|
410
217
|
|
|
411
|
-
|
|
412
|
-
this.hmStyle.
|
|
218
|
+
get borderLeftColor () {
|
|
219
|
+
return this.hmStyle.borderLeftColor
|
|
413
220
|
}
|
|
414
221
|
|
|
415
|
-
|
|
416
|
-
this.hmStyle.
|
|
222
|
+
get borderRightColor () {
|
|
223
|
+
return this.hmStyle.borderRightColor
|
|
417
224
|
}
|
|
418
225
|
|
|
419
|
-
get
|
|
420
|
-
return
|
|
226
|
+
get borderTopColor () {
|
|
227
|
+
return this.hmStyle.borderTopColor
|
|
421
228
|
}
|
|
422
229
|
|
|
423
|
-
|
|
424
|
-
this.hmStyle.
|
|
230
|
+
get borderBottomColor () {
|
|
231
|
+
return this.hmStyle.borderBottomColor
|
|
425
232
|
}
|
|
426
233
|
|
|
427
|
-
|
|
428
|
-
this.hmStyle.borderStyle
|
|
234
|
+
get borderStyle () {
|
|
235
|
+
return BORDER_STYLE_MAP.reverse(this.hmStyle.borderStyle)
|
|
429
236
|
}
|
|
430
|
-
|
|
431
|
-
get
|
|
432
|
-
return this.hmStyle.
|
|
237
|
+
|
|
238
|
+
get borderLeftStyle () {
|
|
239
|
+
return BORDER_STYLE_MAP.reverse(this.hmStyle.borderLeftStyle)
|
|
433
240
|
}
|
|
434
241
|
|
|
435
|
-
|
|
436
|
-
this.hmStyle.
|
|
242
|
+
get borderRightStyle () {
|
|
243
|
+
return BORDER_STYLE_MAP.reverse(this.hmStyle.borderRightStyle)
|
|
437
244
|
}
|
|
438
245
|
|
|
439
|
-
|
|
440
|
-
this.hmStyle.
|
|
246
|
+
get borderTopStyle () {
|
|
247
|
+
return BORDER_STYLE_MAP.reverse(this.hmStyle.borderTopStyle)
|
|
441
248
|
}
|
|
442
249
|
|
|
443
|
-
get
|
|
444
|
-
return
|
|
250
|
+
get borderBottomStyle () {
|
|
251
|
+
return BORDER_STYLE_MAP.reverse(this.hmStyle.borderBottomStyle)
|
|
445
252
|
}
|
|
446
253
|
|
|
447
|
-
|
|
448
|
-
this.hmStyle.
|
|
254
|
+
get borderRadius () {
|
|
255
|
+
return this.hmStyle.borderRadius
|
|
449
256
|
}
|
|
450
257
|
|
|
451
|
-
get
|
|
452
|
-
return this.hmStyle.
|
|
258
|
+
get borderTopLeftRadius () {
|
|
259
|
+
return this.hmStyle.borderTopLeftRadius
|
|
453
260
|
}
|
|
454
261
|
|
|
455
|
-
|
|
456
|
-
this.hmStyle.
|
|
262
|
+
get borderTopRightRadius () {
|
|
263
|
+
return this.hmStyle.borderTopRightRadius
|
|
457
264
|
}
|
|
458
265
|
|
|
459
|
-
get
|
|
460
|
-
return this.hmStyle.
|
|
266
|
+
get borderBottomLeftRadius () {
|
|
267
|
+
return this.hmStyle.borderBottomLeftRadius
|
|
461
268
|
}
|
|
462
269
|
|
|
463
|
-
|
|
464
|
-
this.hmStyle.
|
|
270
|
+
get borderBottomRightRadius () {
|
|
271
|
+
return this.hmStyle.borderBottomRightRadius
|
|
465
272
|
}
|
|
466
273
|
|
|
467
|
-
|
|
468
|
-
this.hmStyle.
|
|
274
|
+
get zIndex () {
|
|
275
|
+
return this.hmStyle.zIndex
|
|
469
276
|
}
|
|
470
277
|
|
|
471
|
-
get
|
|
472
|
-
return
|
|
278
|
+
get opacity () {
|
|
279
|
+
return this.hmStyle.opacity
|
|
473
280
|
}
|
|
474
281
|
|
|
475
|
-
|
|
476
|
-
this.hmStyle.
|
|
282
|
+
get overflow () {
|
|
283
|
+
return this.hmStyle.overflow ? 'hidden' : 'visible'
|
|
477
284
|
}
|
|
478
285
|
|
|
479
|
-
|
|
480
|
-
this.hmStyle.focus
|
|
286
|
+
get focus () {
|
|
287
|
+
return !!this.hmStyle.focus
|
|
481
288
|
}
|
|
482
289
|
|
|
483
290
|
// 文本相关
|
|
@@ -485,50 +292,26 @@ export default class StyleSheet {
|
|
|
485
292
|
return this.hmStyle.color
|
|
486
293
|
}
|
|
487
294
|
|
|
488
|
-
set color (value: string) {
|
|
489
|
-
this.hmStyle.color = value
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
set _color (value: ResourceColor) {
|
|
493
|
-
this.hmStyle.color = value
|
|
494
|
-
}
|
|
495
|
-
|
|
496
295
|
get fontSize () {
|
|
497
296
|
return this.hmStyle.fontSize
|
|
498
297
|
}
|
|
499
298
|
|
|
500
|
-
set fontSize (value: string) {
|
|
501
|
-
this.hmStyle.fontSize = getUnit(value)
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
set _fontSize (value: number | string | Resource) {
|
|
505
|
-
this.hmStyle.fontSize = value
|
|
506
|
-
}
|
|
507
|
-
|
|
508
299
|
get fontWeight () {
|
|
509
300
|
return this.hmStyle.fontWeight
|
|
510
301
|
}
|
|
511
302
|
|
|
512
|
-
|
|
513
|
-
this.hmStyle.
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
303
|
+
get fontStyle () {
|
|
304
|
+
switch (this.hmStyle.fontStyle) {
|
|
305
|
+
case FontStyle.Italic: return 'italic'; break
|
|
306
|
+
case FontStyle.Normal: return 'normal'; break
|
|
307
|
+
default: return ''
|
|
308
|
+
}
|
|
518
309
|
}
|
|
519
310
|
|
|
520
311
|
get fontFamily () {
|
|
521
312
|
return this.hmStyle.fontFamily
|
|
522
313
|
}
|
|
523
314
|
|
|
524
|
-
set fontFamily (value: string) {
|
|
525
|
-
this.hmStyle.fontFamily = value
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
set _fontFamily (value: string | Resource) {
|
|
529
|
-
this.hmStyle.fontFamily = value
|
|
530
|
-
}
|
|
531
|
-
|
|
532
315
|
get textAlign () {
|
|
533
316
|
switch (this.hmStyle.textAlign) {
|
|
534
317
|
case TextAlign.End: return 'right'; break
|
|
@@ -538,68 +321,34 @@ export default class StyleSheet {
|
|
|
538
321
|
}
|
|
539
322
|
}
|
|
540
323
|
|
|
541
|
-
|
|
542
|
-
switch (
|
|
543
|
-
case '
|
|
544
|
-
|
|
545
|
-
case '
|
|
546
|
-
|
|
547
|
-
default:
|
|
548
|
-
return TextAlign.Start
|
|
324
|
+
get verticalAlign() {
|
|
325
|
+
switch (this.hmStyle.verticalAlign) {
|
|
326
|
+
case Alignment.Center: return 'middle'; break
|
|
327
|
+
case Alignment.Top: return 'top'; break
|
|
328
|
+
case Alignment.Bottom: return 'bottom'; break
|
|
329
|
+
default: return ''
|
|
549
330
|
}
|
|
550
331
|
}
|
|
551
332
|
|
|
552
|
-
set _textAlign (value: TextAlign) {
|
|
553
|
-
this.hmStyle.textAlign = value
|
|
554
|
-
}
|
|
555
|
-
|
|
556
333
|
get lineHeight () {
|
|
557
334
|
return this.hmStyle.lineHeight
|
|
558
335
|
}
|
|
559
336
|
|
|
560
|
-
set lineHeight (value: string) {
|
|
561
|
-
this.hmStyle.lineHeight = getUnit(value)
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
set _lineHeight (value: string | number | Resource) {
|
|
565
|
-
this.hmStyle.lineHeight = value
|
|
566
|
-
}
|
|
567
|
-
|
|
568
337
|
get letterSpacing () {
|
|
569
338
|
return this.hmStyle.letterSpacing
|
|
570
339
|
}
|
|
571
340
|
|
|
572
|
-
set letterSpacing (value: string) {
|
|
573
|
-
this.hmStyle.letterSpacing = getUnit(value)
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
set _letterSpacing (value: number | string) {
|
|
577
|
-
this.hmStyle.letterSpacing = value
|
|
578
|
-
}
|
|
579
|
-
|
|
580
341
|
get textDecoration () {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
set textDecoration (value: string) {
|
|
591
|
-
if (typeof value === 'string') {
|
|
592
|
-
switch (value) {
|
|
593
|
-
case 'underline': this.hmStyle.decoration = TextDecorationType.Underline; break
|
|
594
|
-
case 'overline': this.hmStyle.decoration = TextDecorationType.Overline; break
|
|
595
|
-
case 'line-through': this.hmStyle.decoration = TextDecorationType.LineThrough; break
|
|
596
|
-
default: this.hmStyle.decoration = TextDecorationType.None; break
|
|
342
|
+
if (this.hmStyle.textDecoration) {
|
|
343
|
+
switch (this.hmStyle.textDecoration.type) {
|
|
344
|
+
case TextDecorationType.Underline: return 'underline'; break
|
|
345
|
+
case TextDecorationType.Overline: return 'overline'; break
|
|
346
|
+
case TextDecorationType.LineThrough: return 'line-through'; break
|
|
347
|
+
case TextDecorationType.None: return 'none'; break
|
|
348
|
+
default: return ''
|
|
597
349
|
}
|
|
598
350
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
set _textDecoration (value: TextDecorationType) {
|
|
602
|
-
this.hmStyle.decoration = value
|
|
351
|
+
return ''
|
|
603
352
|
}
|
|
604
353
|
|
|
605
354
|
get textOverflow () {
|
|
@@ -613,75 +362,19 @@ export default class StyleSheet {
|
|
|
613
362
|
}
|
|
614
363
|
}
|
|
615
364
|
|
|
616
|
-
set textOverflow (value: string) {
|
|
617
|
-
if (typeof value === 'string') {
|
|
618
|
-
let overflow = TextOverflow.None
|
|
619
|
-
switch (value) {
|
|
620
|
-
case 'clip': overflow = TextOverflow.Clip; break
|
|
621
|
-
case 'ellipsis': overflow = TextOverflow.Ellipsis; break
|
|
622
|
-
case 'marquee': overflow = TextOverflow.MARQUEE; break
|
|
623
|
-
}
|
|
624
|
-
this.hmStyle.textOverflow = {
|
|
625
|
-
overflow
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
set _textOverflow (value: TextOverflow) {
|
|
631
|
-
this.hmStyle.textOverflow = value
|
|
632
|
-
}
|
|
633
|
-
|
|
634
365
|
get WebkitLineClamp () {
|
|
635
|
-
return Number(this.hmStyle.
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
set WebkitLineClamp (value: string | number) {
|
|
639
|
-
this.hmStyle.maxLines = Number(value)
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
set _WebkitLineClamp (value: number) {
|
|
643
|
-
this.hmStyle.maxLines = value
|
|
366
|
+
return Number(this.hmStyle.WebkitLineClamp)
|
|
644
367
|
}
|
|
645
368
|
|
|
646
|
-
// TODO: 未实现转换为w3c
|
|
647
|
-
get linearGradient (): HarmonyType.LinearGradient {
|
|
648
|
-
return this.hmStyle.linearGradient
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
set _linearGradient (value: HarmonyType.LinearGradient[]) {
|
|
652
|
-
this.hmStyle.linearGradient = value?.[0]
|
|
653
|
-
}
|
|
654
|
-
|
|
655
369
|
get transform () {
|
|
656
370
|
return this.hmStyle.transform
|
|
657
371
|
}
|
|
658
372
|
|
|
659
|
-
|
|
660
|
-
this.hmStyle.
|
|
373
|
+
get transformOrigin () {
|
|
374
|
+
return this.hmStyle.transformOrigin
|
|
661
375
|
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
class BORDERhmStyleYLE_MAP {
|
|
666
|
-
static solid = BorderStyle.Solid
|
|
667
|
-
static dotted = BorderStyle.Dotted
|
|
668
|
-
static dashed = BorderStyle.Dashed
|
|
669
376
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
case 'dotted': return BorderStyle.Dotted
|
|
673
|
-
case 'dashed': return BorderStyle.Dashed
|
|
674
|
-
default: return BorderStyle.Solid
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
static reverse(type: BorderStyle): string {
|
|
679
|
-
switch (type) {
|
|
680
|
-
case BorderStyle.Dotted: return 'dotted'
|
|
681
|
-
case BorderStyle.Dashed: return 'dashed'
|
|
682
|
-
case BorderStyle.Solid: return 'solid'
|
|
683
|
-
default: return ''
|
|
684
|
-
}
|
|
685
|
-
|
|
377
|
+
get content () {
|
|
378
|
+
return this.hmStyle._content
|
|
686
379
|
}
|
|
687
380
|
}
|