@varlet/cli 1.26.1 → 1.26.2
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/package.json +5 -5
- package/site/components/code-example/CodeExample.vue +10 -1
- package/site/components/code-example/codeExample.less +3 -2
- package/site/mobile/main.ts +0 -2
- package/site/pc/App.vue +24 -12
- package/site/useProgress.ts +0 -2
- package/varlet.default.config.js +1 -1
- package/CHANGELOG.md +0 -1596
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.2",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@babel/helper-plugin-utils": "^7.14.5",
|
|
34
34
|
"@babel/preset-env": "^7.14.8",
|
|
35
35
|
"@babel/preset-typescript": "^7.14.5",
|
|
36
|
-
"@varlet/icons": "1.26.
|
|
37
|
-
"@varlet/markdown-vite-plugin": "1.26.
|
|
38
|
-
"@varlet/touch-emulator": "1.26.
|
|
36
|
+
"@varlet/icons": "1.26.2",
|
|
37
|
+
"@varlet/markdown-vite-plugin": "1.26.2",
|
|
38
|
+
"@varlet/touch-emulator": "1.26.2",
|
|
39
39
|
"@vitejs/plugin-vue": "2.2.0",
|
|
40
40
|
"@vitejs/plugin-vue-jsx": "1.3.5",
|
|
41
41
|
"@vue/babel-plugin-jsx": "1.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@types/semver": "^7.3.9"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@varlet/touch-emulator": "1.26.
|
|
78
|
+
"@varlet/touch-emulator": "1.26.2",
|
|
79
79
|
"@vue/test-utils": "^2.0.0-rc.6",
|
|
80
80
|
"clipboard": "^2.0.6",
|
|
81
81
|
"live-server": "^1.2.1",
|
|
@@ -57,6 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
const disabledFold: Ref<boolean> = ref(false)
|
|
58
58
|
const clipboard: Ref = ref(get(config, 'pc.clipboard', {}))
|
|
59
59
|
const height: Ref<number> = ref(-1)
|
|
60
|
+
let timer: any = null
|
|
60
61
|
|
|
61
62
|
const toggle = async () => {
|
|
62
63
|
const foldHeight = fold.value.foldHeight
|
|
@@ -68,7 +69,15 @@ export default defineComponent({
|
|
|
68
69
|
height.value = foldHeight
|
|
69
70
|
await doubleRaf()
|
|
70
71
|
height.value = offsetHeight
|
|
72
|
+
|
|
73
|
+
timer = setTimeout(() => {
|
|
74
|
+
height.value = -1
|
|
75
|
+
}, 250)
|
|
71
76
|
} else {
|
|
77
|
+
clearTimeout(timer)
|
|
78
|
+
const { offsetHeight } = code.value as HTMLElement
|
|
79
|
+
height.value = offsetHeight
|
|
80
|
+
await doubleRaf()
|
|
72
81
|
height.value = foldHeight
|
|
73
82
|
}
|
|
74
83
|
}
|
|
@@ -82,7 +91,7 @@ export default defineComponent({
|
|
|
82
91
|
|
|
83
92
|
const { offsetHeight } = code.value as HTMLElement
|
|
84
93
|
disabledFold.value = offsetHeight - fold.value.foldHeight < offset
|
|
85
|
-
height.value = fold.value?.defaultFold ? fold.value?.foldHeight :
|
|
94
|
+
height.value = fold.value?.defaultFold ? fold.value?.foldHeight : -1
|
|
86
95
|
})
|
|
87
96
|
|
|
88
97
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.var-site-code-example {
|
|
2
|
-
margin-top:
|
|
2
|
+
margin-top: 16px;
|
|
3
|
+
margin-bottom: 4px;
|
|
3
4
|
position: relative;
|
|
4
5
|
|
|
5
6
|
&__toolbar {
|
|
@@ -8,7 +9,7 @@
|
|
|
8
9
|
position: absolute;
|
|
9
10
|
z-index: 1;
|
|
10
11
|
right: 10px;
|
|
11
|
-
top:
|
|
12
|
+
top: 10px;
|
|
12
13
|
|
|
13
14
|
button {
|
|
14
15
|
color: white !important;
|
package/site/mobile/main.ts
CHANGED
package/site/pc/App.vue
CHANGED
|
@@ -129,17 +129,21 @@ export default defineComponent({
|
|
|
129
129
|
|
|
130
130
|
<style>
|
|
131
131
|
.hljs {
|
|
132
|
-
background: #
|
|
132
|
+
background: #272727 !important;
|
|
133
133
|
padding: 0 !important;
|
|
134
134
|
border-radius: 4px;
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
.hljs code {
|
|
138
|
+
line-height: 31px;
|
|
139
|
+
}
|
|
136
140
|
</style>
|
|
137
141
|
|
|
138
142
|
<style lang="less">
|
|
139
143
|
@doc-active: {
|
|
140
144
|
display: inline;
|
|
141
145
|
font-family: inherit;
|
|
142
|
-
padding: 0
|
|
146
|
+
padding: 0;
|
|
143
147
|
white-space: pre-wrap;
|
|
144
148
|
}
|
|
145
149
|
|
|
@@ -174,7 +178,7 @@ iframe {
|
|
|
174
178
|
display: flex;
|
|
175
179
|
flex-direction: column;
|
|
176
180
|
align-items: center;
|
|
177
|
-
margin: 20px
|
|
181
|
+
margin: 20px 0;
|
|
178
182
|
padding: 90px 40px;
|
|
179
183
|
border-top: 6px solid var(--site-config-color-introduce-border);
|
|
180
184
|
border-radius: 2px;
|
|
@@ -267,25 +271,30 @@ iframe {
|
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
h3 {
|
|
270
|
-
margin-bottom: 16px;
|
|
271
274
|
font-size: 18px;
|
|
275
|
+
margin: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
h4 {
|
|
279
|
+
margin: 18px 0 0;
|
|
272
280
|
}
|
|
273
281
|
|
|
274
282
|
p,
|
|
275
|
-
ul
|
|
283
|
+
ul,
|
|
284
|
+
ol {
|
|
276
285
|
-webkit-font-smoothing: antialiased;
|
|
277
286
|
color: var(--site-config-color-text);
|
|
278
287
|
font-size: 15px;
|
|
279
288
|
line-height: 26px;
|
|
280
|
-
padding: 16px;
|
|
281
289
|
border-radius: 4px;
|
|
282
290
|
background: var(--site-config-color-bar);
|
|
283
|
-
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
284
291
|
list-style: none;
|
|
292
|
+
margin: 14px 0 0;
|
|
293
|
+
padding: 0;
|
|
285
294
|
}
|
|
286
295
|
|
|
287
296
|
pre {
|
|
288
|
-
margin:
|
|
297
|
+
margin: 0;
|
|
289
298
|
}
|
|
290
299
|
|
|
291
300
|
code {
|
|
@@ -295,7 +304,6 @@ iframe {
|
|
|
295
304
|
overflow-x: auto;
|
|
296
305
|
font-size: 13px;
|
|
297
306
|
font-family: Consolas, Monaco, monospace;
|
|
298
|
-
line-height: 31px;
|
|
299
307
|
white-space: pre-wrap;
|
|
300
308
|
word-wrap: break-word;
|
|
301
309
|
color: #fff;
|
|
@@ -321,7 +329,6 @@ iframe {
|
|
|
321
329
|
line-height: 28px;
|
|
322
330
|
border-collapse: collapse;
|
|
323
331
|
border-radius: 4px;
|
|
324
|
-
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
|
325
332
|
|
|
326
333
|
th {
|
|
327
334
|
padding: 8px 16px;
|
|
@@ -330,11 +337,12 @@ iframe {
|
|
|
330
337
|
color: var(--site-config-color-sub-text);
|
|
331
338
|
font-size: 13px;
|
|
332
339
|
-webkit-font-smoothing: antialiased;
|
|
340
|
+
border-bottom: 1px solid var(--site-config-color-border);
|
|
333
341
|
}
|
|
334
342
|
|
|
335
343
|
td {
|
|
336
344
|
padding: 8px 16px;
|
|
337
|
-
border-
|
|
345
|
+
border-bottom: 1px solid var(--site-config-color-border);
|
|
338
346
|
color: var(--site-config-color-text);
|
|
339
347
|
font-family: Consolas, Monaco, monospace;
|
|
340
348
|
|
|
@@ -355,7 +363,11 @@ iframe {
|
|
|
355
363
|
}
|
|
356
364
|
|
|
357
365
|
.card {
|
|
358
|
-
|
|
366
|
+
border-radius: 4px;
|
|
367
|
+
background: var(--site-config-color-bar);
|
|
368
|
+
padding: 20px;
|
|
369
|
+
margin-bottom: 30px;
|
|
370
|
+
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
359
371
|
}
|
|
360
372
|
}
|
|
361
373
|
}
|
package/site/useProgress.ts
CHANGED