@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,11 +1,8 @@
1
- <script>
1
+ <script setup>
2
2
  import { JsvTextBox } from "jsview";
3
- export default {
4
- props: {
5
- text: String,
6
- },
7
- components: { JsvTextBox },
8
- };
3
+ const props=defineProps({
4
+ text: String
5
+ })
9
6
  </script>
10
7
 
11
8
  <template>
@@ -37,7 +34,7 @@ export default {
37
34
  lineHeight: 80,
38
35
  }"
39
36
  >
40
- {{ text }}
37
+ {{ props.text }}
41
38
  </JsvTextBox>
42
39
  <div
43
40
  :style="{
@@ -66,7 +63,7 @@ export default {
66
63
  lineHeight: 80,
67
64
  }"
68
65
  >
69
- {{ text }}
66
+ {{ props.text }}
70
67
  </JsvTextBox>
71
68
  <div
72
69
  :style="{
@@ -95,7 +92,7 @@ export default {
95
92
  lineHeight: 80,
96
93
  }"
97
94
  >
98
- {{ text }}
95
+ {{ props.text }}
99
96
  </JsvTextBox>
100
97
  </div>
101
98
  </template>
@@ -1,11 +1,8 @@
1
- <script>
1
+ <script setup>
2
2
  import { JsvTextBox } from "jsview";
3
- export default {
4
- props: {
5
- text: String,
6
- },
7
- components: { JsvTextBox },
8
- };
3
+ const props=defineProps({
4
+ text: String
5
+ })
9
6
  </script>
10
7
 
11
8
  <template>
@@ -37,7 +34,7 @@ export default {
37
34
  lineHeight: 40,
38
35
  }"
39
36
  >
40
- {{ `[TR]${text}` }}
37
+ {{ `[TR]${props.text}` }}
41
38
  </JsvTextBox>
42
39
  <div
43
40
  :style="{
@@ -66,7 +63,7 @@ export default {
66
63
  lineHeight: 40,
67
64
  }"
68
65
  >
69
- {{ `[MR]${text}` }}
66
+ {{ `[MR]${props.text}` }}
70
67
  </JsvTextBox>
71
68
  <div
72
69
  :style="{
@@ -95,7 +92,7 @@ export default {
95
92
  lineHeight: 40,
96
93
  }"
97
94
  >
98
- {{ `[BR]${text}` }}
95
+ {{ `[BR]${props.text}` }}
99
96
  </JsvTextBox>
100
97
 
101
98
  <div
@@ -125,7 +122,7 @@ export default {
125
122
  lineHeight: 80,
126
123
  }"
127
124
  >
128
- {{ `[BR]${text}` }}
125
+ {{ `[BR]${props.text}` }}
129
126
  </JsvTextBox>
130
127
  </div>
131
128
  </template>
@@ -1,88 +1,67 @@
1
- <!--
2
- * 当TextData数据中有blur为0(不显示阴影)时,为了测试会报“StyleFormatCheck.js?058c:447 textShadow: blur shadow above 0(now=2 2 0 #00FF00)”错误
3
- -->
4
- <script>
1
+ <script setup>
5
2
  import { JsvTextBox } from "jsview";
6
-
7
- export default {
8
- components: {
9
- JsvTextBox,
3
+ import { useRouter } from "vue-router";
4
+ const router = useRouter();
5
+ const TextData = [
6
+ {
7
+ id: 0,
8
+ title: "偏移x,y为0(文字发光)",
9
+ textShadow: "0 0 3 #00FF00",
10
+ },
11
+ {
12
+ id: 1,
13
+ title: "blur为0(不显示阴影)",
14
+ textShadow: "2 2 0 #00FF00",
15
+ /* 此处会报错,为正常情况。
16
+ * 当TextData数据中有blur为0(不显示阴影)时,为了测试会报“StyleFormatCheck.js?058c:447 textShadow: blur shadow above 0(now=2 2 0 #00FF00)”错误
17
+ */
10
18
  },
11
- data() {
12
- return {
13
- TextData: [
14
- {
15
- id: 0,
16
- title: "偏移x,y为0(文字发光)",
17
- textShadow: "0 0 3 #00FF00",
18
- },
19
- {
20
- id: 1,
21
- title: "blur为0(不显示阴影)",
22
- textShadow: "2 2 0 #00FF00",
23
- },
24
- {
25
- id: 2,
26
- title: "rgba格式颜色(半透明红)",
27
- textShadow: "4 4 3 rgba(255,0,0,0.5)",
28
- },
29
- {
30
- id: 3,
31
- title: "#格式颜色(蓝色)",
32
- textShadow: "4 4 0.5 #0000EF",
33
- },
34
- ],
35
- };
19
+ {
20
+ id: 2,
21
+ title: "rgba格式颜色(半透明红)",
22
+ textShadow: "4 4 3 rgba(255,0,0,0.5)",
36
23
  },
37
- methods: {
38
- onKeyDown(ev) {
39
- if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
40
- this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
41
- }
42
- return true;
43
- },
24
+ {
25
+ id: 3,
26
+ title: "#格式颜色(蓝色)",
27
+ textShadow: "4 4 0.5 #0000EF",
44
28
  },
45
- };
29
+ ]
30
+
31
+ const onKeyDown = (ev) => {
32
+ if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
33
+ router?.go(-1); // 有router时,是从DemoHomepage进入,回退
34
+ }
35
+ return true;
36
+ }
46
37
  </script>
47
38
 
48
39
  <template>
49
- <jsv-focus-block
50
- autoFocus
51
- :onAction="{
52
- onKeyDown: onKeyDown,
53
- }"
54
- >
55
- <div
56
- v-for="item in TextData"
57
- :key="item.id"
58
- :style="{ left: 320 * item.id }"
59
- >
40
+ <jsv-focus-block autoFocus :onAction="{
41
+ onKeyDown: onKeyDown,
42
+ }">
43
+ <div v-for="item in TextData" :key="item.id" :style="{ left: 320 * item.id }">
60
44
  <div>
61
- <div
62
- :style="{
63
- width: 320,
64
- height: 50,
65
- fontSize: 25,
66
- textAlign: 'center',
67
- lineHeight: 50,
68
- backgroundColor: item.id % 2 == 0 ? '#00ff00' : '#0000ff',
69
- }"
70
- >
45
+ <div :style="{
46
+ width: 320,
47
+ height: 50,
48
+ fontSize: 25,
49
+ textAlign: 'center',
50
+ lineHeight: 50,
51
+ backgroundColor: item.id % 2 == 0 ? '#00ff00' : '#0000ff',
52
+ }">
71
53
  {{ item.title }}
72
54
  </div>
73
- <JsvTextBox
74
- :verticalAlign="'middle'"
75
- :style="{
76
- top: 50,
77
- width: 320,
78
- height: 70,
79
- textShadow: item.textShadow,
80
- backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
81
- fontSize: 35,
82
- textAlign: 'center',
83
- lineHeight: 40,
84
- }"
85
- >
55
+ <JsvTextBox :verticalAlign="'middle'" :style="{
56
+ top: 50,
57
+ width: 320,
58
+ height: 70,
59
+ textShadow: item.textShadow,
60
+ backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
61
+ fontSize: 35,
62
+ textAlign: 'center',
63
+ lineHeight: 40,
64
+ }">
86
65
  文字阴影
87
66
  </JsvTextBox>
88
67
  </div>