@shijiu/jsview-vue 0.9.684 → 0.9.766

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.
Files changed (113) hide show
  1. package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
  2. package/dom/bin/jsview-dom.min.js +1 -1
  3. package/dom/bin/jsview-engine-js-browser.min.js +1 -1
  4. package/dom/bin/jsview-forge-define.min.js +1 -1
  5. package/dom/jsv-engine-js-browser.js +6 -0
  6. package/dom/target_core_revision.js +4 -4
  7. package/loader/loader.js +4 -0
  8. package/package.json +1 -1
  9. package/patches/node_modules/@vue/cli-service/lib/config/base.js +1 -1
  10. package/samples/AnimPicture/App.vue +5 -5
  11. package/samples/Basic/components/div/DivLayout.vue +1 -1
  12. package/samples/Basic/components/img/ImageGroup.vue +2 -2
  13. package/samples/Basic/components/img/ImgLayout.vue +79 -15
  14. package/samples/Basic/components/text/TextDirection.vue +104 -0
  15. package/samples/Basic/components/text/TextEmoji.vue +1 -1
  16. package/samples/Basic/components/text/TextGroup1.vue +1 -1
  17. package/samples/Basic/components/text/TextGroup2.vue +11 -1
  18. package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
  19. package/samples/Collision/App.vue +11 -11
  20. package/samples/DemoHomepage/App.vue +43 -8
  21. package/samples/DemoHomepage/router.js +13 -10
  22. package/samples/DemoHomepage/views/Homepage.vue +83 -96
  23. package/samples/FilterDemo/App.vue +1 -1
  24. package/samples/FlipCard/App.vue +2 -2
  25. package/samples/FlipCard/FlipCard.vue +3 -3
  26. package/samples/GridDemo/App.vue +3 -3
  27. package/samples/GridDemo/ButtonBlock.vue +2 -2
  28. package/samples/GridDemo/FocusItem.vue +2 -2
  29. package/samples/GridDemo/Item.vue +1 -1
  30. package/samples/HashHistory/App.vue +10 -3
  31. package/samples/HashHistory/components/Item.vue +1 -1
  32. package/samples/ImpactStop/App.vue +15 -11
  33. package/samples/Input/InputPanel.vue +1 -1
  34. package/samples/LongImage/Button.vue +1 -1
  35. package/samples/LongImage/ButtonItem.vue +1 -1
  36. package/samples/LongImage/LongImageScroll.vue +2 -2
  37. package/samples/LongText/App.vue +1 -1
  38. package/samples/LongText/Button.vue +1 -1
  39. package/samples/LongText/ButtonItem.vue +1 -1
  40. package/samples/LongText/LongTextScroll.vue +3 -3
  41. package/samples/Marquee/longText.js +2 -2
  42. package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
  43. package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +3 -4
  44. package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +2 -3
  45. package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +1 -1
  46. package/samples/MetroWidgetDemos/Item.vue +3 -19
  47. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
  48. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
  49. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +3 -3
  50. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
  51. package/samples/MetroWidgetDemos/PingPong/TabItem.vue +1 -1
  52. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +3 -3
  53. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +2 -2
  54. package/samples/MetroWidgetDemos/WidgetItem.vue +2 -3
  55. package/samples/NinePatchDemo/App.vue +2 -2
  56. package/samples/NinePatchDemo/Item.vue +2 -2
  57. package/samples/Preload/App.vue +1 -1
  58. package/samples/Preload/Item.vue +1 -1
  59. package/samples/QrcodeDemo/App.vue +1 -1
  60. package/samples/SoundPool/App.vue +3 -3
  61. package/samples/SpriteImage/App.vue +5 -0
  62. package/samples/TextBox/App.vue +2 -1
  63. package/samples/TextureAnimation/App2.vue +1 -1
  64. package/samples/ThrowMoveDemo/LRParabolicDemo.vue +33 -47
  65. package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
  66. package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
  67. package/samples/TransitPage/App.vue +1 -1
  68. package/samples/VideoDemo/App.vue +8 -8
  69. package/samples/VideoDemo/components/Button.vue +1 -1
  70. package/samples/VideoDemo/components/Controllor.vue +1 -1
  71. package/samples/VisibleSensorDemo/App.vue +3 -3
  72. package/scripts/jsview-run-android.js +5 -4
  73. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +4 -4
  74. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +65 -39
  75. package/utils/JsViewEngineWidget/TemplateParser.js +138 -146
  76. package/utils/JsViewEngineWidget/WidgetCommon.js +12 -3
  77. package/utils/JsViewPlugin/BrowserPluginLoader.js +4 -2
  78. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +302 -0
  79. package/utils/JsViewPlugin/JsvAudio/CheckType.js +68 -0
  80. package/utils/JsViewPlugin/JsvAudio/Events.js +17 -0
  81. package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +176 -0
  82. package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +40 -0
  83. package/utils/JsViewPlugin/JsvAudio/JsvAudioBrowser.vue +46 -0
  84. package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +140 -0
  85. package/utils/JsViewPlugin/JsvAudio/index.js +26 -0
  86. package/utils/JsViewPlugin/JsvAudio/version.js +24 -0
  87. package/utils/JsViewPlugin/JsvPlayer/index.js +1 -1
  88. package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
  89. package/utils/JsViewVueTools/JsvHashHistory.js +34 -8
  90. package/utils/JsViewVueTools/JsvImpactTracer.js +2 -2
  91. package/utils/JsViewVueTools/JsvRuntimeBridge.js +46 -8
  92. package/utils/JsViewVueTools/JsvStyleClass.js +9 -0
  93. package/utils/{JsViewVueWidget/utils/text.js → JsViewVueTools/JsvTextTools.js} +3 -4
  94. package/utils/JsViewVueTools/TypeCheckAndSet.js +3 -3
  95. package/utils/JsViewVueTools/index.js +2 -1
  96. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +5 -7
  97. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +20 -22
  98. package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +4 -4
  99. package/utils/JsViewVueWidget/JsvGrid.vue +1 -9
  100. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +1 -1
  101. package/utils/JsViewVueWidget/JsvMarquee.vue +22 -12
  102. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
  103. package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -53
  104. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
  105. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
  106. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +3 -3
  107. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
  108. package/utils/JsViewVueWidget/JsvTextBox.vue +11 -31
  109. package/utils/JsViewVueWidget/JsvTouchContainer.vue +2 -2
  110. package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
  111. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
  112. package/utils/JsViewVueWidget/index.js +8 -8
  113. package/utils/JsViewVueWidget/utils/index.js +0 -8
