@shijiu/jsview-vue 0.9.631 → 1.9.628

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 (78) hide show
  1. package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
  2. package/dom/bin/jsview-dom.min.js +1 -1
  3. package/dom/{target_core_revision.js → target_core_revision.mjs} +6 -6
  4. package/index.d.ts +1 -0
  5. package/index.js +1 -10
  6. package/loader/jsview-main.js +1 -1
  7. package/loader/loader.js +0 -1
  8. package/package.json +3 -3
  9. package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +17225 -2182
  10. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +10 -12
  11. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +5 -1
  12. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +6 -1
  13. package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +6972 -7050
  14. package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +221 -117
  15. package/patches/node_modules/postcss-js/objectifier.js +4 -4
  16. package/samples/Basic/App.vue +2 -2
  17. package/samples/Basic/components/FontStyle.css +1 -1
  18. package/samples/Basic/components/anim/AnimGroup.vue +4 -4
  19. package/samples/Basic/components/div/DivGroup1.vue +4 -4
  20. package/samples/Basic/components/div/DivGroup2.vue +5 -5
  21. package/samples/Basic/components/img/ImageGroup.vue +2 -2
  22. package/samples/Basic/components/panel/Panel1.vue +6 -6
  23. package/samples/Basic/components/panel/Panel2.vue +2 -2
  24. package/samples/Basic/components/text/TextGroup1.vue +4 -4
  25. package/samples/Basic/components/text/TextGroup2.vue +2 -2
  26. package/samples/Basic/components/text/TextOverflow.vue +2 -2
  27. package/samples/DemoHomepage/App.vue +1 -1
  28. package/samples/DemoHomepage/components/BodyFrame.vue +0 -2
  29. package/samples/DemoHomepage/router.js +36 -51
  30. package/samples/DemoHomepage/views/Homepage.vue +9 -5
  31. package/samples/HashHistory/router.js +6 -6
  32. package/samples/Input/App.vue +17 -8
  33. package/samples/Input/InputPanel.vue +11 -18
  34. package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
  35. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -17
  36. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +10 -3
  37. package/samples/MetroWidgetDemos/PingPong/{TabItem.vue → Item.vue} +10 -2
  38. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
  39. package/samples/Preload/App.vue +11 -16
  40. package/samples/SprayView/App.vue +2 -2
  41. package/samples/TextureAnimation/App2.vue +14 -42
  42. package/samples/VideoDemo/App.vue +2 -2
  43. package/samples/VisibleSensorDemo/App.vue +25 -92
  44. package/scripts/jsview-post-install.js +5 -5
  45. package/scripts/jsview-run-android.js +12 -11
  46. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +56 -52
  47. package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
  48. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +2 -36
  49. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +0 -14
  50. package/utils/JsViewPlugin/JsvPlayer/index.js +1 -8
  51. package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
  52. package/utils/JsViewVueTools/JsvHashHistory.js +12 -12
  53. package/utils/JsViewVueTools/index.d.ts +5 -1
  54. package/utils/JsViewVueTools/index.js +1 -2
  55. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +1 -11
  56. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
  57. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +2 -4
  58. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +12 -13
  59. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +41 -37
  60. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +8 -1
  61. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +1 -1
  62. package/utils/index.d.ts +3 -0
  63. package/utils/index.js +10 -0
  64. package/dom/jsv-browser-debug-dom.js_1 +0 -8
  65. package/dom/jsv-dom.js_1 +0 -6
  66. package/dom/jsv-forge-define.js_1 +0 -6
  67. package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
  68. package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
  69. package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
  70. package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
  71. package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
  72. package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
  73. package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
  74. package/samples/Collision/App.vue +0 -452
  75. package/samples/ImpactStop/App.vue +0 -435
  76. package/samples/TextureAnimation/assets/light.png +0 -0
  77. package/samples/TextureAnimation/assets/light2.png +0 -0
  78. package/utils/JsViewVueTools/JsvImpactTracer.js +0 -113
@@ -1,9 +1,9 @@
1
1
  <script setup>
2
2
  import { reactive, onMounted, onBeforeUnmount } from "vue";
