@shijiu/jsview-vue-samples 2.0.1073 → 2.0.1106
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/Basic/components/div/DivBackground.vue +13 -25
- package/Basic/components/img/ImageGroup.vue +14 -20
- package/Basic/components/img/ImgLayout.vue +59 -68
- package/BasicFocusControl/components/BaseBlock.vue +11 -17
- package/BasicFocusControl/components/MainAreaLeftBlock.vue +2 -2
- package/BasicFocusControl/components/MainAreaRightBlock.vue +2 -2
- package/BasicFocusControl/components/SideBarBlock.vue +2 -2
- package/CssPreprocessor/App.vue +40 -51
- package/CssPreprocessor/Less/App.vue +6 -14
- package/CssPreprocessor/Scss/App.vue +6 -14
- package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +0 -1
- package/CssPreprocessor/Stylus/App.vue +6 -14
- package/CssPreprocessor/utils/ContentBlock.vue +30 -12
- package/CssPreprocessor/utils/ContentList.vue +23 -14
- package/CssPreprocessor/utils/Panel.vue +34 -23
- package/CssPreprocessor/utils/TitleBar.vue +7 -9
- package/DemoHomepage/components/BodyFrame.vue +54 -78
- package/DemoHomepage/components/Dialog.vue +38 -43
- package/DemoHomepage/components/Item.vue +52 -55
- package/DemoHomepage/components/TabFrame.vue +43 -72
- package/DemoHomepage/router.js +1 -1
- package/GiftRain/App.vue +10 -4
- package/GridDemo/App.vue +5 -5
- package/GridDemo/FocusItem.vue +3 -5
- package/GridDemo/Item.vue +4 -24
- package/HashHistory/App.vue +0 -10
- package/HashHistory/views/MainPage.vue +0 -1
- package/ImpactStop/App.vue +0 -1
- package/Input/App.vue +106 -150
- package/Input/FullKeyboard.vue +18 -28
- package/Input/InputPanel.vue +87 -109
- package/Input/KeyboardItem.vue +35 -45
- package/JsvRadarChart/App.vue +16 -19
- package/LongImage/Button.vue +2 -3
- package/LongText/App.vue +0 -3
- package/LongText/Button.vue +0 -1
- package/LongText/LongTextScroll.vue +0 -4
- package/Marquee/App.vue +1 -0
- package/MetroWidgetDemos/PerformanceTest/App.vue +2 -3
- package/MetroWidgetDemos/PerformanceTest/Item.vue +52 -55
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +86 -95
- package/MetroWidgetDemos/PingPong/App.vue +56 -89
- package/MetroWidgetDemos/PingPong/AppPage.vue +3 -3
- package/MetroWidgetDemos/PingPong/Item.vue +1 -1
- package/MetroWidgetDemos/PingPong/TabItem.vue +3 -3
- package/MetroWidgetDemos/PingPong/WidgetItem.vue +1 -1
- package/MetroWidgetDemos/SkeletonDiagram/App.vue +2 -4
- package/MetroWidgetDemos/basic/Item.vue +1 -1
- package/MetroWidgetDemos/direction/App.vue +0 -2
- package/MetroWidgetDemos/direction/Item.vue +1 -1
- package/MetroWidgetDemos/focusableItemBasic/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemBasic/ButtonItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/Item.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/WidgetItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/ButtonItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/Item.vue +1 -1
- package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +23 -25
- package/MetroWidgetDemos/layoutType/App.vue +0 -2
- package/MetroWidgetDemos/layoutType/Item.vue +1 -1
- package/MetroWidgetDemos/ninePatchFocusPage/App.vue +0 -1
- package/MetroWidgetDemos/ninePatchFocusPage/PageRow.vue +1 -1
- package/MetroWidgetDemos/padding/App.vue +0 -2
- package/MetroWidgetDemos/padding/Item.vue +1 -1
- package/MetroWidgetDemos/slideSetting/Item.vue +1 -1
- package/MockjsDemo/App.vue +26 -11
- package/MockjsDemo/mock/index.js +9 -1
- package/QrcodeDemo/App.vue +0 -1
- package/SoundPool/App.vue +1 -2
- package/SpriteImage/App.vue +89 -125
- package/Swiper/App.vue +1 -3
- package/TestNativeSharedView/App.vue +104 -48
- package/TextBox/RenderCenter.vue +89 -113
- package/TextBox/RenderLeft.vue +89 -113
- package/TextBox/RenderOneLine.vue +7 -10
- package/TextBox/RenderRight.vue +8 -11
- package/TextShadowDemo/App.vue +54 -75
- package/TextureAnimation/App.vue +175 -287
- package/TextureAnimation/App2.vue +1 -5
- package/ThrowMoveDemo/AccelerateDemo.vue +40 -71
- package/ThrowMoveDemo/App.vue +13 -23
- package/ThrowMoveDemo/TargetDemo.vue +24 -53
- package/ThrowMoveDemo/UDParabolicDemo.vue +31 -60
- package/VideoDemo/App.vue +71 -116
- package/package.json +1 -1
- package/VideoDemo/components/Button.vue +0 -58
- package/VideoDemo/components/Controllor.vue +0 -197
- package/VideoDemo/components/VideoFrame.vue +0 -140
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { JsvNativeSharedDiv, JsvFocusBlock, jJsvRuntimeBridge, enableNativeViewListener, disableNativeViewListener } from "jsview"
|
|
3
|
-
import { onBeforeUnmount, onMounted, reactive } from 'vue';
|
|
3
|
+
import { onBeforeUnmount, onMounted, reactive, watch, shallowRef } from 'vue';
|
|
4
4
|
|
|
5
5
|
let state = reactive({
|
|
6
6
|
outX: 20,
|
|
@@ -17,6 +17,30 @@ let _TestData = [
|
|
|
17
17
|
|
|
18
18
|
let _Index = 0;
|
|
19
19
|
|
|
20
|
+
//给两个div给定不同的响应式变量
|
|
21
|
+
let view1 = shallowRef('null')
|
|
22
|
+
let view2 = shallowRef('null')
|
|
23
|
+
let isShow=shallowRef(false)
|
|
24
|
+
let isStop=shallowRef(false)
|
|
25
|
+
//创造出需要的四个属性的对象
|
|
26
|
+
const obj = (newValue) => {
|
|
27
|
+
const resultObj = {}
|
|
28
|
+
const newObj = JSON.parse(newValue.replace(/(\w+)\=/g, "\"$1\":").replace(/'/g, "\"").replace(/^Bundle\[/, "").replace(/\]$/, ""));
|
|
29
|
+
for (const key in newObj) {
|
|
30
|
+
if (key == 'height' || key == 'width' || key == 'x' || key == 'y') {
|
|
31
|
+
resultObj[key] = newObj[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return resultObj
|
|
35
|
+
}
|
|
36
|
+
//监听
|
|
37
|
+
watch(view1, (n, o) => {
|
|
38
|
+
view1 = obj(n)
|
|
39
|
+
})
|
|
40
|
+
watch(view2, (n, o) => {
|
|
41
|
+
view2 = obj(n)
|
|
42
|
+
isShow.value=true
|
|
43
|
+
})
|
|
20
44
|
// 每2秒进行位置变化以测试位置信息更新
|
|
21
45
|
let loopTimer = setInterval(() => {
|
|
22
46
|
_Index = (_Index + 1) % 3;
|
|
@@ -34,11 +58,11 @@ let _ResiterCallbackId1 = -1;
|
|
|
34
58
|
let _ResiterCallbackId2 = -1;
|
|
35
59
|
|
|
36
60
|
let getId = (id) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
if (_ReisterId !== id) {
|
|
62
|
+
_ResiterCallbackId1 = enableNativeViewListener(id, view1)
|
|
63
|
+
_ReisterId = id;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
42
66
|
|
|
43
67
|
let timeout1 = -1;
|
|
44
68
|
let timeout2 = -1;
|
|
@@ -51,17 +75,18 @@ let getId2 = (id) => {
|
|
|
51
75
|
// 提前发出的event在listener注册时,可以收到最后状态信息
|
|
52
76
|
timeout1 = setTimeout(() => {
|
|
53
77
|
timeout1 = -1;
|
|
54
|
-
_ResiterCallbackId2 = enableNativeViewListener(id);
|
|
78
|
+
_ResiterCallbackId2 = enableNativeViewListener(id, view2);
|
|
55
79
|
timeout2 = setTimeout(() => {
|
|
56
80
|
timeout2 = -1;
|
|
57
81
|
disableNativeViewListener(_ResiterCallbackId2);
|
|
82
|
+
isStop.value=true
|
|
58
83
|
_ResiterCallbackId2 = -1;
|
|
59
84
|
}, 10000);
|
|
60
85
|
}, 1000);
|
|
61
86
|
}
|
|
62
87
|
};
|
|
63
88
|
|
|
64
|
-
onBeforeUnmount(()=>{
|
|
89
|
+
onBeforeUnmount(() => {
|
|
65
90
|
if (loopTimer >= 0) {
|
|
66
91
|
clearInterval(loopTimer);
|
|
67
92
|
loopTimer = -1;
|
|
@@ -87,7 +112,7 @@ onBeforeUnmount(()=>{
|
|
|
87
112
|
}
|
|
88
113
|
})
|
|
89
114
|
|
|
90
|
-
onMounted(()=>{
|
|
115
|
+
onMounted(() => {
|
|
91
116
|
console.log("TestNativeSharedView mounted");
|
|
92
117
|
jJsvRuntimeBridge.notifyPageLoaded();
|
|
93
118
|
})
|
|
@@ -95,76 +120,106 @@ onMounted(()=>{
|
|
|
95
120
|
</script>
|
|
96
121
|
|
|
97
122
|
<template>
|
|
98
|
-
<jsv-focus-block
|
|
99
|
-
autoFocus
|
|
100
|
-
>
|
|
123
|
+
<jsv-focus-block autoFocus>
|
|
101
124
|
<!-- 一个无限动画元素,来测试卡顿 -->
|
|
102
|
-
<div
|
|
103
|
-
:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
125
|
+
<div :style="{
|
|
126
|
+
top: 100,
|
|
127
|
+
left: 1000,
|
|
128
|
+
height: 150,
|
|
129
|
+
width: 150,
|
|
130
|
+
backgroundColor: '#334455',
|
|
131
|
+
animation: 'test-anim-rotate 1s infinite linear',
|
|
132
|
+
}" />
|
|
133
|
+
<!-- 显示参数 -->
|
|
134
|
+
<div :style="{ top: 400, left: 1000, width: 256, height: 240, backgroundColor: 'rgba(27,38,151,0.8)' }">
|
|
135
|
+
<div :style="{ top: 0, left: 0, width: 120, height: 30, color: '#FFFFFF', fontSize: 20, textAlign: 'center' }">{{
|
|
136
|
+
'view1的参数'
|
|
137
|
+
}}</div>
|
|
138
|
+
<div v-for="(value, key, index) in view1" :style="{
|
|
139
|
+
top: 30 + index * 40,
|
|
140
|
+
left: 10,
|
|
141
|
+
width: 100,
|
|
142
|
+
height: 40,
|
|
143
|
+
fontSize: 20,
|
|
144
|
+
color: '#FFFFFF',
|
|
145
|
+
textAlign: 'center'
|
|
146
|
+
}">{{ key }}:{{ value }}</div>
|
|
147
|
+
<div :style="{ top: 0, left: 130, width: 120, height: 30, color: '#FFFFFF', fontSize: 20, textAlign: 'center' }">{{
|
|
148
|
+
'view2的参数'
|
|
149
|
+
}}</div>
|
|
150
|
+
<div v-if="isShow">
|
|
151
|
+
<div v-for="(value, key, index) in view2" :style="{
|
|
152
|
+
top: 30 + index * 40,
|
|
153
|
+
left: 130,
|
|
154
|
+
width: 100,
|
|
155
|
+
height: 40,
|
|
156
|
+
fontSize: 20,
|
|
157
|
+
color: '#FFFFFF',
|
|
158
|
+
textAlign: 'center'
|
|
159
|
+
}">{{ key }}:{{ value }}</div>
|
|
160
|
+
<div :style="{top: 200,
|
|
161
|
+
left: 130,
|
|
162
|
+
width: 100,
|
|
163
|
+
height: 40,
|
|
164
|
+
fontSize: 20,
|
|
165
|
+
color: '#FFFFFF',
|
|
166
|
+
textAlign: 'center'}">{{ isStop ? "监听停止":"" }}</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div
|
|
169
|
+
v-else
|
|
170
|
+
:style="{
|
|
171
|
+
top: 30 + 2*30,
|
|
172
|
+
left: 130,
|
|
173
|
+
width: 100,
|
|
174
|
+
height: 40,
|
|
175
|
+
fontSize: 20,
|
|
176
|
+
color: '#FFFFFF',
|
|
177
|
+
textAlign: 'center'}">{{ '未监听' }}</div>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<div :style="{
|
|
114
182
|
left: state.outX,
|
|
115
183
|
top: state.outY,
|
|
116
184
|
backgroundColor: '#00FF00',
|
|
117
185
|
width: 600,
|
|
118
186
|
height: 600,
|
|
119
|
-
}"
|
|
120
|
-
|
|
121
|
-
<jsv-native-shared-div
|
|
122
|
-
:getId="getId"
|
|
123
|
-
:style="{
|
|
187
|
+
}">
|
|
188
|
+
<jsv-native-shared-div :getId="getId" :style="{
|
|
124
189
|
left: state.inX,
|
|
125
190
|
top: state.inY,
|
|
126
191
|
width: 500,
|
|
127
192
|
height: 500,
|
|
128
|
-
}"
|
|
129
|
-
|
|
130
|
-
<div
|
|
131
|
-
:style="{
|
|
193
|
+
}">
|
|
194
|
+
<div :style="{
|
|
132
195
|
backgroundColor: '#00FF00',
|
|
133
196
|
left: 50,
|
|
134
197
|
top: 40,
|
|
135
198
|
width: 30,
|
|
136
199
|
height: 30,
|
|
137
|
-
}"
|
|
138
|
-
/>
|
|
200
|
+
}" />
|
|
139
201
|
</jsv-native-shared-div>
|
|
140
202
|
</div>
|
|
141
|
-
<div
|
|
142
|
-
:style="{
|
|
203
|
+
<div :style="{
|
|
143
204
|
left: state.outX + 200,
|
|
144
205
|
top: state.outY,
|
|
145
206
|
backgroundColor: '#00FF00',
|
|
146
207
|
width: 600,
|
|
147
208
|
height: 600,
|
|
148
|
-
}"
|
|
149
|
-
|
|
150
|
-
<jsv-native-shared-div
|
|
151
|
-
:getId="getId2"
|
|
152
|
-
:style="{
|
|
209
|
+
}">
|
|
210
|
+
<jsv-native-shared-div :getId="getId2" :style="{
|
|
153
211
|
left: state.inX,
|
|
154
212
|
top: state.inY,
|
|
155
213
|
width: 500,
|
|
156
214
|
height: 500,
|
|
157
|
-
}"
|
|
158
|
-
|
|
159
|
-
<div
|
|
160
|
-
:style="{
|
|
215
|
+
}">
|
|
216
|
+
<div :style="{
|
|
161
217
|
backgroundColor: '#00FF00',
|
|
162
218
|
left: 50,
|
|
163
219
|
top: 40,
|
|
164
220
|
width: 30,
|
|
165
221
|
height: 30,
|
|
166
|
-
}"
|
|
167
|
-
/>
|
|
222
|
+
}" />
|
|
168
223
|
</jsv-native-shared-div>
|
|
169
224
|
</div>
|
|
170
225
|
</jsv-focus-block>
|
|
@@ -175,6 +230,7 @@ onMounted(()=>{
|
|
|
175
230
|
from {
|
|
176
231
|
transform: rotate3d(0, 0, 1, 270deg);
|
|
177
232
|
}
|
|
233
|
+
|
|
178
234
|
to {
|
|
179
235
|
transform: rotate3d(0, 0, 1, 0deg);
|
|
180
236
|
}
|
package/TextBox/RenderCenter.vue
CHANGED
|
@@ -1,133 +1,109 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script setup>
|
|
2
2
|
import { JsvTextBox } from "jsview";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
components: { JsvTextBox },
|
|
9
|
-
};
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
text: String,
|
|
5
|
+
text_latex: String,
|
|
6
|
+
})
|
|
10
7
|
</script>
|
|
11
8
|
|
|
12
9
|
<template>
|
|
13
10
|
<div :style="{ top: 400 }">
|
|
14
|
-
<div
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
11
|
+
<div :style="{
|
|
12
|
+
left: 0,
|
|
13
|
+
top: -50,
|
|
14
|
+
width: 400,
|
|
15
|
+
height: 50,
|
|
16
|
+
fontSize: 20,
|
|
17
|
+
textAlign: 'left',
|
|
18
|
+
lineHeight: 50,
|
|
19
|
+
backgroundColor: '#00ff00',
|
|
20
|
+
}">
|
|
26
21
|
整体垂直向上对齐、文字水平居中显示
|
|
27
22
|
</div>
|
|
28
|
-
<JsvTextBox
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}"
|
|
40
|
-
>
|
|
41
|
-
{{ `[TC]${text}` }}
|
|
23
|
+
<JsvTextBox :verticalAlign="'top'" :style="{
|
|
24
|
+
left: 0,
|
|
25
|
+
top: 0,
|
|
26
|
+
width: 400,
|
|
27
|
+
height: 300,
|
|
28
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
29
|
+
fontSize: 30,
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
lineHeight: 40,
|
|
32
|
+
}">
|
|
33
|
+
{{ `[TC]${props.text}` }}
|
|
42
34
|
</JsvTextBox>
|
|
43
|
-
<div
|
|
44
|
-
:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}"
|
|
54
|
-
>
|
|
35
|
+
<div :style="{
|
|
36
|
+
left: 410,
|
|
37
|
+
top: -50,
|
|
38
|
+
width: 400,
|
|
39
|
+
height: 50,
|
|
40
|
+
fontSize: 20,
|
|
41
|
+
textAlign: 'left',
|
|
42
|
+
lineHeight: 50,
|
|
43
|
+
backgroundColor: '#00ff00',
|
|
44
|
+
}">
|
|
55
45
|
整体垂直居中对齐、文字水平居中显示
|
|
56
46
|
</div>
|
|
57
|
-
<JsvTextBox
|
|
58
|
-
:
|
|
59
|
-
:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}"
|
|
69
|
-
:enableLatex="true"
|
|
70
|
-
>
|
|
71
|
-
{{ `[MC]${text_latex}` }}
|
|
47
|
+
<JsvTextBox :verticalAlign="'middle'" :style="{
|
|
48
|
+
left: 410,
|
|
49
|
+
top: 0,
|
|
50
|
+
width: 400,
|
|
51
|
+
height: 300,
|
|
52
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
53
|
+
fontSize: 30,
|
|
54
|
+
textAlign: 'center',
|
|
55
|
+
lineHeight: 40,
|
|
56
|
+
}" :enableLatex="true">
|
|
57
|
+
{{ `[MC]${props.text_latex}` }}
|
|
72
58
|
</JsvTextBox>
|
|
73
|
-
<div
|
|
74
|
-
:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}"
|
|
84
|
-
>
|
|
59
|
+
<div :style="{
|
|
60
|
+
left: 820,
|
|
61
|
+
top: -50,
|
|
62
|
+
width: 400,
|
|
63
|
+
height: 50,
|
|
64
|
+
fontSize: 20,
|
|
65
|
+
textAlign: 'left',
|
|
66
|
+
lineHeight: 50,
|
|
67
|
+
backgroundColor: '#00ff00',
|
|
68
|
+
}">
|
|
85
69
|
整体垂直向下对齐、文字水平居中显示
|
|
86
70
|
</div>
|
|
87
|
-
<JsvTextBox
|
|
88
|
-
:
|
|
89
|
-
:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}"
|
|
99
|
-
>
|
|
100
|
-
{{ `[BC]${text}` }}
|
|
71
|
+
<JsvTextBox :verticalAlign="'bottom'" :style="{
|
|
72
|
+
left: 820,
|
|
73
|
+
top: 0,
|
|
74
|
+
width: 400,
|
|
75
|
+
height: 300,
|
|
76
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
77
|
+
fontSize: 30,
|
|
78
|
+
textAlign: 'center',
|
|
79
|
+
lineHeight: 40,
|
|
80
|
+
}">
|
|
81
|
+
{{ `[BC]${props.text}` }}
|
|
101
82
|
</JsvTextBox>
|
|
102
83
|
|
|
103
|
-
<div
|
|
104
|
-
:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}"
|
|
114
|
-
>
|
|
84
|
+
<div :style="{
|
|
85
|
+
left: 1240,
|
|
86
|
+
top: -50,
|
|
87
|
+
width: 500,
|
|
88
|
+
height: 50,
|
|
89
|
+
fontSize: 20,
|
|
90
|
+
textAlign: 'left',
|
|
91
|
+
lineHeight: 50,
|
|
92
|
+
backgroundColor: '#00ff00',
|
|
93
|
+
}">
|
|
115
94
|
整体垂直居中对齐、文字水平居中显示、行高80px
|
|
116
95
|
</div>
|
|
117
|
-
<JsvTextBox
|
|
118
|
-
:
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}"
|
|
129
|
-
>
|
|
130
|
-
{{ `[MC]${text}` }}
|
|
96
|
+
<JsvTextBox :verticalAlign="'middle'" :style="{
|
|
97
|
+
left: 1240,
|
|
98
|
+
top: 0,
|
|
99
|
+
width: 500,
|
|
100
|
+
height: 300,
|
|
101
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
102
|
+
fontSize: 30,
|
|
103
|
+
textAlign: 'center',
|
|
104
|
+
lineHeight: 80,
|
|
105
|
+
}">
|
|
106
|
+
{{ `[MC]${props.text}` }}
|
|
131
107
|
</JsvTextBox>
|
|
132
108
|
</div>
|
|
133
109
|
</template>
|
package/TextBox/RenderLeft.vue
CHANGED
|
@@ -1,132 +1,108 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script setup>
|
|
2
2
|
import { JsvTextBox } from "jsview";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
components: { JsvTextBox },
|
|
9
|
-
};
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
text: String,
|
|
5
|
+
moveCount: Number,
|
|
6
|
+
})
|
|
10
7
|
</script>
|
|
11
8
|
|
|
12
9
|
<template>
|
|
13
10
|
<div :style="{ top: 50 }">
|
|
14
|
-
<div
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
11
|
+
<div :style="{
|
|
12
|
+
left: 0,
|
|
13
|
+
top: -50,
|
|
14
|
+
width: 400,
|
|
15
|
+
height: 50,
|
|
16
|
+
fontSize: 20,
|
|
17
|
+
textAlign: 'left',
|
|
18
|
+
lineHeight: 50,
|
|
19
|
+
backgroundColor: '#00ff00',
|
|
20
|
+
}">
|
|
26
21
|
整体向上对齐、文字居左显示
|
|
27
22
|
</div>
|
|
28
|
-
<JsvTextBox
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}"
|
|
40
|
-
>
|
|
41
|
-
{{ `测试文字变化能引起刷新: [${moveCount}]\n[TL]${text}` }}
|
|
23
|
+
<JsvTextBox :verticalAlign="'top'" :style="{
|
|
24
|
+
left: 0,
|
|
25
|
+
top: 0,
|
|
26
|
+
width: 400,
|
|
27
|
+
height: 300,
|
|
28
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
29
|
+
fontSize: 30,
|
|
30
|
+
textAlign: 'left',
|
|
31
|
+
lineHeight: 40,
|
|
32
|
+
}">
|
|
33
|
+
{{ `测试文字变化能引起刷新: [${props.moveCount}]\n[TL]${props.text}` }}
|
|
42
34
|
</JsvTextBox>
|
|
43
|
-
<div
|
|
44
|
-
:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}"
|
|
54
|
-
>
|
|
35
|
+
<div :style="{
|
|
36
|
+
left: 410,
|
|
37
|
+
top: -50,
|
|
38
|
+
width: 400,
|
|
39
|
+
height: 50,
|
|
40
|
+
fontSize: 20,
|
|
41
|
+
textAlign: 'left',
|
|
42
|
+
lineHeight: 50,
|
|
43
|
+
backgroundColor: '#00ff00',
|
|
44
|
+
}">
|
|
55
45
|
整体垂直居中对齐、文字水平居左显示
|
|
56
46
|
</div>
|
|
57
|
-
<JsvTextBox
|
|
58
|
-
:
|
|
59
|
-
:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}"
|
|
69
|
-
>
|
|
70
|
-
{{ `[ML]${text}` }}
|
|
47
|
+
<JsvTextBox :verticalAlign="'middle'" :style="{
|
|
48
|
+
left: 410,
|
|
49
|
+
top: 0,
|
|
50
|
+
width: 400,
|
|
51
|
+
height: 300,
|
|
52
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
53
|
+
fontSize: 30,
|
|
54
|
+
textAlign: 'left',
|
|
55
|
+
lineHeight: 40,
|
|
56
|
+
}">
|
|
57
|
+
{{ `[ML]${props.text}` }}
|
|
71
58
|
</JsvTextBox>
|
|
72
|
-
<div
|
|
73
|
-
:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}"
|
|
83
|
-
>
|
|
59
|
+
<div :style="{
|
|
60
|
+
left: 820,
|
|
61
|
+
top: -50,
|
|
62
|
+
width: 400,
|
|
63
|
+
height: 50,
|
|
64
|
+
fontSize: 20,
|
|
65
|
+
textAlign: 'left',
|
|
66
|
+
lineHeight: 50,
|
|
67
|
+
backgroundColor: '#00ff00',
|
|
68
|
+
}">
|
|
84
69
|
整体垂直向下对齐、文字水平居左显示
|
|
85
70
|
</div>
|
|
86
|
-
<JsvTextBox
|
|
87
|
-
:
|
|
88
|
-
:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}"
|
|
98
|
-
>
|
|
99
|
-
{{ `[BL]${text}` }}
|
|
71
|
+
<JsvTextBox :verticalAlign="'bottom'" :style="{
|
|
72
|
+
left: 820,
|
|
73
|
+
top: 0,
|
|
74
|
+
width: 400,
|
|
75
|
+
height: 300,
|
|
76
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
77
|
+
fontSize: 30,
|
|
78
|
+
textAlign: 'left',
|
|
79
|
+
lineHeight: 40,
|
|
80
|
+
}">
|
|
81
|
+
{{ `[BL]${props.text}` }}
|
|
100
82
|
</JsvTextBox>
|
|
101
|
-
<div
|
|
102
|
-
:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}"
|
|
112
|
-
>
|
|
83
|
+
<div :style="{
|
|
84
|
+
left: 1240,
|
|
85
|
+
top: -50,
|
|
86
|
+
width: 500,
|
|
87
|
+
height: 50,
|
|
88
|
+
fontSize: 20,
|
|
89
|
+
textAlign: 'left',
|
|
90
|
+
lineHeight: 50,
|
|
91
|
+
backgroundColor: '#00ff00',
|
|
92
|
+
}">
|
|
113
93
|
整体垂直向上对齐、文字水平居左显示、行高80px
|
|
114
94
|
</div>
|
|
115
|
-
<JsvTextBox
|
|
116
|
-
:
|
|
117
|
-
:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}"
|
|
127
|
-
className="test"
|
|
128
|
-
>
|
|
129
|
-
{{ `[TL]${text}` }}
|
|
95
|
+
<JsvTextBox :verticalAlign="'top'" :style="{
|
|
96
|
+
left: 1240,
|
|
97
|
+
top: 0,
|
|
98
|
+
width: 500,
|
|
99
|
+
height: 300,
|
|
100
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
101
|
+
fontSize: 30,
|
|
102
|
+
textAlign: 'left',
|
|
103
|
+
lineHeight: 80,
|
|
104
|
+
}" className="test">
|
|
105
|
+
{{ `[TL]${props.text}` }}
|
|
130
106
|
</JsvTextBox>
|
|
131
107
|
</div>
|
|
132
108
|
</template>
|