@shijiu/jsview-vue 1.9.648 → 1.9.719

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 (157) hide show
  1. package/package.json +7 -18
  2. package/samples/AnimPicture/App.vue +5 -5
  3. package/samples/Basic/components/div/DivLayout.vue +1 -1
  4. package/samples/Basic/components/text/TextOverflow.vue +10 -5
  5. package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
  6. package/samples/Collision/App.vue +452 -0
  7. package/samples/DemoHomepage/components/BodyFrame.vue +2 -0
  8. package/samples/DemoHomepage/router.js +21 -1
  9. package/samples/DemoHomepage/views/Homepage.vue +3 -7
  10. package/samples/FilterDemo/App.vue +1 -1
  11. package/samples/FlipCard/App.vue +2 -2
  12. package/samples/FlipCard/FlipCard.vue +2 -2
  13. package/samples/GridDemo/App.vue +3 -3
  14. package/samples/GridDemo/ButtonBlock.vue +2 -2
  15. package/samples/GridDemo/FocusItem.vue +2 -2
  16. package/samples/GridDemo/Item.vue +1 -1
  17. package/samples/HashHistory/App.vue +10 -3
  18. package/samples/HashHistory/components/Item.vue +1 -1
  19. package/samples/ImpactStop/App.vue +435 -0
  20. package/samples/Input/App.vue +8 -17
  21. package/samples/Input/InputPanel.vue +19 -12
  22. package/samples/LongImage/Button.vue +1 -1
  23. package/samples/LongImage/ButtonItem.vue +1 -1
  24. package/samples/LongImage/LongImageScroll.vue +2 -2
  25. package/samples/LongText/App.vue +1 -1
  26. package/samples/LongText/Button.vue +1 -1
  27. package/samples/LongText/ButtonItem.vue +1 -1
  28. package/samples/LongText/LongTextScroll.vue +3 -3
  29. package/samples/Marquee/App.vue +176 -40
  30. package/samples/Marquee/longText.js +14 -0
  31. package/samples/MetroWidgetDemos/Advanced/App.vue +5 -6
  32. package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +3 -3
  33. package/samples/MetroWidgetDemos/Advanced/Buttons.vue +5 -5
  34. package/samples/MetroWidgetDemos/Advanced/Mixed.vue +4 -4
  35. package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +83 -0
  36. package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +89 -0
  37. package/samples/MetroWidgetDemos/Advanced/{Widgets.vue → widgets/Widgets.vue} +56 -11
  38. package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  39. package/samples/MetroWidgetDemos/Item.vue +20 -2
  40. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
  41. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
  42. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +1 -1
  43. package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
  44. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +17 -2
  45. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +3 -10
  46. package/samples/MetroWidgetDemos/PingPong/{Item.vue → TabItem.vue} +3 -11
  47. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
  48. package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +2 -2
  49. package/samples/MetroWidgetDemos/Simple/App.vue +2 -2
  50. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +6 -6
  51. package/samples/MetroWidgetDemos/WidgetItem.vue +2 -2
  52. package/samples/MetroWidgetDemos/data.js +2 -1
  53. package/samples/NinePatchDemo/App.vue +2 -2
  54. package/samples/NinePatchDemo/Item.vue +1 -1
  55. package/samples/Preload/App.vue +17 -12
  56. package/samples/Preload/Item.vue +1 -1
  57. package/samples/QrcodeDemo/App.vue +1 -1
  58. package/samples/ScaleDownNeon/App.vue +107 -0
  59. package/samples/SoundPool/App.vue +1 -1
  60. package/samples/TextBox/App.vue +9 -82
  61. package/samples/TextBox/RenderCenter.vue +40 -16
  62. package/samples/TextBox/RenderLeft.vue +48 -19
  63. package/samples/TextBox/RenderOneLine.vue +30 -49
  64. package/samples/TextBox/RenderRight.vue +40 -16
  65. package/samples/TextShadowDemo/App.vue +11 -17
  66. package/samples/TextureAnimation/App2.vue +43 -15
  67. package/samples/TextureAnimation/assets/light.png +0 -0
  68. package/samples/TextureAnimation/assets/light2.png +0 -0
  69. package/samples/TextureSize/App.vue +3 -3
  70. package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
  71. package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
  72. package/samples/TransitPage/App.vue +1 -1
  73. package/samples/VideoDemo/App.vue +8 -8
  74. package/samples/VideoDemo/components/Button.vue +1 -1
  75. package/samples/VisibleSensorDemo/App.vue +94 -27
  76. package/tsconfig.json +6 -6
  77. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +55 -59
  78. package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
  79. package/utils/JsViewEngineWidget/MetroWidget/Const.js +11 -0
  80. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +226 -107
  81. package/utils/JsViewEngineWidget/TemplateParser.js +227 -178
  82. package/utils/JsViewEngineWidget/WidgetCommon.js +13 -5
  83. package/utils/JsViewEngineWidget/index.js +3 -2
  84. package/utils/JsViewPlugin/BrowserPluginLoader.js +1 -1
  85. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +95 -12
  86. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +23 -2
  87. package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +1 -1
  88. package/utils/JsViewPlugin/JsvPlayer/index.js +22 -1
  89. package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
  90. package/utils/JsViewVueTools/JsvImpactTracer.js +113 -0
  91. package/utils/JsViewVueTools/JsvStyleClass.js +1 -1
  92. package/utils/JsViewVueTools/index.js +2 -1
  93. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +11 -1
  94. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserSpray.vue +1 -1
  95. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +7 -9
  96. package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +1 -1
  97. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +3 -3
  98. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +1 -1
  99. package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +5 -5
  100. package/utils/JsViewVueWidget/JsvFilterView.vue +1 -1
  101. package/utils/JsViewVueWidget/JsvGrid.vue +3 -11
  102. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +5 -3
  103. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +15 -14
  104. package/utils/JsViewVueWidget/JsvMarquee.vue +180 -207
  105. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -2
  106. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +35 -27
  107. package/utils/JsViewVueWidget/JsvNinePatch.vue +1 -2
  108. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +38 -42
  109. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +1 -1
  110. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +1 -1
  111. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +24 -8
  112. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +23 -3
  113. package/utils/JsViewVueWidget/JsvTextBox.vue +20 -86
  114. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -9
  115. package/utils/JsViewVueWidget/JsvTouchContainer.vue +6 -7
  116. package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
  117. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +6 -6
  118. package/utils/JsViewVueWidget/index.js +8 -8
  119. package/utils/JsViewVueWidget/utils/index.js +8 -0
  120. package/utils/JsViewVueWidget/utils/text.js +19 -0
  121. package/dom/bin/jsview-browser-debug-dom.min.js +0 -1
  122. package/dom/bin/jsview-dom.min.js +0 -1
  123. package/dom/bin/jsview-forge-define.min.js +0 -1
  124. package/dom/browser-root-style.css +0 -21
  125. package/dom/jsv-browser-debug-dom.js +0 -8
  126. package/dom/jsv-dom.js +0 -6
  127. package/dom/jsv-forge-define.js +0 -6
  128. package/dom/target_core_revision.mjs +0 -15
  129. package/loader/header_script_loader.js +0 -134
  130. package/loader/jsview-main.js +0 -42
  131. package/loader/jsview.config.default.js +0 -37
  132. package/loader/jsview.default.config.js +0 -37
  133. package/loader/loader.js +0 -179
  134. package/loader/loader_webkit.js +0 -40
  135. package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +0 -17609
  136. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +0 -335
  137. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +0 -446
  138. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +0 -91
  139. package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -8038
  140. package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1700
  141. package/patches/node_modules/postcss-js/objectifier.js +0 -90
  142. package/patches/node_modules/vite/dist/node/chunks/dep-0fc8e132.js +0 -63147
  143. package/patches/node_modules/vite/dist/node/jsview.vite.config.js +0 -50
  144. package/patches/node_modules/vue-router/dist/vue-router.mjs +0 -3595
  145. package/scripts/common.js +0 -58
  146. package/scripts/jsview-install-local-packages.js +0 -73
  147. package/scripts/jsview-jsmap-serve.js +0 -105
  148. package/scripts/jsview-post-build.js +0 -183
  149. package/scripts/jsview-post-install.js +0 -102
  150. package/scripts/jsview-run-android.js +0 -67
  151. package/utils/JsViewEngineWidget/MetroPage.js +0 -2128
  152. package/utils/JsViewEngineWidget/SimpleWidget/ContentView.vue +0 -51
  153. package/utils/JsViewEngineWidget/SimpleWidget/Dispatcher.js +0 -19
  154. package/utils/JsViewEngineWidget/SimpleWidget/DivWrapper.vue +0 -53
  155. package/utils/JsViewEngineWidget/SimpleWidget/ItemView.vue +0 -142
  156. package/utils/JsViewEngineWidget/SimpleWidget/RootView.vue +0 -140
  157. package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +0 -1629