@@ -68,7 +68,7 @@ export default {
68
68
  methods: {
69
69
  play() {
70
70
  if (this.$refs.element) {
71
- let main_view = this.$refs.element.jsvMainView;
71
+ let main_view = this.$refs.element.jsvGetProxyView();
72
72
  if (main_view && main_view.ChildViews.length > 0) {
73
73
  let target_view = main_view.ChildViews[0];
74
74
  if (
@@ -106,7 +106,7 @@ export default {
106
106
  },
107
107
  stop() {
108
108
  if (this.$refs.element) {
109
- let main_view = this.$refs.element.jsvMainView;
109
+ let main_view = this.$refs.element.jsvGetProxyView();
110
110
  if (main_view && main_view.ChildViews.length > 0) {
111
111
  let target_view = main_view.ChildViews[0];
112
112
  if (
@@ -130,7 +130,7 @@ export default {
130
130
  }
131
131
  if (this.onLoad) {
132
132
  if (this.$refs.element) {
133
- let main_view = this.$refs.element.jsvMainView;
133
+ let main_view = this.$refs.element.jsvGetProxyView();
134
134
  if (main_view && main_view.ChildViews.length > 0) {
135
135
  let target_view = main_view.ChildViews[0];
136
136
  if (
@@ -151,7 +151,7 @@ export default {
151
151
  beforeUnmount() {
152
152
  this.stop();
153
153
  if (this.$refs.element) {
154
- let main_view = this.$refs.element.jsvMainView;
154
+ let main_view = this.$refs.element.jsvGetProxyView();
155
155
  if (main_view && main_view.ChildViews.length > 0) {
156
156
  let target_view = main_view.ChildViews[0];
157
157
  if (
@@ -66,7 +66,7 @@
66
66
  -->
67
67
  <script>
68
68
  import { reactive } from "vue";
69
- import { EdgeDirection } from "jsview/utils/JsViewEngineWidget";
69
+ import { EdgeDirection, FocusMoveType } from "jsview/utils/JsViewEngineWidget";
70
70
 
71
71
  const TAG = "JsvGrid";
72
72
 
@@ -93,14 +93,6 @@ class LineType extends UpdateType {
93
93
  }
94
94
  }
95
95
 
96
- const FocusMoveType = {
97
- NO_ADJUST: 0x00000000,
98
- COLUMN_LOOP: 0x00000001,
99
- ROW_LOOP: 0x00000001 << 1,
100
- COLUMN_FIND_NEAR: 0x00000001 << 2,
101
- ROW_FIND_NEAR: 0x00000001 << 3,
102
- };
103
-
104
96
  export { PageType, LineType, FocusMoveType };
105
97
 
106
98
  export default {
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
9
- import { ref } from "vue";
9
+ import { ref, shallowRef } from "vue";
10
10
  export default {
11
11
  props: {
12
12
  left: Number,
@@ -10,8 +10,14 @@
10
10
 
11
11
  <script setup>
12
12
  import { Forge } from "../../dom/jsv-forge-define";
13
- import { getTextWidth } from "./utils";
14
- import { ref, computed, toRaw, onMounted, onBeforeUnmount } from "vue";
13
+ import { getTextWidth } from "../JsViewVueTools/JsvTextTools";
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
  },
@@ -54,8 +60,8 @@ const props = defineProps({
54
60
  default: false,
55
61
  },
56
62
  });
57
- const slideDiv = ref(null);
58
- const textDiv = ref(null);
63
+ const slideDiv = shallowRef(null);
64
+ const textDiv = shallowRef(null);
59
65
  let animState = 0;
60
66
  let animIdleHandler = -1;
61
67
  let asyncStartHandler = -1;
@@ -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
@@ -106,13 +114,15 @@ const slideStep = () => {
106
114
  )
107
115
  );
108
116
  anim.Enable(Forge.AnimationEnable.ReleaseAfterEndCallback);
109
- toRaw(slideDiv.value.jsvMaskView).StartAnimation(anim);
117
+ toRaw(slideDiv.value).jsvGetProxyView(true).StartAnimation(anim);
110
118
  animState = 1;
111
119
  }, 1000);
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,
@@ -134,7 +144,7 @@ const slideStep = () => {
134
144
  null
135
145
  )
136
146
  );
137
- toRaw(slideDiv.value.jsvMaskView).StartAnimation(anim);
147
+ toRaw(slideDiv.value.jsvGetProxyView(true)).StartAnimation(anim);
138
148
  animState = 0;
139
149
  }
140
150
  };
@@ -145,7 +155,7 @@ const stopSlide = () => {
145
155
  animIdleHandler = -1;
146
156
  }
147
157
  animState = 0;
148
- toRaw(slideDiv.value?.jsvMaskView)?.StopAnimation();
158
+ toRaw(slideDiv.value?.jsvGetProxyView(true))?.StopAnimation();
149
159
  };
150
160
 
151
161
  const asyncStartAnim = () => {
@@ -211,4 +221,4 @@ onBeforeUnmount(() => {
211
221
  </div>
212
222
  </div>
213
223
  </div>
214
- </template>
224
+ </template>
@@ -110,7 +110,7 @@ export default {
110
110
  const canvas = window.originDocument.createElement("canvas");
111
111
  canvas.style.width = this.style.width + "px";
112
112
  canvas.style.height = this.style.height + "px";
113
- this.$refs.innerView?.jsvMaskView.Element.appendChild(canvas);
113
+ this.$refs.innerView?.jsvGetProxyView(true).Element.appendChild(canvas);
114
114
 
115
115
  const clip_image = new Image();
116
116
  const bg_image = new Image();
@@ -16,64 +16,77 @@
16
16
  * waitForInit {boolean} (选填)尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
17
17
  -->
18
18
 
19
- <script>
20
- export default {
21
- name: "JsvNinePatch",
22
- props: {
23
- style: {
24
- type: Object,
25
- default: () => {
26
- return {};
27
- },
28
- },
29
- top: { type: Number, default: 0 },
30
- left: { type: Number, default: 0 },
31
- waitForInit: { type: Boolean, default: true },
32
-
33
- imageUrl: { type:String, required: true },
34
- imageWidth: { type:Number, required: true },
35
- imageDspWidth: { type:Number, default:0 },
36
- contentWidth: { type:Number, default: -1},
37
- centerWidth: { type:Number, default: -1, required: true },
38
- borderOutset: { type:Number, required: true },
39
- animTime: Number,
40
- },
19
+ <script setup>
20
+ import { ref, watchEffect, computed } from "vue";
41
21
 
42
- methods: {
43
- isReady() {
44
- if (!this.waitForInit) {
45
- return true;
46
- }
47
- return this.style && this.style.width !== 0 && this.style.height !== 0;
48
- },
49
- getTransition() {
50
- let transition = "";
51
- if (this.animTime) {
52
- transition = `left ${this.animTime}s, top ${this.animTime}s, width ${this.animTime}s, height ${this.animTime}s`;
53
- }
54
-
55
- return transition;
22
+ const props = defineProps({
23
+ style: {
24
+ type: Object,
25
+ default: () => {
26
+ return {};
56
27
  },
57
28
  },
29
+ top: { type: Number, default: 0 },
30
+ left: { type: Number, default: 0 },
31
+ waitForInit: { type: Boolean, default: true },
58
32
 
59
- data() {
60
- let center_width = (this.contentWidth >= 0 ? this.contentWidth : 0); // 兼容处理,contentWidth变更为centerWidth
61
- if (this.centerWidth >= 0) {
62
- center_width = this.centerWidth;
63
- }
33
+ imageUrl: { type: String, required: true },
34
+ imageWidth: { type: Number, required: true },
35
+ imageDspWidth: { type: Number, default: 0 },
36
+ contentWidth: { type: Number, default: -1 },
37
+ centerWidth: { type: Number, default: -1, required: true },
38
+ borderOutset: { type: Number, required: true },
39
+ animTime: { type: Number, default: 0 },
40
+ });
64
41
 
65
- // slice_width 获取
66
- let slice_width = Math.ceil(Math.max(0, (this.imageWidth - center_width) / 2));
42
+ const isReady = () => {
43
+ if (!props.waitForInit) {
44
+ return true;
45
+ }
46
+ return props.style && props.style.width !== 0 && props.style.height !== 0;
47
+ };
67
48
 
68
- let image_dsp_width = this.imageDspWidth > 0 ? this.imageDspWidth : this.imageWidth;
49
+ const getTransition = () => {
50
+ let transition = "";
51
+ if (props.animTime && props.animTime > 0) {
52
+ transition = `left ${props.animTime}s, top ${props.animTime}s, width ${props.animTime}s, height ${props.animTime}s`;
53
+ }
69
54
 
70
- return {
71
- sliceWidth: slice_width,
72
- borderDspWidth: Math.ceil(slice_width * image_dsp_width / this.imageWidth), // 跟进图片的缩放信息
73
- convertedBorderOutset: Math.ceil(this.borderOutset * image_dsp_width / this.imageWidth),
74
- };
75
- },
55
+ return transition;
76
56
  };
57
+
58
+ let centerWidth = props.contentWidth >= 0 ? props.contentWidth : 0; // 兼容处理,contentWidth变更为centerWidth
59
+ if (props.centerWidth >= 0) {
60
+ centerWidth = props.centerWidth;
61
+ }
62
+
63
+ const imageDspWidthInner = computed(() =>
64
+ props.imageDspWidth > 0 ? props.imageDspWidth : props.imageWidth
65
+ );
66
+ // slice_width 获取
67
+ const sliceWidth = ref(
68
+ Math.ceil(Math.max(0, (props.imageWidth - centerWidth) / 2))
69
+ );
70
+ const borderDspWidth = ref(
71
+ Math.ceil((sliceWidth.value * imageDspWidthInner.value) / props.imageWidth)
72
+ );
73
+ const convertedBorderOutset = ref(
74
+ Math.ceil((props.borderOutset * imageDspWidthInner.value) / props.imageWidth)
75
+ );
76
+
77
+ watchEffect(() => {
78
+ if (
79
+ (props.style?.width && props.style.width <= imageDspWidthInner.value) ||
80
+ (props.style?.height && props.style.height <= imageDspWidthInner.value)
81
+ ) {
82
+ console.warn(
83
+ "JsvNinePatch: style size must be larger than imageDspWidth. style is",
84
+ props.style,
85
+ "imageDspWidth is",
86
+ imageDspWidthInner.value
87
+ );
88
+ }
89
+ });
77
90
  </script>
78
91
 
79
92
  <template>
@@ -88,6 +101,3 @@ export default {
88
101
  }"
89
102
  />
90
103
  </template>
91
-
92
- <style scoped>
93
- </style>
@@ -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 "../../../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();
@@ -433,8 +433,8 @@ export default {
433
433
  <template>
434
434
  <div id="canvas">
435
435
  <div id="clip" :style="{...transform_style.clipStyle}">
436
- <div id="trans" :style="{...transform_style.transStyle}" :onAnimationEnd="onAnimEndDelegate">
437
- <div id="image" :style="{...transform_style.imageStyle, animation: blinkAnim}" :onAnimationEnd="onBlinkAnimEnd"></div>
436
+ <div id="trans" :style="{...transform_style.transStyle}" @animationend="onAnimEndDelegate">
437
+ <div id="image" :style="{...transform_style.imageStyle, animation: blinkAnim}" @animationend="onBlinkAnimEnd"></div>
438
438
  </div>
439
439
  </div>
440
440
  </div>
@@ -36,7 +36,7 @@ import JsvActorMove, {
36
36
  } from "jsview/utils/JsViewVueWidget/JsvActorMove";
37
37
  import JsvVisibleSensor from "jsview/utils/JsViewVueWidget/JsvVisibleSensor";
38
38
  import Indicator from "./Indicator.vue";
39
- import { ref } from "vue";
39
+ import { ref, shallowRef } from "vue";
40
40
 
41
41
  const VIEW_NUM = 3;
42
42
 
@@ -370,12 +370,12 @@ export default {
370
370
  curViewAnimation.SetAnimationListener(
371
371
  new Forge.AnimationListener(null, this._onAnimationEnd, null)
372
372
  );
373
- this.$refs["element" + this.currentViewIndex]?.jsvMaskView.StartAnimation(
373
+ this.$refs["element" + this.currentViewIndex]?.jsvGetProxyView(true).StartAnimation(
374
374
  curViewAnimation
375
375
  );
376
376
  this.$refs[
377
377
  "element" + modToRange(this.currentViewIndex - direction, VIEW_NUM)
378
- ]?.jsvMaskView.StartAnimation(preViewAnimation);
378
+ ]?.jsvGetProxyView(true).StartAnimation(preViewAnimation);
379
379
  },
380
380
  _startSmoothTranslateAnimation() {
381
381
  let curController = this.controllerList[this.currentViewIndex];
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script>
30
30
  import Indicator from "./Indicator.vue";
31
- import { ref } from "vue";
31
+ import { ref, shallowRef } from "vue";
32
32
  import JsvVisibleSensor from "jsview/utils/JsViewVueWidget/JsvVisibleSensor";
33
33
 
34
34
  const VIEW_NUM = 4;
@@ -8,10 +8,11 @@
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>
14
- import { ref, computed } from "vue";
15
+ import { ref, shallowRef, computed } from "vue";
15
16
 
16
17
  const props = defineProps({
17
18
  style: Object,
@@ -23,49 +24,28 @@ 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
- const innerStyle = computed(() => {
31
- let result = { ...props.style };
32
- if (!result.verticalAlign) {
33
- result.verticalAlign = props.verticalAlign;
34
- }
35
- if (!result.lineAlign) {
36
- result.lineAlign = props.lineAlign;
37
- }
38
- return result;
39
- });
40
- const disable = window.JsvDisableReactWrapper;
41
38
  </script>
42
39
 
43
40
  <template>
44
41
  <div>
45
- <div v-if="disable" :style="style">
46
- <div :style="{ position: 'static', display: 'table' }">
47
- <div
48
- :className="className"
49
- :style="{
50
- position: 'static',
51
- display: 'table-cell',
52
- width: style.width,
53
- height: style.height,
54
- verticalAlign: verticalAlign,
55
- }"
56
- jsv-inherit-class="2"
57
- >
58
- <slot></slot>
59
- </div>
60
- </div>
61
- </div>
62
42
  <div
63
- v-else
64
43
  :className="className"
65
44
  :style="style"
66
45
  :jsv_text_latex_enable="enableLatex ? 'true' : ''"
67
46
  :jsv_text_vertical_align="verticalAlign"
68
47
  :jsv_text_line_align="lineAlign"
48
+ :jsv_text_inner_direction="textDirection"
69
49
  jsv-inherit-class="1"
70
50
  >
71
51
  <slot></slot>
@@ -66,8 +66,8 @@ export default {
66
66
  },
67
67
  created() {},
68
68
  mounted() {
69
- if (this.$refs.touchContainer && this.$refs.touchContainer.jsvMaskView) {
70
- const view = this.$refs.touchContainer.jsvMaskView;
69
+ const view = this.$refs.touchContainer?.jsvGetProxyView(true);
70
+ if (view) {
71
71
  const page_width = this.flingPageWidth;
72
72
  const page_edge = this.flingPageEdge;
73
73
  const direction = this.direction;
@@ -25,7 +25,7 @@ export default {
25
25
  },
26
26
  methods: {
27
27
  _updateInnerView() {
28
- if (this.innerView === null) {
28
+ if (this.innerView === null && !this.html) {
29
29
  // 初始化View
30
30
 
31
31
  // 创建JsView图层穿透的texture,抠洞处理
@@ -29,7 +29,7 @@
29
29
  </template>
30
30
 
31
31
  <script setup>
32
- import { reactive, ref, toRaw, watchEffect, onMounted, defineExpose } from 'vue'
32
+ import { reactive, ref, shallowRef, toRaw, watchEffect, onMounted, defineExpose } from 'vue'
33
33
  import { Forge } from "jsview/dom/jsv-forge-define";
34
34
 
35
35
  const props = defineProps({
@@ -69,7 +69,7 @@ const props = defineProps({
69
69
  });
70
70
 
71
71
  // 内部状态变量
72
- const viewRef = ref(null);
72
+ const viewRef = shallowRef(null);
73
73
  const viewMounted = reactive({status: false})
74
74
  let sensorRef = null;
75
75
 
@@ -96,9 +96,9 @@ watchEffect(()=>{
96
96
  if (props.container) {
97
97
  window.MyContainerView = toRaw(props.container);
98
98
 
99
- let jsv_main_view_ref = toRaw(props.container).jsvMainView;
99
+ let jsv_main_view_ref = toRaw(props.container).jsvGetProxyView();
100
100
  if (jsv_main_view_ref) {
101
- sensorRef.ResetContainer(toRaw(props.container).jsvMainView);
101
+ sensorRef.ResetContainer(jsv_main_view_ref);
102
102
  } else {
103
103
  console.error("Error: container is NOT a div");
104
104
  }
@@ -111,7 +111,7 @@ watchEffect(()=>{
111
111
  onMounted(()=>{
112
112
  console.log("JsvVisibleSensor: on mounted");
113
113
 
114
- sensorRef = new Forge.VisibleSensor(toRaw(viewRef.value).jsvMainView, (old_h, new_h, old_v, new_v)=>{
114
+ sensorRef = new Forge.VisibleSensor(toRaw(viewRef.value).jsvGetProxyView(), (old_h, new_h, old_v, new_v)=>{
115
115
  // 获得横向和纵向的新旧状态值
116
116
  if (props.callback) {
117
117
  props.callback(old_h, new_h, old_v, new_v);
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-05 11:00:51
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-08-18 13:17:17
5
+ * @LastEditTime: 2022-11-23 14:06:24
6
6
  * @Description: file content
7
7
  */
8
8
  export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
@@ -18,15 +18,15 @@ export { default as JsvSpray } from "./JsvSpray";
18
18
  export { default as JsvSpriteAnim, SpriteController } from "./JsvSpriteAnim";
19
19
  export { default as JsvSwiper } from "./JsvSwiper";
20
20
  export { default as JsvSwiper3D } from "./JsvSwiper3D";
21
- export { default as JsvTextureAnim, TexAlignAnchor, DECORATE_NINEPATCH_ALPHA_MIX, DECORATE_BORDER_RADIUS } from "./JsvTextureAnim";
21
+ export {
22
+ default as JsvTextureAnim,
23
+ TexAlignAnchor,
24
+ DECORATE_NINEPATCH_ALPHA_MIX,
25
+ DECORATE_BORDER_RADIUS,
26
+ } from "./JsvTextureAnim";
22
27
  export { default as JsvVisibleSensor } from "./JsvVisibleSensor";
23
28
  export { default as JsvFilterView } from "./JsvFilterView.vue";
24
- export {
25
- default as JsvGrid,
26
- PageType,
27
- LineType,
28
- FocusMoveType,
29
- } from "./JsvGrid.vue";
29
+ export { default as JsvGrid, PageType, LineType } from "./JsvGrid.vue";
30
30
  export { default as JsvHole } from "./JsvHole.js";
31
31
  export { default as JsvMarquee } from "./JsvMarquee.vue";
32
32
  export { default as JsvMaskClipDiv } from "./JsvMaskClipDiv.vue";
@@ -1,8 +0,0 @@
1
- /*
2
- * @Author: ChenChanghua
3
- * @Date: 2022-11-09 15:18:52
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-11-09 15:18:52
6
- * @Description: file content
7
- */
8
- export * from "./text"