@dolphinweex/weex-harmony 0.1.55 → 0.1.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/package.json
CHANGED
@@ -53,7 +53,6 @@ export default {
|
|
53
53
|
startX: 0,
|
54
54
|
startY: 0,
|
55
55
|
isHorizontalScroll: false,
|
56
|
-
embedId: `embed_${this._uid}`, // 使用Vue实例的唯一ID来生成embed元素的唯一ID
|
57
56
|
};
|
58
57
|
},
|
59
58
|
computed: {
|
@@ -70,6 +69,7 @@ export default {
|
|
70
69
|
}
|
71
70
|
},
|
72
71
|
created() {
|
72
|
+
this.embedId = `embedId_${this._uid}_${this.generateNaiveId()}`
|
73
73
|
console.log("[sameLayerRendering] web component created.");
|
74
74
|
weexModule.callNative("transferSameLayerArgs", {
|
75
75
|
componentId: this.embedId,
|
@@ -85,6 +85,9 @@ export default {
|
|
85
85
|
this.removeTouchEvent();
|
86
86
|
},
|
87
87
|
methods: {
|
88
|
+
generateNaiveId() {
|
89
|
+
return Date.now().toString(36) + Math.random().toString(36).substring(2);
|
90
|
+
},
|
88
91
|
// 记录起始触摸位置
|
89
92
|
handleTouchStart(e) {
|
90
93
|
this.startX = e.changedTouches[0].clientX;
|
@@ -55,6 +55,10 @@ export default {
|
|
55
55
|
type: Boolean,
|
56
56
|
default: true,
|
57
57
|
},
|
58
|
+
load: {
|
59
|
+
type: Function,
|
60
|
+
default: ()=>{},
|
61
|
+
},
|
58
62
|
},
|
59
63
|
computed: {
|
60
64
|
hosSameLayerArgs() {
|
@@ -68,6 +72,7 @@ export default {
|
|
68
72
|
repeatCount: this.repeatCount,
|
69
73
|
progress: this.progress,
|
70
74
|
autoPlay: this.autoPlay,
|
75
|
+
load: this.load
|
71
76
|
};
|
72
77
|
},
|
73
78
|
},
|
@@ -77,6 +82,9 @@ export default {
|
|
77
82
|
},
|
78
83
|
|
79
84
|
methods: {
|
85
|
+
load(){
|
86
|
+
this.$emit("load");
|
87
|
+
},
|
80
88
|
// 自定义拓展其它逻辑
|
81
89
|
handleOnChange(res) {
|
82
90
|
if (res.mode == 1) {
|