@@ -0,0 +1,107 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2022-10-24 13:19:41
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2022-10-24 13:50:18
6
+ * @Description: file content
7
+ -->
8
+ <script setup>
9
+ import { useRouter } from "vue-router";
10
+ const router = useRouter();
11
+
12
+ const test1 = "url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_1.jpeg)";
13
+ const test2 = "url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_2.jpeg)";
14
+ const test3 = "url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_3.jpeg)";
15
+ const test4 = "url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_4.jpeg)";
16
+
17
+ const onKeyDown = (ev) => {
18
+ // 8:Backspace, 27:Escape, 10000:盒子返回键
19
+ if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
20
+ if (window.JsView) {
21
+ window.JsView.setGlobalConfig({
22
+ texCache: -1,
23
+ });
24
+ }
25
+
26
+ router.go(-1); // 有router时,回退
27
+ return true;
28
+ }
29
+ return false;
30
+ };
31
+
32
+ const style1 = {
33
+ left: 0,
34
+ top: 0,
35
+ width: 250,
36
+ height: 250,
37
+ borderRadius: "15px",
38
+ };
39
+
40
+ const style2 = {
41
+ left: 0,
42
+ top: 260,
43
+ width: 250,
44
+ height: 250,
45
+ borderRadius: "15px",
46
+ };
47
+ </script>
48
+ <template>
49
+ <jsv-focus-block autoFocus :onKeyDown="onKeyDown">
50
+ <div class="allBgc">
51
+ <div class="block">
52
+ <div :style="{ left: 0, top: 0 }">
53
+ <div class="leftFont top0">
54
+ {{ `原图加载` }}
55
+ </div>
56
+ <div class="leftFont top250">
57
+ {{ `使用缩小算法优化` }}
58
+ </div>
59
+ </div>
60
+
61
+ <div :style="{ left: 120, top: 0 }">
62
+ <img alt="" :style="style1" :src="test4" />
63
+ <img alt="" :style="style2" jsvImgScaledownTex :src="test4" />
64
+ </div>
65
+
66
+ <div :style="{ left: 380, top: 0 }">
67
+ <img alt="" :style="style1" :src="test1" />
68
+ <img alt="" :style="style2" jsvImgScaledownTex :src="test1" />
69
+ </div>
70
+
71
+ <div :style="{ left: 640, top: 0 }">
72
+ <img alt="" :style="style1" :src="test2" />
73
+ <img alt="" :style="style2" jsvImgScaledownTex :src="test2" />
74
+ </div>
75
+
76
+ <div :style="{ left: 900, top: 0 }">
77
+ <img alt="" :style="style1" :src="test3" />
78
+ <img alt="" :style="style2" jsvImgScaledownTex :src="test3" />
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </jsv-focus-block>
83
+ </template>
84
+ <style scoped>
85
+ .allBgc {
86
+ width: 1920;
87
+ height: 1080;
88
+ background-color: #334c4c;
89
+ }
90
+ .block {
91
+ left: 20;
92
+ top: 50;
93
+ }
94
+ .leftFont {
95
+ left: 0;
96
+ width: 100;
97
+ height: 200;
98
+ color: #ffffff;
99
+ font-size: 25px;
100
+ }
101
+ .top0 {
102
+ top: 0;
103
+ }
104
+ .top250 {
105
+ top: 250;
106
+ }
107
+ </style>
@@ -128,7 +128,7 @@ onBeforeUnmount(() => {
128
128
  `[确定]: 播放背景音乐\n[左]: 播放失败音乐1\n[右]: 播放失败音乐2\n[上]: 播放硬币音乐1\n[下]: 播放硬币音乐2`
129
129
  }}
