@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
@@ -13,7 +13,7 @@ import couponMid from "../assets/coupon_mid.png";
13
13
  import borderLeft from "../assets/line_left.png";
14
14
  import borderMid from "../assets/line_mid.png";
15
15
  import borderRight from "../assets/line_right.png";
16
- import { ref, shallowRef, computed } from "vue";
16
+ import { ref, computed } from "vue";
17
17
 
18
18
  const props = defineProps({
19
19
  data: Object,
@@ -314,29 +314,29 @@ const soldTotalText = computed(() => {
314
314
 
315
315
  <style scoped>
316
316
  .frame-background {
317
- width: 213px;
318
- height: 337px;
319
- border-radius: 10px 10px 10px 10px;
317
+ width: 213;
318
+ height: 337;
319
+ border-radius: 10;
320
320
  background-color: #f7f7f4;
321
321
  transition: transform 0.2s linear;
322
322
  }
323
323
 
324
324
  .poster-holder {
325
- width: 213px;
326
- height: 213px;
327
- border-radius: 10px 10px 0px 0px;
325
+ width: 213;
326
+ height: 213;
327
+ border-radius: 10 10 0 0;
328
328
  background-color: #cfcac6;
329
329
  }
330
330
  .poster {
331
- width: 213px;
332
- height: 213px;
333
- border-radius: 7px 7px 0px 0px;
331
+ width: 213;
332
+ height: 213;
333
+ border-radius: 7 7 0 0;
334
334
  }
335
335
 
336
336
  .title-font {
337
- font-size: 21px;
337
+ font-size: 21;
338
338
  color: #73665c;
339
- line-height: 29px;
339
+ line-height: 29;
340
340
  overflow: hidden;
341
341
  white-space: nowrap;
342
342
  text-overflow: ellipsis;
@@ -345,42 +345,42 @@ const soldTotalText = computed(() => {
345
345
  .title-layout {
346
346
  top: 221;
347
347
  left: 13;
348
- width: 193px;
349
- height: 29px;
348
+ width: 193;
349
+ height: 29;
350
350
  }
351
351
  .ticket-text {
352
352
  height: 24;
353
353
  color: #ffffff;
354
- font-size: 16px;
354
+ font-size: 16;
355
355
  text-align: center;
356
- line-height: 24px;
356
+ line-height: 24;
357
357
  }
358
358
  .sold-text {
359
- height: 25px;
359
+ height: 25;
360
360
  color: #ff7a00;
361
- font-size: 20px;
361
+ font-size: 20;
362
362
  text-align: center;
363
- line-height: 25px;
363
+ line-height: 25;
364
364
  }
365
365
  .prize-title-layout {
366
- width: 35px;
367
- height: 24px;
366
+ width: 35;
367
+ height: 24;
368
368
  top: 296;
369
369
  left: 13;
370
370
  }
371
371
  .prize-title-font {
372
372
  color: #de2825;
373
373
  text-align: center;
374
- font-size: 17px;
375
- line-height: 24px;
374
+ font-size: 17;
375
+ line-height: 24;
376
376
  }
377
377
  .prize-font {
378
378
  top: 289;
379
379
  left: 53;
380
380
  width: 158; /*213 - 55*/
381
- height: 37px;
382
- line-height: 37px;
383
- font-size: 28px;
381
+ height: 37;
382
+ line-height: 37;
383
+ font-size: 28;
384
384
  color: #de2825;
385
385
  }
386
386
  </style>
@@ -1,97 +1,88 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-09-29 16:13:35
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-12-02 16:14:11
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-04
6
6
  * @Description: file content
7
7
  -->
8
- <script>
9
- import { ref, shallowRef } from "vue";
8
+ <script setup>
9
+ import { computed, shallowRef } from "vue";
10
10
 
11
- export default {
12
- props: {
13
- name: String,
14
- onEdgeDown: Function,
15
- onItemFocus: Function,
16
- },
17
- setup() {
18
- let activeId = ref(0);
19
- let focused = ref(false);
20
- return {
21
- activeId,
22
- focused,
23
- };
24
- },
25
- computed: {
26
- tab1Class() {
27
- if (this.activeId == 0) {
28
- return this.focused
29
- ? "text-active item-focused"
30
- : "text-active item-normal";
31
- } else {
32
- return "text-normal item-normal";
33
- }
34
- },
35
- tab2Class() {
36
- if (this.activeId == 1) {
37
- return this.focused
38
- ? "text-active item-focused"
39
- : "text-active item-normal";
40
- } else {
41
- return "text-normal item-normal";
42
- }
43
- },
44
- tab3Class() {
45
- if (this.activeId == 2) {
46
- return this.focused
47
- ? "text-active item-focused"
48
- : "text-active item-normal";
49
- } else {
50
- return "text-normal item-normal";
11
+ const props = defineProps({
12
+ name: String,
13
+ onEdgeDown: Function,
14
+ onItemFocus: Function,
15
+ })
16
+
17
+ let activeId = shallowRef(0);
18
+ let focused = shallowRef(false);
19
+
20
+ const tab1Class = computed(() => {
21
+ if (activeId.value == 0) {
22
+ return focused.value
23
+ ? "text-active item-focused"
24
+ : "text-active item-normal";
25
+ } else {
26
+ return "text-normal item-normal";
27
+ }
28
+ })
29
+ const tab2Class = computed(() => {
30
+ if (activeId.value == 1) {
31
+ return focused.value
32
+ ? "text-active item-focused"
33
+ : "text-active item-normal";
34
+ } else {
35
+ return "text-normal item-normal";
36
+ }
37
+ })
38
+ const tab3Class = computed(() => {
39
+ if (activeId.value == 2) {
40
+ return focused.value
41
+ ? "text-active item-focused"
42
+ : "text-active item-normal";
43
+ } else {
44
+ return "text-normal item-normal";
45
+ }
46
+ })
47
+
48
+
49
+ const onKeyDown = (ev) => {
50
+ switch (ev.keyCode) {
51
+ case 37:
52
+ activeId.value--;
53
+ if (activeId.value < 0) {
54
+ activeId.value = 2;
51
55
  }
52
- },
53
- },
54
- methods: {
55
- onKeyDown(ev) {
56
- switch (ev.keyCode) {
57
- case 37:
58
- this.activeId--;
59
- if (this.activeId < 0) {
60
- this.activeId = 2;
61
- }
62
- this.onItemFocus(this.activeId);
63
- break;
64
- case 39:
65
- this.activeId++;
66
- if (this.activeId > 2) {
67
- this.activeId = 0;
68
- }
69
- this.onItemFocus(this.activeId);
70
- break;
71
- case 40:
72
- this.onEdgeDown();
73
- break;
56
+ props.onItemFocus(activeId.value);
57
+ break;
58
+ case 39:
59
+ activeId.value++;
60
+ if (activeId.value > 2) {
61
+ activeId.value = 0;
74
62
  }
75
- },
76
- onFocus() {
77
- this.focused = true;
78
- },
79
- onBlur() {
80
- this.focused = false;
81
- },
82
- getOnAction() {
83
- return {
84
- onKeyDown: this.onKeyDown,
85
- onFocus: this.onFocus,
86
- onBlur: this.onBlur,
87
- };
88
- },
89
- },
90
- };
63
+ props.onItemFocus(activeId.value);
64
+ break;
65
+ case 40:
66
+ props.onEdgeDown();
67
+ break;
68
+ }
69
+ }
70
+ const onFocus = () => {
71
+ focused.value = true;
72
+ }
73
+ const onBlur = () => {
74
+ focused.value = false;
75
+ }
76
+ const actionDefines = {
77
+ onBlur,
78
+ onFocus,
79
+ onKeyDown
80
+ }
81
+
91
82
  </script>
92
83
 
93
84
  <template>
94
- <jsv-focus-block :name="name" :onAction="getOnAction()"></jsv-focus-block>
85
+ <jsv-focus-block :name="props.name" :onAction="actionDefines"></jsv-focus-block>
95
86
  <div :class="tab1Class">Tab1</div>
96
87
  <div :class="tab2Class" :style="{ left: 220 }">Tab2</div>
97
88
  <div :class="tab3Class" :style="{ left: 440 }">Tab3</div>
@@ -99,31 +90,31 @@ export default {
99
90
 
100
91
  <style scoped>
101
92
  .text-normal {
102
- width: 200px;
103
- height: 50px;
104
- line-height: 50px;
93
+ width: 200;
94
+ height: 50;
95
+ line-height: 50;
105
96
  color: #444444;
106
- font-size: 25px;
97
+ font-size: 25;
107
98
  text-align: center;
108
99
  }
109
100
 
110
101
  .text-active {
111
- width: 200px;
112
- height: 50px;
113
- line-height: 50px;
102
+ width: 200;
103
+ height: 50;
104
+ line-height: 50;
114
105
  color: #ffffff;
115
- font-size: 25px;
106
+ font-size: 25;
116
107
  text-align: center;
117
108
  }
118
109
 
119
110
  .item-focused {
120
- width: 200px;
121
- height: 50px;
111
+ width: 200;
112
+ height: 50;
122
113
  background-color: #008080;
123
114
  }
124
115
  .item-normal {
125
- width: 200px;
126
- height: 50px;
116
+ width: 200;
117
+ height: 50;
127
118
  background-color: #87CECB;
128
119
  }
129
120
  </style>
@@ -1,16 +1,17 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-12-21 15:36:29
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2023-03-09 16:28:50
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-04
6
6
  * @Description: file content
7
7
  -->
8
- <script>
8
+ <script setup>
9
9
  import ViewSwiper from "./ViewSwiper.vue";
10
10
  import AppTab from "./AppTab.vue";
11
- import { reactive } from "vue";
11
+ import { reactive, provide, shallowRef } from "vue";
12
12
  import { EdgeDirection } from "jsview";
13
-
13
+ import { useRouter } from "vue-router";
14
+ const router = useRouter();
14
15
  const pageList = [];
15
16
  const tabData = [];
16
17
 
@@ -46,101 +47,67 @@ for (let i = 0; i < 10; ++i) {
46
47
  name: "testPage-" + i,
47
48
  });
48
49
  }
49
- export default {
50
- components: {
51
- ViewSwiper,
52
- AppTab,
53
- },
54
- setup() {
55
- let globalInfo = reactive({
56
- tabId: 0,
57
- });
58
- return {
59
- tabData,
60
- appPageName: "/page",
61
- appTabName: "/tab",
62
- globalInfo,
63
- pageList,
64
- preFocusName: "/tab",
65
- curFocusName: "/tab",
66
- };
67
- },
68
- provide() {
69
- return {
70
- globalInfo: this.globalInfo,
71
- };
72
- },
73
- methods: {
74
- $_app_onFocus() {
75
- console.log("App onFocus");
76
- this.$refs.focusNode.findBlockByName(this.curFocusName).requestFocus();
77
- },
78
- onKeyDown(ev) {
79
- if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
80
- this.$router?.go(-1);
81
- }
82
- return true;
83
- },
84
- $_app_pageOnEdge(info) {
85
- console.log("App page on edge ", info);
86
- if (info.direction === EdgeDirection.top) {
87
- this.curFocusName = "/tab";
88
- this.$refs.focusNode.findBlockByName(this.appTabName).requestFocus();
89
- }
90
- },
91
- $_app_tabOnEdge(info) {
92
- console.log("App tab on edge ", info);
93
- if (info.direction === EdgeDirection.bottom) {
94
- this.curFocusName = "/page";
95
- this.$refs.focusNode.findBlockByName(this.appPageName).requestFocus();
96
- }
97
- },
98
- },
99
- };
50
+ let globalInfo = reactive({
51
+ tabId: 0,
52
+ });
53
+ let focusNode = shallowRef(null)
54
+ const appPageName = "/page";
55
+ const appTabName = "/tab";
56
+ const curFocusName = shallowRef("/tab");
57
+ provide("globalInfo", globalInfo)
58
+
59
+ const $_app_onFocus = () => {
60
+ console.log("App onFocus");
61
+ focusNode.value.findBlockByName(curFocusName.value).requestFocus();
62
+ }
63
+
64
+ const onKeyDown = (ev) => {
65
+ if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
66
+ router?.go(-1);
67
+ }
68
+ return true;
69
+ }
70
+
71
+ const $_app_pageOnEdge = (info) => {
72
+ console.log("App page on edge ", info);
73
+ if (info.direction === EdgeDirection.top) {
74
+ curFocusName.value = "/tab";
75
+ focusNode.value.findBlockByName(appTabName).requestFocus();
76
+ }
77
+ }
78
+
79
+ const $_app_tabOnEdge = (info) => {
80
+ console.log("App tab on edge ", info);
81
+ if (info.direction === EdgeDirection.bottom) {
82
+ curFocusName.value = "/page";
83
+ focusNode.value.findBlockByName(appPageName).requestFocus();
84
+ }
85
+ }
100
86
  </script>
101
87
 
102
88
  <template>
103
- <jsv-focus-block
104
- ref="focusNode"
105
- name="/main"
106
- autoFocus
107
- :onAction="{
108
- onKeyDown: onKeyDown,
109
- onFocus: $_app_onFocus,
110
- }"
111
- :style="{
112
- width: 1280,
113
- height: 720,
114
- backgroundColor: '#007788',
115
- }"
116
- >
117
- <div
118
- :style="{
89
+ <jsv-focus-block ref="focusNode" name="/main" autoFocus :onAction="{
90
+ onKeyDown: onKeyDown,
91
+ onFocus: $_app_onFocus,
92
+ }" :style="{
93
+ width: 1280,
94
+ height: 720,
95
+ backgroundColor: '#007788',
96
+ }">
97
+ <div :style="{
119
98
  top: 0,
120
99
  left: 100,
121
- }"
122
- >
123
- <app-tab
124
- :data="tabData"
125
- :name="appTabName"
126
- :layout="{ width: 600, height: 100 }"
127
- :onEdge="$_app_tabOnEdge"
128
- :style="{
100
+ }">
101
+ <app-tab :data="tabData" :name="appTabName" :layout="{ width: 600, height: 100 }" :onEdge="$_app_tabOnEdge" :style="{
129
102
  top: 15,
130
- }"
131
- ></app-tab>
103
+ }"></app-tab>
132
104
  </div>
