@shijiu/jsview-vue-samples 2.1.200 → 2.1.339-test.0
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/AnimPicture/App.vue +224 -120
- package/AnimPicture/Item.vue +44 -0
- package/ConnectLine/App.vue +173 -0
- package/CoupletsTest/App.vue +212 -0
- package/CoupletsTest/Common/SpriteDeal.js +30 -0
- package/CoupletsTest/LeadWire.vue +221 -0
- package/CoupletsTest/Maroon.vue +112 -0
- package/CoupletsTest/Salvo.vue +251 -0
- package/CoupletsTest/Sprite/firecracker.json +212 -0
- package/CoupletsTest/Sprite/firecracker.png +0 -0
- package/CoupletsTest/Sprite/fireworks.json +220 -0
- package/CoupletsTest/Sprite/fireworks.png +0 -0
- package/CoupletsTest/Sprite/scroll.json +76 -0
- package/CoupletsTest/Sprite/scroll.png +0 -0
- package/CoupletsTest/Sprite/spark.json +268 -0
- package/CoupletsTest/Sprite/spark.png +0 -0
- package/CoupletsTest/images/Couplets.png +0 -0
- package/CoupletsTest/images/goldencoin1.png +0 -0
- package/CoupletsTest/images/goldencoin2.png +0 -0
- package/CoupletsTest/images/leadWire.png +0 -0
- package/CoupletsTest/images/line.png +0 -0
- package/CoupletsTest/images/purpleStar.png +0 -0
- package/CoupletsTest/images/redStar.png +0 -0
- package/CoupletsTest/images/scroll1.png +0 -0
- package/CoupletsTest/images/star1.png +0 -0
- package/CoupletsTest/images/star2.png +0 -0
- package/CoupletsTest/images/star3.png +0 -0
- package/CoupletsTest/images/star4.png +0 -0
- package/CoupletsTest/images/yellowStar.png +0 -0
- package/DemoHomepage/components/BodyFrame.vue +27 -11
- package/DemoHomepage/router.js +35 -5
- package/DemoHomepage/views/Homepage.vue +1 -1
- package/DispersedItemSample/DispersedItemSample.vue +138 -0
- package/DispersedItemSample/DispersedItemWidget/DispersedItemWidget.vue +358 -0
- package/DispersedItemSample/DispersedItemWidget/MyRenderItem.ts +115 -0
- package/DispersedItemSample/Item.vue +55 -0
- package/FilterDemo/AnimatePic.vue +5 -6
- package/FocusMoveStyle/App.vue +126 -110
- package/FocusMoveStyle/CreepFocus.vue +128 -0
- package/FocusMoveStyle/FoldableItem.vue +279 -0
- package/FocusMoveStyle/Item.vue +32 -31
- package/FreeMove/App.vue +2 -2
- package/ImpactStop/App.vue +343 -384
- package/LatexDemo/App.vue +11 -0
- package/MetroWidgetDemos/RefreshDemo/App.vue +101 -0
- package/MetroWidgetDemos/RefreshDemo/Item.vue +116 -0
- package/MetroWidgetDemos/RefreshDemo/assets/imageList.json +237 -0
- package/MetroWidgetDemos/RefreshDemo/data.js +16 -0
- package/MetroWidgetDemos/TripleWidget/App.vue +81 -0
- package/MetroWidgetDemos/TripleWidget/Item.vue +64 -0
- package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +93 -0
- package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +111 -0
- package/MetroWidgetDemos/routeList.js +12 -0
- package/ProgressBar/App.vue +128 -0
- package/QrcodeDemo/App.vue +2 -2
- package/SpriteImage/App.vue +113 -68
- package/SwiperTest/App.vue +105 -0
- package/ViewOpacity/App.vue +98 -0
- package/package.json +1 -1
package/FocusMoveStyle/Item.vue
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, inject } from "vue";
|
|
3
|
-
|
|
4
|
-
const focusFrameController = inject("focusFrameController");
|
|
2
|
+
import { ref, inject, shallowRef, onMounted, computed } from "vue";
|
|
5
3
|
|
|
6
4
|
const props = defineProps({
|
|
7
5
|
data: Object,
|
|
@@ -9,24 +7,21 @@ const props = defineProps({
|
|
|
9
7
|
onEdge: Function,
|
|
10
8
|
onAction: Object,
|
|
11
9
|
frameChanged: Function,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
left: 0,
|
|
16
|
-
top: 0,
|
|
17
|
-
width: 0,
|
|
18
|
-
height: 0,
|
|
10
|
+
focusRectController: {
|
|
11
|
+
type: Object,
|
|
12
|
+
},
|
|
19
13
|
});
|
|
20
14
|
|
|
21
15
|
const focused = ref(false);
|
|
22
|
-
const
|
|
16
|
+
const parentWidget = inject("parentWidget");
|
|
17
|
+
const itemKeepScale = inject("itemKeepScale");
|
|
18
|
+
const divRef = shallowRef();
|
|
23
19
|
|
|
24
20
|
const onFocus = () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
21
|
+
parentWidget.value.slideToDiv(divRef.value, true);
|
|
22
|
+
const rect = props.query.templatePosition(props.query.index);
|
|
23
|
+
props.focusRectController?.onFocusChange(rect);
|
|
24
|
+
focused.value = true;
|
|
30
25
|
};
|
|
31
26
|
|
|
32
27
|
const onBlur = () => {
|
|
@@ -40,24 +35,30 @@ const onClicked = () => {
|
|
|
40
35
|
props.onAction.register("onFocus", onFocus);
|
|
41
36
|
props.onAction.register("onBlur", onBlur);
|
|
42
37
|
props.onAction.register("onClick", onClicked);
|
|
38
|
+
|
|
39
|
+
const scaleTransform = computed(() => {
|
|
40
|
+
return itemKeepScale.value || focused.value
|
|
41
|
+
? "scale3d(1.1,1.1,1)"
|
|
42
|
+
: "scale3d(1,1,1)";
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
onMounted(() => {});
|
|
43
46
|
</script>
|
|
44
47
|
|
|
45
48
|
<template>
|
|
46
|
-
<div
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{{ data.content }}
|
|
60
|
-
</div>
|
|
49
|
+
<div
|
|
50
|
+
ref="divRef"
|
|
51
|
+
:style="{
|
|
52
|
+
fontSize: 40,
|
|
53
|
+
width: data.width,
|
|
54
|
+
height: data.height,
|
|
55
|
+
color: '#FFFFFF',
|
|
56
|
+
textAlign: 'center',
|
|
57
|
+
lineHeight: data.height,
|
|
58
|
+
transform: scaleTransform,
|
|
59
|
+
}"
|
|
60
|
+
>
|
|
61
|
+
{{ data.content }}
|
|
61
62
|
</div>
|
|
62
63
|
</template>
|
|
63
64
|
|
package/FreeMove/App.vue
CHANGED
|
@@ -149,7 +149,7 @@ window.DebugMoveTarget = () => {
|
|
|
149
149
|
]);
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
// ******* 定向移动 + 回调监听 和 共享结束监听(
|
|
152
|
+
// ******* 定向移动 + 回调监听 和 共享结束监听(OnNexusEvent) *******
|
|
153
153
|
window.DebugTestMove = (x, y) => {
|
|
154
154
|
let actRef = {};
|
|
155
155
|
actorControl.run([
|
|
@@ -170,7 +170,7 @@ window.DebugTestMove = (x, y) => {
|
|
|
170
170
|
}),
|
|
171
171
|
actorControl
|
|
172
172
|
.condition()
|
|
173
|
-
.
|
|
173
|
+
.onNexusEvent(actRef, actEvents.ActFinish)
|
|
174
174
|
.then([
|
|
175
175
|
() => {
|
|
176
176
|
console.log("on move finished");
|