@shijiu/jsview-vue-samples 1.9.888 → 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,124 @@
|
|
|
1
|
+
// const data = [
|
|
2
|
+
// {
|
|
3
|
+
// blocks: {
|
|
4
|
+
// w: 200,
|
|
5
|
+
// h: 160
|
|
6
|
+
// },
|
|
7
|
+
// focusable: true,
|
|
8
|
+
// color: "#000022",
|
|
9
|
+
// content: 0
|
|
10
|
+
// },
|
|
11
|
+
// {
|
|
12
|
+
// blocks: {
|
|
13
|
+
// w: 200,
|
|
14
|
+
// h: 160
|
|
15
|
+
// },
|
|
16
|
+
// focusable: true,
|
|
17
|
+
// color: "#003300",
|
|
18
|
+
// content: 1
|
|
19
|
+
// },
|
|
20
|
+
// {
|
|
21
|
+
// blocks: {
|
|
22
|
+
// w: 200,
|
|
23
|
+
// h: 160
|
|
24
|
+
// },
|
|
25
|
+
// focusable: true,
|
|
26
|
+
// color: "#000044",
|
|
27
|
+
// content: 2
|
|
28
|
+
// },
|
|
29
|
+
// {
|
|
30
|
+
// blocks: {
|
|
31
|
+
// w: 400,
|
|
32
|
+
// h: 320
|
|
33
|
+
// },
|
|
34
|
+
// focusable: true,
|
|
35
|
+
// color: "#000055",
|
|
36
|
+
// content: 3
|
|
37
|
+
// },
|
|
38
|
+
// {
|
|
39
|
+
// blocks: {
|
|
40
|
+
// w: 200,
|
|
41
|
+
// h: 160
|
|
42
|
+
// },
|
|
43
|
+
// focusable: true,
|
|
44
|
+
// color: "#000066",
|
|
45
|
+
// content: 4
|
|
46
|
+
// },
|
|
47
|
+
// {
|
|
48
|
+
// blocks: {
|
|
49
|
+
// w: 200,
|
|
50
|
+
// h: 160
|
|
51
|
+
// },
|
|
52
|
+
// focusable: true,
|
|
53
|
+
// color: "#0000CD",
|
|
54
|
+
// content: 5
|
|
55
|
+
// },
|
|
56
|
+
// ];
|
|
57
|
+
|
|
58
|
+
// let content = 6;
|
|
59
|
+
// for (let i = 0; i < 10; i++) {
|
|
60
|
+
// data.push({
|
|
61
|
+
// blocks: {
|
|
62
|
+
// w: 200,
|
|
63
|
+
// h: 320
|
|
64
|
+
// },
|
|
65
|
+
// focusable: true,
|
|
66
|
+
// color: "#000022",
|
|
67
|
+
// content: content++
|
|
68
|
+
// });
|
|
69
|
+
// data.push({
|
|
70
|
+
// blocks: {
|
|
71
|
+
// w: 200,
|
|
72
|
+
// h: 160
|
|
73
|
+
// },
|
|
74
|
+
// focusable: true,
|
|
75
|
+
// color: "#003300",
|
|
76
|
+
// content: content++
|
|
77
|
+
// });
|
|
78
|
+
// }
|
|
79
|
+
|
|
80
|
+
let data1 = [];
|
|
81
|
+
|
|
82
|
+
// 添加300个模拟数据
|
|
83
|
+
for (let i = 0; i < 50; i++) {
|
|
84
|
+
data1.push(Object.freeze({
|
|
85
|
+
index: i,
|
|
86
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
87
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
88
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
89
|
+
savePrize: `${i}`,
|
|
90
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
91
|
+
pictUrl:
|
|
92
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let data2 = [];
|
|
97
|
+
for (let i = 0; i < 49; i++) {
|
|
98
|
+
data2.push(Object.freeze({
|
|
99
|
+
index: i,
|
|
100
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
101
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
102
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
103
|
+
savePrize: `${i}`,
|
|
104
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
105
|
+
pictUrl:
|
|
106
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
let data3 = [];
|
|
111
|
+
for (let i = 0; i < 48; i++) {
|
|
112
|
+
data3.push(Object.freeze({
|
|
113
|
+
index: i,
|
|
114
|
+
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
115
|
+
prize: `${Math.floor(Math.random() * 200) +
|
|
116
|
+
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
117
|
+
savePrize: `${i}`,
|
|
118
|
+
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
119
|
+
pictUrl:
|
|
120
|
+
"http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { data1, data2, data3 };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-01-14 18:18:00
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-01-26 17:35:26
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
props: ["data", "index"],
|
|
11
|
+
created() {},
|
|
12
|
+
mounted() {},
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div
|
|
18
|
+
ref="element"
|
|
19
|
+
:style="{
|
|
20
|
+
left: data.xPos,
|
|
21
|
+
top: data.yPos,
|
|
22
|
+
width: data.width,
|
|
23
|
+
height: data.height,
|
|
24
|
+
}"
|
|
25
|
+
>
|
|
26
|
+
<slot name="renderItem" :data="data.data"></slot>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-22 13:47:23
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-02-11 17:55:55
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import GridItem from "./GridItem.vue";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
props: {
|
|
13
|
+
data: Object,
|
|
14
|
+
height: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
width: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
measures: {
|
|
23
|
+
type: Function,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
components: {
|
|
28
|
+
GridItem,
|
|
29
|
+
},
|
|
30
|
+
created() {
|
|
31
|
+
this.configWidth = this.width;
|
|
32
|
+
this.configHeight = this.height;
|
|
33
|
+
|
|
34
|
+
// 通过measure函数,计算item信息
|
|
35
|
+
let measure_result = this.measures();
|
|
36
|
+
let current_line_x = 0;
|
|
37
|
+
let current_line_y = 0;
|
|
38
|
+
for (let idx = 0; idx < this.data.length; idx++) {
|
|
39
|
+
if (current_line_x + measure_result.width > this.configWidth) {
|
|
40
|
+
// new line
|
|
41
|
+
current_line_x = 0;
|
|
42
|
+
current_line_y += measure_result.height;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
this.itemData.push(
|
|
46
|
+
Object.freeze({
|
|
47
|
+
id: idx,
|
|
48
|
+
xPos: current_line_x,
|
|
49
|
+
yPos: current_line_y,
|
|
50
|
+
data: this.data[idx],
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// next item x
|
|
55
|
+
current_line_x += measure_result.width;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
setup() {
|
|
59
|
+
return {
|
|
60
|
+
configWidth: 0,
|
|
61
|
+
configHeight: 0,
|
|
62
|
+
itemData: [],
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
mounted() {},
|
|
66
|
+
updated() {},
|
|
67
|
+
};
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<template>
|
|
71
|
+
<div
|
|
72
|
+
:style="{ width: configWidth, height: configHeight, overflow: 'hidden' }"
|
|
73
|
+
>
|
|
74
|
+
<grid-item
|
|
75
|
+
v-for="(item, index) in itemData"
|
|
76
|
+
:key="item.id"
|
|
77
|
+
:index="index"
|
|
78
|
+
:data="item"
|
|
79
|
+
>
|
|
80
|
+
<template v-slot:renderItem="slotProps">
|
|
81
|
+
<slot name="renderItem" v-bind="slotProps"></slot>
|
|
82
|
+
</template>
|
|
83
|
+
</grid-item>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
@@ -39,7 +39,7 @@ const item_url =
|
|
|
39
39
|
|
|
40
40
|
@keyframes opacityDemo_CompositeOpacity {
|
|
41
41
|
from {
|
|
42
|
-
transform: translate3d(50%,
|
|
42
|
+
transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
|
|
43
43
|
rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
|
|
44
44
|
opacity: 0.1;
|
|
45
45
|
}
|
|
@@ -49,10 +49,10 @@ const item_url =
|
|
|
49
49
|
|
|
50
50
|
@keyframes opacityDemo_CompositeNoOpacity {
|
|
51
51
|
from {
|
|
52
|
-
transform: translate3d(50%,
|
|
52
|
+
transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
|
|
53
53
|
rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
|
|
54
54
|
}
|
|
55
55
|
to {
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
} ;
|
|
58
58
|
</style>
|
package/FilterDemo/App.vue
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref,
|
|
9
|
+
import { ref, reactive, onMounted } from "vue";
|
|
10
10
|
import { useRouter } from "vue-router";
|
|
11
11
|
import { jJsvRuntimeBridge, JsvFilterView } from "jsview";
|
|
12
|
-
import sample from "
|
|
13
|
-
import webpSample from "
|
|
12
|
+
import sample from "../assets/jpegDemo.jpeg";
|
|
13
|
+
import webpSample from "../assets/webpDemo.webp";
|
|
14
14
|
import AnimatePic from "./AnimatePic.vue";
|
|
15
15
|
import VideoLayer from "./VideoLayer.vue";
|
|
16
16
|
|
package/FlipCard/App.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
|
-
import { ref
|
|
3
|
+
import { ref } from "vue";
|
|
4
4
|
import { HORIZONTAL, MetroWidget } from "jsview";
|
|
5
5
|
import FlipCard from "./FlipCard.vue";
|
|
6
6
|
import { data } from "./data.js";
|
|
@@ -8,7 +8,7 @@ import redEgg from "./assets/red_egg.png";
|
|
|
8
8
|
import blueEgg from "./assets/blue_egg.png";
|
|
9
9
|
|
|
10
10
|
const name = "/flipCard";
|
|
11
|
-
const focusNode =
|
|
11
|
+
const focusNode = ref(null);
|
|
12
12
|
const router = useRouter();
|
|
13
13
|
|
|
14
14
|
const onKeyDown = (ev) => {
|
package/FlipCard/FlipCard.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref
|
|
2
|
+
import { ref } from "vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
initFlipped: Boolean,
|
|
5
5
|
width: Number,
|
|
@@ -18,7 +18,7 @@ let flipAnim = ref("");
|
|
|
18
18
|
let flipped = ref(props.initFlipped);
|
|
19
19
|
let focused = ref(false);
|
|
20
20
|
let keyLocked = false;
|
|
21
|
-
let focusNode =
|
|
21
|
+
let focusNode = ref(null);
|
|
22
22
|
|
|
23
23
|
const onFocus = () => {
|
|
24
24
|
focused.value = true;
|
package/GridDemo/Item.vue
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-10 15:21:24
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2023-02-16 16:25:06
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref,
|
|
9
|
+
import { ref, onUpdated, onMounted } from "vue";
|
|
10
10
|
|
|
11
11
|
const props = defineProps({
|
|
12
12
|
userData: Object,
|
|
@@ -24,16 +24,16 @@ const divNumber = new Array(50);
|
|
|
24
24
|
const blurAction = false;
|
|
25
25
|
|
|
26
26
|
const onFocus = () => {
|
|
27
|
-
console.log("item onfocus", props.userData);
|
|
27
|
+
// console.log("item onfocus", props.userData);
|
|
28
28
|
focused.value = true;
|
|
29
29
|
};
|
|
30
30
|
const onBlur = () => {
|
|
31
|
-
console.log(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
);
|
|
31
|
+
// console.log(
|
|
32
|
+
// "item onblur",
|
|
33
|
+
// props.userData,
|
|
34
|
+
// props.widgetData.getCurrentFocusId(),
|
|
35
|
+
// props.widgetData.dataIndex
|
|
36
|
+
// );
|
|
37
37
|
focused.value = false;
|
|
38
38
|
};
|
|
39
39
|
const onClick = () => {
|
|
@@ -45,10 +45,10 @@ props.onAction.register("onBlur", onBlur);
|
|
|
45
45
|
props.onAction.register("onClick", onClick);
|
|
46
46
|
|
|
47
47
|
onUpdated(() => {
|
|
48
|
-
console.log("item updated", props.userData, props.widgetData);
|
|
48
|
+
// console.log("item updated", props.userData, props.widgetData);
|
|
49
49
|
});
|
|
50
50
|
onMounted(() => {
|
|
51
|
-
console.log("item mounted", props.userData, props.widgetData);
|
|
51
|
+
// console.log("item mounted", props.userData, props.widgetData);
|
|
52
52
|
});
|
|
53
53
|
</script>
|
|
54
54
|
|
|
@@ -67,7 +67,7 @@ onMounted(() => {
|
|
|
67
67
|
:style="{
|
|
68
68
|
width: 100,
|
|
69
69
|
height: 50,
|
|
70
|
-
fontSize:
|
|
70
|
+
fontSize: 30,
|
|
71
71
|
color: '#FFFFFF',
|
|
72
72
|
}"
|
|
73
73
|
>
|
package/HashHistory/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref
|
|
2
|
+
import { ref } from "vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
style: Object,
|
|
5
5
|
name: String,
|
|
@@ -25,7 +25,7 @@ const itemStyle = {
|
|
|
25
25
|
height: props.style.height,
|
|
26
26
|
backgroundColor: "#0FF000",
|
|
27
27
|
lineHeight: props.style.height,
|
|
28
|
-
fontSize:
|
|
28
|
+
fontSize: Math.floor(props.style.height * 0.55),
|
|
29
29
|
};
|
|
30
30
|
</script>
|
|
31
31
|
|
|
@@ -50,7 +50,7 @@ const onBack = () => {
|
|
|
50
50
|
top: 100;
|
|
51
51
|
width: 1280;
|
|
52
52
|
height: 100;
|
|
53
|
-
line-height:
|
|
53
|
+
line-height: 100;
|
|
54
54
|
text-align: center;
|
|
55
55
|
font-size: 55;
|
|
56
56
|
}
|
|
@@ -59,7 +59,7 @@ const onBack = () => {
|
|
|
59
59
|
top: 330;
|
|
60
60
|
width: 1280;
|
|
61
61
|
height: 100;
|
|
62
|
-
line-height:
|
|
62
|
+
line-height: 100;
|
|
63
63
|
text-align: center;
|
|
64
64
|
font-size: 30;
|
|
65
65
|
}
|
package/ImpactStop/App.vue
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { jJsvRuntimeBridge } from "@shijiu/jsview-vue/utils/JsViewVueTools/JsvRuntimeBridge";
|
|
10
9
|
import {
|
|
11
10
|
JsvActorMoveControl,
|
|
12
11
|
JsvActorMove,
|
|
@@ -14,7 +13,7 @@ import {
|
|
|
14
13
|
createImpactCallback,
|
|
15
14
|
createImpactAutoFroze,
|
|
16
15
|
} from "jsview";
|
|
17
|
-
import {
|
|
16
|
+
import { shallowRef, computed, onMounted, onBeforeUnmount } from "vue";
|
|
18
17
|
import { useRouter } from "vue-router";
|
|
19
18
|
const router = useRouter();
|
|
20
19
|
const CONST_BOARD_LEFT = 0;
|
|
@@ -26,6 +25,7 @@ const CONST_BOX_HEIGHT = 30;
|
|
|
26
25
|
|
|
27
26
|
const horizontalControl = new JsvActorMoveControl();
|
|
28
27
|
const verticalControl = new JsvActorMoveControl();
|
|
28
|
+
|
|
29
29
|
const boxLeft = shallowRef(null);
|
|
30
30
|
const boxMid = shallowRef(null);
|
|
31
31
|
const boxRight = shallowRef(null);
|
|
@@ -42,9 +42,9 @@ const actorState = {
|
|
|
42
42
|
jumping: false,
|
|
43
43
|
hMoving: false,
|
|
44
44
|
};
|
|
45
|
-
const showPrecisionGuild =
|
|
46
|
-
const direction =
|
|
47
|
-
const bodyState =
|
|
45
|
+
const showPrecisionGuild = shallowRef(true);
|
|
46
|
+
const direction = shallowRef(1);
|
|
47
|
+
const bodyState = shallowRef(0);
|
|
48
48
|
const isJsView = Boolean(window.JsView);
|
|
49
49
|
|
|
50
50
|
const actorColor = computed(() => {
|
|
@@ -238,8 +238,6 @@ onMounted(() => {
|
|
|
238
238
|
);
|
|
239
239
|
|
|
240
240
|
reset();
|
|
241
|
-
|
|
242
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
243
241
|
});
|
|
244
242
|
|
|
245
243
|
onBeforeUnmount(() => {
|
|
@@ -263,8 +261,8 @@ onBeforeUnmount(() => {
|
|
|
263
261
|
v-if="isJsView"
|
|
264
262
|
:style="{
|
|
265
263
|
textAlign: 'center',
|
|
266
|
-
fontSize:
|
|
267
|
-
lineHeight:
|
|
264
|
+
fontSize: 30,
|
|
265
|
+
lineHeight: 50,
|
|
268
266
|
color: '#ffffff',
|
|
269
267
|
left: 100,
|
|
270
268
|
top: 20,
|
|
@@ -428,9 +426,9 @@ onBeforeUnmount(() => {
|
|
|
428
426
|
}
|
|
429
427
|
|
|
430
428
|
.text {
|
|
431
|
-
font-size:
|
|
429
|
+
font-size: 30;
|
|
432
430
|
color: #73665c;
|
|
433
|
-
line-height:
|
|
431
|
+
line-height: 40;
|
|
434
432
|
overflow: hidden;
|
|
435
433
|
white-space: nowrap;
|
|
436
434
|
text-overflow: ellipsis;
|
package/Input/InputPanel.vue
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-01-25 10:33:07
|
|
4
|
-
* @
|
|
5
|
-
* @LastEditTime: 2022-09-02 13:44:41
|
|
4
|
+
* @LastEditTime: 2023-02-01 13:46:07
|
|
6
5
|
* @Description: file content
|
|
7
6
|
-->
|
|
8
7
|
<script>
|
|
9
8
|
import FullKeyboard from "./FullKeyboard.vue";
|
|
10
9
|
import { EdgeDirection, JsvInput, useFocusHub } from "jsview";
|
|
11
|
-
import { ref
|
|
10
|
+
import { ref } from "vue";
|
|
12
11
|
|
|
13
12
|
const blurColor = "#AAAAAA";
|
|
14
13
|
const focusColor = "#FFFF00";
|
|
@@ -39,7 +38,6 @@ export default {
|
|
|
39
38
|
this.focusHub.setFocus(`${this.name}/keyboard`);
|
|
40
39
|
},
|
|
41
40
|
_onBlur() {
|
|
42
|
-
console.log("testtest onblur");
|
|
43
41
|
this.showCursor = false;
|
|
44
42
|
this.cursorColor = blurColor;
|
|
45
43
|
},
|
package/LongImage/App.vue
CHANGED
package/LongImage/Button.vue
CHANGED
package/LongImage/ButtonItem.vue
CHANGED
package/LongText/App.vue
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import LongTextScroll from "./LongTextScroll.vue";
|
|
28
28
|
import Button from "./Button.vue";
|
|
29
29
|
import { jJsvRuntimeBridge } from "jsview";
|
|
30
|
-
import { onMounted, ref
|
|
30
|
+
import { onMounted, ref } from "vue";
|
|
31
31
|
import { useRouter } from "vue-router";
|
|
32
32
|
|
|
33
33
|
const router = useRouter();
|
|
@@ -55,8 +55,8 @@ onMounted(() => {
|
|
|
55
55
|
<div
|
|
56
56
|
:style="{
|
|
57
57
|
textAlign: 'center',
|
|
58
|
-
fontSize:
|
|
59
|
-
lineHeight:
|
|
58
|
+
fontSize: 30,
|
|
59
|
+
lineHeight: 50,
|
|
60
60
|
color: '#ffffff',
|
|
61
61
|
left: 140,
|
|
62
62
|
top: 20,
|
package/LongText/Button.vue
CHANGED
package/LongText/ButtonItem.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Scroll from "./Scroll.vue";
|
|
3
|
-
import { ref,
|
|
3
|
+
import { ref, onMounted } from "vue";
|
|
4
4
|
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
step: Number,
|
|
@@ -10,8 +10,8 @@ const props = defineProps({
|
|
|
10
10
|
textStyle: Object,
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
const rootRef =
|
|
14
|
-
const element =
|
|
13
|
+
const rootRef = ref(null);
|
|
14
|
+
const element = ref(null);
|
|
15
15
|
const scrollY = ref(0);
|
|
16
16
|
const textY = ref(0);
|
|
17
17
|
|
|
@@ -77,7 +77,7 @@ onMounted(() => {
|
|
|
77
77
|
name="longTextScroll"
|
|
78
78
|
:onAction="onAction"
|
|
79
79
|
>
|
|
80
|
-
<div :style="{
|
|
80
|
+
<div :style="{ overflow: 'hidden', ...style }">
|
|
81
81
|
<div
|
|
82
82
|
ref="element"
|
|
83
83
|
:style="{ top: textY, width: style.width, ...textStyle }"
|
package/Marquee/longText.js
CHANGED
package/MaskClip/App.vue
CHANGED
|
@@ -45,7 +45,7 @@ onMounted(() => {
|
|
|
45
45
|
width: 1200,
|
|
46
46
|
height: 100,
|
|
47
47
|
color: '#FFFFFF',
|
|
48
|
-
fontSize:
|
|
48
|
+
fontSize: 30,
|
|
49
49
|
}"
|
|
50
50
|
>
|
|
51
51
|
原始图片通过四个拼图形状的遮罩切成四种形状以形成拼图效果
|
|
@@ -53,8 +53,8 @@ onMounted(() => {
|
|
|
53
53
|
<div
|
|
54
54
|
:style="{
|
|
55
55
|
textAlign: 'center',
|
|
56
|
-
fontSize:
|
|
57
|
-
lineHeight:
|
|
56
|
+
fontSize: 30,
|
|
57
|
+
lineHeight: 50,
|
|
58
58
|
color: '#ffffff',
|
|
59
59
|
left: 10,
|
|
60
60
|
top: 100,
|
|
@@ -119,4 +119,4 @@ onMounted(() => {
|
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
</jsv-focus-block>
|
|
122
|
-
</template>
|
|
122
|
+
</template>
|