3
- import ContentBlock from "../ContentBlock";
4
- import AnimKeyframeBasic from "./AnimKeyframeBasic";
5
- import AnimKeyframeComposite from "./AnimKeyframeComposite";
6
- import AnimTransition from "./AnimTransition";
3
+ import ContentBlock from "../ContentBlock.vue";
4
+ import AnimKeyframeBasic from "./AnimKeyframeBasic.vue";
5
+ import AnimKeyframeComposite from "./AnimKeyframeComposite.vue";
6
+ import AnimTransition from "./AnimTransition.vue";
7
7
 
8
8
  const props = defineProps({
9
9
  contentClass: String,
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
- import ContentBlock from "../ContentBlock";
3
- import DivBackground from "./DivBackground";
4
- import DivClip from "./DivClip";
5
- import DivLayout from "./DivLayout";
2
+ import ContentBlock from "../ContentBlock.vue";
3
+ import DivBackground from "./DivBackground.vue";
4
+ import DivClip from "./DivClip.vue";
5
+ import DivLayout from "./DivLayout.vue";
6
6
 
7
7
  const props = defineProps({
8
8
  contentClass: String,
@@ -1,9 +1,9 @@
1
1
  <script setup>
2
- import ContentBlock from "../ContentBlock";
3
- import DivCssScoped from "./DivCssScoped";
4
- import DivCssVar from "./DivCssVar";
5
- import DivRadius from "./DivRadius";
6
- import DivTransform from "./DivTransform";
2
+ import ContentBlock from "../ContentBlock.vue";
3
+ import DivCssScoped from "./DivCssScoped.vue";
4
+ import DivCssVar from "./DivCssVar.vue";
5
+ import DivRadius from "./DivRadius.vue";
6
+ import DivTransform from "./DivTransform.vue";
7
7
 
8
8
  const props = defineProps({
9
9
  contentClass: String,
@@ -7,8 +7,8 @@
7
7
  </template>
8
8
 
9
9
  <script>
10
- import ContentBlock from '../ContentBlock';
11
- import ImgLayout from './ImgLayout';
10
+ import ContentBlock from '../ContentBlock.vue';
11
+ import ImgLayout from './ImgLayout.vue';
12
12
 
13
13
  export default {
14
14
  props: {
@@ -1,10 +1,10 @@
1
1
  <script setup>
2
- import TitleBar from "./TitleBar";
3
- import DivGroup1 from "../div/DivGroup1";
4
- import DivGroup2 from "../div/DivGroup2";
5
- import TextGroup1 from "../text/TextGroup1";
6
- import TextGroup2 from "../text/TextGroup2";
7
- import AnimGroup from "../anim/AnimGroup";
2
+ import TitleBar from "./TitleBar.vue";
3
+ import DivGroup1 from "../div/DivGroup1.vue";
4
+ import DivGroup2 from "../div/DivGroup2.vue";
5
+ import TextGroup1 from "../text/TextGroup1.vue";
6
+ import TextGroup2 from "../text/TextGroup2.vue";
7
+ import AnimGroup from "../anim/AnimGroup.vue";
8
8
 
9
9
  const props = defineProps({
10
10
  panelClass: String,
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import TitleBar from "./TitleBar";
3
- import ImageGroup from "../img/ImageGroup";
2
+ import TitleBar from "./TitleBar.vue";
3
+ import ImageGroup from "../img/ImageGroup.vue";
4
4
 
5
5
  const props = defineProps({
6
6
  panelClass: String,
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
- import ContentBlock from "../ContentBlock";
3
- import TextAlign from "./TextAlign";
4
- import TextFontStyle from "./TextFontStyle";
5
- import TextOverflow from "./TextOverflow";
2
+ import ContentBlock from "../ContentBlock.vue";
3
+ import TextAlign from "./TextAlign.vue";
4
+ import TextFontStyle from "./TextFontStyle.vue";
5
+ import TextOverflow from "./TextOverflow.vue";
6
6
 
7
7
  const props = defineProps({
8
8
  contentClass: String,
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import ContentBlock from "../ContentBlock";
3
- import TextEmoji from "./TextEmoji";
2
+ import ContentBlock from "../ContentBlock.vue";
3
+ import TextEmoji from "./TextEmoji.vue";
4
4
 
5
5
  const props = defineProps({
6
6
  contentClass: String,
@@ -77,7 +77,7 @@ const multiLine =
77
77
  top: (blockSize.height + gap) * 4,
78
78
  height: 65,
79
79
  whiteSpace: 'pre-wrap',
80
- textOverflow: 'clip',
80
+ textOverflow: 'ellipsis',
81
81
  overflow: 'hidden',
82
82
  }"
83
83
  >
@@ -91,7 +91,7 @@ const multiLine =
91
91
  top: (blockSize.height + gap) * 4 + 67,
92
92
  height: 65,
93
93
  whiteSpace: 'pre-wrap',
94
- textOverflow: 'ellipsis',
94
+ textOverflow: 'clip',
95
95
  overflow: 'hidden',
96
96
  }"
97
97
  >
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
9
- import { router } from "./router.js";
9
+ import { router } from "./router";
10
10
  import { jJsvRuntimeBridge } from "jsview";
11
11
 
12
12
  export default {
@@ -12,7 +12,6 @@ export default {
12
12
  data: Array,
13
13
  name: String,
14
14
  onEdge: Function,
15
- tabId: Number,
16
15
  },
17
16
  setup() {
18
17
  return {
@@ -37,7 +36,6 @@ export default {
37
36
  }
38
37
  this.$router.push(data.path);
39
38
  localStorage.curFocusId = index;
40
- localStorage.curTab = this.tabId;
41
39
  },
42
40
  _provideData() {
43
41
  return this.data;
@@ -1,190 +1,175 @@
1
1
  import { createRouter } from "vue-router";
2
- import { createJsvHashHistory } from "jsview";
2
+ import { jsvCreateHashHistory } from "jsview";
3
3
 
4
4
  const routeList = [
5
5
  // 功能实例
6
6
  {
7
7
  name: "Home",
8
8
  path: "/",
9
- component: () => import("./views/Homepage"),
9
+ component: () => import("./views/Homepage.vue"),
10
10
  },
11
11
  {
12
12
  name: "基础示例合集",
13
13
  path: "/feature/Basic",
14
- component: () => import("jsview/samples/Basic/App"),
14
+ component: () => import("jsview/samples/Basic/App.vue"),
15
15
  },
16
16
  {
17
17
  name: "可视化变化通知",
18
18
  path: "/feature/VisibleSensorDemo",
19
- component: () => import("jsview/samples/VisibleSensorDemo/App"),
19
+ component: () => import("jsview/samples/VisibleSensorDemo/App.vue"),
20
20
  },
21
21
  {
22
22
  name: "快速刷新的表格布局组件",
23
23
  path: "/feature/GridDemo",
24
- component: () => import("jsview/samples/GridDemo/App"),
24
+ component: () => import("jsview/samples/GridDemo/App.vue"),
25
25
  },
26
26
  {
27
27
  name: ".9图焦点框漂移",
28
28
  path: "/feature/NinePatchDemo",
29
- component: () => import("jsview/samples/NinePatchDemo/App"),
29
+ component: () => import("jsview/samples/NinePatchDemo/App.vue"),
30
30
  },
31
31
  {
32
32
  name: "视频",
33
33
  path: "/feature/VideoDemo",
34
- component: () => import("jsview/samples/VideoDemo/App"),
34
+ component: () => import("jsview/samples/VideoDemo/App.vue"),
35
35
  },
36
36
  {
37
37
  name: "焦点切换demo",
38
38
  path: "/feature/BasicFocusControl",
39
- component: () => import("jsview/samples/BasicFocusControl/App"),
39
+ component: () => import("jsview/samples/BasicFocusControl/App.vue"),
40
40
  },
41
41
  {
42
42
  name: "Hash方式路由切换",
43
43
  path: "/feature/HashHistory",
44
44
  props: { routePath: "/feature/HashHistory" },
45
- component: () => import("jsview/samples/HashHistory/App"),
45
+ component: () => import("jsview/samples/HashHistory/App.vue"),
46
46
  },
47
47
  {
48
48
  name: "翻牌游戏",
49
49
  path: "/feature/FlipCard",
50
- component: () => import("jsview/samples/FlipCard/App"),
50
+ component: () => import("jsview/samples/FlipCard/App.vue"),
51
51
  },
52
52
  {
53
53
  name: "设置颜色空间",
54
54
  path: "/feature/ColorSpace",
55
- component: () => import("jsview/samples/ColorSpace/App"),
55
+ component: () => import("jsview/samples/ColorSpace/App.vue"),
56
56
  },
57
57
  {
58
58
  name: "制定Texture尺寸",
59
59
  path: "/feature/TextureSize",
60
- component: () => import("jsview/samples/TextureSize/App"),
60
+ component: () => import("jsview/samples/TextureSize/App.vue"),
61
61
  },
62
62
  {
63
63
  name: "动图",
64
64
  path: "/feature/AnimPicture",
65
- component: () => import("jsview/samples/AnimPicture/App"),
65
+ component: () => import("jsview/samples/AnimPicture/App.vue"),
66
66
  },
67
67
  {
68
68
  name: "粒子效果",
69
69
  path: "/feature/SprayView",
70
- component: () => import("jsview/samples/SprayView/App"),
70
+ component: () => import("jsview/samples/SprayView/App.vue"),
71
71
  },
72
72
  {
73
73
  name: "长文字",
74
74
  path: "/feature/LongText",
75
- component: () => import("jsview/samples/LongText/App"),
75
+ component: () => import("jsview/samples/LongText/App.vue"),
76
76
  },
77
77
  {
78
78
  name: "长图片",
79
79
  path: "/feature/LongImage",
80
- component: () => import("jsview/samples/LongImage/App"),
80
+ component: () => import("jsview/samples/LongImage/App.vue"),
81
81
  },
82
82
  {
83
83
  name: "二维码",
84
84
  path: "/feature/QrcodeDemo",
85
- component: () => import("jsview/samples/QrcodeDemo/App"),
85
+ component: () => import("jsview/samples/QrcodeDemo/App.vue"),
86
86
  },
87
87
  {
88
88
  name: "文字阴影",
89
89
  path: "/feature/TextShadowDemo",
90
- component: () => import("jsview/samples/TextShadowDemo/App"),
90
+ component: () => import("jsview/samples/TextShadowDemo/App.vue"),
91
91
  },
92
92
  {
93
93
  name: "多行文字区域内对齐",
94
94
  path: "/feature/TextBox",
95
- component: () => import("jsview/samples/TextBox/App"),
95
+ component: () => import("jsview/samples/TextBox/App.vue"),
96
96
  },
97
97
  {
98
98
  name: "抛物运动写法样例",
99
99
  path: "/feature/ThrowMoveDemo",
100
- component: () => import("jsview/samples/ThrowMoveDemo/App"),
100
+ component: () => import("jsview/samples/ThrowMoveDemo/App.vue"),
101
101
  },
102
102
  {
103
103
  name: "精灵图",
104
104
  path: "/feature/SpriteImage",
105
- component: () => import("jsview/samples/SpriteImage/App"),
105
+ component: () => import("jsview/samples/SpriteImage/App.vue"),
106
106
  },
107
107
  {
108
108
  name: "文字滚动(标题跑马灯)",
109
109
  path: "/feature/Marquee",
110
- component: () => import("jsview/samples/Marquee/App"),
110
+ component: () => import("jsview/samples/Marquee/App.vue"),
111
111
  },
112
112
  {
113
113
  name: "文字输入",
114
114
  path: "/feature/Input",
115
- component: () => import("jsview/samples/Input/App"),
115
+ component: () => import("jsview/samples/Input/App.vue"),
116
116
  },
117
117
  {
118
118
  name: "拼图demo",
119
119
  path: "/feature/MaskClip",
120
- component: () => import("jsview/samples/MaskClip/App"),
120
+ component: () => import("jsview/samples/MaskClip/App.vue"),
121
121
  },
122
122
  {
123
123
  name: "SoundPool",
124
124
  path: "/feature/SoundPool",
125
- component: () => import("jsview/samples/SoundPool/App"),
125
+ component: () => import("jsview/samples/SoundPool/App.vue"),
126
126
  },
127
127
  {
128
128
  name: "TextureAnimation",
129
129
  path: "/feature/TextureAnimation",
130
- component: () => import("jsview/samples/TextureAnimation/App"),
130
+ component: () => import("jsview/samples/TextureAnimation/App.vue"),
131
131
  },
132
132
  {
133
- name: "焦点框旋转光效果",
133
+ name: "TextureAnimation2",
134
134
  path: "/feature/TextureAnimation2",
135
- component: () => import("jsview/samples/TextureAnimation/App2"),
135
+ component: () => import("jsview/samples/TextureAnimation/App2.vue"),
136
136
  },
137
137
  {
138
138
  name: "公祭日黑白效果",
139
139
  path: "/feature/GrayDown",
140
- component: () => import("jsview/samples/FilterDemo/App"),
141
- },
142
- {
143
- name: "预加载",
144
- path: "/feature/Preload",
145
- component: () => import("jsview/samples/Preload/App"),
146
- },
147
- // {
148
- // name: "碰撞检测",
149
- // path: "/feature/Collision",
150
- // component: () => import("jsview/samples/Collision/App"),
151
- // },
152
- // {
153
- // name: "碰撞即停",
154
- // path: "/feature/ImpactStop",
155
- // component: () => import("jsview/samples/ImpactStop/App"),
156
- // },
140
+ component: () => import("jsview/samples/FilterDemo/App.vue"),
141
+ },
157
142
 
158
143
  // MetroWidget示例
159
144
  {
160
145
  name: "简单示例",
161
146
  path: "/metroWidget/Simple",
162
- component: () => import("jsview/samples/MetroWidgetDemos/Simple/App"),
147
+ component: () => import("jsview/samples/MetroWidgetDemos/Simple/App.vue"),
163
148
  },
164
149
  {
165
150
  name: "嵌套示例",
166
151
  path: "/metroWidget/Advanced",
167
- component: () => import("jsview/samples/MetroWidgetDemos/Advanced/App"),
152
+ component: () => import("jsview/samples/MetroWidgetDemos/Advanced/App.vue"),
168
153
  },
169
154
  {
170
155
  name: "性能测试",
171
156
  path: "/metroWidget/PerformanceTest",
172
157
  component: () =>
173
- import("jsview/samples/MetroWidgetDemos/PerformanceTest/App"),
158
+ import("jsview/samples/MetroWidgetDemos/PerformanceTest/App.vue"),
174
159
  },
175
160
  {
176
161
  name: "乒乓模式",
177
162
  path: "/metroWidget/PingPong",
178
163
  component: () =>
179
- import("jsview/samples/MetroWidgetDemos/PingPong/App"),
164
+ import("jsview/samples/MetroWidgetDemos/PingPong/App.vue"),
180
165
  },
181
166
  ];
182
167
 
183
168
  const router = createRouter({
184
- // 浏览器调试和盒子上都可以使用类WebHashHistory的createJsvHashHistory(推荐)
169
+ // 浏览器调试和盒子上都可以使用类WebHashHistory的jsvCreateHashHistory(推荐)
185
170
  // 或 createMemoryHistory;
186
171
  // createWebHashHistory只能用于浏览器调试,盒子不支持
187
- history: createJsvHashHistory(),
172
+ history: jsvCreateHashHistory(),
188
173
  routes: routeList,
189
174
  });
190
175
 
@@ -89,12 +89,15 @@ export default {
89
89
  }
90
90
  },
91
91
  tabItemFocus(data) {
92
+ console.log("cchtest tabItemFocus");
92
93
  if (data.id != this.tabId) {
93
94
  this.tabId = data.id;
94
95
  this.contentData = dataList[this.tabId];
96
+ localStorage.curTab = this.tabId;
95
97
  }
96
98
  },
97
99
  onDialogAction(msg) {
100
+ console.log("cchtes dialog onaction", msg);
98
101
  this.showExitDialog = false;
99
102
  this.changeFocus(this.preFocusName);
100
103
  switch (msg) {
@@ -118,8 +121,10 @@ export default {
118
121
  localStorage.curTab = 0;
119
122
  this.contentData = dataList[this.tabId];
120
123
  },
121
- mounted() {},
122
- beforeUnmount() {},
124
+ mounted() {
125
+ },
126
+ beforeUnmount() {
127
+ },
123
128
  };
124
129
  </script>
125
130
 
@@ -157,7 +162,6 @@ export default {
157
162
  :data="contentData"
158
163
  :name="name + '/bodyFrame'"
159
164
  :onEdge="onContentEdge"
160
- :tabId="tabId"
161
165
  />
162
166
  </div>
163
167
 
@@ -172,8 +176,8 @@ export default {
172
176
 
173
177
  <style scoped>
174
178
  .rootSize {
175
- width: 1920;
176
- height: 1080;
179
+ width: 1280;
180
+ height: 720;
177
181
  background-color: #334c4c;
178
182
  }
179
183
 
@@ -1,22 +1,22 @@
1
1
  import { createRouter } from "vue-router";
2
- import { createJsvHashHistory } from "jsview";
2
+ import { jsvCreateHashHistory } from "jsview";
3
3
 
4
4
  const routeList = [
5
5
  // 功能实例
6
6
  {
7
7
  name: "Home",
8
8
  path: "/",
9
- redirect: "/__MainJsvApp/MainPage",
9
+ redirect: "/__MainJsvApp/MainPage.vue",
10
10
  },
11
11
  {
12
12
  name: "MainPage",
13
13
  path: "/__MainJsvApp/MainPage",
14
- component: () => import("./views/MainPage"),
14
+ component: () => import("./views/MainPage.vue"),
15
15
  },
16
16
  {
17
17
  name: "SubPageFirst",
18
18
  path: "/__MainJsvApp/SubPageFirst",
19
- component: () => import("./views/SubPage"),
19
+ component: () => import("./views/SubPage.vue"),
20
20
  props: {
21
21
  name: "First",
22
22
  jumpTo: "Second",
@@ -25,7 +25,7 @@ const routeList = [
25
25
  {
26
26
  name: "SubPageSecond",
27
27
  path: "/__MainJsvApp/SubPageSecond",
28
- component: () => import("./views/SubPage"),
28
+ component: () => import("./views/SubPage.vue"),
29
29
  props: {
30
30
  name: "Second",
31
31
  jumpTo: "First",
@@ -34,7 +34,7 @@ const routeList = [
34
34
  ];
35
35
 
36
36
  const router = createRouter({
37
- history: createJsvHashHistory(),
37
+ history: jsvCreateHashHistory(),
38
38
  routes: routeList,
39
39
  });
40
40
 
@@ -2,11 +2,11 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-01-20 16:09:31
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:34:30
5
+ * @LastEditTime: 2022-07-08 13:37:44
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
9
- import { InputType, EdgeDirection, useFocusHub } from "jsview";
9
+ import { InputType, EdgeDirection } from "jsview";
10
10
  import InputPanel from "./InputPanel.vue";
11
11
 
12
12
  export default {
@@ -17,7 +17,6 @@ export default {
17
17
  return {
18
18
  name: "/input",
19
19
  InputType,
20
- focusHub: useFocusHub(),
21
20
  };
22
21
  },
23
22
  methods: {
@@ -28,23 +27,33 @@ export default {
28
27
  return true;
29
28
  },
30
29
  _onFocus() {
31
- this.focusHub.setFocus(this.name + "/normal");
30
+ this.$refs.focusNode
31
+ .findBlockByName(this.name + "/normal")
32
+ .requestFocus();
32
33
  },
33
34
  _panel1OnEdge(edgeInfo) {
34
35
  if (edgeInfo.direction == EdgeDirection.right) {
35
- this.focusHub.setFocus(this.name + "/password");
36
+ this.$refs.focusNode
37
+ .findBlockByName(this.name + "/password")
38
+ .requestFocus();
36
39
  }
37
40
  },
38
41
  _panel2OnEdge(edgeInfo) {
39
42
  if (edgeInfo.direction == EdgeDirection.left) {
40
- this.focusHub.setFocus(this.name + "/normal");
43
+ this.$refs.focusNode
44
+ .findBlockByName(this.name + "/normal")
45
+ .requestFocus();
41
46
  } else if (edgeInfo.direction == EdgeDirection.right) {
42
- this.focusHub.setFocus(this.name + "/number");
47
+ this.$refs.focusNode
48
+ .findBlockByName(this.name + "/number")
49
+ .requestFocus();
43
50
  }
44
51
  },
45
52
  _panel3OnEdge(edgeInfo) {
46
53
  if (edgeInfo.direction == EdgeDirection.left) {
47
- this.focusHub.setFocus(this.name + "/password");
54
+ this.$refs.focusNode
55
+ .findBlockByName(this.name + "/password")
56
+ .requestFocus();
48
57
  }
49
58
  },
50
59
  },
@@ -2,17 +2,13 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-01-25 10:33:07
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-02 13:44:41
5
+ * @LastEditTime: 2022-07-08 13:38:14
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
9
9
  import FullKeyboard from "./FullKeyboard.vue";
10
- import { EdgeDirection, JsvInput, useFocusHub } from "jsview";
10
+ import { EdgeDirection, JsvInput } from "jsview";
11
11
  import { ref } from "vue";
12
-
13
- const blurColor = "#AAAAAA";
14
- const focusColor = "#FFFF00";
15
-
16
12
  export default {
17
13
  components: {
18
14
  FullKeyboard,
@@ -28,20 +24,17 @@ export default {
28
24
  setup() {
29
25
  return {
30
26
  showCursor: ref(false),
31
- focusHub: useFocusHub(),
32
- cursorColor: ref(blurColor),
33
27
  };
34
28
  },
35
29
  methods: {
36
30
  _onFocus() {
37
31
  this.showCursor = true;
38
- this.cursorColor = blurColor;
39
- this.focusHub.setFocus(`${this.name}/keyboard`);
32
+ this.$refs.focusNode
33
+ .findBlockByName(`${this.name}/keyboard`)
34
+ .requestFocus();
40
35
  },
41
36
  _onBlur() {
42
- console.log("testtest onblur");
43
37
  this.showCursor = false;
44
- this.cursorColor = blurColor;
45
38
  },
46
39
  _keyboardOnClick(item) {
47
40
  const char = item.content;
@@ -55,8 +48,9 @@ export default {
55
48
  },
56
49
  _keyboardOnEdge(edgeInfo) {
57
50
  if (edgeInfo.direction === EdgeDirection.top) {
58
- this.focusHub.setFocus(`${this.name}/etext`);
59
- this.cursorColor = focusColor;
51
+ this.$refs.focusNode
52
+ .findBlockByName(`${this.name}/etext`)
53
+ .requestFocus();
60
54
  } else {
61
55
  this.onEdge?.(edgeInfo);
62
56
  }
@@ -69,8 +63,9 @@ export default {
69
63
  },
70
64
  _inputOnEdge(edgeInfo) {
71
65
  if (edgeInfo.direction === EdgeDirection.bottom) {
72
- this.focusHub.setFocus(`${this.name}/keyboard`);
73
- this.cursorColor = blurColor;
66
+ this.$refs.focusNode
67
+ .findBlockByName(`${this.name}/keyboard`)
68
+ .requestFocus();
74
69
  } else {
75
70
  this.onEdge?.(edgeInfo);
76
71
  }
@@ -86,7 +81,6 @@ export default {
86
81
  ref="focusNode"
87
82
  :onAction="{
88
83
  onFocus: _onFocus,
89
- onBlur: _onBlur,
90
84
  }"
91
85
  >
92
86
  <div
@@ -117,7 +111,6 @@ export default {
117
111
  :cursorWidth="2"
118
112
  :onTextChange="_onTextChange"
119
113
  :onTextOverflow="_onTextOverflow"
120
- :cursorColor="cursorColor"
121
114
  />
122
115
 
123
116
  <div :style="{ top: 100 }">
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2021-12-21 15:36:29
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:08:21
5
+ * @LastEditTime: 2022-07-12 16:11:32
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
@@ -20,13 +20,13 @@ for (let i = 0; i < 5; i++) {
20
20
  width: 100,
21
21
  height: 50,
22
22
  marginRight: 10,
23
- content: "Tab_" + i,
23
+ content: "Tab-" + i,
24
24
  color: randomColor(),
25
25
  });
26
26
 
27
27
  let data = JSON.parse(JSON.stringify(advanceMetroWidget));
28
28
  data.forEach((item) => {
29
- item.name = "testPage_" + i + "-" + item.name;
29
+ item.name = "testPage-" + i + "-" + item.name;
30
30
  });
31
31
  pageList.push({
32
32
  width: 600,