@shijiu/jsview-vue-samples 1.9.887 → 1.9.915
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 +10 -10
- package/Basic/App.vue +1 -1
- package/Basic/components/FontStyle.css +4 -4
- package/Basic/components/anim/AnimKeyframeBasic.vue +1 -1
- package/Basic/components/anim/AnimKeyframeComposite.vue +2 -2
- package/Basic/components/anim/AnimTransition.vue +4 -4
- package/Basic/components/div/DivClip.vue +0 -39
- package/Basic/components/div/DivCssScoped.vue +1 -1
- package/Basic/components/div/DivLayout.vue +1 -1
- package/Basic/components/div/DivRadius.vue +4 -4
- package/Basic/components/img/ImageGroup.vue +2 -2
- package/Basic/components/img/ImgLayout.vue +78 -14
- package/Basic/components/text/TextDirection.vue +9 -9
- package/Basic/components/text/TextEmoji.vue +7 -2
- package/Basic/components/text/TextFontStyle.vue +4 -4
- package/Basic/components/text/TextGroup1.vue +1 -1
- package/Basic/components/text/TextGroup2.vue +2 -2
- package/BasicFocusControl/App.vue +2 -2
- package/BasicFocusControl/components/BaseBlock.vue +2 -2
- package/BasicFocusControl/components/MainArea.vue +2 -2
- package/BasicFocusControl/components/SideBar.vue +2 -2
- package/Collision/App.vue +16 -16
- package/ColorSpace/App.vue +11 -11
- package/CssPreprocessor/App.vue +70 -0
- package/CssPreprocessor/Less/App.vue +32 -0
- package/CssPreprocessor/Less/PanelData.js +51 -0
- package/CssPreprocessor/Less/components/less-group1/LessComments.vue +34 -0
- package/CssPreprocessor/Less/components/less-group1/LessConditionals.vue +32 -0
- package/CssPreprocessor/Less/components/less-group1/LessOperations.vue +24 -0
- package/CssPreprocessor/Less/components/less-group1/LessVariables.vue +48 -0
- package/CssPreprocessor/Less/components/less-group2/LessIteration.vue +32 -0
- package/CssPreprocessor/Less/components/less-group2/LessMethods.vue +27 -0
- package/CssPreprocessor/Less/components/less-group3/LessExtends.vue +32 -0
- package/CssPreprocessor/Less/components/less-group3/LessNesting.vue +63 -0
- package/CssPreprocessor/Less/components/less-group4/LessKeyframes.vue +40 -0
- package/CssPreprocessor/Less/components/less-group4/LessMaps.vue +33 -0
- package/CssPreprocessor/Less/components/less-group4/LessMixins.vue +33 -0
- package/CssPreprocessor/Less/components/less-group5/LessImporting.vue +34 -0
- package/CssPreprocessor/Less/components/less-group5/TextSettings.less +4 -0
- package/CssPreprocessor/Scss/App.vue +32 -0
- package/CssPreprocessor/Scss/PanelData.js +51 -0
- package/CssPreprocessor/Scss/components/scss-group1/ScssComments.vue +34 -0
- package/CssPreprocessor/Scss/components/scss-group1/ScssConditionals.vue +36 -0
- package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +30 -0
- package/CssPreprocessor/Scss/components/scss-group1/ScssVariables.vue +48 -0
- package/CssPreprocessor/Scss/components/scss-group2/ScssIteration.vue +36 -0
- package/CssPreprocessor/Scss/components/scss-group2/ScssMethods.vue +84 -0
- package/CssPreprocessor/Scss/components/scss-group3/ScssExtends.vue +34 -0
- package/CssPreprocessor/Scss/components/scss-group3/ScssNesting.vue +75 -0
- package/CssPreprocessor/Scss/components/scss-group4/ScssKeyframes.vue +40 -0
- package/CssPreprocessor/Scss/components/scss-group4/ScssMaps.vue +35 -0
- package/CssPreprocessor/Scss/components/scss-group4/ScssMixins.vue +33 -0
- package/CssPreprocessor/Scss/components/scss-group5/ScssImporting.vue +34 -0
- package/CssPreprocessor/Scss/components/scss-group5/TextSettings.scss +4 -0
- package/CssPreprocessor/Stylus/App.vue +32 -0
- package/CssPreprocessor/Stylus/PanelData.js +51 -0
- package/CssPreprocessor/Stylus/components/stylus-group1/StylusComments.vue +34 -0
- package/CssPreprocessor/Stylus/components/stylus-group1/StylusConditionals.vue +36 -0
- package/CssPreprocessor/Stylus/components/stylus-group1/StylusOperations.vue +30 -0
- package/CssPreprocessor/Stylus/components/stylus-group1/StylusVariables.vue +47 -0
- package/CssPreprocessor/Stylus/components/stylus-group2/StylusIteration.vue +34 -0
- package/CssPreprocessor/Stylus/components/stylus-group2/StylusMethods.vue +78 -0
- package/CssPreprocessor/Stylus/components/stylus-group3/StylusExtends.vue +34 -0
- package/CssPreprocessor/Stylus/components/stylus-group3/StylusNesting.vue +63 -0
- package/CssPreprocessor/Stylus/components/stylus-group4/StylusKeyframes.vue +40 -0
- package/CssPreprocessor/Stylus/components/stylus-group4/StylusMaps.vue +33 -0
- package/CssPreprocessor/Stylus/components/stylus-group4/StylusMixins.vue +33 -0
- package/CssPreprocessor/Stylus/components/stylus-group5/StylusImporting.vue +34 -0
- package/CssPreprocessor/Stylus/components/stylus-group5/TextSettings.styl +4 -0
- package/CssPreprocessor/utils/ContentBlock.vue +43 -0
- package/CssPreprocessor/utils/ContentList.vue +34 -0
- package/CssPreprocessor/utils/FontStyle.css +19 -0
- package/CssPreprocessor/utils/Panel.vue +49 -0
- package/CssPreprocessor/utils/TitleBar.vue +29 -0
- package/DemoHomepage/App.vue +46 -11
- package/DemoHomepage/components/Dialog.vue +15 -15
- package/DemoHomepage/router.js +20 -12
- package/DemoHomepage/views/Homepage.vue +90 -102
- package/DivMetroPerformance/App.vue +150 -0
- package/DivMetroPerformance/Item.vue +58 -0
- package/DivMetroPerformance/assets/bg.jpg +0 -0
- package/DivMetroPerformance/assets/coupon_content.png +0 -0
- package/DivMetroPerformance/assets/coupon_left.png +0 -0
- package/DivMetroPerformance/assets/coupon_mid.png +0 -0
- package/DivMetroPerformance/assets/coupon_right.png +0 -0
- package/DivMetroPerformance/assets/focus_border.png +0 -0
- package/DivMetroPerformance/assets/holder_logo.png +0 -0
- package/DivMetroPerformance/assets/jrbm.png +0 -0
- package/DivMetroPerformance/assets/line_left.png +0 -0
- package/DivMetroPerformance/assets/line_mid.png +0 -0
- package/DivMetroPerformance/assets/line_right.png +0 -0
- package/DivMetroPerformance/assets/loading.png +0 -0
- package/DivMetroPerformance/assets/logo.png +0 -0
- package/DivMetroPerformance/assets/mcjx.png +0 -0
- package/DivMetroPerformance/assets/tao.png +0 -0
- package/DivMetroPerformance/assets/tmall.png +0 -0
- package/DivMetroPerformance/border.png +0 -0
- package/DivMetroPerformance/components/ContentItem.vue +385 -0
- package/DivMetroPerformance/components/MyTab.vue +129 -0
- package/DivMetroPerformance/data.js +124 -0
- package/DivMetroPerformance/utils/GridItem.vue +28 -0
- package/DivMetroPerformance/utils/GridPlate.vue +85 -0
- package/FilterDemo/AnimatePic.vue +3 -3
- package/FilterDemo/App.vue +3 -3
- package/FlipCard/App.vue +2 -2
- package/FlipCard/FlipCard.vue +2 -2
- package/GridDemo/Item.vue +13 -13
- package/HashHistory/App.vue +0 -1
- package/HashHistory/components/Item.vue +2 -2
- package/HashHistory/views/MainPage.vue +1 -1
- package/HashHistory/views/SubPage.vue +2 -2
- package/ImpactStop/App.vue +9 -11
- package/Input/InputPanel.vue +2 -4
- package/LongImage/App.vue +2 -2
- package/LongImage/Button.vue +1 -1
- package/LongImage/ButtonItem.vue +1 -1
- package/LongText/App.vue +3 -3
- package/LongText/Button.vue +1 -1
- package/LongText/ButtonItem.vue +1 -1
- package/LongText/LongTextScroll.vue +4 -4
- package/Marquee/longText.js +0 -2
- package/MaskClip/App.vue +4 -4
- package/MediaDemo/App.vue +127 -0
- package/MediaDemo/assets/audio-poster.png +0 -0
- package/MediaDemo/components/Button.vue +69 -0
- package/MediaDemo/components/Controllor.vue +279 -0
- package/MediaDemo/components/StatusBar.vue +100 -0
- package/MediaDemo/components/frames/AudioFrame.vue +39 -0
- package/MediaDemo/components/frames/AudioPoster.vue +48 -0
- package/MediaDemo/components/frames/MediaFrame.vue +153 -0
- package/MediaDemo/components/frames/VideoFrame.vue +39 -0
- package/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
- package/MetroWidgetDemos/Advanced/widgets/Item.vue +5 -5
- package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +2 -2
- package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +57 -56
- package/MetroWidgetDemos/Item.vue +4 -5
- package/MetroWidgetDemos/PerformanceTest/App.vue +3 -3
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +15 -15
- package/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
- package/MetroWidgetDemos/PingPong/TabItem.vue +2 -2
- package/MetroWidgetDemos/PingPong/ViewSwiper.vue +9 -9
- package/MetroWidgetDemos/Simple/RelativeTemplate.vue +2 -2
- package/MetroWidgetDemos/WidgetItem.vue +2 -2
- package/NinePatchDemo/App.vue +3 -3
- package/NinePatchDemo/Item.vue +5 -5
- package/Preload/App.vue +5 -5
- package/Preload/Item.vue +1 -1
- package/QrcodeDemo/App.vue +3 -3
- package/ScaleDownNeon/App.vue +9 -9
- package/SoundPool/App.vue +6 -9
- package/SprayView/App.vue +22 -22
- package/SpriteImage/App.vue +4 -4
- package/Swiper/App.vue +2 -8
- package/TextBox/App.vue +1 -2
- package/TextBox/RenderCenter.vue +16 -16
- package/TextBox/RenderLeft.vue +16 -16
- package/TextBox/RenderOneLine.vue +12 -12
- package/TextBox/RenderRight.vue +16 -16
- package/TextShadowDemo/App.vue +4 -4
- package/TextureAnimation/App.vue +1 -17
- package/TextureAnimation/App2.vue +3 -3
- package/TextureSize/App.vue +8 -8
- package/ThrowMoveDemo/AccelerateDemo.vue +4 -4
- package/ThrowMoveDemo/LRParabolicDemo.vue +4 -4
- package/ThrowMoveDemo/TargetDemo.vue +4 -4
- package/ThrowMoveDemo/UDParabolicDemo.vue +4 -4
- package/TouchSample/App.vue +2 -2
- package/TouchSample/Item.vue +2 -2
- package/TouchSample/MetroWidgetHorizontal.vue +3 -3
- package/TouchSample/MetroWidgetVertical.vue +3 -3
- package/TouchSample/TouchContainerHorizontal.vue +2 -2
- package/TouchSample/TouchContainerVertical.vue +2 -2
- package/TransitPage/App.vue +1 -1
- package/VideoDemo/App.vue +4 -4
- package/VideoDemo/components/Button.vue +1 -1
- package/VideoDemo/components/Controllor.vue +2 -2
- package/VideoDemo/components/VideoFrame.vue +1 -1
- package/VisibleSensorDemo/App.vue +7 -7
- package/assets/bmpDemo.bmp +0 -0
- package/assets/jpegDemo.jpeg +0 -0
- package/assets/pngDemo.png +0 -0
- package/assets/pngNoAlphaDemo.png +0 -0
- package/assets/webpDemo.webp +0 -0
- package/package.json +6 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
props: {
|
|
4
|
+
data: Object,
|
|
5
|
+
query: Object,
|
|
6
|
+
onEdge: Function,
|
|
7
|
+
onAction: Object,
|
|
8
|
+
},
|
|
9
|
+
methods: {
|
|
10
|
+
onFocus() {
|
|
11
|
+
this.focus = true;
|
|
12
|
+
},
|
|
13
|
+
onBlur() {
|
|
14
|
+
this.focus = false;
|
|
15
|
+
},
|
|
16
|
+
onClick() {
|
|
17
|
+
console.log("item click");
|
|
18
|
+
},
|
|
19
|
+
getStyle() {
|
|
20
|
+
const width = this.focus
|
|
21
|
+
? (this.data.blocks.w - 10) * (1 / 0.8)
|
|
22
|
+
: this.data.blocks.w - 10;
|
|
23
|
+
const height = this.focus
|
|
24
|
+
? (this.data.blocks.h - 10) * (1 / 0.8)
|
|
25
|
+
: this.data.blocks.h - 10;
|
|
26
|
+
const posx = this.focus ? (this.data.blocks.w - 10 - width) / 2 : 0;
|
|
27
|
+
const posy = this.focus ? (this.data.blocks.h - 10 - height) / 2 : 0;
|
|
28
|
+
return {
|
|
29
|
+
left: posx,
|
|
30
|
+
top: posy,
|
|
31
|
+
width: width,
|
|
32
|
+
height: height,
|
|
33
|
+
color: "#FFFFFF",
|
|
34
|
+
backgroundColor: this.focus ? "#FF0000" : this.data.color,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
focus: false,
|
|
41
|
+
anim: null,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
created() {
|
|
45
|
+
this.onAction.register("onFocus", this.onFocus);
|
|
46
|
+
this.onAction.register("onBlur", this.onBlur);
|
|
47
|
+
this.onAction.register("onClick", this.onClick);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<div :style="{ ...getStyle() }">
|
|
54
|
+
{{ data.content }}
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<style scoped></style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-06-10 14:17:17
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-10-18 14:14:05
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import { Options, Vue, setup } from "vue-class-component";
|
|
10
|
+
import posterHolder from "../assets/holder_logo.png";
|
|
11
|
+
import couponLeft from "../assets/coupon_left.png";
|
|
12
|
+
import couponRight from "../assets/coupon_right.png";
|
|
13
|
+
import couponMid from "../assets/coupon_mid.png";
|
|
14
|
+
import borderLeft from "../assets/line_left.png";
|
|
15
|
+
import borderMid from "../assets/line_mid.png";
|
|
16
|
+
import borderRight from "../assets/line_right.png";
|
|
17
|
+
|
|
18
|
+
@Options({
|
|
19
|
+
props: {
|
|
20
|
+
data: Object,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
class ContentItem extends Vue {
|
|
24
|
+
constructor(props) {
|
|
25
|
+
super(props);
|
|
26
|
+
// console.log("cchtest2 ContentItem constructor " + new Date().getTime());
|
|
27
|
+
this.setup = setup(() => {
|
|
28
|
+
return {
|
|
29
|
+
posterHolder,
|
|
30
|
+
couponLeft,
|
|
31
|
+
couponMid,
|
|
32
|
+
couponRight,
|
|
33
|
+
borderLeft,
|
|
34
|
+
borderMid,
|
|
35
|
+
borderRight,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
created() {}
|
|
41
|
+
|
|
42
|
+
get savePrizeWidth() {
|
|
43
|
+
return 10 * this.data.savePrize.length + 26;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
get soldTotalWidth() {
|
|
47
|
+
let width = 44 + 22; //base width;
|
|
48
|
+
if (this.data.soldTotal >= 10000) {
|
|
49
|
+
let text = parseInt(this.data.soldTotal / 10000) + "";
|
|
50
|
+
width += text.length * 12 + 22;
|
|
51
|
+
} else {
|
|
52
|
+
width += (this.data.soldTotal + "").length * 12;
|
|
53
|
+
}
|
|
54
|
+
return width;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get soldTotalText() {
|
|
58
|
+
let text = "";
|
|
59
|
+
if (this.data.soldTotal >= 10000) {
|
|
60
|
+
text = parseInt(this.data.soldTotal / 10000) + "万";
|
|
61
|
+
} else {
|
|
62
|
+
text = this.data.soldTotal;
|
|
63
|
+
}
|
|
64
|
+
return text;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default ContentItem;
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<div class="frame-background">
|
|
73
|
+
<div class="poster-holder">
|
|
74
|
+
<div
|
|
75
|
+
:style="{
|
|
76
|
+
width: 107,
|
|
77
|
+
height: 23,
|
|
78
|
+
left: 53,
|
|
79
|
+
top: 95,
|
|
80
|
+
backgroundImage: setup.posterHolder,
|
|
81
|
+
}"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<div
|
|
85
|
+
class="poster"
|
|
86
|
+
:style="{
|
|
87
|
+
backgroundImage: `url(${data.pictUrl})`,
|
|
88
|
+
}"
|
|
89
|
+
/>
|
|
90
|
+
<div class="title-font title-layout">
|
|
91
|
+
{{ data.index + data.name }}
|
|
92
|
+
</div>
|
|
93
|
+
<div
|
|
94
|
+
:style="{
|
|
95
|
+
height: 24,
|
|
96
|
+
left: 13,
|
|
97
|
+
top: 256,
|
|
98
|
+
width: savePrizeWidth,
|
|
99
|
+
}"
|
|
100
|
+
>
|
|
101
|
+
<div
|
|
102
|
+
:style="{ width: 5, height: 24, backgroundImage: setup.couponLeft }"
|
|
103
|
+
/>
|
|
104
|
+
<div
|
|
105
|
+
:style="{
|
|
106
|
+
left: 5,
|
|
107
|
+
width: savePrizeWidth - 11,
|
|
108
|
+
height: 24,
|
|
109
|
+
backgroundImage: setup.couponMid,
|
|
110
|
+
}"
|
|
111
|
+
/>
|
|
112
|
+
<div
|
|
113
|
+
:style="{
|
|
114
|
+
left: savePrizeWidth - 6,
|
|
115
|
+
width: 5,
|
|
116
|
+
height: 24,
|
|
117
|
+
backgroundImage: setup.couponRight,
|
|
118
|
+
}"
|
|
119
|
+
/>
|
|
120
|
+
<div
|
|
121
|
+
class="ticket-text"
|
|
122
|
+
:style="{
|
|
123
|
+
width: savePrizeWidth,
|
|
124
|
+
}"
|
|
125
|
+
>
|
|
126
|
+
{{ `${data.savePrize}元券` }}
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div
|
|
131
|
+
:style="{
|
|
132
|
+
top: 256,
|
|
133
|
+
left: 27 + savePrizeWidth,
|
|
134
|
+
}"
|
|
135
|
+
>
|
|
136
|
+
<div
|
|
137
|
+
:style="{ width: 7, height: 25, backgroundImage: setup.borderLeft }"
|
|
138
|
+
/>
|
|
139
|
+
<div
|
|
140
|
+
:style="{
|
|
141
|
+
left: 7,
|
|
142
|
+
width: soldTotalWidth - 13,
|
|
143
|
+
height: 25,
|
|
144
|
+
backgroundImage: setup.borderMid,
|
|
145
|
+
}"
|
|
146
|
+
/>
|
|
147
|
+
<div
|
|
148
|
+
:style="{
|
|
149
|
+
left: soldTotalWidth - 7,
|
|
150
|
+
width: 7,
|
|
151
|
+
height: 25,
|
|
152
|
+
backgroundImage: setup.borderRight,
|
|
153
|
+
}"
|
|
154
|
+
/>
|
|
155
|
+
<div
|
|
156
|
+
class="sold-text"
|
|
157
|
+
:style="{
|
|
158
|
+
width: soldTotalWidth,
|
|
159
|
+
}"
|
|
160
|
+
>
|
|
161
|
+
{{ `已售${soldTotalText}件` }}
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div
|
|
166
|
+
:style="{
|
|
167
|
+
height: 24,
|
|
168
|
+
left: 13,
|
|
169
|
+
top: 270,
|
|
170
|
+
width: savePrizeWidth,
|
|
171
|
+
}"
|
|
172
|
+
>
|
|
173
|
+
<div
|
|
174
|
+
:style="{ width: 5, height: 24, backgroundImage: setup.couponLeft }"
|
|
175
|
+
/>
|
|
176
|
+
<div
|
|
177
|
+
:style="{
|
|
178
|
+
left: 5,
|
|
179
|
+
width: savePrizeWidth - 11,
|
|
180
|
+
height: 24,
|
|
181
|
+
backgroundImage: setup.couponMid,
|
|
182
|
+
}"
|
|
183
|
+
/>
|
|
184
|
+
<div
|
|
185
|
+
:style="{
|
|
186
|
+
left: savePrizeWidth - 6,
|
|
187
|
+
width: 5,
|
|
188
|
+
height: 24,
|
|
189
|
+
backgroundImage: setup.couponRight,
|
|
190
|
+
}"
|
|
191
|
+
/>
|
|
192
|
+
<div
|
|
193
|
+
class="ticket-text"
|
|
194
|
+
:style="{
|
|
195
|
+
width: savePrizeWidth,
|
|
196
|
+
}"
|
|
197
|
+
>
|
|
198
|
+
{{ `${data.savePrize}元券` }}
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
<div
|
|
202
|
+
:style="{
|
|
203
|
+
top: 270,
|
|
204
|
+
left: 27 + savePrizeWidth,
|
|
205
|
+
}"
|
|
206
|
+
>
|
|
207
|
+
<div
|
|
208
|
+
:style="{ width: 7, height: 25, backgroundImage: setup.borderLeft }"
|
|
209
|
+
/>
|
|
210
|
+
<div
|
|
211
|
+
:style="{
|
|
212
|
+
left: 7,
|
|
213
|
+
width: soldTotalWidth - 13,
|
|
214
|
+
height: 25,
|
|
215
|
+
backgroundImage: setup.borderMid,
|
|
216
|
+
}"
|
|
217
|
+
/>
|
|
218
|
+
<div
|
|
219
|
+
:style="{
|
|
220
|
+
left: soldTotalWidth - 7,
|
|
221
|
+
width: 7,
|
|
222
|
+
height: 25,
|
|
223
|
+
backgroundImage: setup.borderRight,
|
|
224
|
+
}"
|
|
225
|
+
/>
|
|
226
|
+
<div
|
|
227
|
+
class="sold-text"
|
|
228
|
+
:style="{
|
|
229
|
+
width: soldTotalWidth,
|
|
230
|
+
}"
|
|
231
|
+
>
|
|
232
|
+
{{ `已售${soldTotalText}件` }}
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div
|
|
237
|
+
:style="{
|
|
238
|
+
height: 24,
|
|
239
|
+
left: 13,
|
|
240
|
+
top: 280,
|
|
241
|
+
width: savePrizeWidth,
|
|
242
|
+
}"
|
|
243
|
+
>
|
|
244
|
+
<div
|
|
245
|
+
:style="{ width: 5, height: 24, backgroundImage: setup.couponLeft }"
|
|
246
|
+
/>
|
|
247
|
+
<div
|
|
248
|
+
:style="{
|
|
249
|
+
left: 5,
|
|
250
|
+
width: savePrizeWidth - 11,
|
|
251
|
+
height: 24,
|
|
252
|
+
backgroundImage: setup.couponMid,
|
|
253
|
+
}"
|
|
254
|
+
/>
|
|
255
|
+
<div
|
|
256
|
+
:style="{
|
|
257
|
+
left: savePrizeWidth - 6,
|
|
258
|
+
width: 5,
|
|
259
|
+
height: 24,
|
|
260
|
+
backgroundImage: setup.couponRight,
|
|
261
|
+
}"
|
|
262
|
+
/>
|
|
263
|
+
<div
|
|
264
|
+
class="ticket-text"
|
|
265
|
+
:style="{
|
|
266
|
+
width: savePrizeWidth,
|
|
267
|
+
}"
|
|
268
|
+
>
|
|
269
|
+
{{ `${data.savePrize}元券` }}
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
<div
|
|
273
|
+
:style="{
|
|
274
|
+
top: 280,
|
|
275
|
+
left: 27 + savePrizeWidth,
|
|
276
|
+
}"
|
|
277
|
+
>
|
|
278
|
+
<div
|
|
279
|
+
:style="{ width: 7, height: 25, backgroundImage: setup.borderLeft }"
|
|
280
|
+
/>
|
|
281
|
+
<div
|
|
282
|
+
:style="{
|
|
283
|
+
left: 7,
|
|
284
|
+
width: soldTotalWidth - 13,
|
|
285
|
+
height: 25,
|
|
286
|
+
backgroundImage: setup.borderMid,
|
|
287
|
+
}"
|
|
288
|
+
/>
|
|
289
|
+
<div
|
|
290
|
+
:style="{
|
|
291
|
+
left: soldTotalWidth - 7,
|
|
292
|
+
width: 7,
|
|
293
|
+
height: 25,
|
|
294
|
+
backgroundImage: setup.borderRight,
|
|
295
|
+
}"
|
|
296
|
+
/>
|
|
297
|
+
<div
|
|
298
|
+
class="sold-text"
|
|
299
|
+
:style="{
|
|
300
|
+
width: soldTotalWidth,
|
|
301
|
+
}"
|
|
302
|
+
>
|
|
303
|
+
{{ `已售${soldTotalText}件` }}
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<div class="prize-title-font prize-title-layout">券后</div>
|
|
308
|
+
<div class="prize-font">
|
|
309
|
+
{{ `¥${data.prize - data.savePrize}` }}
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</template>
|
|
313
|
+
|
|
314
|
+
<style scoped>
|
|
315
|
+
.frame-background {
|
|
316
|
+
width: 213;
|
|
317
|
+
height: 337;
|
|
318
|
+
border-radius: 10 10 10 10;
|
|
319
|
+
background-color: #f7f7f4;
|
|
320
|
+
transition: transform 0.2s linear;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.poster-holder {
|
|
324
|
+
width: 213;
|
|
325
|
+
height: 213;
|
|
326
|
+
border-radius: 10 10 0 0;
|
|
327
|
+
background-color: #cfcac6;
|
|
328
|
+
}
|
|
329
|
+
.poster {
|
|
330
|
+
width: 213;
|
|
331
|
+
height: 213;
|
|
332
|
+
border-radius: 7 7 0 0;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.title-font {
|
|
336
|
+
font-size: 21;
|
|
337
|
+
color: #73665c;
|
|
338
|
+
line-height: 29;
|
|
339
|
+
overflow: hidden;
|
|
340
|
+
white-space: nowrap;
|
|
341
|
+
text-overflow: ellipsis;
|
|
342
|
+
text-align: center;
|
|
343
|
+
}
|
|
344
|
+
.title-layout {
|
|
345
|
+
top: 221;
|
|
346
|
+
left: 13;
|
|
347
|
+
width: 193;
|
|
348
|
+
height: 29;
|
|
349
|
+
}
|
|
350
|
+
.ticket-text {
|
|
351
|
+
height: 24;
|
|
352
|
+
color: #ffffff;
|
|
353
|
+
font-size: 16;
|
|
354
|
+
text-align: center;
|
|
355
|
+
line-height: 24;
|
|
356
|
+
}
|
|
357
|
+
.sold-text {
|
|
358
|
+
height: 25;
|
|
359
|
+
color: #ff7a00;
|
|
360
|
+
font-size: 20;
|
|
361
|
+
text-align: center;
|
|
362
|
+
line-height: 25;
|
|
363
|
+
}
|
|
364
|
+
.prize-title-layout {
|
|
365
|
+
width: 35;
|
|
366
|
+
height: 24;
|
|
367
|
+
top: 296;
|
|
368
|
+
left: 13;
|
|
369
|
+
}
|
|
370
|
+
.prize-title-font {
|
|
371
|
+
color: #de2825;
|
|
372
|
+
text-align: center;
|
|
373
|
+
font-size: 17;
|
|
374
|
+
line-height: 24;
|
|
375
|
+
}
|
|
376
|
+
.prize-font {
|
|
377
|
+
top: 289;
|
|
378
|
+
left: 53;
|
|
379
|
+
width: 158; /*213 - 55*/
|
|
380
|
+
height: 37;
|
|
381
|
+
line-height: 37;
|
|
382
|
+
font-size: 28;
|
|
383
|
+
color: #de2825;
|
|
384
|
+
}
|
|
385
|
+
</style>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-29 16:13:35
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-09-29 17:07:19
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import { ref } from "vue";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
props: {
|
|
13
|
+
name: String,
|
|
14
|
+
onEdgeDown: Function,
|
|
15
|
+
onItemFocus: Function,
|
|
16
|
+
},
|
|
17
|
+
setup() {
|
|
18
|
+
let activeId = ref(0);
|
|
19
|
+
let focused = ref(false);
|
|
20
|
+
return {
|
|
21
|
+
activeId,
|
|
22
|
+
focused,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
tab1Class() {
|
|
27
|
+
if (this.activeId == 0) {
|
|
28
|
+
return this.focused
|
|
29
|
+
? "text-active item-focused"
|
|
30
|
+
: "text-active item-normal";
|
|
31
|
+
} else {
|
|
32
|
+
return "text-normal item-normal";
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
tab2Class() {
|
|
36
|
+
if (this.activeId == 1) {
|
|
37
|
+
return this.focused
|
|
38
|
+
? "text-active item-focused"
|
|
39
|
+
: "text-active item-normal";
|
|
40
|
+
} else {
|
|
41
|
+
return "text-normal item-normal";
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
tab3Class() {
|
|
45
|
+
if (this.activeId == 2) {
|
|
46
|
+
return this.focused
|
|
47
|
+
? "text-active item-focused"
|
|
48
|
+
: "text-active item-normal";
|
|
49
|
+
} else {
|
|
50
|
+
return "text-normal item-normal";
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
onKeyDown(ev) {
|
|
56
|
+
switch (ev.keyCode) {
|
|
57
|
+
case 37:
|
|
58
|
+
this.activeId--;
|
|
59
|
+
if (this.activeId < 0) {
|
|
60
|
+
this.activeId = 2;
|
|
61
|
+
}
|
|
62
|
+
this.onItemFocus(this.activeId);
|
|
63
|
+
break;
|
|
64
|
+
case 39:
|
|
65
|
+
this.activeId++;
|
|
66
|
+
if (this.activeId > 2) {
|
|
67
|
+
this.activeId = 0;
|
|
68
|
+
}
|
|
69
|
+
this.onItemFocus(this.activeId);
|
|
70
|
+
break;
|
|
71
|
+
case 40:
|
|
72
|
+
this.onEdgeDown();
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
onFocus() {
|
|
77
|
+
this.focused = true;
|
|
78
|
+
},
|
|
79
|
+
onBlur() {
|
|
80
|
+
this.focused = false;
|
|
81
|
+
},
|
|
82
|
+
getOnAction() {
|
|
83
|
+
return {
|
|
84
|
+
onKeyDown: this.onKeyDown,
|
|
85
|
+
onFocus: this.onFocus,
|
|
86
|
+
onBlur: this.onBlur,
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<template>
|
|
94
|
+
<jsv-focus-block :name="name" :onAction="getOnAction()"></jsv-focus-block>
|
|
95
|
+
<div :class="tab1Class">Tab1</div>
|
|
96
|
+
<div :class="tab2Class" :style="{ left: 220 }">Tab2</div>
|
|
97
|
+
<div :class="tab3Class" :style="{ left: 440 }">Tab3</div>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<style scoped>
|
|
101
|
+
.text-normal {
|
|
102
|
+
width: 200;
|
|
103
|
+
height: 50;
|
|
104
|
+
line-height: 50;
|
|
105
|
+
color: #444444;
|
|
106
|
+
font-size: 25;
|
|
107
|
+
text-align: center;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.text-active {
|
|
111
|
+
width: 200;
|
|
112
|
+
height: 50;
|
|
113
|
+
line-height: 50;
|
|
114
|
+
color: #ffffff;
|
|
115
|
+
font-size: 25;
|
|
116
|
+
text-align: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.item-focused {
|
|
120
|
+
width: 200;
|
|
121
|
+
height: 50;
|
|
122
|
+
background-color: #008080;
|
|
123
|
+
}
|
|
124
|
+
.item-normal {
|
|
125
|
+
width: 200;
|
|
126
|
+
height: 50;
|
|
127
|
+
background-color: #87CECB;
|
|
128
|
+
}
|
|
129
|
+
</style>
|