130
130
  </div>
131
- <jsv-audiotrack ref="bgm" :src="bgmusic" loop="loop" />
131
+ <audiotrack ref="bgm" :src="bgmusic" loop="loop" />
132
132
  </div>
133
133
  </jsv-focus-block>
134
134
  </template>
@@ -7,19 +7,14 @@
7
7
  * JsvTextBox:Vue高阶组件,文字的垂直对齐方式显示控件
8
8
  * props说明:
9
9
  * verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
10
- * stylesList {array} 布局样式(必需),数组中可包含样式对象或者JsvStyleClass,或者JsvTextStyleClass对象,
11
- * 样式对象内容为{left:0, top:0, width:xxx, height:xxx},
12
- * 布局样式为数组中所有样式的合并。
13
- * styleToken {string} 类似于vue html元素的key,当style变化时,由使用者改变此Token通知hoc进行style重新识别。
14
- * Token不变的场景,props变化不会引起render,以提高渲染性能
10
+ * style {object} 样式(必需)
15
11
  *
16
12
  * 【技巧说明】
17
13
  * Q: 如何实现文字居中对齐方式显示?
18
14
  * A: verticalAlign属性设置为middle
19
15
  *
20
16
  * Q: 如何触发控件重绘?
21
- * A: 1. 变更styleToken属性,将触发控件重新解析styles并重绘
22
- * 2. 变更文字内容,将触发控件重绘,但不会重新解析styles
17
+ * A: 1. 变更文字内容,将触发控件重绘,但不会重新解析styles
23
18
  -->
