Skip to content

Commit adf5c24

Browse files
authored
feat: add huicharts runtime and update docs (#2981)
1 parent e3bf5ad commit adf5c24

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

examples/sites/demos/pc/webdoc/import-components.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
## 自动导入(推荐)
88

9-
首先你需要安装 `@opentiny/unplugin-tiny-vue` 这款插件。
9+
首先你需要安装 `@opentiny/unplugin-tiny-vue` 这款插件,还需要安装两个 `unplugin` 官方的插件包
1010

1111
```bash
12-
npm i @opentiny/unplugin-tiny-vue -D
12+
# 注意 @opentiny/unplugin-tiny-vue 版本号需要大于等于v1.0.0
13+
npm i @opentiny/unplugin-tiny-vue unplugin-auto-import unplugin-vue-components -D
1314
```
1415

1516
然后把以下代码插入到你项目的 `Vite``Webpack` 配置文件中。
@@ -73,8 +74,9 @@ module.exports = {
7374
```
7475

7576
想了解更多自动按需导入的信息,请参考:
76-
[unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
77-
[unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
77+
[unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
78+
[unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
79+
[unplugin-tiny-vue](https://github.com/opentiny/unplugin-tiny-vue)
7880

7981
## 多组件引入
8082

examples/sites/demos/pc/webdoc/installation.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,19 @@ export default defineConfig({
9292
<script type="importmap">
9393
{
9494
"imports": {
95-
"vue": "https://registry.npmmirror.com/vue/3.4.27/files/dist/vue.runtime.esm-browser.js",
95+
"vue": "https://registry.npmmirror.com/vue/3.5/files/dist/vue.runtime.esm-browser.js",
9696
"echarts": "https://registry.npmmirror.com/echarts/5.4.1/files/dist/echarts.esm.js",
97-
"@opentiny/vue": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.17/files/dist3/tiny-vue-pc.mjs",
98-
"@opentiny/vue-icon": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.17/files/dist3/tiny-vue-icon.mjs",
99-
"@opentiny/vue-locale": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.17/files/dist3/tiny-vue-locale.mjs",
100-
"@opentiny/vue-common": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.17/files/dist3/tiny-vue-common.mjs"
97+
// v3.22.0版本新增
98+
"@opentiny/vue-huicharts": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs",
99+
"@opentiny/vue": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-pc.mjs",
100+
"@opentiny/vue-icon": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-icon.mjs",
101+
"@opentiny/vue-locale": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-locale.mjs",
102+
"@opentiny/vue-common": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-common.mjs"
101103
}
102104
}
103105
</script>
104106
<!-- 引入 @opentiny/vue 样式 -->
105-
<link rel="stylesheet" href="https://registry.npmmirror.com/@opentiny/vue-theme/3.17/files/index.css" />
107+
<link rel="stylesheet" href="https://registry.npmmirror.com/@opentiny/vue-theme/3.22/files/index.css" />
106108
</head>
107109
```
108110

internals/cli/src/commands/build/build-runtime.ts

+4
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ function getEntryTasks() {
203203
{
204204
path: 'vue-directive/index.ts',
205205
libPath: 'tiny-vue-directive'
206+
},
207+
{
208+
path: 'vue/src/huicharts/index.ts',
209+
libPath: 'tiny-vue-huicharts'
206210
}
207211
]
208212
return entry

0 commit comments

Comments
 (0)