@opentiny/vue-docs 3.16.1 → 3.16.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.
|
@@ -165,11 +165,11 @@ export default {
|
|
|
165
165
|
type: 'interface',
|
|
166
166
|
code: `
|
|
167
167
|
interface IItemData {
|
|
168
|
-
label
|
|
169
|
-
disabled
|
|
170
|
-
divided
|
|
171
|
-
children
|
|
172
|
-
icon
|
|
168
|
+
label?: string // 菜单项文本
|
|
169
|
+
disabled?: boolean // 是否禁用
|
|
170
|
+
divided?: boolean // 是否显示分割线
|
|
171
|
+
children?: IItemData[] // 菜单项子集
|
|
172
|
+
icon?: Component // 菜单项图标
|
|
173
173
|
}
|
|
174
174
|
`
|
|
175
175
|
},
|
|
@@ -22,7 +22,7 @@ Vite
|
|
|
22
22
|
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
|
-
plugins: [autoImportPlugin()]
|
|
25
|
+
plugins: [autoImportPlugin('vite')]
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -33,13 +33,53 @@ Webpack
|
|
|
33
33
|
|
|
34
34
|
const autoImportPlugin = require('@opentiny/unplugin-tiny-vue')
|
|
35
35
|
|
|
36
|
-
module.exports = {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
module.exports = defineConfig({
|
|
37
|
+
configureWebpack: {
|
|
38
|
+
plugins: [autoImportPlugin('webpack')]
|
|
39
|
+
}
|
|
40
|
+
})
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
这样你就能直接在项目中使用 TinyVue 的组件,这些组件都是自动按需导入的,无需手动导入,且不用担心项目体积变得太大。
|
|
42
44
|
|
|
45
|
+
你也可以只使用 TinyVueResolver,这样就可以和其他组件库一起使用。
|
|
46
|
+
|
|
47
|
+
Vite
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// vite.config.ts
|
|
51
|
+
|
|
52
|
+
import Components from 'unplugin-vue-components/vite'
|
|
53
|
+
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
plugins: [
|
|
57
|
+
Components({
|
|
58
|
+
resolvers: [TinyVueResolver]
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Webpack
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
// webpack.config.js
|
|
68
|
+
|
|
69
|
+
const Components = require('unplugin-vue-components/webpack').default
|
|
70
|
+
const TinyVueResolver = require('@opentiny/unplugin-tiny-vue').TinyVueResolver
|
|
71
|
+
|
|
72
|
+
module.exports = defineConfig({
|
|
73
|
+
configureWebpack: {
|
|
74
|
+
plugins: [
|
|
75
|
+
Components({
|
|
76
|
+
resolvers: [TinyVueResolver]
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
```
|
|
82
|
+
|
|
43
83
|
想了解更多自动按需导入的信息,请参考:[unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) 和 [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)。
|
|
44
84
|
|
|
45
85
|
### 多组件引入
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@unocss/reset": "0.38.2",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"sortablejs": "1.15.0",
|
|
18
18
|
"@opentiny/vue-repl": "^1.1.2",
|
|
19
19
|
"@opentiny/vue": "~3.16.0",
|
|
20
|
-
"@opentiny/vue-design-aurora": "~3.16.0",
|
|
21
20
|
"@opentiny/vue-common": "~3.16.0",
|
|
22
21
|
"@opentiny/vue-design-smb": "~3.16.0",
|
|
22
|
+
"@opentiny/vue-design-aurora": "~3.16.0",
|
|
23
|
+
"@opentiny/vue-theme": "~3.16.2",
|
|
23
24
|
"@opentiny/vue-icon-saas": "~3.16.0",
|
|
24
25
|
"@opentiny/vue-icon": "~3.16.0",
|
|
25
26
|
"@opentiny/vue-design-saas": "~3.16.0",
|
|
26
27
|
"@opentiny/vue-theme-mobile": "~3.16.0",
|
|
27
|
-
"@opentiny/vue-theme": "~3.16.1",
|
|
28
28
|
"@opentiny/vue-theme-saas": "~3.16.0",
|
|
29
29
|
"@opentiny/vue-vite-import": "~1.1.5"
|
|
30
30
|
},
|
package/playground/App.vue
CHANGED
|
@@ -17,7 +17,7 @@ import logoUrl from './assets/opentiny-logo.svg?url'
|
|
|
17
17
|
import GitHub from './icons/Github.vue'
|
|
18
18
|
import Share from './icons/Share.vue'
|
|
19
19
|
|
|
20
|
-
const VERSION = 'tiny-vue-version-3.
|
|
20
|
+
const VERSION = 'tiny-vue-version-3.16'
|
|
21
21
|
const LAYOUT = 'playground-layout'
|
|
22
22
|
const LAYOUT_REVERSE = 'playground-layout-reverse'
|
|
23
23
|
|
|
@@ -28,7 +28,7 @@ const isMobileFirst = tinyMode === 'mobile-first'
|
|
|
28
28
|
const isSaas = tinyTheme === 'saas'
|
|
29
29
|
const isPreview = searchObj.get('openMode') === 'preview' // 是否多端弹窗预览
|
|
30
30
|
|
|
31
|
-
const versions = ['3.15', '3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
31
|
+
const versions = ['3.16', '3.15', '3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
32
32
|
const latestVersion = isPreview ? versions[0] : localStorage.getItem(VERSION) || versions[0]
|
|
33
33
|
const cdnHost = localStorage.getItem('setting-cdn')
|
|
34
34
|
|