24
19
 
25
20
  <script setup>
@@ -27,8 +22,7 @@ import RenderLeft from "./RenderLeft.vue";
27
22
  import RenderRight from "./RenderRight.vue";
28
23
  import RenderCenter from "./RenderCenter.vue";
29
24
  import RenderOneLine from "./RenderOneLine.vue";
30
- import { JsvTextStyleClass, JsvStyleClass } from "jsview";
31
- import { ref } from "vue";
25
+ import { ref, shallowRef } from "vue";
32
26
  import { useRouter } from "vue-router";
33
27
 
34
28
  const router = useRouter();
@@ -41,53 +35,7 @@ const text = `静夜思 --唐李白
41
35
  const text_latex = `静夜思 --唐李白
42
36
  床前\\textcolor{#FF0000}{明月光},疑是地上霜;
43
37
  举头\\textcolor{#0000FF}{望明月},低头思故乡。`;
44
- const sLayoutSet = new JsvStyleClass({
45
- width: 400,
46
- height: 300,
47
- backgroundColor: "rgba(255,255,0,0.5)",
48
- });
49
- const sFontSetLeft40Top = new JsvTextStyleClass({
50
- fontSize: "30px", // 测试 30 和 '30px' 两种写法的兼容性
51
- textAlign: "left",
52
- lineHeight: "40px",
53
- });
54
- const sFontSetLeft40Center = new JsvTextStyleClass({
55
- fontSize: "30px", // 测试 30 和 '30px' 两种写法的兼容性
56
- textAlign: "left",
57
- lineHeight: "40px",
58
- });
59
- const sFontSetLeft40Bottom = new JsvTextStyleClass({
60
- fontSize: "30px",
61
- textAlign: "left",
62
- lineHeight: "40px",
63
- });
64
- const sFontSetLeft80 = new JsvTextStyleClass({
65
- fontSize: "30px",
66
- textAlign: "left",
67
- lineHeight: "80px",
68
- });
69
- const sFontSetCenter40 = new JsvTextStyleClass({
70
- fontSize: "30px",
71
- textAlign: "center",
72
- lineHeight: "40px",
73
- });
74
- const sFontSetCenter80 = new JsvTextStyleClass({
75
- fontSize: "30px",
76
- textAlign: "center",
77
- lineHeight: "80px",
78
- });
79
- const sFontSetRight40 = new JsvTextStyleClass({
80
- fontSize: "30px",
81
- textAlign: "right",
82
- lineHeight: "80px",
83
- });
84
- const sFontSetRight80 = new JsvTextStyleClass({
85
- fontSize: "30px",
86
- textAlign: "right",
87
- lineHeight: "80px",
88
- });
89
- const sStyleToken = "v1.0";
90
- const rootRef = ref(null);
38
+
91
39
  const moveCount = ref(0);
92
40
 
93
41
  const onKeyDown = (ev) => {
@@ -132,33 +80,12 @@ const onBlur = () => {
132
80
  onBlur: onBlur,
133
81
  }"
134
82
  >
83
+ <div :style="{width:1280, height:720, backgroundColor:'#000000'}"/>
135
84
  <div :style="{ top: offsetY, left: offsetX }">
136
- <RenderLeft
137
- :text="text"
138
- :moveCount="moveCount"
139
- :sStyleToken="sStyleToken"
140
- :sLayoutSet="sLayoutSet"
141
- :sFontSetLeft40Top="sFontSetLeft40Top"
142
- :sFontSetLeft40Center="sFontSetLeft40Center"
143
- :sFontSetLeft40Bottom="sFontSetLeft40Bottom"
144
- :sFontSetLeft80="sFontSetLeft80"
145
- />
146
- <RenderRight
147
- :text="text"
148
- :sStyleToken="sStyleToken"
149
- :sLayoutSet="sLayoutSet"
150
- :sFontSetRight40="sFontSetRight40"
151
- :sFontSetRight80="sFontSetRight80"
152
- />
153
- <RenderCenter
154
- :text="text"
155
- :text_latex="text_latex"
156
- :sStyleToken="sStyleToken"
157
- :sLayoutSet="sLayoutSet"
158
- :sFontSetCenter40="sFontSetCenter40"
159
- :sFontSetCenter80="sFontSetCenter80"
160
- />
161
- <RenderOneLine :text="onLineText" :sStyleToken="sStyleToken" />
85
+ <RenderLeft :text="text" :moveCount="moveCount" />
86
+ <RenderRight :text="text" />
87
+ <RenderCenter :text="text" :text_latex="text_latex" />
88
+ <RenderOneLine :text="onLineText" />
162
89
  </div>
163
90
  </jsv-focus-block>
164
91
  </template>
@@ -4,10 +4,6 @@ export default {
4
4
  props: {
5
5
  text: String,
6
6
  text_latex: String,
7
- sStyleToken: String,
8
- sLayoutSet: Object,
9
- sFontSetCenter40: Object,
10
- sFontSetCenter80: Object,
11
7
  },
12
8
  components: { JsvTextBox },
13
9
  };
@@ -31,8 +27,16 @@ export default {
31
27
  </div>
32
28
  <JsvTextBox
33
29
  :verticalAlign="'top'"
34
- :styleToken="sStyleToken"
35
- :stylesList="[sLayoutSet, sFontSetCenter40, { left: 0, top: 0 }]"
30
+ :style="{
31
+ left: 0,
32
+ top: 0,
33
+ width: 400,
34
+ height: 300,
35
+ backgroundColor: 'rgba(255,255,0,0.5)',
36
+ fontSize: '30px',
37
+ textAlign: 'center',
38
+ lineHeight: '40px',
39
+ }"
36
40
  >
37
41
  {{ `[TC]${text}` }}
38
42
  </JsvTextBox>
@@ -52,8 +56,16 @@ export default {
52
56
  </div>
53
57
  <JsvTextBox
54
58
  :verticalAlign="'middle'"
55
- :styleToken="sStyleToken"
56
- :stylesList="[sLayoutSet, sFontSetCenter40, { left: 410, top: 0 }]"
59
+ :style="{
60
+ left: 410,
61
+ top: 0,
62
+ width: 400,
63
+ height: 300,
64
+ backgroundColor: 'rgba(255,255,0,0.5)',
65
+ fontSize: '30px',
66
+ textAlign: 'center',
67
+ lineHeight: '40px',
68
+ }"
57
69
  :enableLatex="true"
58
70
  >
59
71
  {{ `[MC]${text_latex}` }}
@@ -74,8 +86,16 @@ export default {
74
86
  </div>
75
87
  <JsvTextBox
76
88
  :verticalAlign="'bottom'"
77
- :styleToken="sStyleToken"
78
- :stylesList="[sLayoutSet, sFontSetCenter40, { left: 820, top: 0 }]"
89
+ :style="{
90
+ left: 820,
91
+ top: 0,
92
+ width: 400,
93
+ height: 300,
94
+ backgroundColor: 'rgba(255,255,0,0.5)',
95
+ fontSize: '30px',
96
+ textAlign: 'center',
97
+ lineHeight: '40px',
98
+ }"
79
99
  >
80
100
  {{ `[BC]${text}` }}
81
101
  </JsvTextBox>
@@ -96,12 +116,16 @@ export default {
96
116
  </div>
97
117
  <JsvTextBox
98
118
  :verticalAlign="'middle'"
99
- :styleToken="sStyleToken"
100
- :stylesList="[
101
- sLayoutSet,
102
- sFontSetCenter80,
103
- { left: 1240, top: 0, width: 500 },
104
- ]"
119
+ :style="{
120
+ left: 1240,
121
+ top: 0,
122
+ width: 500,
123
+ height: 300,
124
+ backgroundColor: 'rgba(255,255,0,0.5)',
125
+ fontSize: '30px',
126
+ textAlign: 'center',
127
+ lineHeight: '80px',
128
+ }"
105
129
  >
106
130
  {{ `[MC]${text}` }}
107
131
  </JsvTextBox>
@@ -4,12 +4,6 @@ export default {
4
4
  props: {
5
5
  text: String,
6
6
  moveCount: Number,
7
- sStyleToken: String,
8
- sLayoutSet: Object,
9
- sFontSetLeft40Top: Object,
10
- sFontSetLeft40Center: Object,
11
- sFontSetLeft40Bottom: Object,
12
- sFontSetLeft80: Object,
13
7
  },
14
8
  components: { JsvTextBox },
15
9
  };
@@ -33,8 +27,16 @@ export default {
33
27
  </div>
34
28
  <JsvTextBox
35
29
  :verticalAlign="'top'"
36
- :styleToken="sStyleToken"
37
- :stylesList="[sLayoutSet, sFontSetLeft40Top, { left: 0, top: 0 }]"
30
+ :style="{
31
+ left: 0,
32
+ top: 0,
33
+ width: 400,
34
+ height: 300,
35
+ backgroundColor: 'rgba(255,255,0,0.5)',
36
+ fontSize: '30px',
37
+ textAlign: 'left',
38
+ lineHeight: '40px',
39
+ }"
38
40
  >
39
41
  {{ `测试文字变化能引起刷新: [${moveCount}]\n[TL]${text}` }}
40
42
  </JsvTextBox>
@@ -54,8 +56,16 @@ export default {
54
56
  </div>
55
57
  <JsvTextBox
56
58
  :verticalAlign="'middle'"
57
- :styleToken="sStyleToken"
58
- :stylesList="[sLayoutSet, sFontSetLeft40Center, { left: 410, top: 0 }]"
59
+ :style="{
60
+ left: 410,
61
+ top: 0,
62
+ width: 400,
63
+ height: 300,
64
+ backgroundColor: 'rgba(255,255,0,0.5)',
65
+ fontSize: '30px',
66
+ textAlign: 'left',
67
+ lineHeight: '40px',
68
+ }"
59
69
  >
60
70
  {{ `[ML]${text}` }}
61
71
  </JsvTextBox>
@@ -75,8 +85,16 @@ export default {
75
85
  </div>
76
86
  <JsvTextBox
77
87
  :verticalAlign="'bottom'"
78
- :styleToken="sStyleToken"
79
- :stylesList="[sLayoutSet, sFontSetLeft40Bottom, { left: 820, top: 0 }]"
88
+ :style="{
89
+ left: 820,
90
+ top: 0,
91
+ width: 400,
92
+ height: 300,
93
+ backgroundColor: 'rgba(255,255,0,0.5)',
94
+ fontSize: '30px',
95
+ textAlign: 'left',
96
+ lineHeight: '40px',
97
+ }"
80
98
  >
81
99
  {{ `[BL]${text}` }}
82
100
  </JsvTextBox>
@@ -96,14 +114,25 @@ export default {
96
114
  </div>
97
115
  <JsvTextBox
98
116
  :verticalAlign="'top'"
99
- :styleToken="sStyleToken"
100
- :stylesList="[
101
- sLayoutSet,
102
- sFontSetLeft80,
103
- { left: 1240, top: 0, width: 500 },
104
- ]"
117
+ :style="{
118
+ left: 1240,
119
+ top: 0,
120
+ width: 500,
121
+ height: 300,
122
+ backgroundColor: 'rgba(255,255,0,0.5)',
123
+ fontSize: '30px',
124
+ textAlign: 'left',
125
+ lineHeight: '80px',
126
+ }"
127
+ className="test"
105
128
  >
106
129
  {{ `[TL]${text}` }}
107
130
  </JsvTextBox>
108
131
  </div>
109
- </template>
132
+ </template>
133
+
134
+ <style scoped>
135
+ .test {
136
+ color: #007788
137
+ }
138
+ </style>
@@ -3,7 +3,6 @@ import { JsvTextBox } from "jsview";
3
3
  export default {
4
4
  props: {
5
5
  text: String,
6
- sStyleToken: String,
7
6
  },
8
7
  components: { JsvTextBox },
9
8
  };
@@ -27,22 +26,16 @@ export default {
27
26
  </div>
28
27
  <JsvTextBox
29
28
  :verticalAlign="'top'"
30
- :styleToken="sStyleToken"
31
- :stylesList="[
32
- {
33
- left: 0,
34
- top: 0,
35
- width: 400,
36
- height: 80,
37
- backgroundColor: 'rgba(255,255,0,0.5)',
38
- },
39
- {
40
- backgroundColor: 'rgba(255,255,0,0.5)',
41
- fontSize: '30px',
42
- textAlign: 'left',
43
- lineHeight: '80px',
44
- },
45
- ]"
29
+ :style="{
30
+ left: 0,
31
+ top: 0,
32
+ width: 400,
33
+ height: 80,
34
+ backgroundColor: 'rgba(255,255,0,0.5)',
35
+ fontSize: '30px',
36
+ textAlign: 'left',
37
+ lineHeight: '80px',
38
+ }"
46
39
  >
