@shijiu/jsview-vue-samples 2.1.200 → 2.1.340-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.
Files changed (59) hide show
  1. package/AnimPicture/App.vue +224 -120
  2. package/AnimPicture/Item.vue +44 -0
  3. package/ConnectLine/App.vue +173 -0
  4. package/CoupletsTest/App.vue +212 -0
  5. package/CoupletsTest/Common/SpriteDeal.js +30 -0
  6. package/CoupletsTest/LeadWire.vue +221 -0
  7. package/CoupletsTest/Maroon.vue +112 -0
  8. package/CoupletsTest/Salvo.vue +251 -0
  9. package/CoupletsTest/Sprite/firecracker.json +212 -0
  10. package/CoupletsTest/Sprite/firecracker.png +0 -0
  11. package/CoupletsTest/Sprite/fireworks.json +220 -0
  12. package/CoupletsTest/Sprite/fireworks.png +0 -0
  13. package/CoupletsTest/Sprite/scroll.json +76 -0
  14. package/CoupletsTest/Sprite/scroll.png +0 -0
  15. package/CoupletsTest/Sprite/spark.json +268 -0
  16. package/CoupletsTest/Sprite/spark.png +0 -0
  17. package/CoupletsTest/images/Couplets.png +0 -0
  18. package/CoupletsTest/images/goldencoin1.png +0 -0
  19. package/CoupletsTest/images/goldencoin2.png +0 -0
  20. package/CoupletsTest/images/leadWire.png +0 -0
  21. package/CoupletsTest/images/line.png +0 -0
  22. package/CoupletsTest/images/purpleStar.png +0 -0
  23. package/CoupletsTest/images/redStar.png +0 -0
  24. package/CoupletsTest/images/scroll1.png +0 -0
  25. package/CoupletsTest/images/star1.png +0 -0
  26. package/CoupletsTest/images/star2.png +0 -0
  27. package/CoupletsTest/images/star3.png +0 -0
  28. package/CoupletsTest/images/star4.png +0 -0
  29. package/CoupletsTest/images/yellowStar.png +0 -0
  30. package/DemoHomepage/components/BodyFrame.vue +27 -11
  31. package/DemoHomepage/router.js +35 -5
  32. package/DemoHomepage/views/Homepage.vue +1 -1
  33. package/DispersedItemSample/DispersedItemSample.vue +138 -0
  34. package/DispersedItemSample/DispersedItemWidget/DispersedItemWidget.vue +358 -0
  35. package/DispersedItemSample/DispersedItemWidget/MyRenderItem.ts +115 -0
  36. package/DispersedItemSample/Item.vue +55 -0
  37. package/FilterDemo/AnimatePic.vue +5 -6
  38. package/FocusMoveStyle/App.vue +126 -110
  39. package/FocusMoveStyle/CreepFocus.vue +128 -0
  40. package/FocusMoveStyle/FoldableItem.vue +279 -0
  41. package/FocusMoveStyle/Item.vue +32 -31
  42. package/FreeMove/App.vue +2 -2
  43. package/ImpactStop/App.vue +343 -384
  44. package/LatexDemo/App.vue +11 -0
  45. package/MetroWidgetDemos/RefreshDemo/App.vue +101 -0
  46. package/MetroWidgetDemos/RefreshDemo/Item.vue +116 -0
  47. package/MetroWidgetDemos/RefreshDemo/assets/imageList.json +237 -0
  48. package/MetroWidgetDemos/RefreshDemo/data.js +16 -0
  49. package/MetroWidgetDemos/TripleWidget/App.vue +81 -0
  50. package/MetroWidgetDemos/TripleWidget/Item.vue +64 -0
  51. package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +93 -0
  52. package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +111 -0
  53. package/MetroWidgetDemos/routeList.js +12 -0
  54. package/ProgressBar/App.vue +128 -0
  55. package/QrcodeDemo/App.vue +2 -2
  56. package/SpriteImage/App.vue +113 -68
  57. package/SwiperTest/App.vue +105 -0
  58. package/ViewOpacity/App.vue +98 -0
  59. package/package.json +1 -1
@@ -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
- const focusRect = ref({
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 divRef = ref(null);
16
+ const parentWidget = inject("parentWidget");
17
+ const itemKeepScale = inject("itemKeepScale");
18
+ const divRef = shallowRef();
23
19
 
24
20
  const onFocus = () => {
25
- if (focusFrameController) {
26
- const rect = props.query.templatePosition(props.query.index);
27
- focusFrameController.onFocusChange(rect, props.query.index);
28
- focused.value=true
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
- <div
48
- ref="divRef"
49
- :style="{
50
- fontSize: 40,
51
- width: data.width,
52
- height: data.height,
53
- color: '#FFFFFF',
54
- textAlign: 'center',
55
- lineHeight: data.height,
56
- transform:focused?'scale3d(1.1,1.1,1)':'scale3d(1,1,1)'
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
- // ******* 定向移动 + 回调监听 和 共享结束监听(onActEvent) *******
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
- .onActEvent(actRef, actEvents.ActFinish)
173
+ .onNexusEvent(actRef, actEvents.ActFinish)
174
174
  .then([
175
175
  () => {
176
176
  console.log("on move finished");