@shijiu/jsview-vue 1.9.888 → 1.9.921
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +36 -67
- package/utils/JsViewEngineWidget/TemplateParser.js +146 -138
- package/utils/JsViewEngineWidget/WidgetCommon.js +2 -11
- package/utils/JsViewPlugin/BrowserPluginLoader.js +14 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +1 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +19 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.js +1 -101
- package/utils/JsViewVueTools/JsvHashHistory.js +10 -10
- package/utils/JsViewVueTools/JsvImpactTracer.js +1 -1
- package/utils/JsViewVueTools/JsvStyleClass.js +1 -10
- package/utils/JsViewVueTools/JsvTextTools.js +7 -2
- package/utils/JsViewVueTools/TypeCheckAndSet.js +5 -5
- package/utils/JsViewVueTools/index.d.ts +1 -5
- package/utils/JsViewVueTools/index.js +0 -2
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +173 -152
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserSpray.vue +1 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +88 -51
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/BrowserApic.vue +65 -63
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +45 -82
- package/utils/JsViewVueWidget/JsvFilterView.vue +12 -17
- package/utils/JsViewVueWidget/JsvGrid.vue +10 -2
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +7 -5
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +8 -60
- package/utils/JsViewVueWidget/JsvMarquee.vue +9 -12
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +30 -24
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -2
- package/utils/JsViewVueWidget/JsvPosterImage.vue +4 -4
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +8 -8
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +4 -4
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +1 -1
- package/utils/JsViewVueWidget/JsvSoundPool.js +1 -1
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +13 -15
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +1 -1
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +115 -111
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
- package/utils/JsViewVueWidget/JsvTextBox.vue +38 -16
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +16 -12
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +3 -3
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +0 -3
- package/utils/JsViewVueWidget/index.js +8 -13
- package/utils/JsViewVueWidget/utils/text.js +3 -4
|
@@ -41,10 +41,10 @@ watchEffect(()=>{
|
|
|
41
41
|
<div :style="common_style">
|
|
42
42
|
<slot></slot>
|
|
43
43
|
<img
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
:
|
|
44
|
+
data-jsv-vw-enable-fade="true"
|
|
45
|
+
data-jsv-vw-mask-poster-on-top="true"
|
|
46
|
+
data-jsv-img-scaledown-tex="true"
|
|
47
|
+
:data-jsv-img-color-space="colorSpace"
|
|
48
48
|
:style="image_style"
|
|
49
49
|
v-bind="$attrs"
|
|
50
50
|
/>
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
view_info.callToken
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
Forge.sViewStore.remove(id);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
this.preloadViewList = [];
|
|
@@ -125,7 +125,7 @@ export default {
|
|
|
125
125
|
view_info.callToken
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
Forge.sViewStore.remove(id);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
this.downloadViewList = [];
|
|
@@ -177,8 +177,8 @@ export default {
|
|
|
177
177
|
let image_url = base_url;
|
|
178
178
|
if (base_url && base_url.indexOf("http") < 0) {
|
|
179
179
|
// 包含http和https两种请求
|
|
180
|
-
if (window.JsView.
|
|
181
|
-
image_url = new window.JsView.
|
|
180
|
+
if (window.JsView.Dom.UrlRef) {
|
|
181
|
+
image_url = new window.JsView.Dom.UrlRef(base_url).href;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
let target_size = null;
|
|
@@ -226,7 +226,7 @@ export default {
|
|
|
226
226
|
const texture_setting = new Forge.ExternalTextureSetting(texture);
|
|
227
227
|
const preload_view = new Forge.PreloadView(texture_setting);
|
|
228
228
|
return {
|
|
229
|
-
viewId:
|
|
229
|
+
viewId: Forge.sViewStore.add(
|
|
230
230
|
new Forge.ViewInfo(preload_view)
|
|
231
231
|
),
|
|
232
232
|
textureRef: texture,
|
|
@@ -308,7 +308,7 @@ export default {
|
|
|
308
308
|
const preload_view = new Forge.PreloadView(texture_setting);
|
|
309
309
|
|
|
310
310
|
return {
|
|
311
|
-
viewId:
|
|
311
|
+
viewId: Forge.sViewStore.add(
|
|
312
312
|
new Forge.ViewInfo(preload_view)
|
|
313
313
|
),
|
|
314
314
|
textureRef: texture,
|
|
@@ -331,10 +331,10 @@ export default {
|
|
|
331
331
|
<template>
|
|
332
332
|
<div>
|
|
333
333
|
<div v-for="item in preloadViewList" :key="item.viewId" :id="item.viewId">
|
|
334
|
-
<div v-if="item.viewId" :
|
|
334
|
+
<div v-if="item.viewId" :data-jsv-vw-innerview="item.viewId"></div>
|
|
335
335
|
</div>
|
|
336
336
|
<div v-for="item in downloadViewList" :key="item.viewId" :id="item.viewId">
|
|
337
|
-
<div v-if="item.viewId" :
|
|
337
|
+
<div v-if="item.viewId" :data-jsv-vw-innerview="item.viewId"></div>
|
|
338
338
|
</div>
|
|
339
339
|
</div>
|
|
340
340
|
</template>
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
if (this.imageSettings && calculatedImageSettings) {
|
|
74
74
|
let url = this.imageSettings.src;
|
|
75
75
|
if (typeof url === "string") {
|
|
76
|
-
url = new window.JsView.
|
|
76
|
+
url = new window.JsView.Dom.UrlRef(this.imageSettings.src).href;
|
|
77
77
|
}
|
|
78
78
|
const img_texture = texture_manager.GetImage(url);
|
|
79
79
|
const img_view = new Forge.LayoutView(
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
115
115
|
};
|
|
116
116
|
if (this.jsvBaseView === null) {
|
|
117
117
|
this.jsvBaseView = new Forge.LayoutView();
|
|
118
|
-
this.innerViewId =
|
|
118
|
+
this.innerViewId = Forge.sViewStore.add(
|
|
119
119
|
new Forge.ViewInfo(this.jsvBaseView)
|
|
120
120
|
);
|
|
121
121
|
}
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
},
|
|
136
136
|
mounted() {
|
|
137
137
|
if (this.innerViewId !== -1) {
|
|
138
|
-
|
|
138
|
+
Forge.sViewStore.remove(this.innerViewId);
|
|
139
139
|
this.innerViewId = -1;
|
|
140
140
|
this.jsvBaseView = null;
|
|
141
141
|
}
|
|
@@ -144,6 +144,6 @@ export default {
|
|
|
144
144
|
</script>
|
|
145
145
|
|
|
146
146
|
<template>
|
|
147
|
-
<div :
|
|
147
|
+
<div :data-jsv-vw-innerview="innerViewId"></div>
|
|
148
148
|
</template>
|
|
149
149
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2021-10-12 18:20:43
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-11-25 18:26:40
|
|
6
4
|
* @Description: file content
|
|
7
5
|
-->
|
|
8
6
|
|
|
@@ -50,14 +48,14 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
50
48
|
let image_url = base_url;
|
|
51
49
|
if (base_url && base_url.indexOf("http") === 0) {
|
|
52
50
|
image_url = base_url;
|
|
53
|
-
} else if (window.JsView.
|
|
54
|
-
image_url = new window.JsView.
|
|
51
|
+
} else if (window.JsView.Dom.UrlRef) {
|
|
52
|
+
image_url = new window.JsView.Dom.UrlRef(pointRes).href;
|
|
55
53
|
}
|
|
56
54
|
texture_setting = new Forge.ExternalTextureSetting(
|
|
57
55
|
texture_manager.GetImage2(image_url, false, null, "RGB_8888", null)
|
|
58
56
|
);
|
|
59
57
|
}
|
|
60
|
-
const spray_view = new Forge.SprayView(texture_setting
|
|
58
|
+
const spray_view = new Forge.SprayView(texture_setting);
|
|
61
59
|
const add_num_per_frame = sprayStyle.addNumSpeed
|
|
62
60
|
? sprayStyle.addNumSpeed
|
|
63
61
|
: 0.001;
|
|
@@ -83,7 +81,8 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
83
81
|
accelerate_x,
|
|
84
82
|
accelerate_y,
|
|
85
83
|
sprayStyle.enableFade,
|
|
86
|
-
sprayStyle.enableShrink
|
|
84
|
+
sprayStyle.enableShrink,
|
|
85
|
+
ignoreClip
|
|
87
86
|
);
|
|
88
87
|
const view_width =
|
|
89
88
|
sprayStyle.deltaWidth === 0 ? 1 : 2 * sprayStyle.deltaWidth;
|
|
@@ -91,9 +90,7 @@ let buildForgeView = (pointRes, sprayStyle, sizeRef, ignoreClip) => {
|
|
|
91
90
|
sprayStyle.deltaHeight === 0 ? 1 : 2 * sprayStyle.deltaHeight;
|
|
92
91
|
sizeRef.width = view_width;
|
|
93
92
|
sizeRef.height = view_height;
|
|
94
|
-
return
|
|
95
|
-
new Forge.ViewInfo(spray_view)
|
|
96
|
-
);
|
|
93
|
+
return Forge.sViewStore.add(new Forge.ViewInfo(spray_view, null));
|
|
97
94
|
};
|
|
98
95
|
|
|
99
96
|
export default {
|
|
@@ -109,13 +106,13 @@ export default {
|
|
|
109
106
|
ignoreClip: {
|
|
110
107
|
type: Boolean,
|
|
111
108
|
default: false,
|
|
112
|
-
}
|
|
109
|
+
},
|
|
113
110
|
},
|
|
114
111
|
data() {
|
|
115
112
|
return {
|
|
116
113
|
size: {
|
|
117
114
|
width: 0,
|
|
118
|
-
height: 0
|
|
115
|
+
height: 0,
|
|
119
116
|
},
|
|
120
117
|
viewId: -1,
|
|
121
118
|
};
|
|
@@ -123,7 +120,7 @@ export default {
|
|
|
123
120
|
methods: {
|
|
124
121
|
unloadView() {
|
|
125
122
|
if (this.viewId != -1) {
|
|
126
|
-
|
|
123
|
+
Forge.sViewStore.remove(this.viewId);
|
|
127
124
|
this.viewId = -1;
|
|
128
125
|
}
|
|
129
126
|
},
|
|
@@ -142,7 +139,8 @@ export default {
|
|
|
142
139
|
</script>
|
|
143
140
|
|
|
144
141
|
<template>
|
|
145
|
-
<div
|
|
146
|
-
:style="{width: size.width, height: size.height}"
|
|
147
|
-
:
|
|
142
|
+
<div
|
|
143
|
+
:style="{ width: size.width, height: size.height }"
|
|
144
|
+
:data-jsv-vw-innerview="viewId"
|
|
145
|
+
></div>
|
|
148
146
|
</template>
|
|
@@ -117,8 +117,8 @@ export default {
|
|
|
117
117
|
this.stopFrame = stopFrame;
|
|
118
118
|
this.blinkAnim = null;
|
|
119
119
|
this.blinkAnimCache = null;
|
|
120
|
-
this.transform_style = this._AnalyzeProp();
|
|
121
120
|
this.sAnimationToken = 0;
|
|
121
|
+
this.transform_style = this._AnalyzeProp();
|
|
122
122
|
},
|
|
123
123
|
|
|
124
124
|
unmounted() {
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
-->
|
|
31
31
|
|
|
32
32
|
<script>
|
|
33
|
-
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define"
|
|
33
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
34
34
|
import JsvActorMove, {
|
|
35
35
|
JsvActorMoveControl,
|
|
36
|
-
} from "
|
|
37
|
-
import JsvVisibleSensor from "
|
|
36
|
+
} from "jsview/utils/JsViewVueWidget/JsvActorMove";
|
|
37
|
+
import JsvVisibleSensor from "jsview/utils/JsViewVueWidget/JsvVisibleSensor";
|
|
38
38
|
import Indicator from "./Indicator.vue";
|
|
39
|
-
import { ref
|
|
39
|
+
import { ref } from "vue";
|
|
40
40
|
|
|
41
41
|
const VIEW_NUM = 3;
|
|
42
42
|
|
|
@@ -370,10 +370,12 @@ export default {
|
|
|
370
370
|
curViewAnimation.SetAnimationListener(
|
|
371
371
|
new Forge.AnimationListener(null, this._onAnimationEnd, null)
|
|
372
372
|
);
|
|
373
|
-
this.$refs.element
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
this.$refs.element
|
|
373
|
+
this.$refs.element[this.currentViewIndex]
|
|
374
|
+
?.jsvGetProxyView(true)
|
|
375
|
+
.StartAnimation(curViewAnimation);
|
|
376
|
+
this.$refs.element[modToRange(this.currentViewIndex - direction, VIEW_NUM)]
|
|
377
|
+
?.jsvGetProxyView(true)
|
|
378
|
+
.StartAnimation(preViewAnimation);
|
|
377
379
|
},
|
|
378
380
|
_startSmoothTranslateAnimation() {
|
|
379
381
|
let curController = this.controllerList[this.currentViewIndex];
|
|
@@ -426,61 +428,62 @@ export default {
|
|
|
426
428
|
</script>
|
|
427
429
|
|
|
428
430
|
<template>
|
|
429
|
-
<
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
>
|
|
445
|
-
<div v-if="totalFrame == 1">
|
|
446
|
-
<slot
|
|
447
|
-
name="itemView"
|
|
448
|
-
:currentIndex="0"
|
|
449
|
-
:dataIndex="0"
|
|
450
|
-
:focused="focused"
|
|
451
|
-
></slot>
|
|
452
|
-
</div>
|
|
453
|
-
<div
|
|
454
|
-
v-else
|
|
455
|
-
:style="{
|
|
456
|
-
width: layoutInfo.width,
|
|
457
|
-
height: layoutInfo.height,
|
|
458
|
-
overflow: 'hidden',
|
|
431
|
+
<div>
|
|
432
|
+
<jsv-visible-sensor
|
|
433
|
+
:horizonShown="0.2"
|
|
434
|
+
:verticalShown="0.2"
|
|
435
|
+
:width="layoutInfo.width"
|
|
436
|
+
:height="layoutInfo.height"
|
|
437
|
+
:enable="true"
|
|
438
|
+
:callback="onBeVisible"
|
|
439
|
+
></jsv-visible-sensor>
|
|
440
|
+
<jsv-focus-block
|
|
441
|
+
:name="name"
|
|
442
|
+
:onAction="{
|
|
443
|
+
onFocus: _onFocus,
|
|
444
|
+
onBlur: _onBlur,
|
|
445
|
+
onKeyDown: _onKeyDown,
|
|
459
446
|
}"
|
|
460
447
|
>
|
|
448
|
+
<div v-if="totalFrame == 1">
|
|
449
|
+
<slot
|
|
450
|
+
name="itemView"
|
|
451
|
+
:currentIndex="0"
|
|
452
|
+
:dataIndex="0"
|
|
453
|
+
:focused="focused"
|
|
454
|
+
></slot>
|
|
455
|
+
</div>
|
|
461
456
|
<div
|
|
457
|
+
v-else
|
|
462
458
|
:style="{
|
|
463
|
-
|
|
459
|
+
width: layoutInfo.width,
|
|
460
|
+
height: layoutInfo.height,
|
|
461
|
+
overflow: 'hidden',
|
|
464
462
|
}"
|
|
465
463
|
>
|
|
466
|
-
<div
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
464
|
+
<div
|
|
465
|
+
:style="{
|
|
466
|
+
zIndex: 0,
|
|
467
|
+
}"
|
|
468
|
+
>
|
|
469
|
+
<div v-if="smoothTranslate">
|
|
470
|
+
<jsv-actor-move
|
|
471
|
+
v-for="(item, index) in viewInfoList"
|
|
472
|
+
:key="index"
|
|
473
|
+
:style="item.style"
|
|
474
|
+
:control="controllerList[index]"
|
|
475
|
+
>
|
|
476
|
+
<!-- 为了保证slot中的页面刷新。不加这个div slot中的img标签不会更新,vue或者是dom的bug? -->
|
|
477
|
+
<div :key="item.dataIndex">
|
|
478
|
+
<slot
|
|
479
|
+
name="itemView"
|
|
480
|
+
:currentIndex="currentDataIndex"
|
|
481
|
+
:dataIndex="item.dataIndex"
|
|
482
|
+
:focused="focused"
|
|
483
|
+
></slot>
|
|
484
|
+
</div>
|
|
482
485
|
|
|
483
|
-
|
|
486
|
+
<!-- <div
|
|
484
487
|
:style="{
|
|
485
488
|
width: 50,
|
|
486
489
|
height: 50,
|
|
@@ -490,26 +493,26 @@ export default {
|
|
|
490
493
|
>
|
|
491
494
|
{{ index }}
|
|
492
495
|
</div> -->
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
496
|
+
</jsv-actor-move>
|
|
497
|
+
</div>
|
|
498
|
+
<div v-else>
|
|
499
|
+
<div
|
|
500
|
+
v-for="(item, index) in viewInfoList"
|
|
501
|
+
:key="index"
|
|
502
|
+
:style="item.style"
|
|
503
|
+
ref="element"
|
|
504
|
+
>
|
|
505
|
+
<!-- 为了保证slot中的页面刷新。不加这个div slot中的img标签不会更新,vue或者是dom的bug? -->
|
|
506
|
+
<div :key="item.dataIndex">
|
|
507
|
+
<slot
|
|
508
|
+
name="itemView"
|
|
509
|
+
:currentIndex="currentDataIndex"
|
|
510
|
+
:dataIndex="item.dataIndex"
|
|
511
|
+
:focused="focused"
|
|
512
|
+
></slot>
|
|
513
|
+
</div>
|
|
511
514
|
|
|
512
|
-
|
|
515
|
+
<!-- <div
|
|
513
516
|
:style="{
|
|
514
517
|
width: 50,
|
|
515
518
|
height: 50,
|
|
@@ -519,43 +522,44 @@ export default {
|
|
|
519
522
|
>
|
|
520
523
|
{{ index + " " + item.dataIndex }}
|
|
521
524
|
</div> -->
|
|
525
|
+
</div>
|
|
522
526
|
</div>
|
|
523
527
|
</div>
|
|
524
|
-
</div>
|
|
525
528
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
529
|
+
<div v-if="showIndicator" :style="indicatorLayout">
|
|
530
|
+
<indicator
|
|
531
|
+
:number="totalFrame"
|
|
532
|
+
:current="currentDataIndex"
|
|
533
|
+
:itemSize="indicatorDotSize"
|
|
534
|
+
:vertical="vertical"
|
|
535
|
+
>
|
|
536
|
+
<template #current>
|
|
537
|
+
<slot name="indicatorCur">
|
|
538
|
+
<div
|
|
539
|
+
:style="{
|
|
540
|
+
width: 10,
|
|
541
|
+
height: 10,
|
|
542
|
+
backgroundColor: 'rgba(50, 50, 50, 1.0)',
|
|
543
|
+
borderRadius: '5px',
|
|
544
|
+
}"
|
|
545
|
+
></div>
|
|
546
|
+
</slot>
|
|
547
|
+
</template>
|
|
548
|
+
<template #normal>
|
|
549
|
+
<slot name="indicatorNor">
|
|
550
|
+
<div
|
|
551
|
+
:style="{
|
|
552
|
+
width: 10,
|
|
553
|
+
height: 10,
|
|
554
|
+
backgroundColor: 'rgba(100, 100, 100, 0.7)',
|
|
555
|
+
borderRadius: '5px',
|
|
556
|
+
}"
|
|
557
|
+
></div>
|
|
558
|
+
</slot>
|
|
559
|
+
</template>
|
|
560
|
+
</indicator>
|
|
561
|
+
</div>
|
|
558
562
|
</div>
|
|
559
|
-
</
|
|
560
|
-
</
|
|
561
|
-
</template>
|
|
563
|
+
</jsv-focus-block>
|
|
564
|
+
</div>
|
|
565
|
+
</template>
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
* verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
|
|
9
9
|
* style {object} 样式(必需)
|
|
10
10
|
* enableLatex {bool} 是否启用Latex文字描画模式
|
|
11
|
-
* textDirection {string} 内容文字的方向, 默认是unset, 此时会根据第一个字符的语言确定文字是ltr还是rtl
|
|
12
11
|
-->
|
|
13
12
|
|
|
14
13
|
<script setup>
|
|
15
|
-
import { ref,
|
|
14
|
+
import { ref, computed } from "vue";
|
|
16
15
|
|
|
17
16
|
const props = defineProps({
|
|
18
17
|
style: Object,
|
|
@@ -24,31 +23,54 @@ const props = defineProps({
|
|
|
24
23
|
type: String,
|
|
25
24
|
default: "middle",
|
|
26
25
|
},
|
|
27
|
-
enableLatex:
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false,
|
|
30
|
-
},
|
|
26
|
+
enableLatex: Boolean,
|
|
31
27
|
className: String,
|
|
32
|
-
textDirection: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "unset",
|
|
35
|
-
},
|
|
36
28
|
});
|
|
37
29
|
|
|
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;
|
|
38
41
|
</script>
|
|
39
42
|
|
|
40
43
|
<template>
|
|
41
44
|
<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>
|
|
42
62
|
<div
|
|
63
|
+
v-else
|
|
43
64
|
:className="className"
|
|
44
|
-
:style="
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
65
|
+
:style="{
|
|
66
|
+
...style,
|
|
67
|
+
JsvTextLatex: enableLatex ? 1 : 0,
|
|
68
|
+
JsvTextVerticalAlign: verticalAlign,
|
|
69
|
+
JsvTextLineAlign: lineAlign,
|
|
70
|
+
}"
|
|
49
71
|
jsv-inherit-class="1"
|
|
50
72
|
>
|
|
51
73
|
<slot></slot>
|
|
52
74
|
</div>
|
|
53
75
|
</div>
|
|
54
|
-
</template>
|
|
76
|
+
</template>
|