47
40
  {{ text }}
48
41
  </JsvTextBox>
@@ -62,22 +55,16 @@ export default {
62
55
  </div>
63
56
  <JsvTextBox
64
57
  :verticalAlign="'middle'"
65
- :styleToken="sStyleToken"
66
- :stylesList="[
67
- {
68
- left: 410,
69
- top: 0,
70
- width: 400,
71
- height: 80,
72
- backgroundColor: 'rgba(255,255,0,0.5)',
73
- },
74
- {
75
- backgroundColor: 'rgba(255,255,0,0.5)',
76
- fontSize: '30px',
77
- textAlign: 'center',
78
- lineHeight: '80px',
79
- },
80
- ]"
58
+ :style="{
59
+ left: 410,
60
+ top: 0,
61
+ width: 400,
62
+ height: 80,
63
+ backgroundColor: 'rgba(255,255,0,0.5)',
64
+ fontSize: '30px',
65
+ textAlign: 'center',
66
+ lineHeight: '80px',
67
+ }"
81
68
  >
82
69
  {{ text }}
83
70
  </JsvTextBox>
@@ -97,22 +84,16 @@ export default {
97
84
  </div>
98
85
  <JsvTextBox
99
86
  :verticalAlign="'bottom'"
100
- :styleToken="sStyleToken"
101
- :stylesList="[
102
- {
103
- left: 820,
104
- top: 0,
105
- width: 400,
106
- height: 80,
107
- backgroundColor: 'rgba(255,255,0,0.5)',
108
- },
109
- {
110
- backgroundColor: 'rgba(255,255,0,0.5)',
111
- fontSize: '30px',
112
- textAlign: 'right',
113
- lineHeight: '80px',
114
- },
115
- ]"
87
+ :style="{
88
+ left: 820,
89
+ top: 0,
90
+ width: 400,
91
+ height: 80,
92
+ backgroundColor: 'rgba(255,255,0,0.5)',
93
+ fontSize: '30px',
94
+ textAlign: 'right',
95
+ lineHeight: '80px',
96
+ }"
116
97
  >
