@shijiu/jsview-vue 1.9.783 → 1.9.825

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shijiu/jsview-vue",
3
- "version": "1.9.783",
3
+ "version": "1.9.825",
4
4
  "license": "MIT",
5
5
  "repository": "system/jsview-framework",
6
6
  "author": "mengxk",
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-09-22 16:08:58
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-11-24 10:28:17
5
+ * @LastEditTime: 2022-12-19 11:17:10
6
6
  * @Description: file content
7
7
  -->
8
8
 
@@ -86,6 +86,7 @@
86
86
  * loadAll {boolean} 加载不显示的view,触控场景使用
87
87
  * flingPageWidth {}
88
88
  * flingPageEdge {}
89
+ * disableClip {boolean} 取消显示范围的clipView
89
90
  * methods:
90
91
  getFocusBlockRef 获取此MetroWidget的 jsv-focus-block句柄,可以使用requestFocus完成获焦
91
92
 
@@ -407,6 +408,10 @@ const props = defineProps({
407
408
  type: Number,
408
409
  default: 0,
409
410
  },
411
+ disableClip: {
412
+ type: Boolean,
413
+ default: false,
414
+ },
410
415
  });
411
416
 
412
417
  let dataUpdateToken = ref(0);
@@ -1208,6 +1213,8 @@ const _onCustomerEvent = (ev) => {
1208
1213
  yPos: item_layout.top,
1209
1214
  width: item_layout.width,
1210
1215
  height: item_layout.height,
1216
+ centerYPos: Math.floor(item_layout.top + item_layout.height / 2),
1217
+ centerXPos: Math.floor(item_layout.left + item_layout.width / 2),
1211
1218
  index: templateParser.IdToIndex(focusId),
1212
1219
  };
1213
1220
 
@@ -1392,9 +1399,17 @@ const _calculateVisibleStart = (target_item, direction) => {
1392
1399
  );
1393
1400
  break;
1394
1401
  case SlideSetting.Type.WHOLE_PAGE:
1395
- new_visible_start = templateParser.GetItem(target_item.pageHeadIndex)[
1396
- pos_key
1397
- ];
1402
+ if (typeof target_item.pageHeadIndex == "undefined") {
1403
+ //TODO 子控制滚动时whole page滚动
1404
+ console.error(
1405
+ "child controlled whole page slide type is not supported."
1406
+ );
1407
+ } else {
1408
+ new_visible_start = templateParser.GetItem(target_item.pageHeadIndex)[
1409
+ pos_key
1410
+ ];
1411
+ }
1412
+
1398
1413
  break;
1399
1414
  case SlideSetting.Type.SEAMLESS:
