@shijiu/jsview-vue 0.9.352-alpha.0 → 0.9.359-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/dom/target_core_revision.js +3 -3
- package/package.json +1 -1
- package/scripts/jsview-post-build.js +9 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +16 -0
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +9 -1
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +5 -2
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -2
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
const TargetRevision = {
|
|
6
|
-
"CoreRevision":
|
|
7
|
-
"JseRevision": "1.0.
|
|
6
|
+
"CoreRevision": 810983,
|
|
7
|
+
"JseRevision": "1.0.776",
|
|
8
8
|
"JseUrl":
|
|
9
|
-
"http://cdn.release.qcast.cn/forge_js/master/
|
|
9
|
+
"http://cdn.release.qcast.cn/forge_js/master/JsViewES6_react_r776.jsv.1ac51031.js"
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// 不要用export default,update-env脚本不能解析
|
package/package.json
CHANGED
|
@@ -117,6 +117,15 @@ function main() {
|
|
|
117
117
|
options.distDir = path.resolve(options.projectDir, "dist");
|
|
118
118
|
options.appConfigDir = path.resolve(options.projectDir, "src/appConfig");
|
|
119
119
|
|
|
120
|
+
|
|
121
|
+
vueConfigFile = path.resolve(options.projectDir, 'vue.config.js');
|
|
122
|
+
if (fs.existsSync(vueConfigFile)) {
|
|
123
|
+
vueCfgObj = require(vueConfigFile);
|
|
124
|
+
if(vueCfgObj.outputDir) {
|
|
125
|
+
options.distDir = path.resolve(options.projectDir, vueCfgObj.outputDir);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
120
129
|
console.info('Signing JsView App...');
|
|
121
130
|
console.info();
|
|
122
131
|
signApp(options);
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
setup() {
|
|
11
11
|
return {
|
|
12
12
|
preloadResultMap: {},
|
|
13
|
+
unmountStatus: {unmount:false}
|
|
13
14
|
};
|
|
14
15
|
},
|
|
15
16
|
data() {
|
|
@@ -42,7 +43,13 @@ export default {
|
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
const image = new Image();
|
|
46
|
+
const unmount_track = this.unmountStatus;
|
|
45
47
|
image.onload = () => {
|
|
48
|
+
if (unmount_track.unmount) {
|
|
49
|
+
// 子组件已经卸载不再回调
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
this.preloadResultMap[item.url] = {
|
|
47
54
|
width: image.width,
|
|
48
55
|
height: image.height,
|
|
@@ -76,7 +83,13 @@ export default {
|
|
|
76
83
|
return null;
|
|
77
84
|
}
|
|
78
85
|
const image = new Image();
|
|
86
|
+
const unmount_track = this.unmountStatus;
|
|
79
87
|
image.onload = () => {
|
|
88
|
+
if (unmount_track.unmount) {
|
|
89
|
+
// 子组件已经卸载不再回调
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
80
93
|
this.downloadStateList[index] = true;
|
|
81
94
|
console.log(`pre download succeed ${item.url}`);
|
|
82
95
|
if (this.onDownloadDone) {
|
|
@@ -93,6 +106,9 @@ export default {
|
|
|
93
106
|
});
|
|
94
107
|
},
|
|
95
108
|
},
|
|
109
|
+
beforeUnmount() {
|
|
110
|
+
this.unmountStatus.unmount = true;
|
|
111
|
+
}
|
|
96
112
|
};
|
|
97
113
|
</script>
|
|
98
114
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* JsvNativeSharedDiv:创建一个Native端可以跟进显示位置的div,用于Native端外挂插件的开发
|
|
4
4
|
* style {Object} 布局样式(必须),必须包含的信息为{left, top, width, height}
|
|
5
5
|
* getId {function} 回调函数,用于接收ID信息,ID信息用于Native端对该view进行跟踪的标识
|
|
6
|
+
* setId {String} 给定命名ID,避免同进程不同context重名要和Context相关,
|
|
7
|
+
* 例如`${window.JsView?.getJsContextId()}_${you_name}`
|
|
6
8
|
-->
|
|
7
9
|
|
|
8
10
|
<script>
|
|
@@ -15,6 +17,7 @@ export default {
|
|
|
15
17
|
default: () => { return {} }
|
|
16
18
|
},
|
|
17
19
|
getId: Function,
|
|
20
|
+
setId: String,
|
|
18
21
|
},
|
|
19
22
|
setup() {
|
|
20
23
|
return {
|
|
@@ -54,7 +57,12 @@ export default {
|
|
|
54
57
|
height: this.style.height,
|
|
55
58
|
});
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
if (this.setId) {
|
|
61
|
+
// 使用设置进来的track id,而非自动生成
|
|
62
|
+
this.jsvMainView.SetTrackId();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
this.getId?.(this.jsvMainView.GetTrackId());
|
|
58
66
|
}
|
|
59
67
|
},
|
|
60
68
|
beforeUnmount() {
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
* 【模块 export 内容】
|
|
3
3
|
* JsvPreload:Vue高阶组件,图片预加载的控件
|
|
4
4
|
* preloadList {ObjectArray}: 预加载的信息列表,单个内容通过buildPreloadInfo构建
|
|
5
|
+
* 列表中的图片会被进行下载,解码并将解码结果存储在内存中,内存占用的周期同JsvPreload组件声明周期
|
|
5
6
|
* downloadList {ObjectArray}: 预下载的信息列表,单个内容通过buildDownloadInfo构建
|
|
7
|
+
* 列表的内容可以是图片,音频等任何网络资源,下载后缓存在本地,归入本地缓存管理(LRU清理策略)
|
|
6
8
|
* onPreloading {Function(float percent)}: 预加载中回调,返回预加载进度
|
|
7
|
-
* onPreloadDone {Function(
|
|
8
|
-
* onDownloadDone {Function(
|
|
9
|
+
* onPreloadDone {Function(sizeArray)}: 预加载完成回调,sizeArray(格式Object[]),每个的格式为{width, height}
|
|
10
|
+
* onDownloadDone {Function(pathesArray)}: 预下载完成回调,pathesArray(格式为String[])为下载好回调的地址,
|
|
11
|
+
* 其中pathesArray为存储位置的路径列表
|
|
9
12
|
*
|
|
10
13
|
* 注意事项:
|
|
11
14
|
* 指定加载时的尺寸(0为不指定),与img标签中的 jsv_img_scaledown_tex 属性一起使用
|
|
@@ -18,13 +18,13 @@ import { Forge, ForgeExtension } from "../../../dom/jsv-forge-define";
|
|
|
18
18
|
* borderRadius {string} view的圆角设置
|
|
19
19
|
* animation {string} texture的动画, 为keyframe的格式
|
|
20
20
|
* duration {number} 动画时长, 毫秒
|
|
21
|
-
* transform {string} texture的transform, 计算时transform矩阵在动画矩阵右侧
|
|
22
|
-
* transformOrigin {string} transform的锚点
|
|
23
21
|
* onAnimationEnd {function} 动画结束回调
|
|
24
22
|
* repeat {number} 动画执行次数, 默认1次, -1为无限循环
|
|
25
23
|
* delay {number} 动画延迟时间, 毫秒
|
|
26
24
|
* easing {string} 动画曲线, 默认linear
|
|
27
25
|
* autoStart {boolean} 是否自动开始动画, 默认 false
|
|
26
|
+
* transform {string} texture的transform, 计算时transform矩阵在动画矩阵右侧
|
|
27
|
+
* transformOrigin {string} transform的锚点, 锚点不设置的话默认为中心点(0.5, 0.5)
|
|
28
28
|
*
|
|
29
29
|
* public methods:
|
|
30
30
|
* start
|