117
98
  {{ text }}
118
99
  </JsvTextBox>
@@ -3,10 +3,6 @@ import { JsvTextBox } from "jsview";
3
3
  export default {
4
4
  props: {
5
5
  text: String,
6
- sStyleToken: String,
7
- sLayoutSet: Object,
8
- sFontSetRight40: Object,
9
- sFontSetRight80: Object,
10
6
  },
11
7
  components: { JsvTextBox },
12
8
  };
@@ -30,8 +26,16 @@ export default {
30
26
  </div>
31
27
  <JsvTextBox
32
28
  :verticalAlign="'top'"
33
- :styleToken="sStyleToken"
34
- :stylesList="[sLayoutSet, sFontSetRight40, { left: 0, top: 0 }]"
29
+ :style="{
30
+ left: 0,
31
+ top: 0,
32
+ width: 400,
33
+ height: 300,
34
+ backgroundColor: 'rgba(255,255,0,0.5)',
35
+ fontSize: '30px',
36
+ textAlign: 'right',
37
+ lineHeight: '40px',
38
+ }"
35
39
  >
36
40
  {{ `[TR]${text}` }}
37
41
  </JsvTextBox>
@@ -51,8 +55,16 @@ export default {
51
55
  </div>
52
56
  <JsvTextBox
53
57
  :verticalAlign="'middle'"
54
- :styleToken="sStyleToken"
55
- :stylesList="[sLayoutSet, sFontSetRight40, { left: 410, top: 0 }]"
58
+ :style="{
59
+ left: 410,
60
+ top: 0,
61
+ width: 400,
62
+ height: 300,
63
+ backgroundColor: 'rgba(255,255,0,0.5)',
64
+ fontSize: '30px',
65
+ textAlign: 'right',
66
+ lineHeight: '40px',
67
+ }"
56
68
  >
