@shijiu/jsview-vue 2.1.366-test.0 → 2.1.428

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 (27) hide show
  1. package/bin/jsview-vue.mjs +843 -508
  2. package/package.json +1 -1
  3. package/tools/config/vite.config.ts +1 -0
  4. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +4 -8
  5. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +8 -10
  6. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +194 -167
  7. package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +7 -3
  8. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +8 -5
  9. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +173 -0
  10. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +4 -0
  11. package/utils/JsViewVueTools/JsvTextureDefines.ts +11 -0
  12. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +27 -3
  13. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -1
  14. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +0 -28
  15. package/utils/JsViewVueTools/index.js +1 -0
  16. package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +118 -0
  17. package/utils/JsViewVueWidget/JsvFlexCell/index.js +6 -0
  18. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +29 -0
  19. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +4 -0
  20. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +26 -25
  21. package/utils/JsViewVueWidget/JsvPieChart.vue +37 -37
  22. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +29 -9
  23. package/utils/JsViewVueWidget/JsvSceneTransition.vue +174 -0
  24. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +41 -30
  25. package/utils/JsViewVueWidget/JsvTextBox.vue +20 -34
  26. package/utils/JsViewVueWidget/index.js +2 -0
  27. package/utils/JsViewEngineWidget/MetroWidget/AnimationManager.ts +0 -189
@@ -10,24 +10,29 @@
10
10
  -->
11
11
 
12
12
  <template>
13
- <div v-for="(item, index) in finalData.slice().reverse()">
14
- <JsvSector
15
- :radius="props.radius"
16
- :config="{
17
- startAngle: Number(item.startAngle),
18
- sweepAngle: Number(item.sweepAngle) + 1,
19
- color: item.color,
20
- }"
21
- :id="`indexZ${index}`"
22
- :animationTime="props.animationTime"
23
- :centerPosition="props.centerPosition"
24
- :extraTime="item.extraTime"
25
- ></JsvSector>
13
+ <div :key="'pie-' + finalData.length">
14
+ <div v-for="(item, index) in finalData.slice().reverse()">
15
+ <JsvSector
16
+ :radius="props.radius"
17
+ :config="{
18
+ startAngle: Number(item.startAngle),
19
+ sweepAngle:
20
+ finalData.length == 1 || item.sweepAngle == 360
21
+ ? Number(item.sweepAngle)
22
+ : Number(item.sweepAngle) + 1,
23
+ color: item.color,
24
+ }"
25
+ :key="`indexZ${index}`"
26
+ :animationTime="props.animationTime"
27
+ :centerPosition="props.centerPosition"
28
+ :extraTime="item.extraTime"
29
+ ></JsvSector>
30
+ </div>
26
31
  </div>
27
32
  </template>
28
33
 
29
34
  <script setup>
30
- import { watch, reactive, nextTick } from "vue";
35
+ import { reactive,watchEffect } from "vue";
31
36
  import JsvSector from "./JsvSector.vue";
