Skip to content

Commit 086eb5a

Browse files
committed
style: readme
1 parent ee6383c commit 086eb5a

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,48 @@ Introduced on demand
6262
import useRequest from 'vue-hooks-plus/es/useRequest'
6363
```
6464

65+
Auto Import
66+
67+
<details>
68+
<summary>Vite</summary><br>
69+
70+
```ts
71+
import AutoImport from 'unplugin-auto-import/vite'
72+
import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers'
73+
74+
export const AutoImportDeps = () =>
75+
AutoImport({
76+
imports: ['vue', 'vue-router'],
77+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
78+
dts: 'src/auto-imports.d.ts',
79+
resolvers: [VueHooksPlusResolver()],
80+
})
81+
```
82+
83+
<br></details>
84+
85+
<details>
86+
<summary>Webpack</summary><br>
87+
88+
```ts
89+
const { VueHooksPlusResolver } = require('@vue-hooks-plus/resolvers')
90+
module.exports = {
91+
/* ... */
92+
plugins: [
93+
require('unplugin-auto-import/webpack')({
94+
imports: ['vue', 'vue-router'],
95+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
96+
dts: 'src/auto-imports.d.ts',
97+
resolvers: [VueHooksPlusResolver()],
98+
}),
99+
],
100+
}
101+
```
102+
103+
<br></details>
104+
105+
For other supported tools, please see [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
106+
65107
### Globalization Documentations
66108

67109
- [English Documentations](https://inhiblabcore.github.io/docs/hooks/en)

README.zh-CN.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,48 @@ import { useRequest } from 'vue-hooks-plus'
6262
import useRequest from 'vue-hooks-plus/es/useRequest'
6363
```
6464

65+
自动引入
66+
67+
<details>
68+
<summary>Vite</summary><br>
69+
70+
```ts
71+
import AutoImport from 'unplugin-auto-import/vite'
72+
import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers'
73+
74+
export const AutoImportDeps = () =>
75+
AutoImport({
76+
imports: ['vue', 'vue-router'],
77+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
78+
dts: 'src/auto-imports.d.ts',
79+
resolvers: [VueHooksPlusResolver()],
80+
})
81+
```
82+
83+
<br></details>
84+
85+
<details>
86+
<summary>Webpack</summary><br>
87+
88+
```ts
89+
const { VueHooksPlusResolver } = require('@vue-hooks-plus/resolvers')
90+
module.exports = {
91+
/* ... */
92+
plugins: [
93+
require('unplugin-auto-import/webpack')({
94+
imports: ['vue', 'vue-router'],
95+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
96+
dts: 'src/auto-imports.d.ts',
97+
resolvers: [VueHooksPlusResolver()],
98+
}),
99+
],
100+
}
101+
```
102+
103+
<br></details>
104+
105+
其他支持的工具, 更多请看 [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
106+
65107
### 国际化文档
66108

67109
- [English Documentations](https://inhiblab-core.gitee.io/docs/hooks/en)

packages/hooks/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,48 @@ Introduced on demand
6262
import useRequest from 'vue-hooks-plus/es/useRequest'
6363
```
6464

65+
Auto Import
66+
67+
<details>
68+
<summary>Vite</summary><br>
69+
70+
```ts
71+
import AutoImport from 'unplugin-auto-import/vite'
72+
import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers'
73+
74+
export const AutoImportDeps = () =>
75+
AutoImport({
76+
imports: ['vue', 'vue-router'],
77+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
78+
dts: 'src/auto-imports.d.ts',
79+
resolvers: [VueHooksPlusResolver()],
80+
})
81+
```
82+
83+
<br></details>
84+
85+
<details>
86+
<summary>Webpack</summary><br>
87+
88+
```ts
89+
const { VueHooksPlusResolver } = require('@vue-hooks-plus/resolvers')
90+
module.exports = {
91+
/* ... */
92+
plugins: [
93+
require('unplugin-auto-import/webpack')({
94+
imports: ['vue', 'vue-router'],
95+
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
96+
dts: 'src/auto-imports.d.ts',
97+
resolvers: [VueHooksPlusResolver()],
98+
}),
99+
],
100+
}
101+
```
102+
103+
<br></details>
104+
105+
For other supported tools, please see [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
106+
65107
### Globalization Documentations
66108

67109
- [English Documentations](https://inhiblabcore.github.io/docs/hooks/en)

0 commit comments

Comments
 (0)