57
69
  {{ `[MR]${text}` }}
58
70
  </JsvTextBox>
@@ -72,8 +84,16 @@ export default {
72
84
  </div>
73
85
  <JsvTextBox
74
86
  :verticalAlign="'bottom'"
75
- :styleToken="sStyleToken"
76
- :stylesList="[sLayoutSet, sFontSetRight40, { left: 820, top: 0 }]"
87
+ :style="{
88
+ left: 820,
89
+ top: 0,
90
+ width: 400,
91
+ height: 300,
92
+ backgroundColor: 'rgba(255,255,0,0.5)',
93
+ fontSize: '30px',
94
+ textAlign: 'right',
95
+ lineHeight: '40px',
96
+ }"
77
97
  >
78
98
  {{ `[BR]${text}` }}
79
99
  </JsvTextBox>
@@ -94,12 +114,16 @@ export default {
94
114
  </div>
95
115
  <JsvTextBox
96
116
  :verticalAlign="'bottom'"
97
- :styleToken="sStyleToken"
98
- :stylesList="[
99
- sLayoutSet,
100
- sFontSetRight80,
101
- { left: 1240, top: 0, width: 500 },
102
- ]"
117
+ :style="{
118
+ left: 1240,
119
+ top: 0,
120
+ width: 500,
121
+ height: 300,
122
+ backgroundColor: 'rgba(255,255,0,0.5)',
123
+ fontSize: '30px',
124
+ textAlign: 'right',
125
+ lineHeight: '80px',
126
+ }"
103
127
  >