1400
1415
  if (
@@ -1720,8 +1735,8 @@ const _onScroll = () => {
1720
1735
  const _updatePosition = (x, y, anim_info) => {
1721
1736
  if (slideLock) return;
1722
1737
  if (toRaw(slideDiv.value)) {
1723
- let pre_left = toRaw(slideDiv.value).style.left,
1724
- pre_top = toRaw(slideDiv.value).style.top;
1738
+ let pre_left = slideDivLeft.value,
1739
+ pre_top = slideDivTop.value;
1725
1740
  //jsvMaskView的位置更新时会被设置位0,因此不能通过ResetLayoutParams设置位置
1726
1741
  slideDivLeft.value = x;
1727
1742
  slideDivTop.value = y;
@@ -1929,7 +1944,7 @@ defineExpose(exportObject);
1929
1944
  top: top,
1930
1945
  width: width,
1931
1946
  height: height,
1932
- overflow: 'hidden',
1947
+ overflow: disableClip ? null : 'hidden',
1933
1948
  }"
1934
1949
  >
1935
1950
  <div :style="{ left: innerPadding.left, top: innerPadding.top }">
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2020-12-30 14:08:38
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-11-22 09:57:18
5
+ * @LastEditTime: 2022-12-01 16:49:21
6
6
  * @Description: file content
7
7
  */
8
8
  class BaseDispatcher {
@@ -174,7 +174,7 @@ class SeamlessSlide extends SlideSetting {
174
174
  **/
175
175
  class FixPositionSlide extends SlideSetting {
176
176
  constructor({
177
- fixPercent,
177
+ fixPercent = .5,
178
178
  speed = defaultSpeed,
179
179
  easing = defaultEasing,
180
180
  boundaryProtect = SlideSetting.START_PROTECT | SlideSetting.END_PROTECT,
@@ -38,7 +38,7 @@ export default {
38
38
  beforeUnmount() {
39
39
  if (this.onRef) {
40
40
  // video_ref为null,代表video标签卸载处理
41
- this.onshallowRef(null);
41
+ this.onRef(null);
42
42
  }
43
43
  }
44
44
  };
@@ -5,6 +5,7 @@ import { getJsvPlayerCapabilitySet as getCapabilitySet } from "./JsvMedia.js"
5
5
  import { setJsvPlayerDebugMode as setDebugMode } from "./JsvMedia.js"
6
6
  import { getJsvPlayerRunningNum as getRunningPlayerNum } from "./JsvMedia.js"
7
7
  import { globalLoadSetOperator as setOperator } from"./JsvMedia.js"
8
+ import { JsvWidgetWrapperGroup } from '../../JsViewVueWidget/BrowserDebugWidget/WidgetWrapper.js';
8
9
  let _JsvPlayer = JsvPlayer;
9
10
 
10
11
  let globalLoadJsvPlayerPlugin = initPlugin;
@@ -13,9 +14,9 @@ let setJsvPlayerDebugMode = setDebugMode;
13
14
  let getJsvPlayerRunningNum = getRunningPlayerNum;
14
15
  let globalLoadSetOperator = setOperator;
15
16
 
16
- if (window.JsvWidgetWrapperGroup?.BrowserJsvPlayer) {
17
+ if (window.jsvIsBrowserDebug) {
17
18
  // 浏览器版本
18
- _JsvPlayer = window.JsvWidgetWrapperGroup.BrowserJsvPlayer;
19
+ _JsvPlayer = JsvWidgetWrapperGroup.BrowserJsvPlayer;
19
20
 
20
21
  // 为Browser重新定义初始化处理
21
22
  globalLoadJsvPlayerPlugin = (listener) => {
@@ -2,16 +2,16 @@ let PluginInfo={
2
2
  // downloadUrl:"http://192.168.0.63:8080/plugin/JsvPlayer-164.zip", //插件下载地址
3
3
  packageName:"com.qcode.jsvplayer",
4
4
  name:"播放器插件",
5
- version:"1.8.6", //插件需要的版本号
6
- versionCodeMin:186,
7
- versionCodeMax:186,
5
+ version:"1.9.0", //插件需要的版本号
6
+ versionCodeMin:190,
7
+ versionCodeMax:190,
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:"1371d41e658d20b4b29477a3c7649654"
14
+ md5:"77f0b26e2751998e94220df133bd9b3e"
15
15
  };
16
16
 
17
17
  // 不要用export default,update-env脚本不能解析
@@ -233,6 +233,7 @@ class JsvTextStyleClass extends JsvStyleClass {
233
233
  this.jsvTextAttributes = {
234
234
  jsv_text_line_align: "middle", // 文字行内垂直对齐方式
235
235
  jsv_text_vertical_align: "top", // 文字区域内垂直对齐方式
236
+ jsv_text_ellipsis: "end", //文字省略部分
236
237
  };
237
238
  }
238
239
 
@@ -244,6 +245,10 @@ class JsvTextStyleClass extends JsvStyleClass {
244
245
  this.jsvTextAttributes.jsv_text_line_align = new_align;
245
246
  }
246
247
 
248
+ setEllipsis(new_ellipsis) {
249
+ this.jsvTextAttributes.jsv_text_ellipsis = new_ellipsis;
250
+ }
251
+
247
252
  // 注意:此接口仅提供给JsViewReactWidget中的hoc调用,
248
253
  getVerticalAlign() {
249
254
  return this.jsvTextAttributes.jsv_text_vertical_align;
@@ -254,6 +259,10 @@ class JsvTextStyleClass extends JsvStyleClass {
254
259
  return this.jsvTextAttributes.jsv_text_line_align;
255
260
  }
256
261
 
262
+ getEllipsis() {
263
+ return this.jsvTextAttributes.jsv_text_ellipsis;
264
+ }
265
+
257
266
  // Override
258
267
  classType() {
259
268
  return CONST_TYPE_TEXT;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * @Author: ChenChanghua
3
+ * @Date: 2022-11-29 14:26:20
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2022-11-29 14:27:03
6
+ * @Description: file content
7
+ */
8
+ const getTextWidth = (text, style) => {
9
+ const textParams = {
10
+ str: text ? text : "",
11
+ font: style.fontFamily ? style.fontFamily : Forge.TextUtils._sDefaultFont,
12
+ size: style.fontSize ? style.fontSize : Forge.TextUtils._sDefaultFontSize,
13
+ italic: style.fontStyle === "italic" ? "italic" : "",
14
+ bold: style.fontWeight === "bold" ? "bold" : "",
15
+ };
16
+ return window.PlatformUtils.GetTextWidth(textParams);
17
+ };
18
+ export { getTextWidth };
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-05 14:09:55
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-08-30 10:58:14
5
+ * @LastEditTime: 2022-11-29 14:34:45
6
6
  * @Description: file content
7
7
  */
8
8
 
@@ -17,4 +17,5 @@ export * from "./JsvStyleClass.js";
17
17
  export * from "./DebugContentShellJBridge.js";
18
18
  export * from "./DebugTool.js";
19
19
  export * from "./JsvImpactTracer.js";
20
+ export * from "./JsvTextTools.js";
20
21
  export { default as DefaultKeyCodeMap } from "./DefaultKeyMap.js";
@@ -12,6 +12,7 @@ import BrowserSpray from "./BrowserSpray.vue";
12
12
  import BrowserPreload from "./BrowserPreload.vue";
13
13
  import BrowserQrcode from "./BrowserQrcode.vue";
14
14
  import BrowserTextureAnim from "./BrowserTextureAnim.vue";
15
+ import BrowserJsvPlayer from "../../JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue";
15
16
 
16
17
  export {
17
18
  BrowserApic,
@@ -19,12 +20,8 @@ export {
19
20
  BrowserPreload,
20
21
  BrowserQrcode,
21
22
  BrowserTextureAnim,
22
- }
23
23
 
24
- // JsvWidgetWrapperGroup.BrowserApic = BrowserApic;
25
- // JsvWidgetWrapperGroup.BrowserSpray = BrowserSpray;
26
- // JsvWidgetWrapperGroup.BrowserPreload = BrowserPreload;
27
- // JsvWidgetWrapperGroup.BrowserQrcode = BrowserQrcode;
28
- // JsvWidgetWrapperGroup.BrowserTextureAnim = BrowserTextureAnim;
24
+ BrowserJsvPlayer,
25
+ }
29
26
 
30
- // console.log("load browser widgets.");
27
+ console.log("JsView Utils: Load browser widgets.");
@@ -33,32 +33,30 @@
33
33
  * 功能:暂停动画,并将JsvActorMove保持在暂停的位置上
34
34
 
35
35
  -->
36
- <script>
36
+ <script setup>
37
37
  import JsvActorMoveControl from "./JsvActorMoveControl";
38
- export default {
39
- props: {
40
- control: {
41
- type: JsvActorMoveControl,
42
- required: true,
43
- },
44
- refDefine: Object,
45
- },
46
- mounted() {
47
- this.control._SetView(this.$refs.element.jsvGetProxyView());
48
- if (this.refDefine) {
49
- const type = typeof this.refDefine;
50
- if (type === "object") {
51
- this.refDefine.current = this.$refs.element;
52
- } else if (type === "function") {
53
- this.refDefine(this.$refs.element);
54
- }
55
- }
38
+ import { shallowRef, onMounted } from "vue";
39
+
40
+ const props = defineProps({
41
+ control: {
42
+ type: JsvActorMoveControl,
43
+ required: true,
56
44
  },
57
- };
45
+ });
46
+
47
+ let mainDivRef = shallowRef(null);
48
+
49
+ onMounted(() => {
50
+ props.control._SetView(mainDivRef.value.jsvGetProxyView());
51
+ });
52
+
53
+ defineExpose({
54
+ mainDiv: mainDivRef,
55
+ });
58
56
  </script>
59
57
 
60
58
  <template>
61
- <div ref="element">
59
+ <div ref="mainDivRef">
62
60
  <slot></slot>
63
61
  </div>
64
- </template>
62
+ </template>
@@ -93,7 +93,7 @@ class LineType extends UpdateType {
93
93
  }
94
94
  }
95
95
 
96
- export { PageType, LineType };
96
+ export { PageType, LineType, FocusMoveType };
97
97
 
98
98
  export default {
99
99
  props: {
@@ -11,7 +11,13 @@
11
11
  <script setup>
12
12
  import { Forge } from "../../../jsview/dom/jsv-forge-define";
13
13
  import { getTextWidth } from "./utils";
14
- import { ref, shallowRef, computed, toRaw, onMounted, onBeforeUnmount } from "vue";
14
+ import {
15
+ shallowRef,
16
+ computed,
17
+ toRaw,
18
+ onMounted,
19
+ onBeforeUnmount,
20
+ } from "vue";
15
21
 
16
22
  const defaultFontStyle = () => {
17
23
  return {
@@ -20,7 +26,7 @@ const defaultFontStyle = () => {
20
26
  textAlign: "start",
21
27
  lineHeight: "20px",
22
28
  whiteSpace: "nowrap",
23
- direction: 'ltr'
29
+ direction: "ltr",
24
30
  };
25
31
  };
26
32
  const props = defineProps({
@@ -41,7 +47,7 @@ const props = defineProps({
41
47
  textAlign: "start",
42
48
  lineHeight: "20px",
43
49
  whiteSpace: "nowrap",
44
- direction: 'ltr,'
50
+ direction: "ltr,",
45
51
  };
46
52
  },
47
53
  },
@@ -71,7 +77,9 @@ const fontStyle = computed(() => {
71
77
  });
72
78
  //rtl文字需要先获得文字宽度
73
79
  let textWidth =
74
- fontStyle.value.direction == "rtl" ? getTextWidth(props.text, fontStyle.value) : 0;
80
+ fontStyle.value.direction == "rtl"
81
+ ? getTextWidth(props.text, fontStyle.value)
82
+ : 0;
75
83
  const slideDivLeft = computed(() =>
76
84
  fontStyle.value.direction == "rtl" && props.style.width < textWidth
77
85
  ? props.style.width - textWidth
@@ -112,7 +120,9 @@ const slideStep = () => {
112
120
  } else {
113
121
  // 文字从屏幕外部,移动回屏幕中的文字原始位置
114
122
  let start =
115
- fontStyle.value.direction == "rtl" ? -props.style.width : props.style.width,
123
+ fontStyle.value.direction == "rtl"
124
+ ? -props.style.width
125
+ : props.style.width,
116
126
  end = 0;
117
127
  const anim = new Forge.TranslateFrameAnimation(
118
128
  start,
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-10-12 18:20:43
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-11-18 16:42:20
5
+ * @LastEditTime: 2022-11-25 18:26:40
6
6
  * @Description: file content
7
7
  -->
8
8
 
@@ -12,6 +12,7 @@
12
12
  * prop说明:
13
13
  * pointRes {string} (必需)粒子图案 可选值: 绝对路径url|url(相对路径url)|#FFFFFF|rbga(255,0,0,1.0)
14
14
  * sprayStyle {object} (必需)粒子效果配置
15
+ * ignoreClip {boolean} 无视clipView描画
15
16
  *
16
17
  * prop中的sprayStyle说明:
17
18
  * type {int} (必需)喷射类型 0: 一次喷射 1: 持续喷射
@@ -34,7 +35,7 @@
34
35
  <script>
35
36
  import { Forge, ForgeExtension } from "../../../../jsview/dom/jsv-forge-define";
36
37
 
37
- let buildForgeView = (pointRes, sprayStyle, sizeRef) => {
38
+ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
38
39
  if (!pointRes) {
39
40
  return -1;
40
41
  }
@@ -56,7 +57,7 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef) => {
56
57
  texture_manager.GetImage2(image_url, false, null, "RGB_8888", null)
57
58
  );
58
59
  }
59
- const spray_view = new Forge.SprayView(texture_setting);
60
+ const spray_view = new Forge.SprayView(texture_setting, ignoreClip);
60
61
  const add_num_per_frame = sprayStyle.addNumSpeed
61
62
  ? sprayStyle.addNumSpeed
62
63
  : 0.001;
@@ -105,6 +106,10 @@ export default {
105
106
  type: Object,
106
107
  required: true,
107
108
  },
109
+ ignoreClip: {
110
+ type: Boolean,
111
+ default: false,
112
+ }
108
113
  },
109
114
  data() {
110
115
  return {
@@ -124,11 +129,11 @@ export default {
124
129
  },
125
130
  },
126
131
  created() {
127
- this.viewId = buildForgeView(this.pointRes, this.sprayStyle, this.size);
132
+ this.viewId = buildForgeView(this.pointRes, this.sprayStyle, this.size, this.ignoreClip);
128
133
  },
129
134
  updated() {
130
135
  this.unloadView();
131
- this.viewId = buildForgeView(this.pointRes, this.sprayStyle, this.size);
136
+ this.viewId = buildForgeView(this.pointRes, this.sprayStyle, this.size, this.ignoreClip);
132
137
  },
133
138
  beforeUnmount() {
134
139
  this.unloadView();
@@ -8,6 +8,7 @@
8
8
  * verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
9
9
  * style {object} 样式(必需)
10
10
  * enableLatex {bool} 是否启用Latex文字描画模式
11
+ * textDirection {string} 内容文字的方向, 默认是unset, 此时会根据第一个字符的语言确定文字是ltr还是rtl
11
12
  -->
12
13
 
13
14
  <script setup>
@@ -23,8 +24,15 @@ const props = defineProps({
23
24
  type: String,
24
25
  default: "middle",
25
26
  },
26
- enableLatex: Boolean,
27
+ enableLatex: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
27
31
  className: String,
32
+ textDirection: {
33
+ type: String,
34
+ default: "unset",
35
+ },
28
36
  });
29
37
 
30
38
  </script>
@@ -37,6 +45,7 @@ const props = defineProps({
37
45
  :jsv_text_latex_enable="enableLatex ? 'true' : ''"
38
46
  :jsv_text_vertical_align="verticalAlign"
39
47
  :jsv_text_line_align="lineAlign"
48
+ :jsv_text_inner_direction="textDirection"
40
49
  jsv-inherit-class="1"
41
50
  >
42
51
  <slot></slot>
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: ChenChanghua
3
- * @Date: 2022-11-09 15:18:43
3
+ * @Date: 2022-11-29 14:26:20
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-11-10 15:02:54
5
+ * @LastEditTime: 2022-11-29 14:27:03
6
6
  * @Description: file content
7
7
  */
8
8
  const getTextWidth = (text, style) => {
@@ -15,5 +15,4 @@ const getTextWidth = (text, style) => {
15
15
  };
16
16
  return window.PlatformUtils.GetTextWidth(textParams);
17
17
  };
18
-
19
- export { getTextWidth };
18
+ export { getTextWidth };
@@ -1,14 +0,0 @@
1
- /*
2
- * @Author: LuDonglin
3
- * @Date: 2022-2-24 14:00:00
4
- * @LastEditors: LuDonglin
5
- * @LastEditTime: 2022-2-24 14:00:00
6
- * @Description: file content
7
- */
8
- import { JsvWidgetWrapperGroup } from '../JsViewVueWidget/BrowserDebugWidget/WidgetWrapper.js';
9
- //考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
10
- import * as BrowserJsvPlayer from "./JsvPlayer/JsvPlayerBrowser.vue";
11
-
12
- JsvWidgetWrapperGroup.BrowserJsvPlayer = BrowserJsvPlayer;
13
-
14
- console.log("load browser plugin widgets.");