@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.
Files changed (90) hide show
  1. package/Basic/components/div/DivBackground.vue +13 -25
  2. package/Basic/components/img/ImageGroup.vue +14 -20
  3. package/Basic/components/img/ImgLayout.vue +59 -68
  4. package/BasicFocusControl/components/BaseBlock.vue +11 -17
  5. package/BasicFocusControl/components/MainAreaLeftBlock.vue +2 -2
  6. package/BasicFocusControl/components/MainAreaRightBlock.vue +2 -2
  7. package/BasicFocusControl/components/SideBarBlock.vue +2 -2
  8. package/CssPreprocessor/App.vue +40 -51
  9. package/CssPreprocessor/Less/App.vue +6 -14
  10. package/CssPreprocessor/Scss/App.vue +6 -14
  11. package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +0 -1
  12. package/CssPreprocessor/Stylus/App.vue +6 -14
  13. package/CssPreprocessor/utils/ContentBlock.vue +30 -12
  14. package/CssPreprocessor/utils/ContentList.vue +23 -14
  15. package/CssPreprocessor/utils/Panel.vue +34 -23
  16. package/CssPreprocessor/utils/TitleBar.vue +7 -9
  17. package/DemoHomepage/components/BodyFrame.vue +54 -78
  18. package/DemoHomepage/components/Dialog.vue +38 -43
  19. package/DemoHomepage/components/Item.vue +52 -55
  20. package/DemoHomepage/components/TabFrame.vue +43 -72
  21. package/DemoHomepage/router.js +1 -1
  22. package/GiftRain/App.vue +10 -4
  23. package/GridDemo/App.vue +5 -5
  24. package/GridDemo/FocusItem.vue +3 -5
  25. package/GridDemo/Item.vue +4 -24
  26. package/HashHistory/App.vue +0 -10
  27. package/HashHistory/views/MainPage.vue +0 -1
  28. package/ImpactStop/App.vue +0 -1
  29. package/Input/App.vue +106 -150
  30. package/Input/FullKeyboard.vue +18 -28
  31. package/Input/InputPanel.vue +87 -109
  32. package/Input/KeyboardItem.vue +35 -45
  33. package/JsvRadarChart/App.vue +16 -19
  34. package/LongImage/Button.vue +2 -3
  35. package/LongText/App.vue +0 -3
  36. package/LongText/Button.vue +0 -1
  37. package/LongText/LongTextScroll.vue +0 -4
  38. package/Marquee/App.vue +1 -0
  39. package/MetroWidgetDemos/PerformanceTest/App.vue +2 -3
  40. package/MetroWidgetDemos/PerformanceTest/Item.vue +52 -55
  41. package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
  42. package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +86 -95
  43. package/MetroWidgetDemos/PingPong/App.vue +56 -89
  44. package/MetroWidgetDemos/PingPong/AppPage.vue +3 -3
  45. package/MetroWidgetDemos/PingPong/Item.vue +1 -1
  46. package/MetroWidgetDemos/PingPong/TabItem.vue +3 -3
  47. package/MetroWidgetDemos/PingPong/WidgetItem.vue +1 -1
  48. package/MetroWidgetDemos/SkeletonDiagram/App.vue +2 -4
  49. package/MetroWidgetDemos/basic/Item.vue +1 -1
  50. package/MetroWidgetDemos/direction/App.vue +0 -2
  51. package/MetroWidgetDemos/direction/Item.vue +1 -1
  52. package/MetroWidgetDemos/focusableItemBasic/App.vue +1 -1
  53. package/MetroWidgetDemos/focusableItemBasic/ButtonItem.vue +1 -1
  54. package/MetroWidgetDemos/focusableItemMetroWidget/App.vue +1 -1
  55. package/MetroWidgetDemos/focusableItemMetroWidget/Item.vue +1 -1
  56. package/MetroWidgetDemos/focusableItemMetroWidget/WidgetItem.vue +1 -1
  57. package/MetroWidgetDemos/focusableItemMix/App.vue +1 -1
  58. package/MetroWidgetDemos/focusableItemMix/ButtonItem.vue +1 -1
  59. package/MetroWidgetDemos/focusableItemMix/Item.vue +1 -1
  60. package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +23 -25
  61. package/MetroWidgetDemos/layoutType/App.vue +0 -2
  62. package/MetroWidgetDemos/layoutType/Item.vue +1 -1
  63. package/MetroWidgetDemos/ninePatchFocusPage/App.vue +0 -1
  64. package/MetroWidgetDemos/ninePatchFocusPage/PageRow.vue +1 -1
  65. package/MetroWidgetDemos/padding/App.vue +0 -2
  66. package/MetroWidgetDemos/padding/Item.vue +1 -1
  67. package/MetroWidgetDemos/slideSetting/Item.vue +1 -1
  68. package/MockjsDemo/App.vue +26 -11
  69. package/MockjsDemo/mock/index.js +9 -1
  70. package/QrcodeDemo/App.vue +0 -1
  71. package/SoundPool/App.vue +1 -2
  72. package/SpriteImage/App.vue +89 -125
  73. package/Swiper/App.vue +1 -3
  74. package/TestNativeSharedView/App.vue +104 -48
  75. package/TextBox/RenderCenter.vue +89 -113
  76. package/TextBox/RenderLeft.vue +89 -113
  77. package/TextBox/RenderOneLine.vue +7 -10
  78. package/TextBox/RenderRight.vue +8 -11
  79. package/TextShadowDemo/App.vue +54 -75
  80. package/TextureAnimation/App.vue +175 -287
  81. package/TextureAnimation/App2.vue +1 -5
  82. package/ThrowMoveDemo/AccelerateDemo.vue +40 -71
  83. package/ThrowMoveDemo/App.vue +13 -23
  84. package/ThrowMoveDemo/TargetDemo.vue +24 -53
  85. package/ThrowMoveDemo/UDParabolicDemo.vue +31 -60
  86. package/VideoDemo/App.vue +71 -116
  87. package/package.json +1 -1
  88. package/VideoDemo/components/Button.vue +0 -58
  89. package/VideoDemo/components/Controllor.vue +0 -197
  90. package/VideoDemo/components/VideoFrame.vue +0 -140
