@shijiu/jsview-vue-samples 2.1.25 → 2.1.200
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/Basic/components/div/DivBackground.vue +53 -24
- package/BreakRender/App.vue +69 -0
- package/BreakRender/Item.vue +77 -0
- package/BreakRender/assets/imageList.json +237 -0
- package/BreakRender/data.js +18 -0
- package/ClassDynamicSwitching/App.vue +83 -0
- package/ClassDynamicSwitching/components/ClassItem.vue +257 -0
- package/ClassDynamicSwitching/components/ClassShow.vue +78 -0
- package/ClassDynamicSwitching/components/StyleItem.vue +165 -0
- package/ClassDynamicSwitching/components/StyleShow.vue +68 -0
- package/DemoHomepage/router.js +67 -13
- package/DemoHomepage/views/Homepage.vue +13 -2
- package/DynamicClass/App.vue +115 -0
- package/DynamicClass/components/FloorItem.vue +55 -0
- package/DynamicClass/components/FloorList.vue +210 -0
- package/DynamicClass/style1.json +163 -0
- package/DynamicClass/style2.json +164 -0
- package/FilterDemo/App.vue +1 -1
- package/FocusMoveStyle/App.vue +10 -2
- package/FreeMove/App.vue +291 -0
- package/GetBoundingClientRect/App.vue +177 -0
- package/GiftRain/App.vue +3 -3
- package/JsvLine/App.vue +116 -0
- package/JsvLine/bgimage.jpg +0 -0
- package/JsvPreDownloader/App.vue +17 -10
- package/LatexDemo/App.vue +66 -0
- package/LatexFormula/App.vue +65 -0
- package/Marquee/App.vue +711 -183
- package/MetroWidgetDemos/PingPong/App.vue +0 -9
- package/MetroWidgetDemos/PingPong/AppPage.vue +2 -1
- package/MetroWidgetDemos/PingPong/WidgetItem.vue +0 -5
- package/MetroWidgetDemos/SkeletonDiagram/App.vue +3 -1
- package/MetroWidgetDemos/SkeletonDiagram/Item.vue +5 -0
- package/MetroWidgetDemos/itemSizeUpdate/App.vue +11 -4
- package/MetroWidgetDemos/itemSizeUpdate/backward/Backward.vue +6 -4
- package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +2 -25
- package/MetroWidgetDemos/itemSizeUpdate/center/Center.vue +6 -6
- package/MetroWidgetDemos/itemSizeUpdate/center/Item.vue +38 -49
- package/MetroWidgetDemos/itemSizeUpdate/stretch/App.vue +122 -0
- package/MetroWidgetDemos/itemSizeUpdate/stretch/Item.vue +105 -0
- package/MindMap/App.vue +61 -0
- package/MindMap/Item.vue +40 -0
- package/MindMap/data.js +86 -0
- package/Preload/App.vue +25 -18
- package/Preload/Item.vue +1 -1
- package/Preload/data.js +12 -12
- package/Preload/images/bg_btn.png +0 -0
- package/Preload/images/bg_btn_focus.png +0 -0
- package/Preload/images/btn_cancle.png +0 -0
- package/Preload/images/btn_ok.png +0 -0
- package/Preload/images/tease.png +0 -0
- package/Preload/images/tease_lock.png +0 -0
- package/SecTorTest/App.vue +106 -0
- package/TextureStoreTest/App.vue +168 -0
- package/VisibleSensorDemo/App.vue +38 -18
- package/package.json +1 -1
- package/Preload/images/rank.png +0 -0
- package/Preload/images/rank_focus.png +0 -0
- package/Preload/images/rule.png +0 -0
- package/Preload/images/rule_focus.png +0 -0
- package/Preload/images/start.png +0 -0
- package/Preload/images/start_focus.png +0 -0
package/JsvLine/App.vue
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bgStyle">
|
|
3
|
+
<JsvLine :startPos="startPos1" :endPos="endPos1" :lineWidth="2" :backgroundColor="'#FF1213'" ></JsvLine>
|
|
4
|
+
<div class="text text1">竖线不带圆角</div>
|
|
5
|
+
<JsvLine :startPos="startPos2" :endPos="endPos2" :lineWidth="3" :backgroundColor="'#FF1213'" :borderRadius="10"></JsvLine>
|
|
6
|
+
<div class="text text2">斜线带圆角</div>
|
|
7
|
+
<JsvLine :startPos="startPos3" :endPos="endPos3" :lineWidth="5" :backgroundColor="'#22F142'" :borderRadius="10" :appear="'fadeIn'"></JsvLine>
|
|
8
|
+
<div class="text text3">斜线带圆角淡入</div>
|
|
9
|
+
<JsvLine :startPos="startPos4" :endPos="endPos4" :lineWidth="6" :backgroundColor="'#22F142'" :borderRadius="10" :appear="'fadeOut'"></JsvLine>
|
|
10
|
+
<div class="text text4">斜线带圆角淡出</div>
|
|
11
|
+
<JsvLine :startPos="startPos5" :endPos="endPos5" :lineWidth="40" :backgroundImage="bg" :borderRadius="20" ></JsvLine>
|
|
12
|
+
<div class="text text5">带圆角背景图</div>
|
|
13
|
+
<JsvLine :startPos="startPos6" :endPos="endPos6" :lineWidth="30" :backgroundImage="'linear-gradient(to left bottom, rgba(255, 0, 0, 1), rgba(0, 255, 0, 1), rgba(0, 0, 255, 1))'" :borderRadius="20" ></JsvLine>
|
|
14
|
+
<div class="text text6">带圆角渐变色</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { JsvLine } from "jsview"
|
|
20
|
+
import bg from "./bgimage.jpg"
|
|
21
|
+
|
|
22
|
+
const startPos1={
|
|
23
|
+
x:340,
|
|
24
|
+
y:40
|
|
25
|
+
}
|
|
26
|
+
const endPos1={
|
|
27
|
+
x:340,
|
|
28
|
+
y:160
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const startPos2={
|
|
32
|
+
x:840,
|
|
33
|
+
y:150
|
|
34
|
+
}
|
|
35
|
+
const endPos2={
|
|
36
|
+
x:1040,
|
|
37
|
+
y:50
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const startPos3={
|
|
41
|
+
x:340,
|
|
42
|
+
y:300
|
|
43
|
+
}
|
|
44
|
+
const endPos3={
|
|
45
|
+
x:560,
|
|
46
|
+
y:400
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const startPos4={
|
|
50
|
+
x:760,
|
|
51
|
+
y:400
|
|
52
|
+
}
|
|
53
|
+
const endPos4={
|
|
54
|
+
x:980,
|
|
55
|
+
y:300
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const startPos5={
|
|
59
|
+
x:240,
|
|
60
|
+
y:550
|
|
61
|
+
}
|
|
62
|
+
const endPos5={
|
|
63
|
+
x:500,
|
|
64
|
+
y:520
|
|
65
|
+
}
|
|
66
|
+
const startPos6={
|
|
67
|
+
x:840,
|
|
68
|
+
y:520
|
|
69
|
+
}
|
|
70
|
+
const endPos6={
|
|
71
|
+
x:1100,
|
|
72
|
+
y:550
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" scoped>
|
|
77
|
+
.bgStyle {
|
|
78
|
+
width:1280;
|
|
79
|
+
height:720;
|
|
80
|
+
background-color: #007788;
|
|
81
|
+
}
|
|
82
|
+
.text{
|
|
83
|
+
width:180;
|
|
84
|
+
height:30;
|
|
85
|
+
background-color: #000000;
|
|
86
|
+
line-height: 30;
|
|
87
|
+
font-size: 24;
|
|
88
|
+
font-weight: bold;
|
|
89
|
+
color:#FFFFFF;
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
92
|
+
.text1{
|
|
93
|
+
top:200;
|
|
94
|
+
left:240;
|
|
95
|
+
}
|
|
96
|
+
.text2{
|
|
97
|
+
top:200;
|
|
98
|
+
left:840
|
|
99
|
+
}
|
|
100
|
+
.text3{
|
|
101
|
+
top:430;
|
|
102
|
+
left:340;
|
|
103
|
+
}
|
|
104
|
+
.text4{
|
|
105
|
+
top:430;
|
|
106
|
+
left:780;
|
|
107
|
+
}
|
|
108
|
+
.text5{
|
|
109
|
+
top: 620;
|
|
110
|
+
left:280;
|
|
111
|
+
}
|
|
112
|
+
.text6{
|
|
113
|
+
top:620;
|
|
114
|
+
left:860
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
Binary file
|
package/JsvPreDownloader/App.vue
CHANGED
|
@@ -5,6 +5,7 @@ import { useRouter } from "vue-router";
|
|
|
5
5
|
|
|
6
6
|
const router = useRouter();
|
|
7
7
|
|
|
8
|
+
const downloader = new JsvPreDownloader();
|
|
8
9
|
const single =
|
|
9
10
|
"https://img14.360buyimg.com/pop/jfs/t1/144284/20/31579/61411/636f2df0E01dfe716/dd4b1c7471613493.jpg";
|
|
10
11
|
|
|
@@ -17,14 +18,21 @@ const list = [
|
|
|
17
18
|
url: "https://img14.360buyimg.com/pop/jfs/t1/149715/39/27762/70633/637588eeEaaf57540/8a2b507dd6effe91.jpg",
|
|
18
19
|
isImage: true,
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
downloader.buildDownloadItem(
|
|
22
|
+
"https://img14.360buyimg.com/pop/jfs/t1/179091/36/28087/35197/632873cbE8079c6b0/d6f86f1b1d5f112d.jpg",
|
|
23
|
+
"",
|
|
24
|
+
true
|
|
25
|
+
),
|
|
24
26
|
{
|
|
25
27
|
url: "https://img14.360buyimg.com/pop/jfs/t1/145574/2/28766/47462/636f3023E756c7cf4/e1e898525109d0ea.jpg",
|
|
26
28
|
isImage: false,
|
|
27
29
|
},
|
|
30
|
+
{
|
|
31
|
+
url:null,
|
|
32
|
+
isImage:false
|
|
33
|
+
},
|
|
34
|
+
downloader.buildDownloadItem(null),
|
|
35
|
+
null
|
|
28
36
|
];
|
|
29
37
|
|
|
30
38
|
const singleRef = ref(1);
|
|
@@ -35,7 +43,6 @@ const listRef = reactive(
|
|
|
35
43
|
})
|
|
36
44
|
);
|
|
37
45
|
|
|
38
|
-
const downloader = new JsvPreDownloader();
|
|
39
46
|
downloader.download(single, "", true).then(
|
|
40
47
|
(info) => {
|
|
41
48
|
console.log("download single success", info);
|
|
@@ -113,13 +120,13 @@ const onKeyDown = (ev) => {
|
|
|
113
120
|
|
|
114
121
|
<div :style="{ left: 10, top: 210 }">
|
|
115
122
|
<div class="describe">{{ "多文件下载\n(第一个空链接)" }}</div>
|
|
116
|
-
<div :style="{ left:
|
|
123
|
+
<div :style="{ left: 0,top:90 }">
|
|
117
124
|
<div
|
|
118
125
|
v-for="(item, index) in listRef"
|
|
119
126
|
:key="index"
|
|
120
127
|
class="block"
|
|
121
128
|
:style="{
|
|
122
|
-
left:
|
|
129
|
+
left: 180 * index,
|
|
123
130
|
}"
|
|
124
131
|
>
|
|
125
132
|
{{ `${stateToText(item.state)} \n ${item.extra}` }}
|
|
@@ -131,7 +138,7 @@ const onKeyDown = (ev) => {
|
|
|
131
138
|
|
|
132
139
|
<style scoped>
|
|
133
140
|
.describe {
|
|
134
|
-
width:
|
|
141
|
+
width: 300;
|
|
135
142
|
height: 150;
|
|
136
143
|
color: #ffffff;
|
|
137
144
|
font-size: 30;
|
|
@@ -140,11 +147,11 @@ const onKeyDown = (ev) => {
|
|
|
140
147
|
overflow: hidden;
|
|
141
148
|
}
|
|
142
149
|
.block {
|
|
143
|
-
width:
|
|
150
|
+
width: 170;
|
|
144
151
|
height: 150;
|
|
145
152
|
background-color: #888888;
|
|
146
153
|
color: #000000;
|
|
147
|
-
font-size:
|
|
154
|
+
font-size: 24;
|
|
148
155
|
white-space: pre-wrap;
|
|
149
156
|
text-overflow: clip;
|
|
150
157
|
overflow: hidden;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { JsvTextBox } from "jsview";
|
|
3
|
+
|
|
4
|
+
//TODO left, top, width, height无法通过class传递, 待调查
|
|
5
|
+
const baseStyle = {
|
|
6
|
+
left: 50,
|
|
7
|
+
width: 1000,
|
|
8
|
+
height: 50,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//TODO 此字符串直接写在双花括号内编译出错, 待调查
|
|
12
|
+
const text = "测试\\textcolor{#FF0000}{红色并且\\textb{加粗}}文字";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div :style="{ width: 1920, height: 1080, backgroundColor: '#007788' }"></div>
|
|
17
|
+
<jsv-text-box
|
|
18
|
+
:enableLatex="true"
|
|
19
|
+
:style="{ top: 50, ...baseStyle }"
|
|
20
|
+
class="textStyle"
|
|
21
|
+
>
|
|
22
|
+
{{ "测试\\textcolor{#FF0000}{红色}文字" }}
|
|
23
|
+
</jsv-text-box>
|
|
24
|
+
<jsv-text-box
|
|
25
|
+
:enableLatex="true"
|
|
26
|
+
:style="{ top: 100, ...baseStyle }"
|
|
27
|
+
class="textStyle"
|
|
28
|
+
>
|
|
29
|
+
{{ "测试\\textb{加粗}文字" }}
|
|
30
|
+
</jsv-text-box>
|
|
31
|
+
<jsv-text-box
|
|
32
|
+
:enableLatex="true"
|
|
33
|
+
:style="{ top: 150, ...baseStyle }"
|
|
34
|
+
class="textStyle"
|
|
35
|
+
>
|
|
36
|
+
{{ "测试\\texti{italic}文字" }}
|
|
37
|
+
</jsv-text-box>
|
|
38
|
+
<jsv-text-box
|
|
39
|
+
:enableLatex="true"
|
|
40
|
+
:style="{ top: 200, ...baseStyle }"
|
|
41
|
+
class="textStyle"
|
|
42
|
+
>
|
|
43
|
+
{{ "测试\\textdecoration{underline}{下划线}文字" }}
|
|
44
|
+
</jsv-text-box>
|
|
45
|
+
<jsv-text-box
|
|
46
|
+
:enableLatex="true"
|
|
47
|
+
:style="{ top: 250, ...baseStyle }"
|
|
48
|
+
class="textStyle"
|
|
49
|
+
>
|
|
50
|
+
{{ "测试\\textdecoration{line-through}{删除线}文字" }}
|
|
51
|
+
</jsv-text-box>
|
|
52
|
+
<jsv-text-box
|
|
53
|
+
:enableLatex="true"
|
|
54
|
+
:style="{ top: 300, ...baseStyle }"
|
|
55
|
+
class="textStyle"
|
|
56
|
+
>
|
|
57
|
+
{{ text }}
|
|
58
|
+
</jsv-text-box>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style scoped>
|
|
62
|
+
.textStyle {
|
|
63
|
+
line-height: 50;
|
|
64
|
+
font-size: 40;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, onMounted } from "vue";
|
|
3
|
+
import { JsvLatex, globalLoadJsvLatexPlugin } from "jsview";
|
|
4
|
+
|
|
5
|
+
globalLoadJsvLatexPlugin((status) => {
|
|
6
|
+
console.log("load JsvLatex plugin status", status);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const latexStr = `\\begin{array}{l}
|
|
10
|
+
测试文字 \\forall\\varepsilon\\in\\mathbb{R}_+^*\\ \\exists\\eta>0\\ |x-x_0|\\leq\\eta\\Longrightarrow|f(x)-f(x_0)|\\leq\\varepsilon测试文字\\\\
|
|
11
|
+
测试文字\\det
|
|
12
|
+
\\begin{bmatrix}
|
|
13
|
+
a_{11}&a_{12}&\\cdots&a_{1n}\\\\
|
|
14
|
+
a_{21}&\\ddots&&\\vdots\\\\
|
|
15
|
+
\\vdots&&\\ddots&\\vdots\\\\
|
|
16
|
+
a_{n1}&\\cdots&\\cdots&a_{nn}
|
|
17
|
+
\\end{bmatrix}
|
|
18
|
+
\\overset{\\mathrm{def}}{=}\\sum_{\\sigma\\in\\mathfrak{S}_n}\\varepsilon(\\sigma)\\prod_{k=1}^n a_{k\\sigma(k)}\\\\
|
|
19
|
+
\\sideset{_\\alpha^\\beta}{_\\gamma^\\delta}{\\begin{pmatrix}a&b\\\\c&d\\end{pmatrix}}\\\\
|
|
20
|
+
\\int_0^\\infty{x^{2n} e^{-a x^2}\\,dx} = \\frac{2n-1}{2a}
|
|
21
|
+
\\int_0^\\infty{x^{2(n-1)} e^{-a x^2}\\,dx} = \\frac{(2n-1)!!}{2^{n+1}} \\sqrt{\\frac{\\pi}{a^{2n+1}}}\\\\
|
|
22
|
+
\\int_a^b{f(x)\\,dx} = (b - a) \\sum\\limits_{n = 1}^\\infty
|
|
23
|
+
{\\sum\\limits_{m = 1}^{2^n - 1} {\\left( { - 1} \\right)^{m + 1} } } 2^{ - n} f(a + m\\left( {b - a} \\right)2^{-n} )\\\\
|
|
24
|
+
\\int_{-\\pi}^{\\pi} \\sin(\\alpha x) \\sin^n(\\beta x) dx = \\textstyle{\\left \\{
|
|
25
|
+
\\begin{array}{cc}
|
|
26
|
+
(-1)^{(n+1)/2} (-1)^m \\frac{2 \\pi}{2^n} \\binom{n}{m} & n \\mbox{ odd},\\ \\alpha = \\beta (2m-n) \\\\
|
|
27
|
+
0 & \\mbox{otherwise} \\\\ \\end{array} \\right .}\\\\
|
|
28
|
+
L = \\int_a^b \\sqrt{ \\left|\\sum_{i,j=1}^ng_{ij}(\\gamma(t))\\left(\\frac{d}{dt}x^i\\circ\\gamma(t)\\right)
|
|
29
|
+
\\left(\\frac{d}{dt}x^j\\circ\\gamma(t)\\right)\\right|}\\,dt\\\\
|
|
30
|
+
\\begin{array}{rl}
|
|
31
|
+
s &= \\int_a^b\\left\\|\\frac{d}{dt}\\vec{r}\\,(u(t),v(t))\\right\\|\\,dt \\\\
|
|
32
|
+
&= \\int_a^b \\sqrt{u'(t)^2\\,\\vec{r}_u\\cdot\\vec{r}_u + 2u'(t)v'(t)\\, \\vec{r}_u\\cdot
|
|
33
|
+
\\vec{r}_v+ v'(t)^2\\,\\vec{r}_v\\cdot\\vec{r}_v}\\,\\,\\, dt.
|
|
34
|
+
\\end{array}\\\\
|
|
35
|
+
\\end{array}`;
|
|
36
|
+
|
|
37
|
+
onMounted(() => {});
|
|
38
|
+
</script>
|
|
39
|
+
<template>
|
|
40
|
+
<div
|
|
41
|
+
:style="{
|
|
42
|
+
width: 1280,
|
|
43
|
+
height: 720,
|
|
44
|
+
backgroundColor: '#007788',
|
|
45
|
+
}"
|
|
46
|
+
></div>
|
|
47
|
+
<jsv-latex
|
|
48
|
+
:latexStr="latexStr"
|
|
49
|
+
:left="50"
|
|
50
|
+
:width="800"
|
|
51
|
+
:fontSize="25"
|
|
52
|
+
color="#FFFFFF"
|
|
53
|
+
></jsv-latex>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style scoped>
|
|
57
|
+
@keyframes test-translate {
|
|
58
|
+
from {
|
|
59
|
+
transform: translate3d(0, 0, 0);
|
|
60
|
+
}
|
|
61
|
+
to {
|
|
62
|
+
transform: translate3d(100, 0, 0);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</style>
|