@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,7 +1,7 @@
1
- <script>
1
+ <script setup>
2
2
  import ContentBlock from './ContentBlock.vue';
3
-
4
- export default {
3
+ import { computed } from "vue"
4
+ /* export default {
5
5
  props: {
6
6
  style: Object,
7
7
  startIndex: Number,
@@ -15,20 +15,29 @@ export default {
15
15
  return this.style.height / 4;
16
16
  },
17
17
  }
18
- }
18
+ } */
19
+
20
+ const props = defineProps({
21
+ style: Object,
22
+ startIndex: Number,
23
+ contentData: Array,
24
+ })
25
+
26
+ const rowHeight=computed(()=>{
27
+ return props.style.height / 4;
28
+ })
19
29
  </script>
20
30
 
21
31
  <template>
22
- <div :style=style>
23
- <div v-for="(_, idx) in contentData.length" :key=idx>
24
- <ContentBlock v-if="contentData[idx].zoom != 0"
25
- :style="{top: rowHeight*idx, width: style.width, height: rowHeight * (contentData[idx].zoom ?? 1)}"
26
- :index=startIndex+idx :title=contentData[idx].title >
27
- <component :is=contentData[idx].obj />
28
- </ContentBlock>
32
+ <div :style=props.style>
33
+ <div v-for="(_, idx) in props.contentData.length" :key=idx>
34
+ <ContentBlock v-if="props.contentData[idx].zoom != 0"
35
+ :style="{ top: rowHeight * idx, width: props.style.width, height: rowHeight * (props.contentData[idx].zoom ?? 1) }"
36
+ :index=props.startIndex + idx :title=props.contentData[idx].title>
37
+ <component :is=props.contentData[idx].obj />
38
+ </ContentBlock>
39
+ </div>
29
40
  </div>
30
- </div>
31
41
  </template>
32
42
 
33
- <style>
34
- </style>
43
+ <style></style>
@@ -1,8 +1,8 @@
1
- <script>
1
+ <script setup>
2
2
  import ContentList from './ContentList.vue';
3
3
  import TitleBar from './TitleBar.vue';
4
-
5
- export default {
4
+ import { computed } from "vue"
5
+ /* export default {
6
6
  props: {
7
7
  style: Object,
8
8
  panelData: Object,
@@ -20,30 +20,41 @@ export default {
20
20
  return 'rgba(142,175,153,1)'
21
21
  }
22
22
  },
23
- }
23
+ } */
24
+
25
+ const props = defineProps({
26
+ style: Object,
27
+ panelData: Object,
28
+ sideline: Boolean
29
+ })
30
+ const columnWidth=computed(()=>{
31
+ return props.style.width / props.panelData.title.length;
32
+ })
33
+ const separatorColor=computed(()=>{
34
+ return 'rgba(142,175,153,1)'
35
+ })
24
36
  </script>
25
37
 
26
38
  <template>
27
- <div :style=style>
28
- <!-- 分隔线 -->
29
- <div v-if=sideline >
30
- <div :style="{width:style.width, height:1, backgroundColor:separatorColor}" />
31
- <div :style="{top:style.height, width:style.width, height:1, backgroundColor:separatorColor}" />
32
- <div :style="{left: 0, width:1, height: style.height, backgroundColor:separatorColor}" />
33
- <template v-for="(_, idx) in panelData.title" :key="idx" >
34
- <div :style="{left: columnWidth*(idx+1), width:1, height: style.height, backgroundColor:separatorColor}" />
35
- </template>
36
- </div>
39
+ <div :style=props.style>
40
+ <!-- 分隔线 -->
41
+ <div v-if=props.sideline>
42
+ <div :style="{ width: props.style.width, height: 1, backgroundColor: separatorColor }" />
43
+ <div :style="{ top: props.style.height, width: props.style.width, height: 1, backgroundColor: separatorColor }" />
44
+ <div :style="{ left: 0, width: 1, height: props.style.height, backgroundColor: separatorColor }" />
45
+ <template v-for="(_, idx) in props.panelData.title" :key="idx">
46
+ <div
47
+ :style="{ left: columnWidth * (idx + 1), width: 1, height: props.style.height, backgroundColor: separatorColor }" />
48
+ </template>
49
+ </div>
37
50
 
38
- <TitleBar :style="{width: columnWidth}" :titleData=panelData.title />
39
- <div :style="{top:20}" >
40
- <ContentList v-for="(_, idx) in panelData.contentList.length" :key=idx
41
- :style="{left: columnWidth*idx, width: columnWidth, height: style.height-20}" :startIndex=idx
42
- :contentData=panelData.contentList[idx]
43
- />
51
+ <TitleBar :style="{ width: columnWidth }" :titleData=props.panelData.title />
52
+ <div :style="{ top: 20 }">
53
+ <ContentList v-for="(_, idx) in props.panelData.contentList.length" :key=idx
54
+ :style="{ left: columnWidth * idx, width: columnWidth, height: props.style.height - 20 }" :startIndex=idx
55
+ :contentData=props.panelData.contentList[idx] />
56
+ </div>
44
57
  </div>
45
- </div>
46
58
  </template>
47
59
 
48
- <style scoped>
49
- </style>
60
+ <style scoped></style>
@@ -1,16 +1,14 @@
1
- <script>
2
- export default {
3
- props: {
4
- style: Object,
5
- titleData: Array
6
- }
7
- }
1
+ <script setup>
2
+ const props = defineProps({
3
+ style: Object,
4
+ titleData: Array
5
+ })
8
6
  </script>
9
7
 
10
8
  <template>
11
9
  <div>
12
- <template v-for="(title, index) in titleData" :key="index" >
13
- <div class='title-font title-range' :style="{left: style.width * index}">
10
+ <template v-for="(title, index) in props.titleData" :key="index">
11
+ <div class='title-font title-range' :style="{ left: props.style.width * index }">
14
12
  {{ title }}
15
13
  </div>
16
14
  </template>
@@ -1,93 +1,69 @@
1
- <script>
2
- import { watch } from "vue";
1
+ <script setup>
2
+ import { watch, shallowRef } from "vue";
3
3
  import { MetroWidget, VERTICAL } from "jsview";
4
4
  import Item from "./Item.vue";
5
+ import { useRouter } from "vue-router";
6
+ const router = useRouter();
7
+ let mw = shallowRef(null)
8
+ const props = defineProps({
9
+ data: Array,
10
+ name: String,
11
+ onEdge: Function,
12
+ tabId: Number,
13
+ })
5
14
 
6
- export default {
7
- components: {
8
- Item,
9
- MetroWidget,
10
- },
11
- props: {
12
- data: Array,
13
- name: String,
14
- onEdge: Function,
15
- tabId: Number,
16
- },
17
- setup() {
18
- return {
19
- direction: VERTICAL,
20
- width: 1280,
21
- height: 600,
22
- initFocusId: 0,
23
- };
24
- },
25
- methods: {
26
- measures(item) {
27
- return {
28
- width: item.width,
29
- height: item.height,
30
- focusable: item.focusable,
31
- };
32
- },
33
- itemClick(index, data) {
34
- if (!data.path) {
35
- console.error("Route path is not defined.");
36
- return;
37
- }
38
- this.$router.push(data.path);
39
- localStorage.curFocusId = index;
40
- localStorage.curTab = this.tabId;
41
- },
42
- _provideData() {
43
- return this.data;
44
- },
45
- },
46
- beforeCreate() {
47
- if (typeof localStorage.curFocusId !== "undefined") {
48
- this.initFocusId = parseInt(localStorage.curFocusId);
49
- }
50
- localStorage.curFocusId = 0;
51
- watch(
52
- () => {
53
- return this.data;
54
- },
55
- () => {
56
- this.$refs.mw?.refreshData(true);
57
- }
58
- );
15
+ const direction = VERTICAL;
16
+ const width = 1280;
17
+ const height = 600;
18
+ let initFocusId = shallowRef(0);
19
+
20
+ const measures = (item) => {
21
+ return {
22
+ width: item.width,
23
+ height: item.height,
24
+ focusable: item.focusable,
25
+ };
26
+ }
27
+
28
+ const itemClick = (index, data) => {
29
+ if (!data.path) {
30
+ console.error("Route path is not defined.");
31
+ return;
32
+ }
33
+ router.push(data.path);
34
+ localStorage.curFocusId = index;
35
+ localStorage.curTab = props.tabId;
36
+ }
37
+
38
+ const _provideData = () => {
39
+ return props.data;
40
+ }
41
+
42
+ if (typeof localStorage.curFocusId !== "undefined") {
43
+ initFocusId.value = parseInt(localStorage.curFocusId);
44
+ }
45
+ localStorage.curFocusId = 0;
46
+ watch(
47
+ () => {
48
+ return props.data;
59
49
  },
60
- };
50
+ () => {
51
+ mw.value?.refreshData(true);
52
+ }
53
+ );
61
54
  </script>
62
55
 
63
56
  <template>
64
- <metro-widget
65
- ref="mw"
66
- :name="name"
67
- :width="width"
68
- :height="height"
69
- :direction="direction"
70
- :provideData="_provideData"
71
- :enableTouch="true"
72
- :measures="measures"
73
- :padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
74
- :onEdge="onEdge"
75
- :initFocusId="initFocusId"
76
- >
57
+ <metro-widget ref="mw" :name="props.name" :width="width" :height="height" :direction="direction" :provideData="_provideData"
58
+ :enableTouch="true" :measures="measures" :padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
59
+ :onEdge="props.onEdge" :initFocusId="initFocusId">
77
60
  <template #renderItem="{ data, query, onEdge, onAction }">
78
- <Item
79
- :style="{
61
+ <Item :style="{
80
62
  width: data.width,
81
63
  height: data.height,
82
64
  backgroundColor: data.backgroundColor,
83
65
  color: '#000000',
84
- }"
85
- :data="data"
86
- :query="query"
87
- :onEdge="onEdge"
88
- :onAction="onAction"
89
- :itemClick="itemClick"
90
- >
66
+ }" :data="data" :query="query" :onEdge="onEdge" :onAction="onAction" :itemClick="itemClick">
91
67
  {{ data.name }}
92
68
  </Item>
93
69
  </template>
@@ -1,50 +1,43 @@
1
- <script>
2
- export default {
3
- props: {
4
- name: String,
5
- onAction: Function,
6
- },
7
- data() {
8
- return {
9
- focusId: 0,
10
- };
11
- },
12
- methods: {
13
- onKeyDown(ev) {
14
- switch (ev.keyCode) {
15
- case 37:
16
- if (this.focusId == 1) {
17
- this.focusId = 0;
18
- }
19
- break;
20
- case 39:
21
- if (this.focusId == 0) {
22
- this.focusId = 1;
23
- }
24
- break;
25
- case 10000:
26
- case 27:
27
- this.onAction("back");
28
- break;
29
- case 13:
30
- this.onAction(this.focusId == 0 ? "ok" : "cancel");
31
- break;
32
- default:
1
+ <script setup>
2
+ import { shallowRef } from "vue"
3
+ const props = defineProps({
4
+ name: String,
5
+ onAction: Function,
6
+ })
7
+
8
+ let focusId = shallowRef(0)
9
+
10
+ const onKeyDown = (ev) => {
11
+ switch (ev.keyCode) {
12
+ case 37:
13
+ if (focusId.value == 1) {
14
+ focusId.value = 0;
33
15
  }
34
- return true;
35
- },
36
- },
37
- };
16
+ break;
17
+ case 39:
18
+ if (focusId.value == 0) {
19
+ focusId.value = 1;
20
+ }
21
+ break;
22
+ case 10000:
23
+ case 27:
24
+ props.onAction("back");
25
+ break;
26
+ case 13:
27
+ props.onAction(focusId.value == 0 ? "ok" : "cancel");
28
+ break;
29
+ default:
30
+ }
31
+ return true;
32
+ }
33
+ const actionDefines = {
34
+ onKeyDown
35
+ }
36
+
38
37
  </script>
39
38
 
40
39
  <template>
41
- <jsv-focus-block
42
- autoFocus
43
- :name="name"
44
- :onAction="{
45
- onKeyDown: onKeyDown,
46
- }"
47
- >
40
+ <jsv-focus-block autoFocus :name="props.name" :onAction="actionDefines">
48
41
  <div :style="{ top: 200, left: 465 }">
49
42
  <div class="background"></div>
50
43
  <div class="message">是否退出</div>
@@ -76,6 +69,7 @@ export default {
76
69
  text-align: center;
77
70
  font-size: 30;
78
71
  }
72
+
79
73
  .background {
80
74
  left: 0;
81
75
  top: 0;
@@ -83,6 +77,7 @@ export default {
83
77
  height: 200;
84
78
  background-color: rgba(0, 0, 0, 0.7);
85
79
  }
80
+
86
81
  .message {
87
82
  top: 20;
88
83
  width: 350;
@@ -1,58 +1,54 @@
1
- <script>
2
- export default {
3
- props: {
4
- style: Object,
5
- itemClick: Function,
6
- itemFocus: Function,
7
- data: Object,
8
- query: Object,
9
- onEdge: Function,
10
- onAction: Object,
11
- },
12
- data() {
13
- return {
14
- focused: false,
15
- anim: "flip 1s",
16
- };
17
- },
18
- computed: {
19
- foucsStyle() {
20
- return {
21
- width: this.style.width,
22
- height: this.style.height,
23
- };
24
- },
25
- itemStyle() {
26
- return {
27
- width: this.style.width - 10,
28
- height: this.style.height - 10,
29
- backgroundColor: this.style.backgroundColor,
30
- color: this.style.color,
31
- };
32
- },
33
- },
34
- methods: {
35
- onFocus() {
36
- this.focused = true;
37
- if (this.itemFocus) {
38
- this.itemFocus(this.data);
39
- }
40
- },
41
- onBlur() {
42
- this.focused = false;
43
- },
44
- onClick() {
45
- if (this.itemClick) {
46
- this?.itemClick(this.query.id, this.data);
47
- }
48
- },
49
- },
50
- created() {
51
- this.onAction.register("onFocus", this.onFocus);
52
- this.onAction.register("onBlur", this.onBlur);
53
- this.onAction.register("onClick", this.onClick);
54
- },
55
- };
1
+ <script setup>
2
+ import { shallowRef, computed } from "vue"
3
+ const props = defineProps({
4
+ style: Object,
5
+ itemClick: Function,
6
+ itemFocus: Function,
7
+ data: Object,
8
+ query: Object,
9
+ onAction: Object,
10
+ })
11
+
12
+ let focused = shallowRef(false)
13
+
14
+ const foucsStyle = computed(() => {
15
+ return {
16
+ width: props.style.width,
17
+ height: props.style.height,
18
+ };
19
+ })
20
+
21
+ const itemStyle = computed(() => {
22
+ return {
23
+ width: props.style.width - 10,
24
+ height: props.style.height - 10,
25
+ backgroundColor: props.style.backgroundColor,
26
+ color: props.style.color,
27
+ };
28
+
29
+ })
30
+
31
+ const onFocus = () => {
32
+ focused.value = true;
33
+ if (props.itemFocus) {
34
+ props.itemFocus(props.data);
35
+ }
36
+ }
37
+
38
+ const onBlur = () => {
39
+ focused.value = false;
40
+ }
41
+
42
+ const onClick = () => {
43
+ if (props.itemClick) {
44
+ props?.itemClick(props.query.id, props.data);
45
+ }
46
+ }
47
+
48
+ props.onAction.register("onFocus", onFocus);
49
+ props.onAction.register("onBlur", onBlur);
50
+ props.onAction.register("onClick", onClick);
51
+
56
52
  </script>
57
53
 
58
54
  <template>
@@ -70,6 +66,7 @@ export default {
70
66
  left: -5;
71
67
  background-color: #0000ff;
72
68
  }
69
+
73
70
  .item {
74
71
  text-align: center;
75
72
  font-size: 30;
@@ -1,4 +1,4 @@
1
- <script>
1
+ <script setup>
2
2
  import { MetroWidget, VERTICAL } from "jsview";
3
3
  import Item from "./Item.vue";
4
4
 
@@ -10,88 +10,59 @@ const measures = (item) => {
10
10
  };
11
11
  };
12
12
 
13
- export default {
14
- components: {
15
- MetroWidget,
16
- Item,
13
+ const props = defineProps({
14
+ name: String,
15
+ itemFocus: Function,
16
+ onEdge: Function,
17
+ initId: Number,
18
+ })
19
+
20
+ const width = 1280;
21
+ const height = 100;
22
+ const data = [
23
+ {
24
+ width: 200,
25
+ height: 50,
26
+ name: "功能实例",
27
+ focusable: true,
28
+ id: 0,
17
29
  },
18
- props: {
19
- name: String,
20
- itemFocus: Function,
21
- onEdge: Function,
22
- initId: Number,
30
+ {
31
+ width: 200,
32
+ height: 50,
33
+ name: "MetroWidget",
34
+ focusable: true,
35
+ id: 1,
23
36
  },
24
- setup() {
25
- const width = 1280;
26
- const height = 100;
27
- const data = [
28
- {
29
- width: 200,
30
- height: 50,
31
- name: "功能实例",
32
- focusable: true,
33
- id: 0,
34
- },
35
- {
36
- width: 200,
37
- height: 50,
38
- name: "MetroWidget",
39
- focusable: true,
40
- id: 1,
41
- },
42
- {
43
- width: 200,
44
- height: 50,
45
- name: "首页/运营",
46
- focusable: true,
47
- id: 2,
48
- },
49
- {
50
- width: 200,
51
- height: 50,
52
- name: "游戏实例",
53
- focusable: true,
54
- id: 3,
55
- }
56
- ];
57
- const direction = VERTICAL;
58
- return {
59
- width,
60
- height,
61
- data,
62
- direction,
63
- measures,
64
- };
37
+ {
38
+ width: 200,
39
+ height: 50,
40
+ name: "首页/运营",
41
+ focusable: true,
42
+ id: 2,
65
43
  },
66
- };
44
+ {
45
+ width: 200,
46
+ height: 50,
47
+ name: "游戏实例",
48
+ focusable: true,
49
+ id: 3,
50
+ }
51
+ ];
52
+ const direction = VERTICAL;
53
+
67
54
  </script>
68
55
 
69
56
  <template>
70
- <metro-widget
71
- :name="name"
72
- :width="width"
73
- :height="height"
74
- :direction="direction"
75
- :data="data"
76
- :measures="measures"
77
- :padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
78
- :onEdge="onEdge"
79
- :initFocusId="initId"
80
- >
57
+ <metro-widget :name="props.name" :width="width" :height="height" :direction="direction" :data="data"
58
+ :measures="measures" :padding="{ left: 10, top: 10, right: 10, bottom: 10 }" :onEdge="props.onEdge" :initFocusId="props.initId">
81
59
  <template #renderItem="{ data, query, onEdge, onAction }">
82
- <Item
83
- :style="{
60
+ <Item :style="{
84
61
  width: data.width,
85
62
  height: data.height,
86
63
  backgroundColor: '#00AA00',
87
64
  color: '#FFFFFF',
88
- }"
89
- :data="data"
90
- :query="query"
91
- :onEdge="onEdge"
92
- :onAction="onAction"
93
- :itemFocus="itemFocus"
94
- >
65
+ }" :data="data" :query="query" :onEdge="onEdge" :onAction="onAction" :itemFocus="props.itemFocus">
95
66
  {{ data.name }}
96
67
  </Item>
97
68
  </template>
@@ -188,7 +188,7 @@ let routeList = [
188
188
  component: () => import('jsview-vue-samples/FocusMoveStyle/App.vue'),
189
189
  },
190
190
  {
191
- name: 'Mockjs',
191
+ name: 'Mockjs测试',
192
192
  path: '/feature/MockjsDemo',
193
193
  component: () => import('jsview-vue-samples/MockjsDemo/App.vue'),
194
194
  },