@qin-ui/antd-vue-pro 1.1.24 → 2.0.0
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 +73 -322
- package/es/antd-vue-pro.css +52 -0
- package/es/component-provider/index-DtsWFG3s.js +154 -0
- package/es/component-provider/index.js +3 -85
- package/es/form/index.js +637 -18
- package/es/index.d.ts +778 -7488
- package/es/index.js +19 -24
- package/es/table/index.js +538 -498
- package/es/vendor/utils/lodash-es-Bu1KKNMo.js +985 -0
- package/package.json +13 -8
- package/es/form/index-1cdda7ac.js +0 -16336
- package/es/style.css +0 -43
|
@@ -1,87 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const INJECT_KEYS = {
|
|
3
|
-
"pro-table": Symbol(""),
|
|
4
|
-
"pro-form": Symbol(""),
|
|
5
|
-
"pro-form-item": Symbol(""),
|
|
6
|
-
// field
|
|
7
|
-
"input": Symbol(""),
|
|
8
|
-
"textarea": Symbol(""),
|
|
9
|
-
"input-password": Symbol(""),
|
|
10
|
-
"input-search": Symbol(""),
|
|
11
|
-
"input-number": Symbol(""),
|
|
12
|
-
"select": Symbol(""),
|
|
13
|
-
"cascader": Symbol(""),
|
|
14
|
-
"date-picker": Symbol(""),
|
|
15
|
-
"date-picker.date": Symbol(""),
|
|
16
|
-
"date-picker.week": Symbol(""),
|
|
17
|
-
"date-picker.month": Symbol(""),
|
|
18
|
-
"date-picker.year": Symbol(""),
|
|
19
|
-
"date-picker.quarter": Symbol(""),
|
|
20
|
-
"range-picker": Symbol(""),
|
|
21
|
-
"time-picker": Symbol(""),
|
|
22
|
-
"checkbox-group": Symbol(""),
|
|
23
|
-
"radio-group": Symbol(""),
|
|
24
|
-
"switch": Symbol(""),
|
|
25
|
-
"slider": Symbol(""),
|
|
26
|
-
"tree-select": Symbol(""),
|
|
27
|
-
"transfer": Symbol("")
|
|
28
|
-
};
|
|
29
|
-
const getPopupContainer = (triggerNode) => triggerNode.closest(".ant-form");
|
|
30
|
-
const INIT_PROPS_MAP = /* @__PURE__ */ new Map([
|
|
31
|
-
[INJECT_KEYS["pro-table"], {}],
|
|
32
|
-
[INJECT_KEYS["pro-form"], {}],
|
|
33
|
-
[INJECT_KEYS["pro-form-item"], {}],
|
|
34
|
-
// field
|
|
35
|
-
[INJECT_KEYS["input"], { maxlength: 100, allowClear: true, placeholder: "请输入" }],
|
|
36
|
-
[INJECT_KEYS["textarea"], { maxlength: 200, autoSize: { minRows: 3, maxRows: 6 }, showCount: true, allowClear: true, placeholder: "请输入" }],
|
|
37
|
-
[INJECT_KEYS["input-password"], { maxlength: 100, allowClear: true, placeholder: "请输入" }],
|
|
38
|
-
[INJECT_KEYS["input-number"], { max: 10 ** 15 - 1, min: -(10 ** 15 + 1), controls: false, allowClear: true, placeholder: "请输入" }],
|
|
39
|
-
[INJECT_KEYS["select"], { allowClear: true, placeholder: "请选择", getPopupContainer }],
|
|
40
|
-
[INJECT_KEYS["cascader"], { allowClear: true, placeholder: "请选择", getPopupContainer }],
|
|
41
|
-
[INJECT_KEYS["date-picker"], { allowClear: true, getPopupContainer }],
|
|
42
|
-
[INJECT_KEYS["date-picker.week"], { allowClear: true, getPopupContainer }],
|
|
43
|
-
[INJECT_KEYS["date-picker.month"], { allowClear: true, getPopupContainer }],
|
|
44
|
-
[INJECT_KEYS["date-picker.year"], { allowClear: true, getPopupContainer }],
|
|
45
|
-
[INJECT_KEYS["date-picker.quarter"], { allowClear: true, getPopupContainer }],
|
|
46
|
-
[INJECT_KEYS["time-picker"], { allowClear: true, getPopupContainer }],
|
|
47
|
-
[INJECT_KEYS["range-picker"], { allowClear: true, getPopupContainer }],
|
|
48
|
-
[INJECT_KEYS["checkbox-group"], { allowClear: true, getPopupContainer }],
|
|
49
|
-
[INJECT_KEYS["radio-group"], {}],
|
|
50
|
-
[INJECT_KEYS["switch"], {}],
|
|
51
|
-
[INJECT_KEYS["slider"], {}],
|
|
52
|
-
[INJECT_KEYS["tree-select"], {}],
|
|
53
|
-
[INJECT_KEYS["transfer"], {}]
|
|
54
|
-
]);
|
|
55
|
-
const useInjectProps = (key) => {
|
|
56
|
-
const initProps = INIT_PROPS_MAP.get(key) ?? {};
|
|
57
|
-
const injectProps = inject(key, {});
|
|
58
|
-
return { ...initProps, ...injectProps };
|
|
59
|
-
};
|
|
60
|
-
const useProviderProps = (key, value) => {
|
|
61
|
-
provide(key, value);
|
|
62
|
-
};
|
|
63
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
|
-
__name: "index",
|
|
65
|
-
props: {
|
|
66
|
-
componentVars: {}
|
|
67
|
-
},
|
|
68
|
-
setup(__props) {
|
|
69
|
-
const props = __props;
|
|
70
|
-
if (props.componentVars) {
|
|
71
|
-
Object.entries(props.componentVars).forEach(([key, val]) => {
|
|
72
|
-
const injectKey = INJECT_KEYS[key];
|
|
73
|
-
useProviderProps(injectKey, val);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return (_ctx, _cache) => {
|
|
77
|
-
return renderSlot(_ctx.$slots, "default");
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
});
|
|
1
|
+
import { I, _ } from "./index-DtsWFG3s.js";
|
|
81
2
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
_sfc_main as default,
|
|
85
|
-
useInjectProps,
|
|
86
|
-
useProviderProps
|
|
3
|
+
I as INJECT_CONFIG,
|
|
4
|
+
_ as default
|
|
87
5
|
};
|