@shijiu/jsview-vue 0.9.631 → 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 (140) 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 -0
  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/Basic/components/text/TextOverflow.vue +8 -3
  19. package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
  20. package/samples/Collision/App.vue +11 -11
  21. package/samples/DemoHomepage/App.vue +43 -8
  22. package/samples/DemoHomepage/router.js +18 -10
  23. package/samples/DemoHomepage/views/Homepage.vue +83 -96
  24. package/samples/FilterDemo/App.vue +1 -1
  25. package/samples/FlipCard/App.vue +2 -2
  26. package/samples/FlipCard/FlipCard.vue +3 -3
  27. package/samples/GridDemo/App.vue +3 -3
  28. package/samples/GridDemo/ButtonBlock.vue +2 -2
  29. package/samples/GridDemo/FocusItem.vue +2 -2
  30. package/samples/GridDemo/Item.vue +1 -1
  31. package/samples/HashHistory/App.vue +10 -3
  32. package/samples/HashHistory/components/Item.vue +1 -1
  33. package/samples/ImpactStop/App.vue +15 -11
  34. package/samples/Input/InputPanel.vue +1 -1
  35. package/samples/LongImage/Button.vue +1 -1
  36. package/samples/LongImage/ButtonItem.vue +1 -1
  37. package/samples/LongImage/LongImageScroll.vue +2 -2
  38. package/samples/LongText/App.vue +1 -1
  39. package/samples/LongText/Button.vue +1 -1
  40. package/samples/LongText/ButtonItem.vue +1 -1
  41. package/samples/LongText/LongTextScroll.vue +3 -3
  42. package/samples/Marquee/App.vue +176 -40
  43. package/samples/Marquee/longText.js +14 -0
  44. package/samples/MetroWidgetDemos/Advanced/App.vue +5 -6
  45. package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
  46. package/samples/MetroWidgetDemos/Advanced/Buttons.vue +5 -5
  47. package/samples/MetroWidgetDemos/Advanced/Mixed.vue +4 -4
  48. package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +82 -0
  49. package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +88 -0
  50. package/samples/MetroWidgetDemos/Advanced/{Widgets.vue → widgets/Widgets.vue} +56 -11
  51. package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  52. package/samples/MetroWidgetDemos/Item.vue +4 -2
  53. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
  54. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
  55. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +3 -3
  56. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
  57. package/samples/MetroWidgetDemos/PingPong/TabItem.vue +1 -1
  58. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +3 -3
  59. package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +2 -2
  60. package/samples/MetroWidgetDemos/Simple/App.vue +2 -2
  61. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +6 -6
  62. package/samples/MetroWidgetDemos/WidgetItem.vue +2 -3
  63. package/samples/MetroWidgetDemos/data.js +2 -1
  64. package/samples/NinePatchDemo/App.vue +2 -2
  65. package/samples/NinePatchDemo/Item.vue +2 -2
  66. package/samples/Preload/App.vue +1 -1
  67. package/samples/Preload/Item.vue +1 -1
  68. package/samples/QrcodeDemo/App.vue +1 -1
  69. package/samples/ScaleDownNeon/App.vue +107 -0
  70. package/samples/SoundPool/App.vue +3 -3
  71. package/samples/SpriteImage/App.vue +5 -0
  72. package/samples/TextBox/App.vue +9 -82
  73. package/samples/TextBox/RenderCenter.vue +40 -16
  74. package/samples/TextBox/RenderLeft.vue +48 -19
  75. package/samples/TextBox/RenderOneLine.vue +30 -49
  76. package/samples/TextBox/RenderRight.vue +40 -16
  77. package/samples/TextShadowDemo/App.vue +11 -17
  78. package/samples/TextureAnimation/App2.vue +1 -1
  79. package/samples/TextureSize/App.vue +3 -3
  80. package/samples/ThrowMoveDemo/LRParabolicDemo.vue +33 -47
  81. package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
  82. package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
  83. package/samples/TransitPage/App.vue +1 -1
  84. package/samples/VideoDemo/App.vue +8 -8
  85. package/samples/VideoDemo/components/Button.vue +1 -1
  86. package/samples/VideoDemo/components/Controllor.vue +1 -1
  87. package/samples/VisibleSensorDemo/App.vue +3 -3
  88. package/scripts/jsview-run-android.js +5 -4
  89. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +4 -4
  90. package/utils/JsViewEngineWidget/MetroWidget/Const.js +11 -0
  91. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +245 -111
  92. package/utils/JsViewEngineWidget/TemplateParser.js +227 -178
  93. package/utils/JsViewEngineWidget/WidgetCommon.js +14 -6
  94. package/utils/JsViewEngineWidget/index.js +3 -2
  95. package/utils/JsViewPlugin/BrowserPluginLoader.js +4 -2
  96. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +302 -0
  97. package/utils/JsViewPlugin/JsvAudio/CheckType.js +68 -0
  98. package/utils/JsViewPlugin/JsvAudio/Events.js +17 -0
  99. package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +176 -0
  100. package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +40 -0
  101. package/utils/JsViewPlugin/JsvAudio/JsvAudioBrowser.vue +46 -0
  102. package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +140 -0
  103. package/utils/JsViewPlugin/JsvAudio/index.js +26 -0
  104. package/utils/JsViewPlugin/JsvAudio/version.js +24 -0
  105. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +61 -12
  106. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +8 -1
  107. package/utils/JsViewPlugin/JsvPlayer/index.js +14 -0
  108. package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
  109. package/utils/JsViewVueTools/JsvHashHistory.js +34 -8
  110. package/utils/JsViewVueTools/JsvImpactTracer.js +2 -2
  111. package/utils/JsViewVueTools/JsvRuntimeBridge.js +46 -8
  112. package/utils/JsViewVueTools/JsvStyleClass.js +9 -0
  113. package/utils/JsViewVueTools/JsvTextTools.js +18 -0
  114. package/utils/JsViewVueTools/TypeCheckAndSet.js +3 -3
  115. package/utils/JsViewVueTools/index.js +2 -1
  116. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +5 -7
  117. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +20 -22
  118. package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +4 -4
  119. package/utils/JsViewVueWidget/JsvGrid.vue +1 -9
  120. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +1 -1
  121. package/utils/JsViewVueWidget/JsvMarquee.vue +188 -205
  122. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
  123. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +35 -27
  124. package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -54
  125. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
  126. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
  127. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +21 -5
  128. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +23 -3
  129. package/utils/JsViewVueWidget/JsvTextBox.vue +27 -84
  130. package/utils/JsViewVueWidget/JsvTouchContainer.vue +5 -6
  131. package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
  132. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
  133. package/utils/JsViewVueWidget/index.js +8 -8
  134. package/utils/JsViewEngineWidget/MetroPage.js +0 -2128
  135. package/utils/JsViewEngineWidget/SimpleWidget/ContentView.vue +0 -51
  136. package/utils/JsViewEngineWidget/SimpleWidget/Dispatcher.js +0 -19
  137. package/utils/JsViewEngineWidget/SimpleWidget/DivWrapper.vue +0 -53
  138. package/utils/JsViewEngineWidget/SimpleWidget/ItemView.vue +0 -142
  139. package/utils/JsViewEngineWidget/SimpleWidget/RootView.vue +0 -140
  140. package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +0 -1629