133
105
 
134
106
  <div :style="{ top: 100, left: 200 }">
135
- <view-swiper
136
- :name="appPageName"
137
- :pageData="pageList"
138
- :onEdge="$_app_pageOnEdge"
139
- :layout="{
107
+ <view-swiper :name="appPageName" :pageData="pageList" :onEdge="$_app_pageOnEdge" :layout="{
140
108
  width: 600,
141
109
  height: 600,
142
- }"
143
- ></view-swiper>
110
+ }"></view-swiper>
144
111
  </div>
145
112
  </jsv-focus-block>
146
113
  </template>
@@ -1,14 +1,14 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 10:45:38
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2023-03-09 16:27:44
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-04
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
9
  import { VERTICAL, MetroWidget } from "jsview";
10
10
  import WidgetItem from "./WidgetItem.vue";
11
- import { ref, shallowRef, watch, onBeforeUnmount } from "vue";
11
+ import { shallowRef, watch, onBeforeUnmount } from "vue";
12
12
 
13
13
  const props = defineProps({
14
14
  data: {
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { ref, shallowRef, inject } from "vue";
7
+ import { ref, shallowRef } from "vue";
8
8
 
9
9
  const props = defineProps({
10
10
  data: Object,
@@ -1,12 +1,12 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 14:52:53
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:10:14
4
+ * @LastEditors: ZhengYi
5
+ * @LastEditTime: 2023-05-04
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { ref, shallowRef, inject } from "vue";
9
+ import { ref, inject } from "vue";
10
10
 
11
11
  const props = defineProps({
12
12
  data: Object,
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script setup>
8
8
  import { HORIZONTAL, MetroWidget, useFocusHub } from "jsview";
9
- import { ref, shallowRef } from "vue";
9
+ import { shallowRef } from "vue";
10
10
  import Item from "./Item.vue";
11
11
 
12
12
  const props = defineProps({
@@ -3,11 +3,9 @@ import {
3
3
  MetroWidget,
4
4
  VERTICAL,
5
5
  useFocusHub,
6
- JsvPosterImage,
7
- JsvPosterDiv,
8
6
  } from "jsview";
9
7
  import Item from "./Item.vue";
10
- import { ref, onMounted } from "vue";
8
+ import { onMounted } from "vue";
11
9
  import { useRouter } from "vue-router";
12
10
  import data from "./data.js";
13
11
 
@@ -58,7 +56,7 @@ onMounted(() => {
58
56
  :direction="VERTICAL"
59
57
  :provideData="provideData"
60
58
  :measures="measures"
61
- :padding="{ left: 50, right: 50, top: 50, height: 50 }"
59
+ :padding="{ left: 50, right: 50, top: 50, bottom: 50 }"
62
60
  :enableItemRenderBreak="true"
63
61
  :placeHolderSetting="{
64
62
  backgroundColor: 'rgba(78,105,127, 0.8)',
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { ref, shallowRef, inject } from "vue";
7
+ import { ref } from "vue";
8
8
 
9
9
  const props = defineProps({
10
10
  data: Object,
@@ -14,8 +14,6 @@ import {
14
14
  import Item from "./Item.vue";
15
15
  import { onMounted } from "vue";
16
16
 
17
- const TAG = "MetroWidgetDemo";
18
-
19
17
  const focusHub = useFocusHub();
20
18
 
21
19
  const randomColor = () => {
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { ref, shallowRef, inject } from "vue";
7
+ import { ref, shallowRef } from "vue";
8
8
 
9
9
  const props = defineProps({
10
10
  data: Object,
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { MetroWidget, HORIZONTAL, EdgeDirection, useFocusHub } from "jsview";
7
+ import { MetroWidget, HORIZONTAL, useFocusHub } from "jsview";
8
8
  import { onMounted } from "vue";
9
9
  import ButtonItem from "./ButtonItem.vue";
10
10
 
@@ -4,7 +4,7 @@
4
4
  * @Description: 一个简单的按左右键, 焦点在左右两个view来回切换的控件
5
5
  -->
6
6
  <script setup>
7
- import { ref, shallowRef } from "vue";
7
+ import { ref } from "vue";
8
8
  import { useFocusHub } from "jsview";
9
9
 
10
10
  const props = defineProps({
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { MetroWidget, VERTICAL, EdgeDirection, useFocusHub } from "jsview";
7
+ import { MetroWidget, VERTICAL, useFocusHub } from "jsview";
8
8
  import WidgetItem from "./WidgetItem.vue";
9
9
  import { onMounted } from "vue";
10
10
 
@@ -4,7 +4,7 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script setup>
7
- import { ref, shallowRef, inject } from "vue";
7
+ import { ref } from "vue";
8
8
 
9
9
  const props = defineProps({
10
10
  data: Object,
@@ -1,7 +1,7 @@
1
1
 
2
2
  <script setup>
3
3
  import { HORIZONTAL, MetroWidget, useFocusHub } from "jsview";
4
- import { ref, shallowRef } from "vue";
4
+ import { shallowRef } from "vue";
5
5
  import Item from "./Item.vue";
6
6
 
7
7
  const props = defineProps({
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { MetroWidget, HORIZONTAL, EdgeDirection, useFocusHub } from "jsview";
9
+ import { MetroWidget, HORIZONTAL, useFocusHub } from "jsview";
10
10
  import ButtonItem from "./ButtonItem.vue";
11
11
  import Item from "./Item.vue";
12
12
  import { onMounted } from "vue";