@vue-ui-kit/ant 1.8.3 → 1.8.4
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/README.md +66 -6
- package/dist/style.scss +5 -1
- package/package.json +15 -3
- package/dist/variables.scss +0 -3
package/README.md
CHANGED
|
@@ -16,23 +16,83 @@ yarn add @vue-ui-kit/ant
|
|
|
16
16
|
pnpm add @vue-ui-kit/ant
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
### 1. Basic Usage
|
|
22
|
+
|
|
19
23
|
```ts
|
|
20
24
|
/*main.ts*/
|
|
21
25
|
import { createApp } from 'vue';
|
|
22
26
|
import App from './App.vue';
|
|
23
27
|
import Antd from 'ant-design-vue';
|
|
24
28
|
import UIKit from '@vue-ui-kit/ant';
|
|
25
|
-
import '@vue-ui-kit/ant/scss';
|
|
26
|
-
/*Create renderer (recommended to use tsx)*/
|
|
27
|
-
import { setupKit } from './setup/kit.tsx';
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
// Import styles - choose one of the following methods:
|
|
31
|
+
// Method 1: Import SCSS source files (recommended, allows variable override)
|
|
32
|
+
import '@vue-ui-kit/ant/style.scss';
|
|
33
|
+
|
|
34
|
+
// Method 2: Import compiled CSS file
|
|
35
|
+
// import '@vue-ui-kit/ant/style.css';
|
|
36
|
+
|
|
37
|
+
createApp(App).use(Antd).use(UIKit).mount('#app');
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Configure Global Defaults
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
/*main.ts*/
|
|
44
|
+
import { createApp } from 'vue';
|
|
45
|
+
import App from './App.vue';
|
|
46
|
+
import Antd from 'ant-design-vue';
|
|
47
|
+
import UIKit, { setup } from '@vue-ui-kit/ant';
|
|
48
|
+
import '@vue-ui-kit/ant/style.scss';
|
|
49
|
+
|
|
50
|
+
// Configure global defaults
|
|
51
|
+
setup({
|
|
52
|
+
form: {
|
|
53
|
+
labelCol: { span: 8 }, // Modify form label column width
|
|
54
|
+
wrapperCol: { span: 14 }, // Modify form input column width
|
|
55
|
+
},
|
|
56
|
+
grid: {
|
|
57
|
+
align: 'center', // Set default table alignment
|
|
58
|
+
lazyReset: true, // Don't auto-submit after reset
|
|
59
|
+
fitHeight: 200, // Set adaptive height
|
|
60
|
+
}
|
|
32
61
|
});
|
|
62
|
+
|
|
33
63
|
createApp(App).use(Antd).use(UIKit).mount('#app');
|
|
34
64
|
```
|
|
35
65
|
|
|
66
|
+
### 3. Alternative import methods (if main method doesn't work)
|
|
67
|
+
|
|
68
|
+
If you encounter issues with the standard import, try these alternatives:
|
|
69
|
+
|
|
70
|
+
```scss
|
|
71
|
+
// In your main.scss file
|
|
72
|
+
@import '@vue-ui-kit/ant/dist/style.scss';
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
// Or using require in JavaScript/TypeScript
|
|
77
|
+
require('@vue-ui-kit/ant/style.css');
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 4. For Vite users
|
|
81
|
+
If using Vite, make sure your vite.config.js includes sass support:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
// vite.config.js
|
|
85
|
+
export default {
|
|
86
|
+
css: {
|
|
87
|
+
preprocessorOptions: {
|
|
88
|
+
scss: {
|
|
89
|
+
additionalData: `@import '@vue-ui-kit/ant/style.scss';`
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
36
96
|
```tsx
|
|
37
97
|
/*kit.tsx*/
|
|
38
98
|
import UIKit from '@vue-ui-kit/ant';
|
package/dist/style.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-ui-kit/ant",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "Vue3 UI Kit based on Ant Design",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./dist/cjs/index.js",
|
|
7
|
+
"module": "./dist/es/index.js",
|
|
6
8
|
"types": "./dist/index.d.ts",
|
|
7
9
|
"exports": {
|
|
8
10
|
".": {
|
|
@@ -10,8 +12,18 @@
|
|
|
10
12
|
"import": "./dist/es/index.js",
|
|
11
13
|
"types": "./dist/index.d.ts"
|
|
12
14
|
},
|
|
13
|
-
"./style.css":
|
|
14
|
-
|
|
15
|
+
"./style.css": {
|
|
16
|
+
"import": "./dist/style.css",
|
|
17
|
+
"require": "./dist/style.css",
|
|
18
|
+
"default": "./dist/style.css"
|
|
19
|
+
},
|
|
20
|
+
"./style.scss": {
|
|
21
|
+
"import": "./dist/style.scss",
|
|
22
|
+
"require": "./dist/style.scss",
|
|
23
|
+
"default": "./dist/style.scss"
|
|
24
|
+
},
|
|
25
|
+
"./dist/style.css": "./dist/style.css",
|
|
26
|
+
"./dist/style.scss": "./dist/style.scss"
|
|
15
27
|
},
|
|
16
28
|
"files": [
|
|
17
29
|
"dist",
|
package/dist/variables.scss
DELETED