@@ -1,43 +1,33 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-10-20 18:27:08
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-10-25 09:38:21
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-05
6
6
  * @Description: file content
7
7
  -->
8
- <script>
8
+ <script setup>
9
9
  import LRParabolicDemo from "./LRParabolicDemo.vue";
10
10
  import UDParabolicDemo from "./UDParabolicDemo.vue";
11
11
  import TargetDemo from "./TargetDemo.vue";
12
12
  import AccelerateDemo from "./AccelerateDemo.vue";
13
+ import { shallowRef } from "vue"
14
+ import { useRouter } from "vue-router"
13
15
 
14
- export default {
15
- components: {
16
- LRParabolicDemo,
17
- UDParabolicDemo,
18
- TargetDemo,
19
- AccelerateDemo,
20
- },
21
- data() {
22
- return {
23
- demoIndex: 0,
24
- };
25
- },
26
- methods: {
27
- onKeyDown(ev) {
16
+ const router=useRouter()
17
+ let demoIndex=shallowRef(0)
18
+
19
+ const onKeyDown=(ev)=>{
28
20
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
29
- this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
21
+ router?.go(-1); // 有router时,是从DemoHomepage进入,回退
30
22
  return true;
31
23
  }
32
24
  if (ev.keyCode === 37) {
33
- this.demoIndex = this.demoIndex - 1 < 0 ? 3 : this.demoIndex - 1;
25
+ demoIndex.value = demoIndex.value - 1 < 0 ? 3 : demoIndex.value - 1;
34
26
  } else if (ev.keyCode === 39) {
35
- this.demoIndex = this.demoIndex - +1 > 3 ? 0 : this.demoIndex + 1;
27
+ demoIndex.value = demoIndex.value + 1 > 3 ? 0 : demoIndex.value + 1;
36
28
  }
37
29
  return true;
38
- },
39
- },
40
- };
30
+ }
41
31
  </script>
