@shijiu/jsview-vue 0.9.502 → 0.9.631
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/dom/bin/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/target_core_revision.js +4 -3
- package/index.js +10 -0
- package/package.json +8 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +16 -5
- package/samples/AnimPicture/App.vue +89 -106
- package/samples/Basic/App.vue +65 -68
- package/samples/Basic/components/ContentBlock.vue +31 -36
- package/samples/Basic/components/anim/AnimGroup.vue +61 -75
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +54 -43
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +25 -31
- package/samples/Basic/components/anim/AnimTransition.vue +142 -105
- package/samples/Basic/components/div/DivBackground.vue +38 -16
- package/samples/Basic/components/div/DivClip.vue +143 -78
- package/samples/Basic/components/div/DivCssScoped.vue +10 -10
- package/samples/Basic/components/div/DivCssVar.vue +40 -42
- package/samples/Basic/components/div/DivGroup1.vue +45 -39
- package/samples/Basic/components/div/DivGroup2.vue +56 -45
- package/samples/Basic/components/div/DivLayout.vue +63 -5
- package/samples/Basic/components/div/DivRadius.vue +51 -42
- package/samples/Basic/components/div/DivTransform.vue +21 -16
- package/samples/Basic/components/panel/Panel1.vue +46 -44
- package/samples/Basic/components/panel/Panel2.vue +22 -26
- package/samples/Basic/components/panel/TitleBar.vue +12 -12
- package/samples/Basic/components/text/TextAlign.vue +54 -44
- package/samples/Basic/components/text/TextEmoji.vue +16 -20
- package/samples/Basic/components/text/TextFontStyle.vue +77 -53
- package/samples/Basic/components/text/TextGroup1.vue +46 -38
- package/samples/Basic/components/text/TextGroup2.vue +25 -28
- package/samples/Basic/components/text/TextOverflow.vue +78 -59
- package/samples/BasicFocusControl/App.vue +22 -43
- package/samples/BasicFocusControl/components/BaseBlock.vue +42 -43
- package/samples/BasicFocusControl/components/MainArea.vue +55 -70
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +11 -15
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +21 -24
- package/samples/BasicFocusControl/components/SideBar.vue +32 -47
- package/samples/BasicFocusControl/components/SideBarBlock.vue +20 -23
- package/samples/Collision/App.vue +452 -0
- package/samples/ColorSpace/App.vue +15 -24
- package/samples/DemoHomepage/App.vue +7 -11
- package/samples/DemoHomepage/components/BodyFrame.vue +21 -9
- package/samples/DemoHomepage/components/TabFrame.vue +7 -8
- package/samples/DemoHomepage/router.js +52 -33
- package/samples/DemoHomepage/views/Homepage.vue +18 -9
- package/samples/FilterDemo/AnimatePic.vue +58 -0
- package/samples/FilterDemo/App.vue +99 -61
- package/samples/FilterDemo/VideoLayer.vue +62 -0
- package/samples/FlipCard/App.vue +32 -41
- package/samples/FlipCard/FlipCard.vue +48 -54
- package/samples/GridDemo/App.vue +109 -77
- package/samples/GridDemo/ButtonBlock.vue +50 -49
- package/samples/GridDemo/FocusItem.vue +19 -38
- package/samples/GridDemo/Item.vue +46 -54
- package/samples/HashHistory/App.vue +63 -79
- package/samples/HashHistory/components/HorizontalButtonList.vue +72 -95
- package/samples/HashHistory/components/Item.vue +42 -56
- package/samples/HashHistory/router.js +23 -12
- package/samples/HashHistory/views/MainPage.vue +35 -46
- package/samples/HashHistory/views/SubPage.vue +34 -47
- package/samples/ImpactStop/App.vue +435 -0
- package/samples/Input/App.vue +8 -18
- package/samples/Input/FullKeyboard.vue +2 -6
- package/samples/Input/InputPanel.vue +18 -12
- package/samples/Input/KeyboardItem.vue +1 -1
- package/samples/LongImage/App.vue +11 -27
- package/samples/LongImage/Button.vue +50 -145
- package/samples/LongImage/ButtonItem.vue +44 -0
- package/samples/LongImage/LongImageScroll.vue +71 -106
- package/samples/LongImage/Scroll.vue +7 -9
- package/samples/LongText/App.vue +13 -28
- package/samples/LongText/Button.vue +43 -145
- package/samples/LongText/ButtonItem.vue +44 -0
- package/samples/LongText/LongTextScroll.vue +68 -101
- package/samples/LongText/Scroll.vue +7 -9
- package/samples/Marquee/App.vue +34 -37
- package/samples/MaskClip/App.vue +17 -30
- package/samples/MetroWidgetDemos/Advanced/App.vue +47 -0
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
- package/samples/MetroWidgetDemos/Advanced/Widgets.vue +71 -0
- package/samples/MetroWidgetDemos/Item.vue +67 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/App.vue +80 -104
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/Item.vue +7 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/bg.jpg +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_content.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/focus_border.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/holder_logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/jrbm.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/loading.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/mcjx.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tao.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tmall.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/border.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/ContentItem.vue +60 -86
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/MyTab.vue +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/data.js +45 -0
- package/samples/MetroWidgetDemos/PingPong/App.vue +135 -0
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +73 -0
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +84 -0
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
- package/samples/MetroWidgetDemos/Simple/App.vue +45 -0
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
- package/samples/MetroWidgetDemos/WidgetItem.vue +89 -0
- package/samples/MetroWidgetDemos/data.js +204 -0
- package/samples/NinePatchDemo/App.vue +114 -115
- package/samples/NinePatchDemo/Item.vue +7 -8
- package/samples/Preload/App.vue +67 -64
- package/samples/Preload/Item.vue +21 -29
- package/samples/QrcodeDemo/App.vue +24 -29
- package/samples/SoundPool/App.vue +77 -106
- package/samples/SprayView/App.vue +10 -8
- package/samples/SpriteImage/App.vue +1 -2
- package/samples/TextBox/App.vue +86 -101
- package/samples/TextBox/RenderCenter.vue +1 -1
- package/samples/TextBox/RenderLeft.vue +1 -1
- package/samples/TextBox/RenderOneLine.vue +1 -1
- package/samples/TextBox/RenderRight.vue +1 -1
- package/samples/TextShadowDemo/App.vue +1 -2
- package/samples/TextureAnimation/App.vue +16 -13
- package/samples/TextureAnimation/App2.vue +111 -0
- package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/samples/TextureAnimation/assets/light.png +0 -0
- package/samples/TextureAnimation/assets/light2.png +0 -0
- package/samples/TextureAnimation/assets/mask.png +0 -0
- package/samples/TextureSize/App.vue +15 -25
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +2 -4
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +2 -3
- package/samples/ThrowMoveDemo/TargetDemo.vue +3 -4
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +2 -3
- package/samples/TouchSample/App.vue +2 -3
- package/samples/TouchSample/Item.vue +15 -13
- package/samples/TouchSample/MetroWidgetHorizontal.vue +2 -2
- package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
- package/samples/TouchSample/TouchContainerHorizontal.vue +4 -3
- package/samples/TouchSample/TouchContainerVertical.vue +3 -2
- package/samples/TransitPage/App.vue +20 -32
- package/samples/VideoDemo/App.vue +65 -81
- package/samples/VideoDemo/components/Button.vue +41 -52
- package/samples/VideoDemo/components/Controllor.vue +171 -169
- package/samples/VideoDemo/components/VideoFrame.vue +87 -99
- package/samples/VisibleSensorDemo/App.vue +234 -0
- package/scripts/jsview-jsmap-serve.js +42 -0
- package/scripts/jsview-post-install.js +1 -1
- package/tsconfig.json +3 -0
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +204 -193
- package/utils/JsViewEngineWidget/JsvFocusManager.js +30 -17
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +1561 -1656
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.js +136 -0
- package/utils/JsViewEngineWidget/MetroWidget/ToolFunctions.js +18 -0
- package/utils/JsViewEngineWidget/TemplateParser.js +111 -1
- package/utils/JsViewEngineWidget/WidgetCommon.js +8 -2
- package/utils/JsViewEngineWidget/index.js +4 -4
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +301 -58
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +22 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +8 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvImpactTracer.js +113 -0
- package/utils/JsViewVueTools/JsvRefTaker.js +35 -0
- package/utils/JsViewVueTools/index.js +20 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +11 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +8 -4
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +203 -14
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvFilterView.vue +59 -51
- package/utils/JsViewVueWidget/JsvGrid.vue +139 -41
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +4 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +13 -12
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +8 -17
- package/utils/JsViewVueWidget/JsvNinePatch.vue +1 -1
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +37 -7
- package/utils/JsViewVueWidget/JsvPosterImage.vue +34 -13
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +39 -53
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +1 -1
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +13 -10
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +282 -285
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -3
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +142 -61
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +9 -5
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +7 -8
- package/utils/JsViewVueWidget/JsvVideo.vue +9 -12
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +141 -0
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +9 -0
- package/utils/JsViewVueWidget/index.js +42 -0
- package/samples/AdvanceMetroWidget/App.vue +0 -123
- package/samples/AdvanceMetroWidget/Frame.vue +0 -102
- package/samples/AdvanceMetroWidget/Item.vue +0 -63
- package/samples/AdvanceMetroWidget/data.js +0 -137
- package/samples/ClassNameDemo/App.vue +0 -119
- package/samples/ClassNameDemo/components/ContentItem.vue +0 -253
- package/samples/ClassNameDemo/components/LoadingView.vue +0 -43
- package/samples/ClassNameDemo/components/TitleView.vue +0 -24
- package/samples/ClassNameDemo/data.js +0 -24
- package/samples/FlowMultiWidget/App.vue +0 -91
- package/samples/FlowMultiWidget/assets/nine_patch_focus.png +0 -0
- package/samples/FlowMultiWidget/components/Block.vue +0 -107
- package/samples/FlowMultiWidget/components/FlowPage.vue +0 -60
- package/samples/FlowMultiWidget/components/Item.vue +0 -103
- package/samples/FlowMultiWidget/components/MenuItem.vue +0 -72
- package/samples/FlowMultiWidget/components/MyMenu.vue +0 -90
- package/samples/FlowMultiWidget/data.js +0 -446
- package/samples/HashHistory/views/BasePage.vue +0 -19
- package/samples/HashHistory/views/SubPageFirst.vue +0 -10
- package/samples/HashHistory/views/SubPageSecond.vue +0 -10
- package/samples/SimpleWidgetDemo/assets/bg.jpg +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_content.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/focus_border.png +0 -0
- package/samples/SimpleWidgetDemo/assets/holder_logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/jrbm.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/loading.png +0 -0
- package/samples/SimpleWidgetDemo/assets/logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/mcjx.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tao.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tmall.png +0 -0
- package/samples/SimpleWidgetDemo/data.js +0 -124
- package/utils/JsViewEngineWidget/MetroWidget/ContentView.vue +0 -63
- package/utils/JsViewEngineWidget/MetroWidget/DivWrapper.vue +0 -51
- package/utils/JsViewEngineWidget/MetroWidget/ItemView.vue +0 -213
- package/utils/JsViewEngineWidget/MetroWidget/RootView.vue +0 -154
package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/ContentItem.vue
RENAMED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2021-06-10 14:17:17
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime:
|
|
5
|
+
* @LastEditTime: 2022-07-11 18:20:58
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { Options, Vue, setup } from "vue-class-component";
|
|
8
|
+
<script setup>
|
|
10
9
|
import posterHolder from "../assets/holder_logo.png";
|
|
11
10
|
import couponLeft from "../assets/coupon_left.png";
|
|
12
11
|
import couponRight from "../assets/coupon_right.png";
|
|
@@ -14,80 +13,55 @@ import couponMid from "../assets/coupon_mid.png";
|
|
|
14
13
|
import borderLeft from "../assets/line_left.png";
|
|
15
14
|
import borderMid from "../assets/line_mid.png";
|
|
16
15
|
import borderRight from "../assets/line_right.png";
|
|
16
|
+
import { ref, computed } from "vue";
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
})
|
|
26
|
-
class ContentItem extends Vue {
|
|
27
|
-
constructor(props) {
|
|
28
|
-
super(props);
|
|
29
|
-
// console.log("cchtest2 ContentItem constructor " + new Date().getTime());
|
|
30
|
-
this.focused = false;
|
|
31
|
-
this.setup = setup(() => {
|
|
32
|
-
return {
|
|
33
|
-
posterHolder,
|
|
34
|
-
couponLeft,
|
|
35
|
-
couponMid,
|
|
36
|
-
couponRight,
|
|
37
|
-
borderLeft,
|
|
38
|
-
borderMid,
|
|
39
|
-
borderRight,
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
}
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
data: Object,
|
|
20
|
+
query: Object,
|
|
21
|
+
onEdge: Function,
|
|
22
|
+
onAction: Object,
|
|
23
|
+
});
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
25
|
+
const focused = ref(false);
|
|
26
|
+
const onFocus = () => {
|
|
27
|
+
focused.value = true;
|
|
28
|
+
};
|
|
47
29
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
const onBlur = () => {
|
|
31
|
+
focused.value = false;
|
|
32
|
+
};
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
props.onAction.register("onFocus", onFocus);
|
|
35
|
+
props.onAction.register("onBlur", onBlur);
|
|
53
36
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.onAction.register("onClick", this.onClick);
|
|
58
|
-
}
|
|
37
|
+
const focusTransform = computed(() => {
|
|
38
|
+
return focused.value ? "scale3d(1.2, 1.2, 1)" : null;
|
|
39
|
+
});
|
|
59
40
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
const savePrizeWidth = computed(() => {
|
|
42
|
+
return 10 * props.data.savePrize.length + 26;
|
|
43
|
+
});
|
|
63
44
|
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
const soldTotalWidth = computed(() => {
|
|
46
|
+
let width = 44 + 22; //base width;
|
|
47
|
+
if (props.data.soldTotal >= 10000) {
|
|
48
|
+
let text = parseInt(props.data.soldTotal / 10000) + "";
|
|
49
|
+
width += text.length * 12 + 22;
|
|
50
|
+
} else {
|
|
51
|
+
width += (props.data.soldTotal + "").length * 12;
|
|
66
52
|
}
|
|
53
|
+
return width;
|
|
54
|
+
});
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
width += (this.data.soldTotal + "").length * 12;
|
|
75
|
-
}
|
|
76
|
-
return width;
|
|
56
|
+
const soldTotalText = computed(() => {
|
|
57
|
+
let text = "";
|
|
58
|
+
if (props.data.soldTotal >= 10000) {
|
|
59
|
+
text = parseInt(props.data.soldTotal / 10000) + "万";
|
|
60
|
+
} else {
|
|
61
|
+
text = props.data.soldTotal;
|
|
77
62
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
let text = "";
|
|
81
|
-
if (this.data.soldTotal >= 10000) {
|
|
82
|
-
text = parseInt(this.data.soldTotal / 10000) + "万";
|
|
83
|
-
} else {
|
|
84
|
-
text = this.data.soldTotal;
|
|
85
|
-
}
|
|
86
|
-
return text;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default ContentItem;
|
|
63
|
+
return text;
|
|
64
|
+
});
|
|
91
65
|
</script>
|
|
92
66
|
|
|
93
67
|
<template>
|
|
@@ -104,7 +78,7 @@ export default ContentItem;
|
|
|
104
78
|
height: 23,
|
|
105
79
|
left: 53,
|
|
106
80
|
top: 95,
|
|
107
|
-
backgroundImage:
|
|
81
|
+
backgroundImage: posterHolder,
|
|
108
82
|
}"
|
|
109
83
|
/>
|
|
110
84
|
</div>
|
|
@@ -126,14 +100,14 @@ export default ContentItem;
|
|
|
126
100
|
}"
|
|
127
101
|
>
|
|
128
102
|
<div
|
|
129
|
-
:style="{ width: 5, height: 24, backgroundImage:
|
|
103
|
+
:style="{ width: 5, height: 24, backgroundImage: couponLeft }"
|
|
130
104
|
/>
|
|
131
105
|
<div
|
|
132
106
|
:style="{
|
|
133
107
|
left: 5,
|
|
134
108
|
width: savePrizeWidth - 11,
|
|
135
109
|
height: 24,
|
|
136
|
-
backgroundImage:
|
|
110
|
+
backgroundImage: couponMid,
|
|
137
111
|
}"
|
|
138
112
|
/>
|
|
139
113
|
<div
|
|
@@ -141,7 +115,7 @@ export default ContentItem;
|
|
|
141
115
|
left: savePrizeWidth - 6,
|
|
142
116
|
width: 5,
|
|
143
117
|
height: 24,
|
|
144
|
-
backgroundImage:
|
|
118
|
+
backgroundImage: couponRight,
|
|
145
119
|
}"
|
|
146
120
|
/>
|
|
147
121
|
<div
|
|
@@ -161,14 +135,14 @@ export default ContentItem;
|
|
|
161
135
|
}"
|
|
162
136
|
>
|
|
163
137
|
<div
|
|
164
|
-
:style="{ width: 7, height: 25, backgroundImage:
|
|
138
|
+
:style="{ width: 7, height: 25, backgroundImage: borderLeft }"
|
|
165
139
|
/>
|
|
166
140
|
<div
|
|
167
141
|
:style="{
|
|
168
142
|
left: 7,
|
|
169
143
|
width: soldTotalWidth - 13,
|
|
170
144
|
height: 25,
|
|
171
|
-
backgroundImage:
|
|
145
|
+
backgroundImage: borderMid,
|
|
172
146
|
}"
|
|
173
147
|
/>
|
|
174
148
|
<div
|
|
@@ -176,7 +150,7 @@ export default ContentItem;
|
|
|
176
150
|
left: soldTotalWidth - 7,
|
|
177
151
|
width: 7,
|
|
178
152
|
height: 25,
|
|
179
|
-
backgroundImage:
|
|
153
|
+
backgroundImage: borderRight,
|
|
180
154
|
}"
|
|
181
155
|
/>
|
|
182
156
|
<div
|
|
@@ -198,14 +172,14 @@ export default ContentItem;
|
|
|
198
172
|
}"
|
|
199
173
|
>
|
|
200
174
|
<div
|
|
201
|
-
:style="{ width: 5, height: 24, backgroundImage:
|
|
175
|
+
:style="{ width: 5, height: 24, backgroundImage: couponLeft }"
|
|
202
176
|
/>
|
|
203
177
|
<div
|
|
204
178
|
:style="{
|
|
205
179
|
left: 5,
|
|
206
180
|
width: savePrizeWidth - 11,
|
|
207
181
|
height: 24,
|
|
208
|
-
backgroundImage:
|
|
182
|
+
backgroundImage: couponMid,
|
|
209
183
|
}"
|
|
210
184
|
/>
|
|
211
185
|
<div
|
|
@@ -213,7 +187,7 @@ export default ContentItem;
|
|
|
213
187
|
left: savePrizeWidth - 6,
|
|
214
188
|
width: 5,
|
|
215
189
|
height: 24,
|
|
216
|
-
backgroundImage:
|
|
190
|
+
backgroundImage: couponRight,
|
|
217
191
|
}"
|
|
218
192
|
/>
|
|
219
193
|
<div
|
|
@@ -232,14 +206,14 @@ export default ContentItem;
|
|
|
232
206
|
}"
|
|
233
207
|
>
|
|
234
208
|
<div
|
|
235
|
-
:style="{ width: 7, height: 25, backgroundImage:
|
|
209
|
+
:style="{ width: 7, height: 25, backgroundImage: borderLeft }"
|
|
236
210
|
/>
|
|
237
211
|
<div
|
|
238
212
|
:style="{
|
|
239
213
|
left: 7,
|
|
240
214
|
width: soldTotalWidth - 13,
|
|
241
215
|
height: 25,
|
|
242
|
-
backgroundImage:
|
|
216
|
+
backgroundImage: borderMid,
|
|
243
217
|
}"
|
|
244
218
|
/>
|
|
245
219
|
<div
|
|
@@ -247,7 +221,7 @@ export default ContentItem;
|
|
|
247
221
|
left: soldTotalWidth - 7,
|
|
248
222
|
width: 7,
|
|
249
223
|
height: 25,
|
|
250
|
-
backgroundImage:
|
|
224
|
+
backgroundImage: borderRight,
|
|
251
225
|
}"
|
|
252
226
|
/>
|
|
253
227
|
<div
|
|
@@ -269,14 +243,14 @@ export default ContentItem;
|
|
|
269
243
|
}"
|
|
270
244
|
>
|
|
271
245
|
<div
|
|
272
|
-
:style="{ width: 5, height: 24, backgroundImage:
|
|
246
|
+
:style="{ width: 5, height: 24, backgroundImage: couponLeft }"
|
|
273
247
|
/>
|
|
274
248
|
<div
|
|
275
249
|
:style="{
|
|
276
250
|
left: 5,
|
|
277
251
|
width: savePrizeWidth - 11,
|
|
278
252
|
height: 24,
|
|
279
|
-
backgroundImage:
|
|
253
|
+
backgroundImage: couponMid,
|
|
280
254
|
}"
|
|
281
255
|
/>
|
|
282
256
|
<div
|
|
@@ -284,7 +258,7 @@ export default ContentItem;
|
|
|
284
258
|
left: savePrizeWidth - 6,
|
|
285
259
|
width: 5,
|
|
286
260
|
height: 24,
|
|
287
|
-
backgroundImage:
|
|
261
|
+
backgroundImage: couponRight,
|
|
288
262
|
}"
|
|
289
263
|
/>
|
|
290
264
|
<div
|
|
@@ -303,14 +277,14 @@ export default ContentItem;
|
|
|
303
277
|
}"
|
|
304
278
|
>
|
|
305
279
|
<div
|
|
306
|
-
:style="{ width: 7, height: 25, backgroundImage:
|
|
280
|
+
:style="{ width: 7, height: 25, backgroundImage: borderLeft }"
|
|
307
281
|
/>
|
|
308
282
|
<div
|
|
309
283
|
:style="{
|
|
310
284
|
left: 7,
|
|
311
285
|
width: soldTotalWidth - 13,
|
|
312
286
|
height: 25,
|
|
313
|
-
backgroundImage:
|
|
287
|
+
backgroundImage: borderMid,
|
|
314
288
|
}"
|
|
315
289
|
/>
|
|
316
290
|
<div
|
|
@@ -318,7 +292,7 @@ export default ContentItem;
|
|
|
318
292
|
left: soldTotalWidth - 7,
|
|
319
293
|
width: 7,
|
|
320
294
|
height: 25,
|
|
321
|
-
backgroundImage:
|
|
295
|
+
backgroundImage: borderRight,
|
|
322
296
|
}"
|
|
323
297
|
/>
|
|
324
298
|
<div
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
let data1 = [];
|
|
2
|
+
|
|
3
|
+
// 添加300个模拟数据
|
|
4
|
+
for (let i = 0; i < 40; i++) {
|
|
5
|
+
data1.push({
|
|
6
|
+
index: i,
|
|
7
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
8
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
9
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
10
|
+
savePrize: `${i}`,
|
|
11
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
12
|
+
pictUrl:
|
|
13
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let data2 = [];
|
|
18
|
+
for (let i = 0; i < 50; i++) {
|
|
19
|
+
data2.push({
|
|
20
|
+
index: i,
|
|
21
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
22
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
23
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
24
|
+
savePrize: `${i}`,
|
|
25
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
26
|
+
pictUrl:
|
|
27
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let data3 = [];
|
|
32
|
+
for (let i = 0; i < 30; i++) {
|
|
33
|
+
data3.push({
|
|
34
|
+
index: i,
|
|
35
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
36
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
37
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
38
|
+
savePrize: `${i}`,
|
|
39
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
40
|
+
pictUrl:
|
|
41
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { data1, data2, data3 };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-12-21 15:36:29
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-09-01 17:08:21
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import ViewSwiper from "./ViewSwiper.vue";
|
|
10
|
+
import AppTab from "./AppTab.vue";
|
|
11
|
+
import { reactive } from "vue";
|
|
12
|
+
import { EdgeDirection } from "jsview";
|
|
13
|
+
import { advanceMetroWidget, randomColor } from "../data.js";
|
|
14
|
+
|
|
15
|
+
const pageList = [];
|
|
16
|
+
const tabData = [];
|
|
17
|
+
|
|
18
|
+
for (let i = 0; i < 5; i++) {
|
|
19
|
+
tabData.push({
|
|
20
|
+
width: 100,
|
|
21
|
+
height: 50,
|
|
22
|
+
marginRight: 10,
|
|
23
|
+
content: "Tab_" + i,
|
|
24
|
+
color: randomColor(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
let data = JSON.parse(JSON.stringify(advanceMetroWidget));
|
|
28
|
+
data.forEach((item) => {
|
|
29
|
+
item.name = "testPage_" + i + "-" + item.name;
|
|
30
|
+
});
|
|
31
|
+
pageList.push({
|
|
32
|
+
width: 600,
|
|
33
|
+
height: 600,
|
|
34
|
+
data: data,
|
|
35
|
+
name: "testPage-" + i,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export default {
|
|
39
|
+
components: {
|
|
40
|
+
ViewSwiper,
|
|
41
|
+
AppTab,
|
|
42
|
+
},
|
|
43
|
+
setup() {
|
|
44
|
+
let globalInfo = reactive({
|
|
45
|
+
tabId: 0,
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
tabData,
|
|
49
|
+
appPageName: "/page",
|
|
50
|
+
appTabName: "/tab",
|
|
51
|
+
globalInfo,
|
|
52
|
+
pageList,
|
|
53
|
+
preFocusName: "/tab",
|
|
54
|
+
curFocusName: "/tab",
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
provide() {
|
|
58
|
+
return {
|
|
59
|
+
globalInfo: this.globalInfo,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
$_app_onFocus() {
|
|
64
|
+
console.log("App onFocus");
|
|
65
|
+
this.$refs.focusNode.findBlockByName(this.curFocusName).requestFocus();
|
|
66
|
+
},
|
|
67
|
+
onKeyDown(ev) {
|
|
68
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
69
|
+
this.$router?.go(-1);
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
},
|
|
73
|
+
$_app_pageOnEdge(info) {
|
|
74
|
+
console.log("App page on edge ", info);
|
|
75
|
+
if (info.direction === EdgeDirection.top) {
|
|
76
|
+
this.curFocusName = "/tab";
|
|
77
|
+
this.$refs.focusNode.findBlockByName(this.appTabName).requestFocus();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
$_app_tabOnEdge(info) {
|
|
81
|
+
console.log("App tab on edge ", info);
|
|
82
|
+
if (info.direction === EdgeDirection.bottom) {
|
|
83
|
+
this.curFocusName = "/page";
|
|
84
|
+
this.$refs.focusNode.findBlockByName(this.appPageName).requestFocus();
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<template>
|
|
92
|
+
<jsv-focus-block
|
|
93
|
+
ref="focusNode"
|
|
94
|
+
name="/main"
|
|
95
|
+
autoFocus
|
|
96
|
+
:onAction="{
|
|
97
|
+
onKeyDown: onKeyDown,
|
|
98
|
+
onFocus: $_app_onFocus,
|
|
99
|
+
}"
|
|
100
|
+
:style="{
|
|
101
|
+
width: 1920,
|
|
102
|
+
height: 1080,
|
|
103
|
+
backgroundColor: '#007788',
|
|
104
|
+
}"
|
|
105
|
+
>
|
|
106
|
+
<div
|
|
107
|
+
:style="{
|
|
108
|
+
top: 0,
|
|
109
|
+
left: 100,
|
|
110
|
+
}"
|
|
111
|
+
>
|
|
112
|
+
<app-tab
|
|
113
|
+
:data="tabData"
|
|
114
|
+
:name="appTabName"
|
|
115
|
+
:layout="{ width: 1920, height: 100 }"
|
|
116
|
+
:onEdge="$_app_tabOnEdge"
|
|
117
|
+
:style="{
|
|
118
|
+
top: 15,
|
|
119
|
+
}"
|
|
120
|
+
></app-tab>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div :style="{ top: 100, left: 200 }">
|
|
124
|
+
<view-swiper
|
|
125
|
+
:name="appPageName"
|
|
126
|
+
:pageData="pageList"
|
|
127
|
+
:onEdge="$_app_pageOnEdge"
|
|
128
|
+
:layout="{
|
|
129
|
+
width: 600,
|
|
130
|
+
height: 600,
|
|
131
|
+
}"
|
|
132
|
+
></view-swiper>
|
|
133
|
+
</div>
|
|
134
|
+
</jsv-focus-block>
|
|
135
|
+
</template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-07-12 10:45:38
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-09-01 17:04:31
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { VERTICAL, MetroWidget } from "jsview";
|
|
10
|
+
import WidgetItem from "../WidgetItem.vue";
|
|
11
|
+
import { ref, watch, onBeforeUnmount } from "vue";
|
|
12
|
+
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
data: {
|
|
15
|
+
type: Object,
|
|
16
|
+
require: true,
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: String,
|
|
20
|
+
require: true,
|
|
21
|
+
},
|
|
22
|
+
onEdge: {
|
|
23
|
+
type: Function,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const widgetRef = ref(null);
|
|
28
|
+
|
|
29
|
+
const provideData = () => {
|
|
30
|
+
return props.data.data;
|
|
31
|
+
};
|
|
32
|
+
const measures = (item) => {
|
|
33
|
+
return {
|
|
34
|
+
width: item.width,
|
|
35
|
+
height: item.height,
|
|
36
|
+
doSlide: false,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const watcher = watch(
|
|
41
|
+
() => props.data,
|
|
42
|
+
(newValue, oldValue) => {
|
|
43
|
+
widgetRef.value?.refreshData();
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
onBeforeUnmount(() => {
|
|
48
|
+
watcher();
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<metro-widget
|
|
55
|
+
ref="widgetRef"
|
|
56
|
+
:name="name"
|
|
57
|
+
:width="data.width"
|
|
58
|
+
:height="data.height"
|
|
59
|
+
:provideData="provideData"
|
|
60
|
+
:direction="VERTICAL"
|
|
61
|
+
:measures="measures"
|
|
62
|
+
:onEdge="onEdge"
|
|
63
|
+
>
|
|
64
|
+
<template #renderItem="{ data, query, onItemEdge, onAction }">
|
|
65
|
+
<widget-item
|
|
66
|
+
:data="data"
|
|
67
|
+
:query="query"
|
|
68
|
+
:onItemEdge="onItemEdge"
|
|
69
|
+
:onAction="onAction"
|
|
70
|
+
></widget-item>
|
|
71
|
+
</template>
|
|
72
|
+
</metro-widget>
|
|
73
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-07-12 10:45:19
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-09-01 16:19:51
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { HORIZONTAL, MetroWidget } from "jsview";
|
|
10
|
+
import TabItem from "./TabItem.vue";
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
data: {
|
|
14
|
+
type: Object,
|
|
15
|
+
require: true,
|
|
16
|
+
},
|
|
17
|
+
name: {
|
|
18
|
+
type: String,
|
|
19
|
+
require: true,
|
|
20
|
+
},
|
|
21
|
+
layout: {
|
|
22
|
+
type: Object,
|
|
23
|
+
},
|
|
24
|
+
onEdge: {
|
|
25
|
+
type: Function,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const measures = (item) => {
|
|
30
|
+
return {
|
|
31
|
+
width: item.width,
|
|
32
|
+
height: item.height,
|
|
33
|
+
marginRight: item.marginRight,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const provideData = () => {
|
|
37
|
+
return props.data;
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<jsv-focus-block>
|
|
43
|
+
<metro-widget
|
|
44
|
+
:name="name"
|
|
45
|
+
:width="layout.width"
|
|
46
|
+
:height="layout.height"
|
|
47
|
+
:provideData="provideData"
|
|
48
|
+
:direction="HORIZONTAL"
|
|
49
|
+
:measures="measures"
|
|
50
|
+
:onEdge="onEdge"
|
|
51
|
+
:padding="{
|
|
52
|
+
top: 30,
|
|
53
|
+
left: 60,
|
|
54
|
+
right: 60,
|
|
55
|
+
}"
|
|
56
|
+
>
|
|
57
|
+
<template #renderItem="{ data, query, onAction }">
|
|
58
|
+
<tab-item :data="data" :query="query" :onAction="onAction"></tab-item>
|
|
59
|
+
</template>
|
|
60
|
+
</metro-widget>
|
|
61
|
+
</jsv-focus-block>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-07-12 14:52:53
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-09-01 17:10:14
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, inject } from "vue";
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
data: Object,
|
|
13
|
+
query: Object,
|
|
14
|
+
onAction: Object,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const globalInfo = inject("globalInfo");
|
|
18
|
+
|
|
19
|
+
const focused = ref(false);
|
|
20
|
+
const active = ref(false);
|
|
21
|
+
|
|
22
|
+
// 自身的焦点状态自己记录, 通过回调来改变
|
|
23
|
+
const onFocus = () => {
|
|
24
|
+
globalInfo.tabId = props.query.id;
|
|
25
|
+
focused.value = true;
|
|
26
|
+
active.value = false;
|
|
27
|
+
};
|
|
28
|
+
const onBlur = () => {
|
|
29
|
+
focused.value = false;
|
|
30
|
+
active.value =
|
|
31
|
+
props.query.getCurrentFocusId().id === props.query.id ? true : false;
|
|
32
|
+
};
|
|
33
|
+
const onClick = () => {
|
|
34
|
+
console.log("tab item onclick ", props.data);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// 一般在create的时候进行回调的注册, 使用 option api的可以在created时进行注册
|
|
38
|
+
props.onAction.register("onFocus", onFocus);
|
|
39
|
+
props.onAction.register("onBlur", onBlur);
|
|
40
|
+
props.onAction.register("onClick", onClick);
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div
|
|
45
|
+
:style="{
|
|
46
|
+
width: data.width,
|
|
47
|
+
height: data.height,
|
|
48
|
+
transform: focused ? 'scale3d(1.2, 1.2, 1.2)' : '',
|
|
49
|
+
transition: 'transform 0.2s linear',
|
|
50
|
+
}"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
v-if="!focused && active"
|
|
54
|
+
:style="{
|
|
55
|
+
left: -2,
|
|
56
|
+
top: -2,
|
|
57
|
+
width: data.width + 4,
|
|
58
|
+
height: data.height + 4,
|
|
59
|
+
backgroundColor: '#00FF00',
|
|
60
|
+
}"
|
|
61
|
+
></div>
|
|
62
|
+
<div
|
|
63
|
+
v-if="focused"
|
|
64
|
+
:style="{
|
|
65
|
+
left: -2,
|
|
66
|
+
top: -2,
|
|
67
|
+
width: data.width + 4,
|
|
68
|
+
height: data.height + 4,
|
|
69
|
+
backgroundColor: '#FF0000',
|
|
70
|
+
}"
|
|
71
|
+
></div>
|
|
72
|
+
<div
|
|
73
|
+
:style="{
|
|
74
|
+
width: data.width,
|
|
75
|
+
height: data.height,
|
|
76
|
+
fontSize: '30px',
|
|
77
|
+
color: '#FFFFFF',
|
|
78
|
+
backgroundColor: data.color,
|
|
79
|
+
}"
|
|
80
|
+
>
|
|
81
|
+
{{ data.content }}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|