@shijiu/jsview-vue 0.9.490 → 0.9.500

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.
@@ -8,25 +8,38 @@ export default {
8
8
  playerType: {type: Number, default: 1}, // PC 模拟时,不对接本功能
9
9
  background: {type: Boolean, default: true}, // PC 模拟时,不对接本功能
10
10
  },
11
+ setup() {
12
+ return {
13
+ VideoRef: null
14
+ };
15
+ },
11
16
  methods: {
12
17
  onRefProxy(video_ref) {
13
- if (video_ref) {
14
- // 补充插件扩展出来的接口
15
- for (let method_name in playerExMethods) {
16
- video_ref[method_name] = playerExMethods[method_name].bind(video_ref);
17
- }
18
- } else {
19
- // video_ref为null,代表video标签卸载处理
20
- }
18
+ this.VideoRef = video_ref;
21
19
 
22
- // 将修改好的video回调返回给使用者
23
- if (this.onRef) {
24
- this.onRef(video_ref);
25
- }
20
+ // 不在此直接回调 onRef,因为onRefProxy可能会因为 .src的设置导致重新触发一次调用(vue本身问题)
21
+ // 参照vue-core处理的 componentUpdateFn处理, onMounted 一次, src设置后会再次 onPatch 一次
26
22
  }
27
23
  },
28
24
  mounted() {
25
+ if (this.VideoRef && this.onRef) {
26
+ let video_ref = this.VideoRef;
27
+ this.VideoRef = null;
28
+
29
+ // 补充插件扩展出来的接口
30
+ for (let method_name in playerExMethods) {
31
+ video_ref[method_name] = playerExMethods[method_name].bind(video_ref);
32
+ }
29
33
 
34
+ // 将修改好的video回调返回给使用者
35
+ this.onRef(video_ref);
36
+ }
37
+ },
38
+ beforeUnmount() {
39
+ if (this.onRef) {
40
+ // video_ref为null,代表video标签卸载处理
41
+ this.onRef(null);
42
+ }
30
43
  }
31
44
  };
32
45
 
@@ -2,16 +2,16 @@ let PluginInfo={
2
2
  //downloadUrl:"http://192.168.0.37:8080/plugin/JsvPlayer-6.0.zip", //插件下载地址
3
3
  packageName:"com.qcode.jsvplayer",
4
4
  name:"播放器插件",
5
- version:"1.4.8", //插件需要的版本号
6
- versionCodeMin:148,
7
- versionCodeMax:148,
5
+ version:"1.5.0", //插件需要的版本号
6
+ versionCodeMin:150,
7
+ versionCodeMax:150,
8
8
  bridgeName:"jsvPlayerBridge", //插件bridge注册到jsview的名称
9
9
  className:"com.qcode.jsvplayer.JsvPlayer", //插件初始化类名称
10
10
  initMethod:"createInstance", //插件初始化方法
11
11
  listener:"top.JsvPlayerPluginLoadResult", //插件加载结果回调
12
12
  listener2: "top.JsvPlayerPluginStatus",
13
13
  // debug:true,
14
- md5:"68be07d505e34d120ee95c5595ba6d73"
14
+ md5:"b0d74cbeafdb0adb02862addf61ce9d3"
15
15
  };
16
16
 
17
17
  // 不要用export default,update-env脚本不能解析
@@ -4,9 +4,18 @@ export default {
4
4
  props: {
5
5
  value: String,
6
6
  size: Number,
7
- fgColor: String,
8
- bgColor: String,
9
- level: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
7
+ fgColor: {
8
+ type: String,
9
+ default: "#000000"
10
+ },
11
+ bgColor: {
12
+ type: String,
13
+ default: "#ffffff"
14
+ },
15
+ level: {
16
+ type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
17
+ default: "L"
18
+ },
10
19
  imageSettings: Object
11
20
  },
12
21
  data() {
@@ -90,7 +99,7 @@ export default {
90
99
  const imageSettings = props.imageSettings;
91
100
  const size = props.size;
92
101
  if (!imageSettings) {
93
- return null;
102
+ return null;
94
103
  }
95
104
  const w = imageSettings.width;
96
105
  const h = imageSettings.height;
@@ -123,6 +132,8 @@ export default {
123
132
  left: calculatedImageSettings.x + margin,
124
133
  top: calculatedImageSettings.y + margin
125
134
  }
135
+ } else {
136
+ this.imageStyle = {}
126
137
  }
127
138
  const fgPath = this.generatePath(cells, margin);
128
139
  return {numCells, fgPath};
@@ -133,16 +144,16 @@ export default {
133
144
 
134
145
  <template>
135
146
  <div>
136
- <jsvsvg
147
+ <jsve-svg
137
148
  :type="'qrcode'"
138
149
  :shapeRendering="'crispEdges'"
139
150
  :height="size"
140
151
  :width="size"
141
152
  :viewBox="'0 0 ' + renderQrcode().numCells + ' ' + renderQrcode().numCells"
142
153
  >
143
- <jsvpath :fill="bgColor" :d="'M0,0 h' + renderQrcode().numCells + 'v' + renderQrcode().numCells + 'H0z'" />
144
- <jsvpath :fill="fgColor" :d="renderQrcode().fgPath" />
145
- </jsvsvg>
154
+ <jsve-path :fill="bgColor" :d="'M0,0 h' + renderQrcode().numCells + 'v' + renderQrcode().numCells + 'H0z'" />
155
+ <jsve-path :fill="fgColor" :d="renderQrcode().fgPath" />
156
+ </jsve-svg>
146
157
  <div :style="imageStyle"></div>
147
158
  </div>
148
159
  </template>
@@ -120,5 +120,5 @@ export { LoopType };
120
120
  </script>
121
121
 
122
122
  <template>
123
- <jsvcanvas :id="canvasId" :style="style" />
123
+ <jsve-canvas :id="canvasId" :style="style" />
124
124
  </template>
@@ -559,7 +559,7 @@ export default {
559
559
  top: item.top,
560
560
  width: itemSize.width,
561
561
  height: itemSize.height,
562
- visibility: item.widgetData.visibility ? 'visible' : 'hidden',
562
+ visibility: item.widgetData.visibility ? 'inherit' : 'hidden',
563
563
  }"
564
564
  >
565
565
  <slot
@@ -22,9 +22,18 @@ export default {
22
22
  props: {
23
23
  value: String,
24
24
  size: Number,
25
- fgColor: String,
26
- bgColor: String,
27
- level: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
25
+ fgColor: {
26
+ type: String,
27
+ default: "#000000"
28
+ },
29
+ bgColor: {
30
+ type: String,
31
+ default: "#ffffff"
32
+ },
33
+ level: {
34
+ type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
35
+ default: "L"
36
+ },
28
37
  imageSettings: Object,
29
38
  },
30
39
  methods: {