32
37
  const props = defineProps({
33
38
  centerPosition: { type: Object, required: true },
@@ -49,21 +54,22 @@ const CheckData = (data) => {
49
54
  let totalPercent = 0;
50
55
  data.forEach((item) => {
51
56
  if (!item.hasOwnProperty("percent")) {
52
- throw new Error("每一项必须包含percent属性");
57
+ console.error("每一项必须包含percent属性");
53
58
  }
54
- if (item.percent <= 0 || item.percent > 100) {
55
- throw new Error("每一项percent必须大于0或者小于等于100!");
59
+ if (item.percent < 0 || item.percent > 100) {
60
+ console.error("每一项percent必须大于0或者小于等于100!");
56
61
  }
57
62
  totalPercent += item.percent;
58
63
  });
59
64
  if (totalPercent < 99 || totalPercent > 101) {
60
- throw new Error("percent属性值总和必须等于100!");
65
+ console.error("percent属性值总和必须等于100!");
61
66
  }
62
67
  return true;
63
68
  };
64
69
  CheckData(props.data);
65
70
  //过滤数据
66
71
  let finalData = reactive([]);
72
+ let TempAngleArray = [];
67
73
  const filterData = (data) => {
68
74
  data.forEach((item, index) => {
69
75
  if (item.percent > previousPercent[index]) {
@@ -73,7 +79,7 @@ const filterData = (data) => {
73
79
  } else {
74
80
  extraTimeArray[index] = 0;
75
81
  }
76
- item.angle = ((item.percent / 100) * 360).toFixed(2);
82
+ TempAngleArray.push(((item.percent / 100) * 360).toFixed(2));
77
83
  if (index == 0) {
78
84
  finalData.push({
79
85
  startAngle: Number(0).toFixed(2),
@@ -88,37 +94,31 @@ const filterData = (data) => {
88
94
  Number(finalData[index - 1].startAngle) +
89
95
  Number(finalData[index - 1].sweepAngle)
90
96
  ).toFixed(2),
91
- sweepAngle: Number(item.angle).toFixed(2),
97
+ sweepAngle: Number(TempAngleArray[index]).toFixed(2),
92
98
  color: item.color,
93
99
  index: index,
94
100
  extraTime: extraTimeArray[index],
95
101
  });
96
102
  }
97
103
  });
104
+ //处理结束清理临时角度数组
105
+ TempAngleArray=[]
98
106
  };
99
107
  filterData(myData);
100
- watch(
101
- props.data,
102
- (n, o) => {
103
- if (CheckData(n)) {
104
- finalData.splice(0, finalData.length);
105
- filterData(n);
106
- myData = n;
107
- }
108
- },
109
- { deep: true }
110
- );
111
- watch(myData, (n, o) => {
112
- previousPercent = [];
108
+
109
+ watchEffect(()=>{
110
+ if(CheckData(props.data)){
111
+ finalData.splice(0, finalData.length);
112
+ filterData(props.data);
113
+ myData = props.data;
114
+ previousPercent = [];
113
115
  extraTimeArray = [];
114
116
  myData.forEach((item, index) => {
115
117
  previousPercent.push(item.percent);
116
118
  extraTimeArray.push(0);
117
119
  });
118
- n.forEach((item, index) => {
119
- previousPercent.push(item.percent);
120
- });
121
- });
120
+ }
121
+ })
122
122
  </script>
123
123
 
124
124
  <style lang="scss" scoped></style>
@@ -7,6 +7,8 @@
7
7
  * fgColor {string} 二维码前景色,默认值"#000000",黑色
8
8
  * bgColor {string} 二维码背景色,默认值"#ffffff",白色
9
9
  * level {string} 二维码的容错能力,可选值{'L':低, 'M':中, 'H':高, 'Q':最精细},默认值'L'
10
+ * instant {string} 是否立即加载(auto, sync, async), auto = async
11
+ * 是否当前帧限制(默认为非当前帧显示,不影响按键响应,但是会闪)
10
12
  * imageSettings {Object} 设置中心logo图片,默认值为null,设置格式为:
11
13
  * {
12
14
  * src {string} logo的url地址
@@ -14,25 +16,31 @@
14
16
  * height {int} logo的高度
15
17
  * }
16
18
  -->
17
- <script>
19
+ <script>
18
20
  import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
19
21
  import ForgeHandles from "../../JsViewVueTools/ForgeHandles";
22
+ import { TextureInstantType } from "../../JsViewVueTools/JsvTextureDefines.ts";
20
23
 
21
24
  export default {
22
25
  props: {
23
26
  value: String,
24
27
  size: Number,
25
28
  fgColor: {
26
- type: String,
27
- default: "#000000"
29
+ type: String,
30
+ default: "#000000",
28
31
  },
29
32
  bgColor: {
30
- type: String,
31
- default: "#ffffff"
33
+ type: String,
34
+ default: "#ffffff",
32
35
  },
33
36
  level: {
34
- type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
35
- default: "L"
37
+ type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
38
+ default: "L",
39
+ },
40
+ sync: {
41
+ // 是否当前帧限制(默认为非当前帧显示,不影响按键响应,但是会闪)
42
+ type: String,
43
+ default: "auto", // QrCode的 auto = async
36
44
  },
37
45
  imageSettings: Object,
38
46
  },
@@ -58,10 +66,23 @@ export default {
58
66
  let view = null;
59
67
  let lp_params = null;
60
68
  const texture_manager = ForgeHandles.TextureManager;
69
+ let instantLoad;
70
+ switch (this.sync) {
71
+ case "sync":
72
+ instantLoad = TextureInstantType.Sync;
73
+ break;
74
+ case "async":
75
+ instantLoad = TextureInstantType.Async;
76
+ break;
77
+ case "auto":
78
+ default:
79
+ instantLoad = TextureInstantType.Auto;
80
+ }
61
81
  const qrcode_texture = texture_manager.GetQRCodeTexture(
62
82
  this.value,
63
83
  this.size,
64
84
  this.size,
85
+ instantLoad,
65
86
  Forge.QRCodeLevel[this.level],
66
87
  this.bgColor,
67
88
  this.fgColor
@@ -143,7 +164,6 @@ export default {
143
164
  };
144
165
  </script>
145
166
 
146
- <template>
167
+ <template>
147
168
  <div :data-jsv-vw-innerview="innerViewId"></div>
148
169
  </template>
149
-
@@ -0,0 +1,174 @@
1
+ <!--
2
+ * 【模块 export 内容】
3
+ * JsvSceneTransition:场景过渡组件。
4
+ * props说明:
5
+ * imageUrl {String} (必填) 显示图片的加载地址
6
+ * displayWidth {Number} (必填) 想要展示的宽度
7
+ * ArraySet {Array} (必填) 模板配置项,包括:每个模块的width,height,left,top,url
8
+ * style {Object} (必填) 横纵模板总长度和总宽度。(width,height)
9
+ * onOff {Boolean} (必填) 组件挂载好后是否立即动画的开关,后续可通过改值为true开启。
10
+ -->
11
+
12
+ <template>
13
+ <div
14
+ :style="{
15
+ width: 1280,
16
+ height: 720,
17
+ transform: `scale3d(${props.displayWidth / 1280},${
18
+ props.displayWidth / 1280
19
+ },1)`,
20
+ transformOrigin: 'left top',
21
+ }"
22
+ >
23
+ <jsv-free-move-actor
24
+ v-for="(item, index) in props.ArraySet"
25
+ :ref="(el) => (refArray[index] = el)"
26
+ :top="item.top"
27
+ :left="item.left"
28
+ :width="item.width"
29
+ :height="item.height"
30
+ >
31
+ <jsv-mask-clip-div
32
+ :style="{
33
+ top: 0,
34
+ left: 0,
35
+ width: item.width,
36
+ height: item.height,
37
+ }"
38
+ :viewSrc="props.imageUrl"
39
+ :maskSrc="item.url"
40
+ :maskLeft="item.left / props.style.width"
41
+ :maskTop="item.top / props.style.height"
42
+ :maskWidth="item.width / props.style.width"
43
+ :maskHeight="item.height / props.style.height"
44
+ />
45
+ </jsv-free-move-actor>
46
+ </div>
47
+ </template>
48
+
49
+ <script setup>
50
+ import JsvMaskClipDiv from "./JsvMaskClipDiv.vue";
51
+ import { JsvFreeMoveActor } from "./JsvFreeMoveActor";
52
+ import { onMounted, onBeforeUnmount, watch, shallowRef } from "vue";
53
+
54
+ const props = defineProps({
55
+ imageUrl: { type: String, require: true },
56
+ displayWidth: { type: Number, require: true },
57
+ ArraySet: { type: Array, require: true },
58
+ style: { type: Object, require: true },
59
+ onOff: { type: Boolean, require: true },
60
+ });
61
+
62
+ //12个FreeMove引用
63
+ const refArray = [];
64
+ const controlArray = new Array(props.ArraySet.length).fill(null);
65
+
66
+ //监听控制开关的值
67
+ watch(
68
+ () => props.onOff,
69
+ (n, o) => {
70
+ if (n == true) {
71
+ MoveFunc();
72
+ }
73
+ }
74
+ );
75
+
76
+ //运动函数
77
+ const MoveFunc = () => {
78
+ controlArray[0].run([
79
+ controlArray[0].action().setSpdAndAccel(-6, -9, 0, 1, null, null),
80
+ controlArray[0]
81
+ .condition()
82
+ .reachPosition(undefined, props.style.height + 100)
83
+ .then([controlArray[0].action().stopMoving()]),
84
+ ]);
85
+
86
+ controlArray[1].run([
87
+ controlArray[1].action().setSpdAndAccel(0, -5, 0, 1, null, null),
88
+ controlArray[1]
89
+ .condition()
90
+ .reachPosition(undefined, props.style.height + 100)
91
+ .then([controlArray[1].action().stopMoving()]),
92
+ ]);
93
+ controlArray[2].run([
94
+ controlArray[2].action().setSpdAndAccel(6, -9, 0, 1, null, null),
95
+ controlArray[2]
96
+ .condition()
97
+ .reachPosition(undefined, props.style.height + 100)
98
+ .then([controlArray[2].action().stopMoving()]),
99
+ ]);
100
+ controlArray[3].run([
101
+ controlArray[3].action().setSpdAndAccel(-6, -7, 0, 1, null, null),
102
+ controlArray[3]
103
+ .condition()
104
+ .reachPosition(undefined, props.style.height + 100)
105
+ .then([controlArray[3].action().stopMoving()]),
106
+ ]);
107
+ controlArray[4].run([
108
+ controlArray[4].action().setSpdAndAccel(0, -8, 0, 1, null, null),
109
+ controlArray[4]
110
+ .condition()
111
+ .reachPosition(undefined, props.style.height + 100)
112
+ .then([controlArray[4].action().stopMoving()]),
113
+ ]);
114
+ controlArray[5].run([
115
+ controlArray[5].action().setSpdAndAccel(6, -7, 0, 1, null, null),
116
+ controlArray[5]
117
+ .condition()
118
+ .reachPosition(undefined, props.style.height + 100)
119
+ .then([controlArray[5].action().stopMoving()]),
120
+ ]);
121
+ controlArray[6].run([
122
+ controlArray[6].action().setSpdAndAccel(-6, -4, 0, 1, null, null),
123
+ controlArray[6]
124
+ .condition()
125
+ .reachPosition(undefined, props.style.height + 100)
126
+ .then([controlArray[6].action().stopMoving()]),
127
+ ]);
128
+ controlArray[7].run([
129
+ controlArray[7].action().setSpdAndAccel(0, -8, 0, 1, null, null),
130
+ controlArray[7]
131
+ .condition()
132
+ .reachPosition(undefined, props.style.height + 100)
133
+ .then([controlArray[7].action().stopMoving()]),
134
+ ]);
135
+ controlArray[8].run([
136
+ controlArray[8].action().setSpdAndAccel(2, -7, 0, 1, null, null),
137
+ controlArray[8]
138
+ .condition()
139
+ .reachPosition(undefined, props.style.height + 100)
140
+ .then([controlArray[8].action().stopMoving()]),
141
+ ]);
142
+ controlArray[9].run([
143
+ controlArray[9].action().setSpdAndAccel(6, -7, 0, 1, null, null),
144
+ controlArray[9]
145
+ .condition()
146
+ .reachPosition(undefined, props.style.height + 100)
147
+ .then([controlArray[9].action().stopMoving()]),
148
+ ]);
149
+ controlArray[10].run([
150
+ controlArray[10].action().setSpdAndAccel(4, -4, 0, 1, null, null),
151
+ controlArray[10]
152
+ .condition()
153
+ .reachPosition(undefined, props.style.height + 100)
154
+ .then([controlArray[10].action().stopMoving()]),
155
+ ]);
156
+ controlArray[11].run([
157
+ controlArray[11].action().setSpdAndAccel(6, -4, 0, 1, null, null),
158
+ controlArray[11]
159
+ .condition()
160
+ .reachPosition(undefined, props.style.height + 100)
161
+ .then([controlArray[11].action().stopMoving()]),
162
+ ]);
163
+ };
164
+ onMounted(() => {
165
+ for (let i = 0; i < refArray.length; i++) {
166
+ controlArray[i] = refArray[i].control;
167
+ }
168
+ if (props.onOff == true) {
169
+ MoveFunc();
170
+ }
171
+ });
172
+ </script>
173
+
174
+ <style scoped></style>
@@ -38,7 +38,7 @@
38
38
  <!-- 平移 -->
39
39
  <div
40
40
  v-for="(item, index) in items"
41
- :key="item.image + `${index}`"
41
+ :key="item + `${index}`"
42
42
  :style="getItemStyle(index)"
43
43
  >
44
44
  <!-- 缩放 -->
@@ -46,7 +46,8 @@
46
46
  <slot
47
47
  name="itemView"
48
48
  :dataIndex="item.dataIndex"
49
- :item="item"
49
+ :propsItem="item.propsItem"
50
+ :defineSize="item.defineSize"
50
51
  ></slot>
51
52
  </div>
52
53
  </div>
@@ -56,7 +57,7 @@
56
57
  </template>
57
58
 
58
59
  <script setup>
59
- import { reactive, shallowRef,onBeforeUnmount } from "vue";
60
+ import { shallowReactive, shallowRef, onBeforeUnmount,reactive } from "vue";
60
61
  import { getKeyFramesGroup } from "../../JsViewVueTools/JsvDynamicKeyFrames.js";
61
62
 
62
63
  const props = defineProps({
@@ -73,16 +74,23 @@ const props = defineProps({
73
74
  onClick: { type: Function },
74
75
  onChange: { type: Function },
75
76
  });
77
+
78
+ //展示数量低于3个时
79
+ let showNumber = props.dispNumber < 3 ? 3 : props.dispNumber;
80
+ if (showNumber % 2 == 0) {
81
+ showNumber = showNumber + 1;
82
+ }
83
+ //处理原数组
84
+ let items = shallowReactive(new Array(showNumber + 2));
85
+
76
86
  let currentId;
77
87
  let preFocusedIdx;
78
88
  if (props.initIndex == undefined) {
79
- currentId = Math.floor(props.dispNumber / 2);
89
+ currentId = Math.floor(showNumber / 2);
80
90
  } else {
81
91
  currentId = props.initIndex;
82
92
  }
83
93
 
84
- //处理原数组
85
- let items = reactive(new Array(props.dispNumber + 2));
86
94
  let allItems = [];
87
95
 
88
96
  let length = props.ItemArray.length;
@@ -92,8 +100,13 @@ if (length < props.dispNumber) {
92
100
  } else {
93
101
  for (let i = 0; i < props.ItemArray.length; i++) {
94
102
  allItems.push({
95
- ...props.ItemArray[i],
103
+ propsItem:props.ItemArray[i],
96
104
  dataIndex: i,
105
+ defineSize:{
106
+ top:null,
107
+ width:null,
108
+ height:null
109
+ }
97
110
  });
98
111
  }
99
112
  }
@@ -105,9 +118,9 @@ let space = shallowRef(0);
105
118
  //如果item数量等于总数量
106
119
  let direction = "left";
107
120
  let focusedIdx = currentId;
108
- let prevNumber = Math.floor(props.dispNumber / 2) + 1;
121
+ let prevNumber = Math.floor(showNumber / 2) + 1;
109
122
  const move1 = () => {
110
- for (let i = 0; i < props.dispNumber + 2; i++) {
123
+ for (let i = 0; i < showNumber + 2; i++) {
111
124
  let itemIdx = focusedIdx - prevNumber + i;
112
125
  if (itemIdx < 0) {
113
126
  itemIdx += props.ItemArray.length;
@@ -142,7 +155,7 @@ for (let index = 0; index < items.length; index++) {
142
155
  if (index == items.length - 2) {
143
156
  let startPosX = props.layoutInfo.width / 2;
144
157
  let endPosX = props.layoutInfo.width - width / 2;
145
- space.value = (endPosX - startPosX) / ((props.dispNumber - 1) / 2);
158
+ space.value = (endPosX - startPosX) / ((showNumber - 1) / 2);
146
159
  }
147
160
  leftArray[index] = { index, width };
148
161
  }
@@ -185,12 +198,12 @@ const getItemStyle = (index) => {
185
198
  if (index == items.length - 2) {
186
199
  let startPosX = props.layoutInfo.width / 2;
187
200
  let endPosX = props.layoutInfo.width - width / 2;
188
- space.value = (endPosX - startPosX) / ((props.dispNumber - 1) / 2);
201
+ space.value = (endPosX - startPosX) / ((showNumber - 1) / 2);
189
202
  }
190
203
  left = leftArray[index].left;
191
- items[index].top = top;
192
- items[index].width = width;
193
- items[index].height = height;
204
+ items[index].defineSize.top = top;
205
+ items[index].defineSize.width = width;
206
+ items[index].defineSize.height = height;
194
207
  return {
195
208
  zIndex,
196
209
  left,
@@ -204,11 +217,9 @@ const getItemStyle = (index) => {
204
217
  const scaleItemStyle = (index) => {
205
218
  const currentIndex = Math.abs(index - Math.floor(items.length / 2));
206
219
  const scale = 1 - currentIndex * props.sideScale; // 根据需要调整缩放比例
207
- const backgroundImage = items[index].image;
208
220
  const width = props.initItemStyle.width * scale;
209
221
  const height = props.initItemStyle.height * scale;
210
222
 
211
- items[index].backgroundImage = backgroundImage;
212
223
  if (direction == "left") {
213
224
  return {
214
225
  width,
@@ -458,20 +469,20 @@ const onActionObj = {
458
469
  onFocus: props.onFocus,
459
470
  onBlur: props.onBlur,
460
471
  };
461
- onBeforeUnmount(()=>{
462
- styleShell.removeRule('slideToLeftA');
463
- styleShell.removeRule('slideToLeftB');
464
- styleShell.removeRule('slideToRightA')
465
- styleShell.removeRule('slideToRightB')
466
- styleShell.removeRule('slideToLeft0A')
467
- styleShell.removeRule('slideToLeft0B')
468
- styleShell.removeRule('slideToRight0A')
469
- styleShell.removeRule('slideToRight0B')
470
- styleShell.removeRule('lowerA')
471
- styleShell.removeRule('lowerB')
472
- styleShell.removeRule('biggerA')
473
- styleShell.removeRule('biggerB')
474
- })
472
+ onBeforeUnmount(() => {
473
+ styleShell.removeRule("slideToLeftA");
474
+ styleShell.removeRule("slideToLeftB");
475
+ styleShell.removeRule("slideToRightA");
476
+ styleShell.removeRule("slideToRightB");
477
+ styleShell.removeRule("slideToLeft0A");
478
+ styleShell.removeRule("slideToLeft0B");
479
+ styleShell.removeRule("slideToRight0A");
480
+ styleShell.removeRule("slideToRight0B");
481
+ styleShell.removeRule("lowerA");
482
+ styleShell.removeRule("lowerB");
483
+ styleShell.removeRule("biggerA");
484
+ styleShell.removeRule("biggerB");
485
+ });
475
486
  </script>
476
487
 
477
488
  <style scoped></style>
@@ -20,6 +20,7 @@
20
20
 
21
21
  <script setup>
22
22
  import { computed } from "vue";
23
+ import { JsvFlexDiv } from "./JsvFlexCell";
23
24
 
24
25
  const props = defineProps({
25
26
  style: Object,
@@ -39,51 +40,36 @@ const props = defineProps({
39
40
  },
40
41
  });
41
42
 
42
- const innerStyle = computed(() => {
43
- let result = { ...props.style };
44
- if (!result.verticalAlign) {
45
- result.verticalAlign = props.verticalAlign;
43
+ const computeAlignItems = computed(() => {
44
+ switch (props.verticalAlign) {
45
+ case "top":
46
+ return "flex-start";
47
+ case "bottom":
48
+ return "flex-end";
49
+ default:
50
+ case "center":
51
+ return "center";
46
52
  }
47
- if (!result.lineAlign) {
48
- result.lineAlign = props.lineAlign;
49
- }
50
- return result;
51
53
  });
52
- const disable = window.JsvDisableReactWrapper;
53
54
  </script>
54
55
 
55
56
  <template>
56
- <div>
57
- <div v-if="disable" :style="style">
58
- <div :style="{ position: 'static', display: 'table' }">
59
- <div
60
- :className="className"
61
- :style="{
62
- position: 'static',
63
- display: 'table-cell',
64
- width: style.width,
65
- height: style.height,
66
- verticalAlign: verticalAlign,
67
- }"
68
- jsv-inherit-class="2"
69
- >
70
- <slot></slot>
71
- </div>
72
- </div>
73
- </div>
57
+ <jsv-flex-div
58
+ :style="{
59
+ ...props.style,
60
+ flexDirection: 'row',
61
+ alignItems: computeAlignItems,
62
+ }"
63
+ >
74
64
  <div
75
- v-else
76
- :className="className"
77
65
  :style="{
78
- ...style,
66
+ width: props.style.width,
79
67
  JsvTextLatex: enableLatex ? 1 : 0,
80
- JsvTextVerticalAlign: verticalAlign,
81
68
  JsvTextLineAlign: lineAlign,
82
69
  JsvTextInnerDirection: textDirection,
83
70
  }"
84
- jsv-inherit-class="1"
85
71
  >
86
- <slot></slot>
72
+ <slot />
87
73
  </div>
88
- </div>
74
+ </jsv-flex-div>
89
75
  </template>
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
9
9
  export * from "./JsvFreeMoveActor";
10
+ export * from "./JsvFlexCell";
10
11
  export { default as JsvApic } from "./JsvApic/JsvApic";
11
12
  export { default as JsvApic2 } from "./JsvApic/JsvApic2";
12
13
  export { LoopType, ApicEndState } from "./JsvApic/JsvCommonLoopToolBase.js";
@@ -48,6 +49,7 @@ export { default as JsvPieChart } from "./JsvPieChart.vue";
48
49
  export { default as JsvSector } from "./JsvSector.vue";
49
50
  export { default as JsvConnectLine } from "./JsvConnectLine";
50
51
  export { default as JsvProgressBar } from "./JsvProgressBar.vue"
52
+ export { default as JsvSceneTransition } from "./JsvSceneTransition.vue"
51
53
  //! 合并透过层样例, 更便于有声音无画面问题的调试
52
54
  import JsvNativeSharedDiv from "./JsvNativeSharedDiv.vue";
53
55
  export {