@@ -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>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, reactive } from "vue";
2
+ import { ref, shallowRef, reactive } from "vue";
3
3
  import { useRouter } from "vue-router";
4
4
  import {
5
5
  jJsvRuntimeBridge,
@@ -32,7 +32,7 @@ const onKeyDown = (ev) => {
32
32
  </div>
33
33
  <div class="leftFont top250">
34
34
  {{
35
- `指定尺寸加载\n内存占用由给定尺寸决定,图片质量下降,但更省内存`
35
+ `指定尺寸加载\n内存占用由给定尺寸决定,图片质量基本没变,但更省内存`
36
36
  }}
37
37
  </div>
38
38
  </div>
@@ -67,9 +67,9 @@ const onKeyDown = (ev) => {
67
67
  <img alt="" class="graphSize top0" :src="pngDemo" />
68
68
  <img
69
69
  alt=""
70
+ :src="pngDemo"
70
71
  class="graphSize top250"
71
72
  jsvImgScaledownTex
72
- :src="pngDemo"
73
73
  />
74
74
  <div class="underFont">
75
75
  {{ `png有透明图片\n指定尺寸有明显锯齿` }}
@@ -80,9 +80,9 @@ const onKeyDown = (ev) => {
80
80
  <img alt="" class="graphSize top0" :src="pngNoAlphaDemo" />
81
81
  <img
82
82
  alt=""
83
+ :src="pngNoAlphaDemo"
83
84
  class="graphSize top250"
84
85
  jsvImgScaledownTex
85
- :src="pngNoAlphaDemo"
86
86
  />
87
87
  <div class="underFont">
88
88
  {{ `png无透明图片` }}