@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.
- package/Basic/components/div/DivBackground.vue +13 -25
- package/Basic/components/img/ImageGroup.vue +14 -20
- package/Basic/components/img/ImgLayout.vue +59 -68
- package/BasicFocusControl/components/BaseBlock.vue +11 -17
- package/BasicFocusControl/components/MainAreaLeftBlock.vue +2 -2
- package/BasicFocusControl/components/MainAreaRightBlock.vue +2 -2
- package/BasicFocusControl/components/SideBarBlock.vue +2 -2
- package/CssPreprocessor/App.vue +40 -51
- package/CssPreprocessor/Less/App.vue +6 -14
- package/CssPreprocessor/Scss/App.vue +6 -14
- package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +0 -1
- package/CssPreprocessor/Stylus/App.vue +6 -14
- package/CssPreprocessor/utils/ContentBlock.vue +30 -12
- package/CssPreprocessor/utils/ContentList.vue +23 -14
- package/CssPreprocessor/utils/Panel.vue +34 -23
- package/CssPreprocessor/utils/TitleBar.vue +7 -9
- package/DemoHomepage/components/BodyFrame.vue +54 -78
- package/DemoHomepage/components/Dialog.vue +38 -43
- package/DemoHomepage/components/Item.vue +52 -55
- package/DemoHomepage/components/TabFrame.vue +43 -72
- package/DemoHomepage/router.js +1 -1
- package/GiftRain/App.vue +10 -4
- package/GridDemo/App.vue +5 -5
- package/GridDemo/FocusItem.vue +3 -5
- package/GridDemo/Item.vue +4 -24
- package/HashHistory/App.vue +0 -10
- package/HashHistory/views/MainPage.vue +0 -1
- package/ImpactStop/App.vue +0 -1
- package/Input/App.vue +106 -150
- package/Input/FullKeyboard.vue +18 -28
- package/Input/InputPanel.vue +87 -109
- package/Input/KeyboardItem.vue +35 -45
- package/JsvRadarChart/App.vue +16 -19
- package/LongImage/Button.vue +2 -3
- package/LongText/App.vue +0 -3
- package/LongText/Button.vue +0 -1
- package/LongText/LongTextScroll.vue +0 -4
- package/Marquee/App.vue +1 -0
- package/MetroWidgetDemos/PerformanceTest/App.vue +2 -3
- package/MetroWidgetDemos/PerformanceTest/Item.vue +52 -55
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +86 -95
- package/MetroWidgetDemos/PingPong/App.vue +56 -89
- package/MetroWidgetDemos/PingPong/AppPage.vue +3 -3
- package/MetroWidgetDemos/PingPong/Item.vue +1 -1
- package/MetroWidgetDemos/PingPong/TabItem.vue +3 -3
- package/MetroWidgetDemos/PingPong/WidgetItem.vue +1 -1
- package/MetroWidgetDemos/SkeletonDiagram/App.vue +2 -4
- package/MetroWidgetDemos/basic/Item.vue +1 -1
- package/MetroWidgetDemos/direction/App.vue +0 -2
- package/MetroWidgetDemos/direction/Item.vue +1 -1
- package/MetroWidgetDemos/focusableItemBasic/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemBasic/ButtonItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/Item.vue +1 -1
- package/MetroWidgetDemos/focusableItemMetroWidget/WidgetItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/App.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/ButtonItem.vue +1 -1
- package/MetroWidgetDemos/focusableItemMix/Item.vue +1 -1
- package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +23 -25
- package/MetroWidgetDemos/layoutType/App.vue +0 -2
- package/MetroWidgetDemos/layoutType/Item.vue +1 -1
- package/MetroWidgetDemos/ninePatchFocusPage/App.vue +0 -1
- package/MetroWidgetDemos/ninePatchFocusPage/PageRow.vue +1 -1
- package/MetroWidgetDemos/padding/App.vue +0 -2
- package/MetroWidgetDemos/padding/Item.vue +1 -1
- package/MetroWidgetDemos/slideSetting/Item.vue +1 -1
- package/MockjsDemo/App.vue +26 -11
- package/MockjsDemo/mock/index.js +9 -1
- package/QrcodeDemo/App.vue +0 -1
- package/SoundPool/App.vue +1 -2
- package/SpriteImage/App.vue +89 -125
- package/Swiper/App.vue +1 -3
- package/TestNativeSharedView/App.vue +104 -48
- package/TextBox/RenderCenter.vue +89 -113
- package/TextBox/RenderLeft.vue +89 -113
- package/TextBox/RenderOneLine.vue +7 -10
- package/TextBox/RenderRight.vue +8 -11
- package/TextShadowDemo/App.vue +54 -75
- package/TextureAnimation/App.vue +175 -287
- package/TextureAnimation/App2.vue +1 -5
- package/ThrowMoveDemo/AccelerateDemo.vue +40 -71
- package/ThrowMoveDemo/App.vue +13 -23
- package/ThrowMoveDemo/TargetDemo.vue +24 -53
- package/ThrowMoveDemo/UDParabolicDemo.vue +31 -60
- package/VideoDemo/App.vue +71 -116
- package/package.json +1 -1
- package/VideoDemo/components/Button.vue +0 -58
- package/VideoDemo/components/Controllor.vue +0 -197
- package/VideoDemo/components/VideoFrame.vue +0 -140
package/GiftRain/App.vue
CHANGED
|
@@ -178,6 +178,10 @@ const _onImpactTracer = (rain) => {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
+
//定义边缘变量,到边缘时不允许触发相应方向的按键事件。
|
|
182
|
+
let leftEdge = shallowRef(false)
|
|
183
|
+
let rightEgde = shallowRef(false)
|
|
184
|
+
|
|
181
185
|
//键盘松开时应该暂停动作
|
|
182
186
|
const onKeyUp = (ev) => {
|
|
183
187
|
console.log("onKeyUp in : ", ev);
|
|
@@ -196,17 +200,19 @@ const router = useRouter();
|
|
|
196
200
|
const onKeyDown = (ev) => {
|
|
197
201
|
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
198
202
|
router.go(-1)
|
|
199
|
-
} else if (ev.keyCode === 37) {
|
|
203
|
+
} else if (ev.keyCode === 37 && !leftEdge.value) {
|
|
200
204
|
console.log(" ev.keyCode === 37 ");
|
|
201
205
|
if (!_IsRunning) {
|
|
202
|
-
_TranslateControl.moveToX(0, 400 * 1.5,
|
|
206
|
+
_TranslateControl.moveToX(0, 400 * 1.5, () => leftEdge.value = true);
|
|
203
207
|
_IsRunning = true;
|
|
208
|
+
rightEgde.value = false
|
|
204
209
|
}
|
|
205
|
-
} else if (ev.keyCode === 39) {
|
|
210
|
+
} else if (ev.keyCode === 39 && !rightEgde.value) {
|
|
206
211
|
console.log(" ev.keyCode === 39");
|
|
207
212
|
if (!_IsRunning) {
|
|
208
|
-
_TranslateControl.moveToX((1280 - 220 - 194) * 1.5, 400 * 1.5,
|
|
213
|
+
_TranslateControl.moveToX((1280 - 220 - 194) * 1.5, 400 * 1.5, () => rightEgde.value = true);
|
|
209
214
|
_IsRunning = true;
|
|
215
|
+
leftEdge.value = false
|
|
210
216
|
}
|
|
211
217
|
}
|
|
212
218
|
return true;
|
package/GridDemo/App.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-06 19:32:53
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: ZhengYi
|
|
5
|
+
* @LastEditTime: 2023-05-04
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import { jJsvRuntimeBridge, JsvGrid, LineType, EdgeDirection } from "jsview";
|
|
10
|
-
import {
|
|
10
|
+
import { shallowRef, onMounted } from "vue";
|
|
11
11
|
import { useRouter } from "vue-router";
|
|
12
12
|
import ItemVue from "./Item.vue";
|
|
13
13
|
import FocusItem from "./FocusItem.vue";
|
|
@@ -203,13 +203,13 @@ onMounted(() => {
|
|
|
203
203
|
<div
|
|
204
204
|
:style="{
|
|
205
205
|
left: 100,
|
|
206
|
-
top:
|
|
206
|
+
top: 0,
|
|
207
207
|
width: 300,
|
|
208
208
|
height: 50,
|
|
209
209
|
fontSize: 30,
|
|
210
210
|
}"
|
|
211
211
|
>
|
|
212
|
-
|
|
212
|
+
空数据展示
|
|
213
213
|
</div>
|
|
214
214
|
</div>
|
|
215
215
|
</jsv-focus-block>
|
package/GridDemo/FocusItem.vue
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-10 15:21:24
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditors: ZhengYi
|
|
5
|
+
* @LastEditTime: 2022-05-04
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import ButtonBlock from "./ButtonBlock.vue";
|
|
10
|
-
import {
|
|
10
|
+
import { shallowRef } from "vue";
|
|
11
11
|
|
|
12
12
|
const props = defineProps({
|
|
13
13
|
userData: Object,
|
|
14
14
|
widgetData: Object,
|
|
15
15
|
onAction: Object,
|
|
16
16
|
});
|
|
17
|
-
const focused = ref(false);
|
|
18
|
-
const divNumber = new Array(50);
|
|
19
17
|
const button = shallowRef(null);
|
|
20
18
|
const onFocus = () => {
|
|
21
19
|
button.value
|
package/GridDemo/Item.vue
CHANGED
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-10 15:21:24
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime: 2023-
|
|
4
|
+
* @LastEditors: ZhengYi
|
|
5
|
+
* @LastEditTime: 2023-05-04
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref
|
|
9
|
+
import { ref } from "vue";
|
|
10
10
|
|
|
11
11
|
const props = defineProps({
|
|
12
12
|
userData: Object,
|
|
13
13
|
widgetData: Object,
|
|
14
14
|
onAction: Object,
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
|
|
18
|
-
return (
|
|
19
|
-
"#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
|
|
20
|
-
);
|
|
21
|
-
};
|
|
16
|
+
|
|
22
17
|
const focused = ref(false);
|
|
23
18
|
const divNumber = new Array(50);
|
|
24
|
-
const blurAction = false;
|
|
25
|
-
|
|
26
19
|
const onFocus = () => {
|
|
27
|
-
// console.log("item onfocus", props.userData);
|
|
28
20
|
focused.value = true;
|
|
29
21
|
};
|
|
30
22
|
const onBlur = () => {
|
|
31
|
-
// console.log(
|
|
32
|
-
// "item onblur",
|
|
33
|
-
// props.userData,
|
|
34
|
-
// props.widgetData.getCurrentFocusId(),
|
|
35
|
-
// props.widgetData.dataIndex
|
|
36
|
-
// );
|
|
37
23
|
focused.value = false;
|
|
38
24
|
};
|
|
39
25
|
const onClick = () => {
|
|
@@ -44,12 +30,6 @@ props.onAction.register("onFocus", onFocus);
|
|
|
44
30
|
props.onAction.register("onBlur", onBlur);
|
|
45
31
|
props.onAction.register("onClick", onClick);
|
|
46
32
|
|
|
47
|
-
onUpdated(() => {
|
|
48
|
-
// console.log("item updated", props.userData, props.widgetData);
|
|
49
|
-
});
|
|
50
|
-
onMounted(() => {
|
|
51
|
-
// console.log("item mounted", props.userData, props.widgetData);
|
|
52
|
-
});
|
|
53
33
|
</script>
|
|
54
34
|
|
|
55
35
|
<template>
|
package/HashHistory/App.vue
CHANGED
|
@@ -46,16 +46,6 @@ const onRequestFocus = (branchName) => {
|
|
|
46
46
|
topRef.value.findBlockByname(branchName)?.requestFocus();
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const watchRouterChanged = (route) => {
|
|
50
|
-
route.afterEach(() => {
|
|
51
|
-
displayUrl.value = window.location.href;
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const onKeyDown = (event) => {
|
|
56
|
-
return routePage.value.onKeyDown(event);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
49
|
onMounted(() => {
|
|
60
50
|
jJsvRuntimeBridge.notifyPageLoaded();
|
|
61
51
|
});
|
package/ImpactStop/App.vue
CHANGED
package/Input/App.vue
CHANGED
|
@@ -1,164 +1,120 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-01-20 16:09:31
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: ZhengYi
|
|
5
|
+
* @LastEditTime: 2023-04-28
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script>
|
|
8
|
+
<script setup>
|
|
9
9
|
import { InputType, EdgeDirection, useFocusHub } from "jsview";
|
|
10
10
|
import InputPanel from "./InputPanel.vue";
|
|
11
|
+
import { useRouter } from "vue-router";
|
|
12
|
+
import { shallowRef } from "vue"
|
|
13
|
+
const router = useRouter();
|
|
14
|
+
let focusNode = shallowRef(null)
|
|
15
|
+
const name = "/input"
|
|
16
|
+
const focusHub = useFocusHub()
|
|
17
|
+
|
|
18
|
+
const _onKeyDown = (ev) => {
|
|
19
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
20
|
+
router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
const _onFocus = () => {
|
|
25
|
+
focusHub.setFocus(name + "/normal");
|
|
26
|
+
}
|
|
27
|
+
const _panel1OnEdge = (edgeInfo) => {
|
|
28
|
+
if (edgeInfo.direction == EdgeDirection.right) {
|
|
29
|
+
focusHub.setFocus(name + "/password");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const _panel2OnEdge = (edgeInfo) => {
|
|
33
|
+
if (edgeInfo.direction == EdgeDirection.left) {
|
|
34
|
+
focusHub.setFocus(name + "/normal");
|
|
35
|
+
} else if (edgeInfo.direction == EdgeDirection.right) {
|
|
36
|
+
focusHub.setFocus(name + "/number");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const _panel3OnEdge = (edgeInfo) => {
|
|
40
|
+
if (edgeInfo.direction == EdgeDirection.left) {
|
|
41
|
+
focusHub.setFocus(name + "/password");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
11
45
|
|
|
12
|
-
export default {
|
|
13
|
-
components: {
|
|
14
|
-
InputPanel,
|
|
15
|
-
},
|
|
16
|
-
setup() {
|
|
17
|
-
return {
|
|
18
|
-
name: "/input",
|
|
19
|
-
InputType,
|
|
20
|
-
focusHub: useFocusHub(),
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
methods: {
|
|
24
|
-
_onKeyDown(ev) {
|
|
25
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
26
|
-
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
},
|
|
30
|
-
_onFocus() {
|
|
31
|
-
this.focusHub.setFocus(this.name + "/normal");
|
|
32
|
-
},
|
|
33
|
-
_panel1OnEdge(edgeInfo) {
|
|
34
|
-
if (edgeInfo.direction == EdgeDirection.right) {
|
|
35
|
-
this.focusHub.setFocus(this.name + "/password");
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
_panel2OnEdge(edgeInfo) {
|
|
39
|
-
if (edgeInfo.direction == EdgeDirection.left) {
|
|
40
|
-
this.focusHub.setFocus(this.name + "/normal");
|
|
41
|
-
} else if (edgeInfo.direction == EdgeDirection.right) {
|
|
42
|
-
this.focusHub.setFocus(this.name + "/number");
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
_panel3OnEdge(edgeInfo) {
|
|
46
|
-
if (edgeInfo.direction == EdgeDirection.left) {
|
|
47
|
-
this.focusHub.setFocus(this.name + "/password");
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
46
|
</script>
|
|
53
47
|
|
|
54
48
|
<template>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
文字输入-左对齐
|
|
84
|
-
</div>
|
|
85
|
-
<div
|
|
86
|
-
:style="{
|
|
87
|
-
top: 100,
|
|
88
|
-
}"
|
|
89
|
-
>
|
|
90
|
-
<input-panel
|
|
91
|
-
:name="name + '/normal'"
|
|
92
|
-
:type="InputType.TEXT"
|
|
93
|
-
textAlign="left"
|
|
94
|
-
placeholder="请输入"
|
|
95
|
-
:onEdge="_panel1OnEdge"
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
49
|
+
<jsv-focus-block ref="focusNode" autoFocus :onAction="{
|
|
50
|
+
onKeyDown: _onKeyDown,
|
|
51
|
+
onFocus: _onFocus,
|
|
52
|
+
}" :style="{
|
|
53
|
+
width: 1920,
|
|
54
|
+
height: 1080,
|
|
55
|
+
backgroundColor: '#007788',
|
|
56
|
+
}">
|
|
57
|
+
<div :style="{
|
|
58
|
+
top: 100,
|
|
59
|
+
left: 100,
|
|
60
|
+
}">
|
|
61
|
+
<div :style="{
|
|
62
|
+
width: 300,
|
|
63
|
+
height: 50,
|
|
64
|
+
lineHeight: 50,
|
|
65
|
+
textAlign: 'center',
|
|
66
|
+
fontSize: 30,
|
|
67
|
+
}">
|
|
68
|
+
文字输入-左对齐
|
|
69
|
+
</div>
|
|
70
|
+
<div :style="{
|
|
71
|
+
top: 100,
|
|
72
|
+
}">
|
|
73
|
+
<input-panel :name="name + '/normal'" :type="InputType.TEXT" textAlign="left" placeholder="请输入"
|
|
74
|
+
:onEdge="_panel1OnEdge" />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
99
77
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}"
|
|
121
|
-
>
|
|
122
|
-
<input-panel
|
|
123
|
-
:name="name + '/password'"
|
|
124
|
-
:type="InputType.PASSWORD"
|
|
125
|
-
textAlign="right"
|
|
126
|
-
placeholder="请输入"
|
|
127
|
-
:onEdge="_panel2OnEdge"
|
|
128
|
-
/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
78
|
+
<div :style="{
|
|
79
|
+
top: 100,
|
|
80
|
+
left: 500,
|
|
81
|
+
}">
|
|
82
|
+
<div :style="{
|
|
83
|
+
width: 300,
|
|
84
|
+
height: 50,
|
|
85
|
+
lineHeight: 50,
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
fontSize: 30,
|
|
88
|
+
}">
|
|
89
|
+
密码输入-右对齐
|
|
90
|
+
</div>
|
|
91
|
+
<div :style="{
|
|
92
|
+
top: 100,
|
|
93
|
+
}">
|
|
94
|
+
<input-panel :name="name + '/password'" :type="InputType.PASSWORD" textAlign="right" placeholder="请输入"
|
|
95
|
+
:onEdge="_panel2OnEdge" />
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
131
98
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
>
|
|
154
|
-
<input-panel
|
|
155
|
-
:name="name + '/number'"
|
|
156
|
-
:type="InputType.NUMBER"
|
|
157
|
-
textAlign="right"
|
|
158
|
-
placeholder="请输入"
|
|
159
|
-
:onEdge="_panel3OnEdge"
|
|
160
|
-
/>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</jsv-focus-block>
|
|
99
|
+
<div :style="{
|
|
100
|
+
top: 100,
|
|
101
|
+
left: 900,
|
|
102
|
+
}">
|
|
103
|
+
<div :style="{
|
|
104
|
+
width: 300,
|
|
105
|
+
height: 50,
|
|
106
|
+
lineHeight: 50,
|
|
107
|
+
textAlign: 'center',
|
|
108
|
+
fontSize: 30,
|
|
109
|
+
}">
|
|
110
|
+
数字输入-右对齐
|
|
111
|
+
</div>
|
|
112
|
+
<div :style="{
|
|
113
|
+
top: 100,
|
|
114
|
+
}">
|
|
115
|
+
<input-panel :name="name + '/number'" :type="InputType.NUMBER" textAlign="right" placeholder="请输入"
|
|
116
|
+
:onEdge="_panel3OnEdge" />
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</jsv-focus-block>
|
|
164
120
|
</template>
|
package/Input/FullKeyboard.vue
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-01-25 10:27:17
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: ZhengYi
|
|
5
|
+
* @LastEditTime: 2023-04-28
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script>
|
|
8
|
+
<script setup>
|
|
9
9
|
import { VERTICAL, SimpleWidget } from "jsview";
|
|
10
10
|
import KeyboardItem from "./KeyboardItem.vue";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const props=defineProps({
|
|
13
|
+
name: String,
|
|
14
|
+
onClick: Function,
|
|
15
|
+
onEdge: Function,
|
|
16
|
+
})
|
|
17
|
+
const _initData=()=>{
|
|
13
18
|
const result = [];
|
|
14
19
|
result.push({
|
|
15
20
|
width: 120,
|
|
@@ -35,44 +40,29 @@ function _initData() {
|
|
|
35
40
|
return result;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
props: {
|
|
44
|
-
name: String,
|
|
45
|
-
onClick: Function,
|
|
46
|
-
onEdge: Function,
|
|
47
|
-
},
|
|
48
|
-
setup() {
|
|
49
|
-
return {
|
|
50
|
-
direction: VERTICAL,
|
|
51
|
-
data: _initData(),
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
methods: {
|
|
55
|
-
_measures(item) {
|
|
43
|
+
|
|
44
|
+
const direction=VERTICAL
|
|
45
|
+
const data=_initData()
|
|
46
|
+
|
|
47
|
+
const _measures=(item)=> {
|
|
56
48
|
return {
|
|
57
49
|
width: item.width,
|
|
58
50
|
height: item.height,
|
|
59
51
|
};
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
};
|
|
52
|
+
}
|
|
63
53
|
</script>
|
|
64
54
|
|
|
65
55
|
<template>
|
|
66
56
|
<simple-widget
|
|
67
57
|
ref="sw"
|
|
68
|
-
:name="name"
|
|
58
|
+
:name="props.name"
|
|
69
59
|
:data="data"
|
|
70
60
|
:width="260"
|
|
71
61
|
:height="300"
|
|
72
62
|
:padding="{ left: 10, right: 10, top: 10, bottom: 10 }"
|
|
73
63
|
:direction="direction"
|
|
74
64
|
:measures="_measures"
|
|
75
|
-
:onEdge="onEdge"
|
|
65
|
+
:onEdge="props.onEdge"
|
|
76
66
|
>
|
|
77
67
|
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
78
68
|
<keyboard-item
|
|
@@ -80,7 +70,7 @@ export default {
|
|
|
80
70
|
:query="query"
|
|
81
71
|
:onEdge="onEdge"
|
|
82
72
|
:onAction="onAction"
|
|
83
|
-
:onClick="onClick"
|
|
73
|
+
:onClick="props.onClick"
|
|
84
74
|
/>
|
|
85
75
|
</template>
|
|
86
76
|
</simple-widget>
|