@shijiu/jsview-vue 0.9.287 → 0.9.289-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.
@@ -3,10 +3,10 @@
3
3
  */
4
4
 
5
5
  const TargetRevision = {
6
- "CoreRevision": 810895,
7
- "JseRevision": "1.0.772",
6
+ "CoreRevision": 810953,
7
+ "JseRevision": "1.0.774",
8
8
  "JseUrl":
9
- "http://cdn.release.qcast.cn/forge_js/master/JsViewES6_react_r772.jsv.91a55796.js"
9
+ "http://cdn.release.qcast.cn/forge_js/master/JsViewES6_react_r774.jsv.dfae49bd.js"
10
10
  };
11
11
 
12
12
  // 不要用export default,update-env脚本不能解析
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shijiu/jsview-vue",
3
- "version": "0.9.287",
3
+ "version": "0.9.289-alpha.0",
4
4
  "bin": {
5
5
  "jsview-post-build": "./scripts/jsview-post-build.js",
6
6
  "jsview-post-install": "./scripts/jsview-post-install.js",
@@ -48,12 +48,14 @@ export default {
48
48
  );
49
49
 
50
50
  // 更新宽高
51
- this.jsvMainView.ResetLayoutParams({
52
- width: this.style.width,
53
- height: this.style.height,
54
- });
51
+ if(typeof this.jsvMainView!="undefined" && this.jsvMainView){
52
+ this.jsvMainView.ResetLayoutParams({
53
+ width: this.style.width,
54
+ height: this.style.height,
55
+ });
55
56
 
56
- this.getId?.(this.jsvMainView?.GetTrackId());
57
+ this.getId?.(this.jsvMainView?.GetTrackId());
58
+ }
57
59
  },
58
60
  beforeUnmount() {
59
61
  if(this.isBrowserDebug) {
@@ -69,10 +71,12 @@ export default {
69
71
  },
70
72
  updated() {
71
73
  // 更新宽高
72
- this.jsvMainView.ResetLayoutParams({
73
- width: this.style.width,
74
- height: this.style.height,
75
- });
74
+ if(typeof this.jsvMainView!="undefined" && this.jsvMainView){
75
+ this.jsvMainView.ResetLayoutParams({
76
+ width: this.style.width,
77
+ height: this.style.height,
78
+ });
79
+ }
76
80
  }
77
81
  };
78
82
  </script>
@@ -84,7 +88,7 @@ export default {
84
88
  >
85
89
  <slot/>
86
90
  </div> <div v-else
87
- :style="{...style, backgroundColor: '#000000'}"
91
+ :style="{...style}"
88
92
  >
89
93
  <slot/>
90
94
  </div>
@@ -0,0 +1,19 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2021-12-27 10:02:13
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2021-12-31 11:03:18
6
+ * @Description: file content
7
+ -->
8
+ <script>
9
+ export default {
10
+ //不让根元素继承style,以导致多画一个图片。同时注意slot和div的位置
11
+ inheritAttrs: false,
12
+ };
13
+ </script>
14
+ <template>
15
+ <div>
16
+ <slot></slot>
17
+ <div jsv_enable_fade="true" jsv_poster_on_top="true" v-bind="$attrs" />
18
+ </div>
19
+ </template>
@@ -0,0 +1,31 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2021-12-27 10:02:20
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2021-12-27 10:07:25
6
+ * @Description: file content
7
+ -->
8
+ <script>
9
+ export default {
10
+ props: {
11
+ colorSpace: {
12
+ type: String,
13
+ default: "RGBA_8888",
14
+ },
15
+ },
16
+ inheritAttrs: false,
17
+ };
18
+ </script>
19
+
20
+ <template>
21
+ <div>
22
+ <slot></slot>
23
+ <img
24
+ jsv_enable_fade="true"
25
+ jsv_poster_on_top="true"
26
+ jsv_img_scaledown_tex="true"
27
+ :jsv_img_color_space="{ colorSpace }"
28
+ v-bind="$attrs"
29
+ />
30
+ </div>
31
+ </template>
@@ -263,7 +263,6 @@ export default {
263
263
  if (!state) return;
264
264
  }
265
265
  if (this.$props.onDownloadDone) {
266
- console.log("zhang $props downloadStateList =",this.downloadStateList)
267
266
  this.$props.onDownloadDone(this.downloadStateList);
268
267
  }
269
268
  },
@@ -286,12 +285,13 @@ export default {
286
285
  "Error:format mismatch, data should comes from function buildDownloadInfo()"
287
286
  );
288
287
  }
288
+ console.log(`OnDownload get${index} url=${item.url}`)
289
289
  const base_url = item.url;
290
290
  let image_url = base_url;
291
291
  if (base_url && base_url.indexOf("http") < 0) {
292
292
  // 包含http和https两种请求
293
- if (window.JsView.React.UrlRef) {
294
- image_url = new window.JsView.React.UrlRef(base_url).href;
293
+ if (window.JsView.Dom.UrlRef) {
294
+ image_url = new window.JsView.Dom.UrlRef(base_url).href;
295
295
  }
296
296
  }
297
297
  const texture =
@@ -303,7 +303,7 @@ export default {
303
303
  return;
304
304
  }
305
305
  const callback_token = texture.RegisterLoadImageCallback(null, (texture_info) => {
306
- console.log("zhang texture_info =",texture_info);
306
+ console.log(`OnDownload done index${index}`)
307
307
  this.downloadStateList[index] = texture_info.extra.absolutePath;
308
308
  this._checkDownload();
309
309
  });
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-11-23 09:42:26
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-12-02 15:47:26
5
+ * @LastEditTime: 2022-01-04 16:42:36
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
@@ -233,7 +233,7 @@ export default {
233
233
  this.timeoutHandler = -1;
234
234
  },
235
235
  startAutoplay() {
236
- if (this.autoplayInterval > 0) {
236
+ if (this.autoplayInterval > 0 && this.totalFrame > 1) {
237
237
  if (this.timeoutHandler > 0) {
238
238
  clearTimeout(this.timeoutHandler);
239
239
  }
@@ -360,6 +360,7 @@ export default {
360
360
  }
361
361
  },
362
362
  _trigger(direction) {
363
+ if (this.totalFrame <= 1) return;
363
364
  this.preOffset = this.offset;
364
365
  this.offset += direction;
365
366
  this._startAnimation();
@@ -385,7 +386,16 @@ export default {
385
386
  onKeyDown: _onKeyDown,
386
387
  }"
387
388
  >
389
+ <div v-if="totalFrame == 1">
390
+ <slot
391
+ name="itemView"
392
+ :currentIndex="0"
393
+ :dataIndex="0"
394
+ :focused="focused"
395
+ ></slot>
396
+ </div>
388
397
  <div
398
+ v-else
389
399
  :style="{
390
400
  width: layoutInfo.width,
391
401
  height: layoutInfo.height,