@opentiny/vue-docs 2.1.5 → 2.1.7
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@unocss/reset": "0.38.2",
|
|
6
6
|
"@vue/repl": "^2.5.5",
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"marked": "^4.3.0",
|
|
16
16
|
"@playwright/test": "^1.29.2",
|
|
17
17
|
"sortablejs": "1.15.0",
|
|
18
|
-
"@opentiny/vue-repl": "^1.0
|
|
19
|
-
"@opentiny/vue": "~3.11.0",
|
|
18
|
+
"@opentiny/vue-repl": "^1.1.0",
|
|
20
19
|
"@opentiny/vue-common": "~3.11.0",
|
|
21
|
-
"@opentiny/vue
|
|
22
|
-
"@opentiny/vue-design-aurora": "~3.11.0",
|
|
23
|
-
"@opentiny/vue-theme": "~3.11.0",
|
|
20
|
+
"@opentiny/vue": "~3.11.0",
|
|
24
21
|
"@opentiny/vue-icon-saas": "~3.11.0",
|
|
25
22
|
"@opentiny/vue-design-smb": "~3.11.0",
|
|
23
|
+
"@opentiny/vue-icon": "~3.11.0",
|
|
24
|
+
"@opentiny/vue-design-aurora": "~3.11.0",
|
|
26
25
|
"@opentiny/vue-theme-mobile": "~3.11.0",
|
|
27
|
-
"@opentiny/vue-
|
|
28
|
-
"@opentiny/vue-theme
|
|
26
|
+
"@opentiny/vue-theme-saas": "~3.11.0",
|
|
27
|
+
"@opentiny/vue-theme": "~3.11.0",
|
|
28
|
+
"@opentiny/vue-vite-import": "~1.1.5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/markdown-it": "^12.2.3",
|
package/playground/App.vue
CHANGED
|
@@ -13,8 +13,7 @@ import Share from './icons/Share.vue'
|
|
|
13
13
|
|
|
14
14
|
const versions = ['3.11', '3.10', '3.9', '3.8']
|
|
15
15
|
const latestVersion = versions[0]
|
|
16
|
-
const cdnHost =
|
|
17
|
-
window.localStorage.setItem('setting-cdn', cdnHost)
|
|
16
|
+
const cdnHost = window.localStorage.getItem('setting-cdn')
|
|
18
17
|
|
|
19
18
|
const searchObj = new URLSearchParams(location.search)
|
|
20
19
|
const tinyMode = searchObj.get('mode')
|
package/playground.html
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Vite + Vue</title>
|
|
8
|
+
<script>
|
|
9
|
+
const cdnHost = 'https://unpkg.com'
|
|
10
|
+
window.localStorage.setItem('setting-cdn', cdnHost)
|
|
11
|
+
</script>
|
|
8
12
|
</head>
|
|
9
13
|
<body>
|
|
10
14
|
<div id="app"></div>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<tbody>
|
|
65
65
|
<tr v-for="row in oneApiArr" :key="row.name">
|
|
66
66
|
<td>
|
|
67
|
-
<a v-if="row.demoId"
|
|
67
|
+
<a v-if="row.demoId" @click="jumpToDemo(row.demoId)">{{ row.name }}</a>
|
|
68
68
|
<span v-else>{{ row.name }}</span>
|
|
69
69
|
</td>
|
|
70
70
|
<td v-if="!key.includes('slots')"><span v-html="row.type"></span></td>
|
|
@@ -261,6 +261,13 @@ export default defineComponent({
|
|
|
261
261
|
copyText: (text) => {
|
|
262
262
|
navigator.clipboard.writeText(text)
|
|
263
263
|
},
|
|
264
|
+
jumpToDemo: (demoId) => {
|
|
265
|
+
if (demoId.startsWith('chart') || demoId.startsWith('grid')) {
|
|
266
|
+
router.push(demoId)
|
|
267
|
+
} else {
|
|
268
|
+
router.push(`#${demoId}`)
|
|
269
|
+
}
|
|
270
|
+
},
|
|
264
271
|
handleApiClick: (ev) => {
|
|
265
272
|
if (ev.target.tagName === 'A') {
|
|
266
273
|
ev.preventDefault()
|
package/vite.config.ts
CHANGED
|
@@ -69,9 +69,6 @@ export default defineConfig((config) => {
|
|
|
69
69
|
targets: copyTarget
|
|
70
70
|
})
|
|
71
71
|
],
|
|
72
|
-
define: {
|
|
73
|
-
'process.env': {}
|
|
74
|
-
},
|
|
75
72
|
optimizeDeps: getOptimizeDeps(3),
|
|
76
73
|
build: {
|
|
77
74
|
rollupOptions: {
|
|
@@ -116,5 +113,11 @@ export default defineConfig((config) => {
|
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
|
|
116
|
+
if (env.NODE_ENV === 'development') {
|
|
117
|
+
viteConfig.define = {
|
|
118
|
+
'process.env': {}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
119
122
|
return viteConfig
|
|
120
123
|
})
|