@qy_better_lib/pc 0.2.34 → 0.3.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/DOCUMENTATION.md +559 -0
- package/dist/@qy_better_lib/pc.min.js +1 -1
- package/lib/commDialog/index.d.ts +3 -0
- package/lib/commDialog/index.js +8 -0
- package/lib/commDialog/src/index.vue.d.ts +102 -0
- package/lib/commDialog/src/index.vue.js +49 -0
- package/lib/commDialog/src/index.vue2.js +4 -0
- package/lib/commDialog/src/props.d.ts +49 -0
- package/lib/commDialog/src/props.js +48 -0
- package/lib/commDialog/src/type.d.ts +39 -0
- package/lib/commForm/index.d.ts +3 -0
- package/lib/commForm/index.js +8 -0
- package/lib/commForm/src/index.vue.d.ts +95 -0
- package/lib/commForm/src/index.vue.js +51 -0
- package/lib/commForm/src/index.vue2.js +4 -0
- package/lib/commForm/src/props.d.ts +49 -0
- package/lib/commForm/src/props.js +47 -0
- package/lib/commForm/src/type.d.ts +8 -0
- package/lib/contextMenu/index.d.ts +5 -2
- package/lib/contextMenu/index.js +5 -4
- package/lib/contextMenu/src/index.vue.d.ts +48 -36
- package/lib/contextMenu/src/index.vue.js +128 -79
- package/lib/contextMenu/src/index.vue2.js +2 -2
- package/lib/contextMenu/src/props.d.ts +32 -0
- package/lib/contextMenu/src/props.js +27 -0
- package/lib/contextMenu/src/type.d.ts +11 -0
- package/lib/describeView/index.js +4 -4
- package/lib/describeView/src/index.vue.d.ts +6 -9
- package/lib/describeView/src/index.vue.js +73 -70
- package/lib/describeView/src/index.vue2.js +2 -2
- package/lib/describeView/src/props.d.ts +35 -0
- package/lib/describeView/src/props.js +33 -0
- package/lib/index.d.ts +7 -3
- package/lib/index.js +31 -21
- package/lib/simpleVirtualList/index.js +4 -4
- package/lib/simpleVirtualList/src/index.vue.js +70 -53
- package/lib/simpleVirtualList/src/index.vue2.js +2 -2
- package/lib/styles/comm-form.scss +4 -0
- package/lib/styles/index.scss +6 -5
- package/lib/tableExtend/index.js +4 -4
- package/lib/tableExtend/props.d.ts +74 -15
- package/lib/tableExtend/props.js +82 -24
- package/lib/tableExtend/src/colVisible.vue.js +95 -70
- package/lib/tableExtend/src/colVisible.vue2.js +2 -2
- package/lib/tableExtend/src/index.vue.d.ts +18 -10
- package/lib/tableExtend/src/index.vue.js +171 -142
- package/lib/tableExtend/src/index.vue2.js +2 -2
- package/lib/tableExtend/src/valueCol.vue.js +11 -8
- package/lib/tableExtend/src/valueCol.vue2.js +2 -2
- package/lib/tableExtend/type.d.ts +9 -14
- package/lib/tableExtend/type.js +7 -2
- package/lib/tableExtend/useTable.d.ts +19 -50
- package/lib/tableExtend/useTable.js +95 -56
- package/lib/textButton/index.js +4 -4
- package/lib/textButton/src/index.vue.d.ts +7 -6
- package/lib/textButton/src/index.vue.js +25 -37
- package/lib/textButton/src/index.vue2.js +2 -2
- package/lib/textButton/src/props.d.ts +23 -0
- package/lib/textButton/src/props.js +30 -0
- package/lib/textButton/src/type.d.ts +30 -0
- package/lib/utils/index.d.ts +55 -13
- package/lib/utils/index.js +98 -54
- package/package.json +25 -8
- package/types/index.d.ts +9 -1
- /package/lib/styles/{contextMenu.scss → context-menu.scss} +0 -0
- /package/lib/styles/{describeView.scss → describe-view.scss} +0 -0
- /package/lib/styles/{simpleVirtualList.scss → simple-virtual-list.scss} +0 -0
- /package/lib/styles/{tableExtend.scss → table-extend.scss} +0 -0
- /package/lib/styles/{textButton.scss → text-button.scss} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DialogType } from './type';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
/**
|
|
7
|
+
* 头部插槽
|
|
8
|
+
*/
|
|
9
|
+
header?: () => any;
|
|
10
|
+
/**
|
|
11
|
+
* 默认插槽
|
|
12
|
+
*/
|
|
13
|
+
default?: () => any;
|
|
14
|
+
/**
|
|
15
|
+
* 底部插槽
|
|
16
|
+
*/
|
|
17
|
+
footer?: () => any;
|
|
18
|
+
}> & {
|
|
19
|
+
/**
|
|
20
|
+
* 头部插槽
|
|
21
|
+
*/
|
|
22
|
+
header?: () => any;
|
|
23
|
+
/**
|
|
24
|
+
* 默认插槽
|
|
25
|
+
*/
|
|
26
|
+
default?: () => any;
|
|
27
|
+
/**
|
|
28
|
+
* 底部插槽
|
|
29
|
+
*/
|
|
30
|
+
footer?: () => any;
|
|
31
|
+
};
|
|
32
|
+
refs: {};
|
|
33
|
+
rootEl: any;
|
|
34
|
+
};
|
|
35
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
36
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
37
|
+
type: {
|
|
38
|
+
type: () => DialogType;
|
|
39
|
+
default: string;
|
|
40
|
+
validator: (value: string) => boolean;
|
|
41
|
+
};
|
|
42
|
+
size: {
|
|
43
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
showClose: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
draggable: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
modal: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
modalStyle: {
|
|
59
|
+
type: ObjectConstructor;
|
|
60
|
+
default: () => {};
|
|
61
|
+
};
|
|
62
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
63
|
+
type: {
|
|
64
|
+
type: () => DialogType;
|
|
65
|
+
default: string;
|
|
66
|
+
validator: (value: string) => boolean;
|
|
67
|
+
};
|
|
68
|
+
size: {
|
|
69
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
showClose: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
draggable: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
modal: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
modalStyle: {
|
|
85
|
+
type: ObjectConstructor;
|
|
86
|
+
default: () => {};
|
|
87
|
+
};
|
|
88
|
+
}>> & Readonly<{}>, {
|
|
89
|
+
type: DialogType;
|
|
90
|
+
size: string | number;
|
|
91
|
+
showClose: boolean;
|
|
92
|
+
draggable: boolean;
|
|
93
|
+
modal: boolean;
|
|
94
|
+
modalStyle: Record<string, any>;
|
|
95
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
96
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
97
|
+
export default _default;
|
|
98
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
99
|
+
new (): {
|
|
100
|
+
$slots: S;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, useSlots, openBlock, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { ElDialog, ElDrawer } from "element-plus";
|
|
3
|
+
import { props } from "./props.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: props(),
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const props2 = __props;
|
|
9
|
+
const attrs = useAttrs();
|
|
10
|
+
const slots = useSlots();
|
|
11
|
+
const dialog_component = () => /* @__PURE__ */ React.createElement(
|
|
12
|
+
ElDialog,
|
|
13
|
+
{
|
|
14
|
+
...attrs,
|
|
15
|
+
width: props2.size,
|
|
16
|
+
showClose: props2.showClose,
|
|
17
|
+
draggable: props2.draggable,
|
|
18
|
+
modal: props2.modal,
|
|
19
|
+
modalStyle: props2.modalStyle
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
header: () => slots.header?.(),
|
|
23
|
+
default: () => slots.default?.(),
|
|
24
|
+
footer: () => slots.footer?.()
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const drawer_component = () => /* @__PURE__ */ React.createElement(
|
|
28
|
+
ElDrawer,
|
|
29
|
+
{
|
|
30
|
+
...attrs,
|
|
31
|
+
size: props2.size,
|
|
32
|
+
showClose: props2.showClose,
|
|
33
|
+
modal: props2.modal,
|
|
34
|
+
modalStyle: props2.modalStyle
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
header: () => slots.header?.(),
|
|
38
|
+
default: () => slots.default?.(),
|
|
39
|
+
footer: () => slots.footer?.()
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return _ctx.type === "dialog" ? (openBlock(), createBlock(dialog_component, { key: 0 })) : _ctx.type === "drawer" ? (openBlock(), createBlock(drawer_component, { key: 1 })) : createCommentVNode("", true);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
_sfc_main as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DialogType } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* 通用弹窗组件属性定义
|
|
4
|
+
*/
|
|
5
|
+
export declare const props: () => {
|
|
6
|
+
/**
|
|
7
|
+
* 弹窗类型
|
|
8
|
+
*/
|
|
9
|
+
type: {
|
|
10
|
+
type: () => DialogType;
|
|
11
|
+
default: string;
|
|
12
|
+
validator: (value: string) => boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 弹窗大小
|
|
16
|
+
*/
|
|
17
|
+
size: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 是否显示关闭按钮
|
|
23
|
+
*/
|
|
24
|
+
showClose: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 是否可拖动
|
|
30
|
+
*/
|
|
31
|
+
draggable: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 是否模态
|
|
37
|
+
*/
|
|
38
|
+
modal: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 遮罩层样式
|
|
44
|
+
*/
|
|
45
|
+
modalStyle: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
default: () => {};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const props = () => ({
|
|
2
|
+
/**
|
|
3
|
+
* 弹窗类型
|
|
4
|
+
*/
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "dialog",
|
|
8
|
+
validator: (value) => ["dialog", "drawer"].includes(value)
|
|
9
|
+
},
|
|
10
|
+
/**
|
|
11
|
+
* 弹窗大小
|
|
12
|
+
*/
|
|
13
|
+
size: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: "50%"
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* 是否显示关闭按钮
|
|
19
|
+
*/
|
|
20
|
+
showClose: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* 是否可拖动
|
|
26
|
+
*/
|
|
27
|
+
draggable: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* 是否模态
|
|
33
|
+
*/
|
|
34
|
+
modal: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* 遮罩层样式
|
|
40
|
+
*/
|
|
41
|
+
modalStyle: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default: () => ({})
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
props
|
|
48
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DialogProps, DrawerProps } from 'element-plus';
|
|
2
|
+
/**
|
|
3
|
+
* 弹窗类型
|
|
4
|
+
*/
|
|
5
|
+
export type DialogType = 'dialog' | 'drawer';
|
|
6
|
+
/**
|
|
7
|
+
* 通用弹窗组件属性
|
|
8
|
+
*/
|
|
9
|
+
export interface CommonDialogProps {
|
|
10
|
+
/**
|
|
11
|
+
* 弹窗类型
|
|
12
|
+
*/
|
|
13
|
+
type: DialogType;
|
|
14
|
+
/**
|
|
15
|
+
* 弹窗大小
|
|
16
|
+
*/
|
|
17
|
+
size: string | number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 弹窗组件插槽
|
|
21
|
+
*/
|
|
22
|
+
export interface CommonDialogSlots {
|
|
23
|
+
/**
|
|
24
|
+
* 头部插槽
|
|
25
|
+
*/
|
|
26
|
+
header?: () => any;
|
|
27
|
+
/**
|
|
28
|
+
* 默认插槽
|
|
29
|
+
*/
|
|
30
|
+
default?: () => any;
|
|
31
|
+
/**
|
|
32
|
+
* 底部插槽
|
|
33
|
+
*/
|
|
34
|
+
footer?: () => any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 合并的弹窗属性(包含Element Plus的属性)
|
|
38
|
+
*/
|
|
39
|
+
export type MergedDialogProps = CommonDialogProps & Partial<DialogProps> & Partial<DrawerProps>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { LabelPosition } from './type';
|
|
2
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 表单验证
|
|
5
|
+
*/
|
|
6
|
+
declare function validate(): Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* 表单重置
|
|
9
|
+
*/
|
|
10
|
+
declare function reset(): void;
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: Readonly<{
|
|
14
|
+
/**默认插槽 */
|
|
15
|
+
default: () => any[];
|
|
16
|
+
/**底部插槽 */
|
|
17
|
+
footer: () => any[];
|
|
18
|
+
}> & {
|
|
19
|
+
/**默认插槽 */
|
|
20
|
+
default: () => any[];
|
|
21
|
+
/**底部插槽 */
|
|
22
|
+
footer: () => any[];
|
|
23
|
+
};
|
|
24
|
+
refs: {};
|
|
25
|
+
rootEl: any;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
29
|
+
labelWidth: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
labelPosition: {
|
|
34
|
+
type: PropType<LabelPosition>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
model: {
|
|
38
|
+
type: PropType<Record<string, any>>;
|
|
39
|
+
default: () => {};
|
|
40
|
+
};
|
|
41
|
+
form_rules: {
|
|
42
|
+
type: PropType<Record<string, any>>;
|
|
43
|
+
default: () => {};
|
|
44
|
+
};
|
|
45
|
+
column: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
options: {
|
|
50
|
+
type: PropType<Record<string, any>>;
|
|
51
|
+
default: () => {};
|
|
52
|
+
};
|
|
53
|
+
}>, {
|
|
54
|
+
validate: typeof validate;
|
|
55
|
+
reset: typeof reset;
|
|
56
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
57
|
+
labelWidth: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
default: number;
|
|
60
|
+
};
|
|
61
|
+
labelPosition: {
|
|
62
|
+
type: PropType<LabelPosition>;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
model: {
|
|
66
|
+
type: PropType<Record<string, any>>;
|
|
67
|
+
default: () => {};
|
|
68
|
+
};
|
|
69
|
+
form_rules: {
|
|
70
|
+
type: PropType<Record<string, any>>;
|
|
71
|
+
default: () => {};
|
|
72
|
+
};
|
|
73
|
+
column: {
|
|
74
|
+
type: NumberConstructor;
|
|
75
|
+
default: number;
|
|
76
|
+
};
|
|
77
|
+
options: {
|
|
78
|
+
type: PropType<Record<string, any>>;
|
|
79
|
+
default: () => {};
|
|
80
|
+
};
|
|
81
|
+
}>> & Readonly<{}>, {
|
|
82
|
+
column: number;
|
|
83
|
+
options: Record<string, any>;
|
|
84
|
+
labelWidth: number;
|
|
85
|
+
labelPosition: LabelPosition;
|
|
86
|
+
model: Record<string, any>;
|
|
87
|
+
form_rules: Record<string, any>;
|
|
88
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
90
|
+
export default _default;
|
|
91
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
92
|
+
new (): {
|
|
93
|
+
$slots: S;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, useSlots, openBlock, createBlock } from "vue";
|
|
2
|
+
import { validateForm } from "../../utils/index.js";
|
|
3
|
+
import { props } from "./props.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: props(),
|
|
7
|
+
setup(__props, { expose: __expose }) {
|
|
8
|
+
const props2 = __props;
|
|
9
|
+
const form_ref = ref(null);
|
|
10
|
+
const form_style = computed(() => {
|
|
11
|
+
return {
|
|
12
|
+
"grid-template-columns": `repeat(${props2.column}, minmax(1px, 1fr))`
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
const form_attr = computed(() => ({
|
|
16
|
+
labelWidth: props2.labelWidth,
|
|
17
|
+
labelPosition: props2.labelPosition,
|
|
18
|
+
...props2.options
|
|
19
|
+
}));
|
|
20
|
+
__expose({
|
|
21
|
+
validate,
|
|
22
|
+
reset
|
|
23
|
+
});
|
|
24
|
+
const slots = useSlots();
|
|
25
|
+
async function validate() {
|
|
26
|
+
return await validateForm(form_ref);
|
|
27
|
+
}
|
|
28
|
+
function reset() {
|
|
29
|
+
form_ref.value?.resetFields();
|
|
30
|
+
}
|
|
31
|
+
const common_form = () => /* @__PURE__ */ React.createElement(
|
|
32
|
+
"el-form",
|
|
33
|
+
{
|
|
34
|
+
class: "comm-form",
|
|
35
|
+
model: props2.model,
|
|
36
|
+
rules: props2.form_rules,
|
|
37
|
+
ref: form_ref,
|
|
38
|
+
...form_attr.value,
|
|
39
|
+
style: form_style.value
|
|
40
|
+
},
|
|
41
|
+
slots.default?.(),
|
|
42
|
+
slots.footer?.()
|
|
43
|
+
);
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createBlock(common_form);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
_sfc_main as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { LabelPosition } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* 通用表单组件属性定义
|
|
5
|
+
*/
|
|
6
|
+
export declare const props: () => {
|
|
7
|
+
/**
|
|
8
|
+
* 标题宽度
|
|
9
|
+
*/
|
|
10
|
+
labelWidth: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 标签位置
|
|
16
|
+
*/
|
|
17
|
+
labelPosition: {
|
|
18
|
+
type: PropType<LabelPosition>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 表单数据
|
|
23
|
+
*/
|
|
24
|
+
model: {
|
|
25
|
+
type: PropType<Record<string, any>>;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 验证规则
|
|
30
|
+
*/
|
|
31
|
+
form_rules: {
|
|
32
|
+
type: PropType<Record<string, any>>;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 表单列数,默认1列
|
|
37
|
+
*/
|
|
38
|
+
column: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* UI组件属性
|
|
44
|
+
*/
|
|
45
|
+
options: {
|
|
46
|
+
type: PropType<Record<string, any>>;
|
|
47
|
+
default: () => {};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const props = () => ({
|
|
2
|
+
/**
|
|
3
|
+
* 标题宽度
|
|
4
|
+
*/
|
|
5
|
+
labelWidth: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 100
|
|
8
|
+
},
|
|
9
|
+
/**
|
|
10
|
+
* 标签位置
|
|
11
|
+
*/
|
|
12
|
+
labelPosition: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "left"
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 表单数据
|
|
18
|
+
*/
|
|
19
|
+
model: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({})
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 验证规则
|
|
25
|
+
*/
|
|
26
|
+
form_rules: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({})
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* 表单列数,默认1列
|
|
32
|
+
*/
|
|
33
|
+
column: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 1
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* UI组件属性
|
|
39
|
+
*/
|
|
40
|
+
options: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
props
|
|
47
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
1
|
+
import { default as ContextMenu } from './src/index.vue';
|
|
2
|
+
import { ContextMenuItem, MenuPosition } from './src/type';
|
|
3
|
+
export { ContextMenu };
|
|
4
|
+
export type { ContextMenuItem, MenuPosition };
|
|
5
|
+
export default ContextMenu;
|
package/lib/contextMenu/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import _sfc_main from "./src/index.vue.js";
|
|
2
|
+
_sfc_main.install = (app) => {
|
|
3
|
+
app.component("ContextMenu", _sfc_main);
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_sfc_main as ContextMenu,
|
|
7
|
+
_sfc_main as default
|
|
7
8
|
};
|