@tarojs/plugin-platform-harmony-ets 4.0.0-beta.56 → 4.0.0-beta.57
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/wxml/selectorQuery.ts +7 -3
- package/dist/components-harmony-ets/image.ets +7 -0
- package/dist/components-harmony-ets/style.ets +4 -4
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +3 -3
- package/dist/runtime-utils.js +5 -2
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +5 -2
- package/dist/runtime.js.map +1 -1
- package/package.json +9 -9
|
@@ -112,7 +112,7 @@ function filter (fields, dom) {
|
|
|
112
112
|
return res
|
|
113
113
|
}
|
|
114
114
|
if (context) {
|
|
115
|
-
// TODO: 暂未实现获取
|
|
115
|
+
// TODO: 暂未实现获取 context
|
|
116
116
|
// const typeName = dom.type
|
|
117
117
|
// if (/^video/i.test(typeName)) {
|
|
118
118
|
// return { context: dom }
|
|
@@ -179,9 +179,13 @@ function filter (fields, dom) {
|
|
|
179
179
|
|
|
180
180
|
function querySelector (selector, selectAll) {
|
|
181
181
|
if (typeof selector === 'string') {
|
|
182
|
-
return
|
|
182
|
+
return selector.split(',').reduce((prev, current) => {
|
|
183
|
+
const item = current.trim()
|
|
184
|
+
|
|
185
|
+
return prev.concat(parseHandler(item, selectAll))
|
|
186
|
+
}, [])
|
|
183
187
|
}
|
|
184
|
-
return
|
|
188
|
+
return []
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
function queryBat (queue, cb) {
|
|
@@ -39,5 +39,12 @@ export default struct TaroImage {
|
|
|
39
39
|
.attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
|
|
40
40
|
.onComplete(e => eventHandler(e, 'complete', this.node))
|
|
41
41
|
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
42
|
+
// TODO: 临时改为申明式,后续等鸿蒙修复modify设置失败的bug后删除该申明
|
|
43
|
+
.borderRadius({
|
|
44
|
+
topLeft: this.node._st.hmStyle.borderTopLeftRadius,
|
|
45
|
+
topRight: this.node._st.hmStyle.borderTopRightRadius,
|
|
46
|
+
bottomLeft: this.node._st.hmStyle.borderBottomLeftRadius,
|
|
47
|
+
bottomRight: this.node._st.hmStyle.borderBottomRightRadius
|
|
48
|
+
})
|
|
42
49
|
}
|
|
43
50
|
}
|
|
@@ -170,15 +170,15 @@ export function setTransformAttributeIntoInstance(instance: CommonAttribute, sty
|
|
|
170
170
|
x: style.transform?.Scale?.x,
|
|
171
171
|
y: style.transform?.Scale?.y,
|
|
172
172
|
z: style.transform?.Scale?.z,
|
|
173
|
-
centerX: style.transformOrigin?.x
|
|
174
|
-
centerY: style.transformOrigin?.y
|
|
173
|
+
centerX: style.transformOrigin?.x,
|
|
174
|
+
centerY: style.transformOrigin?.y,
|
|
175
175
|
})
|
|
176
176
|
instance.rotate({
|
|
177
177
|
x: style.transform?.Rotate?.x,
|
|
178
178
|
y: style.transform?.Rotate?.y,
|
|
179
179
|
z: style.transform?.Rotate?.z,
|
|
180
|
-
centerX: style.transformOrigin?.x
|
|
181
|
-
centerY: style.transformOrigin?.y
|
|
180
|
+
centerX: style.transformOrigin?.x,
|
|
181
|
+
centerY: style.transformOrigin?.y,
|
|
182
182
|
angle: style.transform?.Rotate?.angle || 0,
|
|
183
183
|
})
|
|
184
184
|
}
|
|
@@ -23,10 +23,10 @@ class CSSStyleDeclaration {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
public set cssText (value: string) {
|
|
26
|
+
// 复制,防止被篡改到attr上的原始内容
|
|
27
|
+
this._st.hmStyle = Object.assign({}, this.el._attrs?.__hmStyle) || {}
|
|
26
28
|
if (value === '' || value === undefined || value === null) {
|
|
27
|
-
//
|
|
28
|
-
// this.el._st = {}
|
|
29
|
-
this._st.hmStyle = {}
|
|
29
|
+
// 清空style,只保留class的样式
|
|
30
30
|
return
|
|
31
31
|
}
|
|
32
32
|
|
package/dist/runtime-utils.js
CHANGED
|
@@ -4340,9 +4340,12 @@ function filter(fields, dom) {
|
|
|
4340
4340
|
}
|
|
4341
4341
|
function querySelector(selector, selectAll) {
|
|
4342
4342
|
if (typeof selector === 'string') {
|
|
4343
|
-
return
|
|
4343
|
+
return selector.split(',').reduce((prev, current) => {
|
|
4344
|
+
const item = current.trim();
|
|
4345
|
+
return prev.concat(parseHandler(item, selectAll));
|
|
4346
|
+
}, []);
|
|
4344
4347
|
}
|
|
4345
|
-
return
|
|
4348
|
+
return [];
|
|
4346
4349
|
}
|
|
4347
4350
|
function queryBat(queue, cb) {
|
|
4348
4351
|
const result = [];
|