42
32
 
43
33
  <template>
@@ -1,44 +1,31 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-10-20 18:27:25
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-07-08 14:11:39
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-05
6
6
  * @Description: file content
7
7
  -->
8
- <script>
8
+ <script setup>
9
9
  import { JsvActorMoveControl, JsvActorMove } from "jsview";
10
+ import { shallowRef } from "vue";
10
11
 
11
- export default {
12
- components: {
13
- JsvActorMove,
14
- },
15
- props: {
16
- name: String,
17
- },
18
- data() {
19
- return {
20
- direction: 1,
21
- };
22
- },
23
- setup() {
24
- let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
25
- let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
12
+ const props = defineProps({
13
+ name: String,
14
+ })
15
+ let direction = shallowRef(1)
16
+ let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
17
+ let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
18
+ let focusNode=shallowRef(null)
26
19
 
27
- return {
28
- throwControl,
29
- moveControl,
30
- };
31
- },
32
- methods: {
33
- onKeyDown(ev) {
20
+ const onKeyDown=(ev)=>{
34
21
  if (ev.keyCode === 13) {
35
- let preDirection = this.direction;
36
- this.direction = -this.direction;
37
- this.moveControl.moveToX(195 * this.direction, 250, (x, y) => {
22
+ let preDirection = direction.value;
23
+ direction.value = -direction.value;
24
+ moveControl.moveToX(195 * direction.value, 250, (x, y) => {
38
25
  console.log(`Move end with x=${x} y=${y}`);
39
26
  });
40
27
  const position = (-100 * preDirection) / 2;
41
- this.throwControl.throwAlongY(
28
+ throwControl.throwAlongY(
42
29
  -500 * preDirection,
43
30
  750 * preDirection,
44
31
  {
@@ -53,40 +40,24 @@ export default {
53
40
  return true;
54
41
  }
55
42
  return false;
56
- },
57
- },
58
- };
43
+ }
44
+
59
45
  </script>
60
46
 
61
47
  <template>
62
- <jsv-focus-block
63
- ref="focusNode"
64
- :name="name"
65
- autoFocus
66
- :onAction="{
67
- onKeyDown: onKeyDown,
68
- }"
69
- >
70
- <div
71
- key="sample1"
72
- class="detail-font"
73
- :style="{ top: 150, left: 425, width: 430, height: 40 }"
74
- >
48
+ <jsv-focus-block ref="focusNode" :name="props.name" autoFocus :onAction="{
49
+ onKeyDown: onKeyDown,
50
+ }">
51
+ <div key="sample1" class="detail-font" :style="{ top: 150, left: 425, width: 430, height: 40 }">
75
52
  拐点前触碰目标点
76
53
  </div>
77
- <div
78
- key="DirectText"
79
- class="font"
80
- :style="{ top: 250, left: 425, width: 430, height: 40 }"
81
- >
54
+ <div key="DirectText" class="font" :style="{ top: 250, left: 425, width: 430, height: 40 }">
82
55
  {{ `当前方向:${direction > 0 ? "右" : "左"}` }}
83
56
  </div>
84
57
  <div :style="{ top: 590, left: 625 }">
85
58
  <jsv-actor-move key="move" :control="moveControl">
86
59
  <jsv-actor-move key="throw" :control="throwControl">
87
- <div
88
- :style="{ backgroundColor: '#0916ff', width: 30, height: 30 }"
89
- ></div>
60
+ <div :style="{ backgroundColor: '#0916ff', width: 30, height: 30 }"></div>
90
61
  </jsv-actor-move>
91
62
  </jsv-actor-move>
92
63
  </div>
@@ -1,49 +1,36 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-10-20 18:27:25
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-10-21 14:07:16
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-05
6
6
  * @Description: file content
7
7
  -->
8
- <script>
8
+ <script setup>
9
9
  import { JsvActorMoveControl, JsvActorMove } from "jsview";
10
+ import { shallowRef, computed } from "vue";
10
11
 
11
- export default {
12
- components: {
13
- JsvActorMove,
14
- },
15
- props: {
16
- name: String,
17
- },
18
- data() {
19
- return {
20
- direction: 1,
21
- };
22
- },
23
- computed: {
24
- directionDetail() {
25
- return this.direction < 0 ? "上" : "下";
26
- },
27
- detail() {
28
- return this.direction < 0 ? "向上抛物" : "向下掷物并弹起";
29
- },
30
- },
31
- setup() {
32
- let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
33
- let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
12
+ let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
13
+ let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
14
+ let focusNode=shallowRef(null)
34
15
 
35
- return {
36
- throwControl,
37
- moveControl,
38
- };
39
- },
40
- methods: {
41
- onKeyDown(ev) {
42
- let preDirection = this.direction;
16
+ const props = defineProps({
17
+ name: String,
18
+ })
19
+ let direction = shallowRef(1)
20
+
21
+ const directionDetail = computed(() => {
22
+ return direction.value < 0 ? "上" : "下";
23
+ })
24
+ const detail = computed(() => {
25
+ return direction.value < 0 ? "向上抛物" : "向下掷物并弹起";
26
+ })
27
+
28
+ const onKeyDown=(ev)=>{
29
+ let preDirection = direction.value;
43
30
  switch (ev.keyCode) {
44
31
  case 13:
45
- this.direction = -this.direction;
46
- this.throwControl.throwAlongY(
32
+ direction.value = -direction.value;
33
+ throwControl.throwAlongY(
47
34
  -400 * preDirection,
48
35
  550 * preDirection,
49
36
  {
@@ -58,40 +45,24 @@ export default {
58
45
  return true;
59
46
  }
60
47
  return false;
61
- },
62
- },
63
- };
48
+ }
49
+
64
50
  </script>
65
51
 
66
52
  <template>
67
- <jsv-focus-block
68
- ref="focusNode"
69
- :name="name"
70
- autoFocus
71
- :onAction="{
72
- onKeyDown: onKeyDown,
73
- }"
74
- >
75
- <div
76
- key="sample1"
77
- class="detail-font"
78
- :style="{ top: 150, left: 425, width: 430, height: 40 }"
79
- >
53
+ <jsv-focus-block ref="focusNode" :name="props.name" autoFocus :onAction="{
54
+ onKeyDown: onKeyDown,
55
+ }">
56
+ <div key="sample1" class="detail-font" :style="{ top: 150, left: 425, width: 430, height: 40 }">
80
57
  {{ detail }}
81
58
  </div>
82
- <div
83
- key="DirectText"
84
- class="font"
85
- :style="{ top: 250, left: 425, width: 430, height: 40 }"
86
- >
59
+ <div key="DirectText" class="font" :style="{ top: 250, left: 425, width: 430, height: 40 }">
87
60
  {{ `当前方向:${directionDetail}` }}
88
61
  </div>
89
62
  <div :style="{ top: 590, left: 625 }">
90
63
  <jsv-actor-move key="move" :control="moveControl">
91
64
  <jsv-actor-move key="throw" :control="throwControl">
92
- <div
93
- :style="{ backgroundColor: '#ffb915', width: 30, height: 30 }"
94
- ></div>
65
+ <div :style="{ backgroundColor: '#ffb915', width: 30, height: 30 }"></div>
95
66
  </jsv-actor-move>
96
67
  </jsv-actor-move>
97
68
  </div>
package/VideoDemo/App.vue CHANGED
@@ -1,121 +1,76 @@
1
+ <!--
2
+ * @Author: ZhengYi
3
+ * @Date: 2023-05-06
4
+ * @Description: file content
5
+ -->
1
6
  <script setup>
2
- import { provide, reactive, ref, shallowRef, watch } from "vue";
3
- import Controllor from "./components/Controllor.vue";
4
- import VideoFrame from "./components/VideoFrame.vue";
5
-
6
- const Caption = {
7
- offscreenVideo:
8
- "名称:OffscreenVideo(自动播放)\n" +
9
- "功能描述:\n" +
10
- "1.离屏视频播放、支持前进/后退控制\n" +
11
- "2.支持圆角设置\n" +
12
- "3.支持平移、缩放、旋转等动画\n" +
13
- "4.支持ObjectFit调整\n",
14
- normalVideo:
15
- "名称:Video\n" +
16
- "功能描述:\n" +
17
- "1.视频播放、支持前进/后退控制\n" +
18
- "2.支持ObjectFit调整\n",
19
- };
20
-
21
- let caption = shallowRef(null);
22
- let useTexture = shallowRef(null);
23
- let videoTime = reactive({
24
- currentTime: 0,
25
- duration: 0,
26
- });
27
- let objectFitTitle = shallowRef(null);
28
- let playStatus = ref("");
29
- provide("useTexture", useTexture);
30
- provide("objectFit", shallowRef(null));
31
- provide("videoRect", ref({}));
32
- provide("playVideo", shallowRef(null));
33
- provide("seekVideo", shallowRef(null));
34
- provide("enableAnimation", shallowRef(null));
35
- provide("videoTime", videoTime);
36
- provide("objectFitTitle", objectFitTitle);
37
- provide("playStatus", playStatus);
38
- watch(useTexture, () => {
39
- caption.value = useTexture.value ? Caption.offscreenVideo : Caption.normalVideo;
40
- });
41
- </script>
42
-
43
- <template>
44
- <div
45
- :style="{
46
- top: 0,
47
- left: 0,
48
- width: 1280,
49
- height: 720,
50
- backgroundColor: 'rgb(222,211,140)',
51
- }"
52
- >
53
- <!-- :key="useTexture" => 当useTexture属性变化时,重建VideoFrame -->
54
- <VideoFrame :key="useTexture" />
55
-
56
- <!-- :key="useTexture" => JsView bug,当useTexture属性变化时,为了保证显示在VideoFrame前面 -->
57
- <div class="caption" :key="useTexture">
58
- {{ caption }}
59
- </div>
60
- <div>
61
- <div class="text status">
62
- {{ "播放状态: " + playStatus }}
63
- </div>
64
- <div class="text objectFit">
65
- {{ objectFitTitle }}
66
- </div>
67
- <div class="text current">
68
- {{ Math.ceil(videoTime.currentTime) }}
69
- </div>
70
- <div class="text duration">
71
- {{ "/" + Math.ceil(videoTime.duration) }}
72
- </div>
73
- </div>
74
- <Controllor class="controllor" />
75
- </div>
76
- </template>
77
-
78
- <style scoped>
79
- .caption {
80
- text-align: left;
81
- font-size: 24;
82
- line-height: 30;
83
- color: #ffffff;
84
- left: 10;
85
- top: 10;
86
- width: 400;
87
- height: 180;
88
- background-color: rgba(27, 38, 151, 0.8);
89
- }
90
-
91
- .text {
92
- color: #ff0000;
93
- font-size: 24;
94
- top: 550;
95
- width: 60;
96
- height: 40;
7
+ import { shallowRef, onMounted, onBeforeUnmount } from "vue";
8
+ import { JsvPlayer } from "jsview"
9
+ import { useRouter } from "vue-router";
10
+ //路由
11
+ const router = useRouter()
12
+ //位移变量
13
+ let leftMove = shallowRef(0)
14
+ //定时器
15
+ let timer = {
16
+ id: -1
97
17
  }
98
- .status {
99
- left: 50;
100
- width: 300;
18
+ //动画
19
+ const changeTransition = () => {
20
+ let transition = "left 0.5s"
21
+ return transition
101
22
  }
102
- .objectFit {
103
- left: 800;
104
- width: 200;
105
- text-align: center;
23
+ //挂载时启动定时器
24
+ onMounted(() => {
25
+ timer.id = setInterval(() => {
26
+ if (leftMove.value > (1280-350)) {
27
+ leftMove.value = -60
28
+ }
29
+ leftMove.value = leftMove.value + 60
30
+ }, 500)
31
+ })
32
+ onBeforeUnmount(() => {
33
+ if (timer.id > 0) {
34
+ clearInterval(timer.id)
35
+ timer.id = -1;
36
+ }
37
+ })
38
+ //设定视频来源
39
+ const video_url =
40
+ "http://qcast-image.oss-cn-qingdao.aliyuncs.com/homepage/20190726/4cc4e6a8fd7d9d9c707ed4c4da27ca9d.mp4";
41
+ //按键事件
42
+ const onKeyDown = (ev) => {
43
+ if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
44
+ router.go(-1); // 有router时,是从DemoHomepage进入,回退
45
+ return true;
46
+ }
106
47
  }
107
-
108
- .current {
109
- left: 1060;
110
- text-align: right;
48
+ //注册事件
49
+ let actionDefines = {
50
+ onKeyDown
111
51
  }
112
- .duration {
113
- left: 1120;
114
- text-align: left;
115
- }
116
-
117
- .controllor {
118
- left: 40;
119
- top: 600;
120
- }
121
- </style>
52
+ </script>
53
+ <template>
54
+ <jsv-focus-block autoFocus :onAction="actionDefines">
55
+ <div :style="{ width: 700, height: 500, top: 60, left: leftMove, transition: changeTransition() }">
56
+ <JsvPlayer :src="video_url" autoplay="autoplay" loop="loop" :style="{
57
+ top: 0,
58
+ left: 0,
59
+ width: 700,
60
+ height: 500,
61
+ }"></JsvPlayer>
62
+ </div>
63
+ <div :style="{
64
+ textAlign: 'center',
65
+ fontSize: 30,
66
+ lineHeight: 50,
67
+ color: '#ffffff',
68
+ left: 100,
69
+ top: 620,
70
+ width: 1280 - 200,
71
+ height: 50,
72
+ backgroundColor: 'rgba(27,38,151,0.8)'
73
+ }">观察视频在移动过程中是否正常播放,特别是在出屏幕一半时。</div>
74
+ </jsv-focus-block>
75
+ </template>
76
+ <style></style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shijiu/jsview-vue-samples",
3
- "version": "2.0.1073",
3
+ "version": "2.0.1106",
4
4
  "license": "MIT",
5
5
  "repository": "system/jsview-framework",
6
6
  "author": "mengxk",
@@ -1,58 +0,0 @@
1
- <script setup>
2
- import { ref } from "vue";
3
- const props = defineProps({
4
- style: Object,
5
- autoFocus: Boolean,
6
- name: String,
7
- onClick: Function,
8
- });
9
-
10
- const hasFocused = ref(false);
11
-
12
- const onFocus = () => {
13
- hasFocused.value = true;
14
- };
15
-
16
- const onBlur = () => {
17
- hasFocused.value = false;
18
- };
19
-
20
- const onKeyDown = (ev) => {
21
- if (ev.keyCode === 13) {
22
- // Enter
23
- props.onClick?.();
24
- return true;
25
- }
26
- return false;
27
- };
28
- </script>
29
-
30
- <template>
31
- <jsv-focus-block
32
- :name="name"
33
- :autoFocus="autoFocus ? '' : undefined"
34
- :onAction="{
35
- onFocus: onFocus,
36
- onBlur: onBlur,
37
- onKeyDown: onKeyDown,
38
- }"
39
- >
40
- <div
41
- class="item"
42
- :style="{
43
- ...style,
44
- backgroundColor: hasFocused ? '#FFFF00' : '#A8A8A8',
45
- }"
46
- >
47
- <slot></slot>
48
- </div>
49
- </jsv-focus-block>
50
- </template>
51
-
52
- <style scoped>
53
- .item {
54
- text-align: center;
55
- font-size: 24;
56
- line-height: 40;
57
- }
58
- </style>