mwl-components 0.1.0 → 0.1.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.
- package/README.md +80 -1
- package/dist/EasyForm/index.vue.d.ts +17 -21
- package/dist/EasyTable/index.vue.d.ts +10 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +439 -425
- package/dist/mwl-components.css +1 -1
- package/dist/types/index.d.ts +5 -11
- package/package.json +1 -1
- package/dist/EasyFormH/index.vue.d.ts +0 -64
- package/dist/EasyTableH/index.vue.d.ts +0 -114
package/README.md
CHANGED
|
@@ -42,6 +42,85 @@ app.mount('#app')
|
|
|
42
42
|
|
|
43
43
|
### 如果你不想 全局注册element-plus 你要在注册组件库前,单独注册组件库使用的element-plus组件
|
|
44
44
|
|
|
45
|
+
```sh
|
|
46
|
+
import 'element-plus/dist/index.css'
|
|
47
|
+
import 'element-plus/theme-chalk/dark/css-vars.css' //暗黑模式
|
|
48
|
+
|
|
49
|
+
import mwlComponents from 'mwl-components'
|
|
50
|
+
import 'mwl-components/dist/mwl-components.css'
|
|
51
|
+
import {
|
|
52
|
+
ElForm,
|
|
53
|
+
ElFormItem,
|
|
54
|
+
ElInput,
|
|
55
|
+
ElSelect,
|
|
56
|
+
ElSelectV2,
|
|
57
|
+
ElTreeSelect,
|
|
58
|
+
ElOption,
|
|
59
|
+
ElDatePicker,
|
|
60
|
+
ElSwitch,
|
|
61
|
+
ElCascader,
|
|
62
|
+
ElCheckbox,
|
|
63
|
+
ElRadio,
|
|
64
|
+
ElRadioGroup,
|
|
65
|
+
ElCheckboxGroup,
|
|
66
|
+
ElInputNumber,
|
|
67
|
+
ElTable,
|
|
68
|
+
ElTableColumn,
|
|
69
|
+
ElButton,
|
|
70
|
+
ElMenu,
|
|
71
|
+
ElSubMenu,
|
|
72
|
+
ElMenuItem,
|
|
73
|
+
ElPagination,
|
|
74
|
+
ElDialog,
|
|
75
|
+
ElScrollbar,
|
|
76
|
+
ElCard,
|
|
77
|
+
ElTooltip,
|
|
78
|
+
ElIcon
|
|
79
|
+
} from 'element-plus'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
const components = [
|
|
84
|
+
ElForm,
|
|
85
|
+
ElFormItem,
|
|
86
|
+
ElInput,
|
|
87
|
+
ElSelect,
|
|
88
|
+
ElSelectV2,
|
|
89
|
+
ElTreeSelect,
|
|
90
|
+
ElOption,
|
|
91
|
+
ElDatePicker,
|
|
92
|
+
ElSwitch,
|
|
93
|
+
ElCascader,
|
|
94
|
+
ElCheckbox,
|
|
95
|
+
ElRadio,
|
|
96
|
+
ElRadioGroup,
|
|
97
|
+
ElCheckboxGroup,
|
|
98
|
+
ElInputNumber,
|
|
99
|
+
ElTable,
|
|
100
|
+
ElTableColumn,
|
|
101
|
+
ElButton,
|
|
102
|
+
ElMenu,
|
|
103
|
+
ElSubMenu,
|
|
104
|
+
ElMenuItem,
|
|
105
|
+
ElPagination,
|
|
106
|
+
ElDialog,
|
|
107
|
+
ElScrollbar,
|
|
108
|
+
ElCard,
|
|
109
|
+
ElTooltip,
|
|
110
|
+
ElIcon
|
|
111
|
+
]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
export const installs = (app: any) => {
|
|
116
|
+
// app.use(ElementPlus)
|
|
117
|
+
components.forEach((component) => {
|
|
118
|
+
app.component(component.name, component)
|
|
119
|
+
})
|
|
120
|
+
app.use(mwlComponents)
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
45
124
|
⚠️ **注意::** 主项目使用 ”插件按需导入“ 的无效,请使用手动按需导入
|
|
46
125
|
|
|
47
126
|
#### 组件包括如果
|
|
@@ -79,7 +158,7 @@ import { ElTable, ElTableColumn, ElButton } from 'element-plus'
|
|
|
79
158
|
EasyForm
|
|
80
159
|
|
|
81
160
|
```sh
|
|
82
|
-
import { ElForm, ElFormItem, ElInput, ElSelect, ElOption, ElDatePicker, ElSwitch, ElCascader, ElCheckbox, ElRadio, ElRadioGroup, ElCheckboxGroup, ElInputNumber } from 'element-plus'
|
|
161
|
+
import { ElForm, ElFormItem, ElInput, ElSelect, ElSelectV2, ElTreeSelect, ElOption, ElDatePicker, ElSwitch, ElCascader, ElCheckbox, ElRadio, ElRadioGroup, ElCheckboxGroup, ElInputNumber } from 'element-plus'
|
|
83
162
|
```
|
|
84
163
|
|
|
85
164
|
## 打包配置问题
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { FormItem } from '../types';
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: any;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
import { FormItem, ComponentMapType } from '../types';
|
|
3
|
+
export declare const getPlaceholder: (item: FormItem) => string | undefined;
|
|
4
|
+
export declare const componentsMap: ComponentMapType[];
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
11
6
|
inline: {
|
|
12
7
|
type: BooleanConstructor;
|
|
13
8
|
default: boolean;
|
|
14
9
|
};
|
|
15
|
-
formData: {
|
|
16
|
-
type: PropType<Record<string, any>>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
10
|
formItems: {
|
|
20
11
|
type: PropType<FormItem[]>;
|
|
21
12
|
default: () => never[];
|
|
@@ -28,15 +19,16 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
28
19
|
type: StringConstructor[];
|
|
29
20
|
default: string;
|
|
30
21
|
};
|
|
31
|
-
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: PropType<Record<string, any>>;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
32
28
|
inline: {
|
|
33
29
|
type: BooleanConstructor;
|
|
34
30
|
default: boolean;
|
|
35
31
|
};
|
|
36
|
-
formData: {
|
|
37
|
-
type: PropType<Record<string, any>>;
|
|
38
|
-
required: true;
|
|
39
|
-
};
|
|
40
32
|
formItems: {
|
|
41
33
|
type: PropType<FormItem[]>;
|
|
42
34
|
default: () => never[];
|
|
@@ -49,13 +41,17 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
49
41
|
type: StringConstructor[];
|
|
50
42
|
default: string;
|
|
51
43
|
};
|
|
52
|
-
|
|
44
|
+
modelValue: {
|
|
45
|
+
type: PropType<Record<string, any>>;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{
|
|
48
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
49
|
+
}>, {
|
|
53
50
|
labelWidth: string | number;
|
|
54
51
|
inline: boolean;
|
|
55
52
|
formItems: FormItem[];
|
|
56
53
|
itemWidth: string;
|
|
57
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any
|
|
58
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<Record<string, any>> & Record<string, any>>;
|
|
59
55
|
export default _default;
|
|
60
56
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
61
57
|
new (): {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { TableColumn, buttonType } from '../types';
|
|
2
3
|
declare function __VLS_template(): {
|
|
3
4
|
attrs: Partial<{}>;
|
|
@@ -51,6 +52,10 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
51
52
|
type: StringConstructor;
|
|
52
53
|
default: undefined;
|
|
53
54
|
};
|
|
55
|
+
footerHeight: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
54
59
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
55
60
|
data: {
|
|
56
61
|
type: {
|
|
@@ -94,6 +99,10 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
94
99
|
type: StringConstructor;
|
|
95
100
|
default: undefined;
|
|
96
101
|
};
|
|
102
|
+
footerHeight: {
|
|
103
|
+
type: NumberConstructor;
|
|
104
|
+
default: number;
|
|
105
|
+
};
|
|
97
106
|
}>> & Readonly<{}>, {
|
|
98
107
|
data: Record<string, any>[];
|
|
99
108
|
maxHeight: string;
|
|
@@ -102,6 +111,7 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
102
111
|
tableColumns: TableColumn[];
|
|
103
112
|
buttons: buttonType[];
|
|
104
113
|
buttonWidth: string | number;
|
|
114
|
+
footerHeight: number;
|
|
105
115
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
106
116
|
tableRef: HTMLDivElement;
|
|
107
117
|
}, HTMLDivElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { default as ContentWarp } from './ContentWarp/index.vue';
|
|
2
2
|
import { default as Dialog } from './Dialog/index.vue';
|
|
3
|
-
import { default as EasyForm } from './EasyForm/index.vue';
|
|
3
|
+
import { default as EasyForm, componentsMap, getPlaceholder } from './EasyForm/index.vue';
|
|
4
4
|
import { default as EasyTable } from './EasyTable/index.vue';
|
|
5
5
|
import { default as MenuTree } from './MenuTree/components/index.vue';
|
|
6
6
|
import { default as Pagination } from './Pagination/index.vue';
|
|
7
|
-
export { ContentWarp, Dialog, EasyForm, EasyTable, MenuTree, Pagination, };
|
|
7
|
+
export { ContentWarp, Dialog, EasyForm, EasyTable, MenuTree, Pagination, componentsMap, getPlaceholder };
|
|
8
8
|
export declare const install: (app: any, options: any) => void;
|
|
9
9
|
declare const _default: {
|
|
10
10
|
install: (app: any, options: any) => void;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
13
|
-
export type { FormItem,
|
|
13
|
+
export type { Options, FormItem, Rule, Placement, TableColumn, buttonType, ComponentMapType, } from './types';
|