104
128
  {{ `[BR]${text}` }}
105
129
  </JsvTextBox>
@@ -2,7 +2,7 @@
2
2
  * 当TextData数据中有blur为0(不显示阴影)时,为了测试会报“StyleFormatCheck.js?058c:447 textShadow: blur shadow above 0(now=2 2 0 #00FF00)”错误
3
3
  -->
4
4
  <script>
5
- import { JsvTextStyleClass, JsvTextBox } from "jsview";
5
+ import { JsvTextBox } from "jsview";
6
6
 
7
7
  export default {
8
8
  components: {
@@ -32,11 +32,6 @@ export default {
32
32
  textShadow: "4 4 0.5 #0000EF",
33
33
  },
34
34
  ],
35
- font_style: new JsvTextStyleClass({
36
- fontSize: "35px",
37
- textAlign: "center",
38
- lineHeight: "40px",
39
- }),
40
35
  };
41
36
  },
42
37
  methods: {
@@ -77,17 +72,16 @@ export default {
77
72
  </div>
78
73
  <JsvTextBox
79
74
  :verticalAlign="'middle'"
80
- :styleToken="'Fixed'"
81
- :stylesList="[
82
- font_style,
83
- {
84
- top: 50,
85
- width: 320,
86
- height: 70,
87
- textShadow: item.textShadow,
88
- backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
89
- },
90
- ]"
75
+ :style="{
76
+ top: 50,
77
+ width: 320,
78
+ height: 70,
79
+ textShadow: item.textShadow,
80
+ backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
81
+ fontSize: '35px',
82
+ textAlign: 'center',
83
+ lineHeight: '40px',
84
+ }"
91
85
  >
92
86
  文字阴影
93
87
  </JsvTextBox>