1
1
<script setup lang="ts">
2
2
import { downloadProject } from ' ./download/download'
3
- import { setVersion , resetVersion } from ' ./sfcCompiler '
3
+ import { setVersion , resetVersion } from ' ./transform '
4
4
import { ref , onMounted } from ' vue'
5
5
6
6
const currentCommit = __COMMIT__
@@ -44,8 +44,8 @@ async function fetchVersions(): Promise<string[]> {
44
44
` https://api.github.com/repos/vuejs/vue-next/releases?per_page=100 `
45
45
)
46
46
const releases: any [] = await res .json ()
47
- const versions = releases .map (
48
- r => ( / ^ v/ .test (r .tag_name ) ? r .tag_name .substr (1 ) : r .tag_name )
47
+ const versions = releases .map (r =>
48
+ / ^ v/ .test (r .tag_name ) ? r .tag_name .substr (1 ) : r .tag_name
49
49
)
50
50
const minVersion = versions .findIndex (v => v === ' 3.0.10' )
51
51
return versions .slice (0 , minVersion + 1 )
@@ -55,7 +55,7 @@ async function fetchVersions(): Promise<string[]> {
55
55
<template >
56
56
<nav >
57
57
<h1 >
58
- <img alt =" logo" src =" /logo.svg" >
58
+ <img alt =" logo" src =" /logo.svg" / >
59
59
<span >Vue SFC Playground</span >
60
60
</h1 >
61
61
<div class =" links" >
@@ -68,31 +68,61 @@ async function fetchVersions(): Promise<string[]> {
68
68
<li v-for =" version of publishedVersions" >
69
69
<a @click =" setVueVersion(version)" >v{{ version }}</a >
70
70
</li >
71
- <li ><a @click =" resetVueVersion" >This Commit ({{ currentCommit }})</a ></li >
72
71
<li >
73
- <a href =" https://app.netlify.com/sites/vue-sfc-playground/deploys" target =" _blank" >Commits History</a >
72
+ <a @click =" resetVueVersion" >This Commit ({{ currentCommit }})</a >
73
+ </li >
74
+ <li >
75
+ <a
76
+ href =" https://app.netlify.com/sites/vue-sfc-playground/deploys"
77
+ target =" _blank"
78
+ >Commits History</a
79
+ >
74
80
</li >
75
81
</ul >
76
82
</div >
77
83
<button class =" share" @click =" copyLink" >
78
84
<svg width =" 1.4em" height =" 1.4em" viewBox =" 0 0 24 24" >
79
- <g fill =" none" stroke =" #626262" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" >
80
- <circle cx =" 18" cy =" 5" r =" 3" />
81
- <circle cx =" 6" cy =" 12" r =" 3" />
82
- <circle cx =" 18" cy =" 19" r =" 3" />
83
- <path d =" M8.59 13.51l6.83 3.98" />
84
- <path d =" M15.41 6.51l-6.82 3.98" />
85
+ <g
86
+ fill =" none"
87
+ stroke =" #626262"
88
+ stroke-width =" 2"
89
+ stroke-linecap =" round"
90
+ stroke-linejoin =" round"
91
+ >
92
+ <circle cx =" 18" cy =" 5" r =" 3" />
93
+ <circle cx =" 6" cy =" 12" r =" 3" />
94
+ <circle cx =" 18" cy =" 19" r =" 3" />
95
+ <path d =" M8.59 13.51l6.83 3.98" />
96
+ <path d =" M15.41 6.51l-6.82 3.98" />
85
97
</g >
86
98
</svg >
87
- </button >
99
+ </button >
88
100
<button class =" download" @click =" downloadProject" >
89
101
<svg width =" 1.7em" height =" 1.7em" viewBox =" 0 0 24 24" >
90
102
<g fill =" #626262" >
91
- <rect x =" 4" y =" 18" width =" 16" height =" 2" rx =" 1" ry =" 1" />
92
- <rect x =" 3" y =" 17" width =" 4" height =" 2" rx =" 1" ry =" 1" transform =" rotate(-90 5 18)" />
93
- <rect x =" 17" y =" 17" width =" 4" height =" 2" rx =" 1" ry =" 1" transform =" rotate(-90 19 18)" />
94
- <path d =" M12 15a1 1 0 0 1-.58-.18l-4-2.82a1 1 0 0 1-.24-1.39a1 1 0 0 1 1.4-.24L12 12.76l3.4-2.56a1 1 0 0 1 1.2 1.6l-4 3a1 1 0 0 1-.6.2z" />
95
- <path d =" M12 13a1 1 0 0 1-1-1V4a1 1 0 0 1 2 0v8a1 1 0 0 1-1 1z" />
103
+ <rect x =" 4" y =" 18" width =" 16" height =" 2" rx =" 1" ry =" 1" />
104
+ <rect
105
+ x =" 3"
106
+ y =" 17"
107
+ width =" 4"
108
+ height =" 2"
109
+ rx =" 1"
110
+ ry =" 1"
111
+ transform =" rotate(-90 5 18)"
112
+ />
113
+ <rect
114
+ x =" 17"
115
+ y =" 17"
116
+ width =" 4"
117
+ height =" 2"
118
+ rx =" 1"
119
+ ry =" 1"
120
+ transform =" rotate(-90 19 18)"
121
+ />
122
+ <path
123
+ d =" M12 15a1 1 0 0 1-.58-.18l-4-2.82a1 1 0 0 1-.24-1.39a1 1 0 0 1 1.4-.24L12 12.76l3.4-2.56a1 1 0 0 1 1.2 1.6l-4 3a1 1 0 0 1-.6.2z"
124
+ />
125
+ <path d =" M12 13a1 1 0 0 1-1-1V4a1 1 0 0 1 2 0v8a1 1 0 0 1-1 1z" />
96
126
</g >
97
127
</svg >
98
128
</button >
0 commit comments