orion-design 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +30 -14
- package/dist/Throne/index.js.map +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/components/Button/index.js +40 -33
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +122 -89
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +128 -66
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +836 -656
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +30 -18
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +111 -56
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.js +4 -3
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/hooks/useColumns.js +88 -80
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.js +687 -542
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +92 -54
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +82 -74
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +579 -469
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +92 -54
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +100 -74
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +603 -358
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +6 -4
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +74 -39
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +29 -19
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +9 -5
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +22 -17
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +74 -39
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +9 -8
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +14 -7
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +49 -25
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +103 -61
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +65 -50
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +8 -4
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +12 -11
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +4 -2
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +18 -14
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +46 -20
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +18 -10
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +5 -4
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +4 -3
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +9 -8
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +16 -10
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +41 -38
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +41 -22
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +85 -43
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +27 -15
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +29 -25
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +35 -18
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +46 -30
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +12 -6
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +5 -3
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +5 -4
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +100 -54
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +231 -220
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +38 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components-B3d9m_tn.js +27 -0
- package/dist/components-B3d9m_tn.js.map +1 -0
- package/dist/error/OrionError.js +8 -4
- package/dist/error/OrionError.js.map +1 -1
- package/dist/functions-BeMkokbY.js +63 -0
- package/dist/functions-BeMkokbY.js.map +1 -0
- package/dist/index-BOKLZnqH.js +54 -0
- package/dist/index-BOKLZnqH.js.map +1 -0
- package/dist/index-D1m0KTpK.js +69 -0
- package/dist/index-D1m0KTpK.js.map +1 -0
- package/dist/index-DR5ZP7mD.js +160 -0
- package/dist/index-DR5ZP7mD.js.map +1 -0
- package/dist/index-DkwIULcN.js +200 -0
- package/dist/index-DkwIULcN.js.map +1 -0
- package/dist/index.css +797 -1
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +101 -43
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +200 -108
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +17 -14
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +16 -13
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +17 -14
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +47 -22
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +40 -25
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +16 -10
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +305 -201
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +11 -5
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +11 -5
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +9 -4
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +11 -5
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +48 -33
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +191 -93
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +35 -25
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
@@ -1,71 +1,84 @@
|
|
1
|
-
import { difference
|
2
|
-
import { defineComponent
|
3
|
-
import { withInstall
|
4
|
-
import { ElForm
|
5
|
-
import { formContextKey
|
6
|
-
import
|
7
|
-
import { useFormItemSpan
|
8
|
-
import { getSingleCodeContent
|
9
|
-
import { S as
|
10
|
-
import { g as
|
11
|
-
import { lovContextKey
|
12
|
-
import { default as
|
13
|
-
const
|
14
|
-
name: "OForm",
|
15
|
-
inheritAttrs: !1,
|
1
|
+
import { difference, isEmpty, isDate, isString, isNumber, toNumber } from "lodash-es";
|
2
|
+
import { defineComponent, useTemplateRef, provide, reactive, toRef, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, isRef, useAttrs, computed, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, watch, ref, onMounted, normalizeStyle } from "vue";
|
3
|
+
import { withInstall } from "../_util/vue/install.js";
|
4
|
+
import { ElForm, ElRow, ElCol, ElFormItem, ElInput, ElSelect, ElOption, ElRadioGroup, ElRadio, ElCheckboxGroup, ElCheckbox, ElSwitch, dayjs, ElTimePicker, ElDatePicker, ElDropdown, ElInputNumber } from "element-plus";
|
5
|
+
import { formContextKey } from "./Form.js";
|
6
|
+
import OrionError from "../../error/OrionError.js";
|
7
|
+
import { useFormItemSpan, useFormItemRules, useFormItemStringModel, useFormItemDisabled, useFormItemCode, useFormItemMultiModel, useFormContext, useFormItemBooleanModel } from "./hooks/index.js";
|
8
|
+
import { getSingleCodeContent, getMultiCodeContent } from "./utils/index.js";
|
9
|
+
import { S as Space } from "../../index-BOKLZnqH.js";
|
10
|
+
import { g as search_default } from "../../index-DkwIULcN.js";
|
11
|
+
import { lovContextKey } from "./LovInput/LovInput.js";
|
12
|
+
import { default as default2 } from "./LovInput/hooks/useLov.js";
|
13
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
14
|
+
...{ name: "OForm", inheritAttrs: false },
|
16
15
|
__name: "Form",
|
17
16
|
props: {
|
18
17
|
rules: {},
|
19
18
|
itemSpan: { default: 6 },
|
20
19
|
itemLabelWidth: { default: "auto" },
|
21
|
-
disabled: { type: Boolean, default:
|
20
|
+
disabled: { type: Boolean, default: false },
|
22
21
|
modelValue: {}
|
23
22
|
},
|
24
23
|
emits: ["update:modelValue"],
|
25
|
-
setup(
|
26
|
-
const
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
24
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
25
|
+
const emit = __emit;
|
26
|
+
const updateModelValue = (name, value) => {
|
27
|
+
if (!Object.keys(__props.modelValue).includes(name)) {
|
28
|
+
throw new OrionError(`modelValue中不存在[${name}]`);
|
29
|
+
}
|
30
|
+
emit("update:modelValue", { ...__props.modelValue, [name]: value });
|
31
|
+
};
|
32
|
+
const updateModelValueMulti = (data) => {
|
33
|
+
const modelKeys = Object.keys(__props.modelValue);
|
34
|
+
const dataKeys = Object.keys(data);
|
35
|
+
const diff = difference(dataKeys, modelKeys);
|
36
|
+
if (!isEmpty(diff)) {
|
37
|
+
throw new OrionError(`modelValue中不存在[${diff.join(",")}]`);
|
38
|
+
}
|
39
|
+
emit("update:modelValue", { ...__props.modelValue, ...data });
|
40
|
+
};
|
41
|
+
const formRef = useTemplateRef("form");
|
42
|
+
const validate = async () => {
|
43
|
+
return await formRef.value.validate();
|
44
|
+
};
|
45
|
+
__expose({
|
46
|
+
validate
|
47
|
+
});
|
48
|
+
provide(
|
49
|
+
formContextKey,
|
50
|
+
reactive({
|
51
|
+
modelValue: toRef(() => __props.modelValue),
|
52
|
+
updateModelValue,
|
53
|
+
updateModelValueMulti,
|
54
|
+
rules: toRef(() => __props.rules),
|
55
|
+
itemSpan: toRef(() => __props.itemSpan),
|
56
|
+
disabled: toRef(() => __props.disabled)
|
47
57
|
})
|
48
|
-
)
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
58
|
+
);
|
59
|
+
return (_ctx, _cache) => {
|
60
|
+
return openBlock(), createBlock(unref(ElForm), {
|
61
|
+
ref: "form",
|
62
|
+
model: _ctx.modelValue,
|
63
|
+
rules: _ctx.rules,
|
64
|
+
"label-width": _ctx.itemLabelWidth,
|
65
|
+
disabled: _ctx.disabled
|
66
|
+
}, {
|
67
|
+
default: withCtx(() => [
|
68
|
+
createVNode(unref(ElRow), { gutter: 16 }, {
|
69
|
+
default: withCtx(() => [
|
70
|
+
renderSlot(_ctx.$slots, "default")
|
71
|
+
]),
|
72
|
+
_: 3
|
73
|
+
})
|
74
|
+
]),
|
75
|
+
_: 3
|
76
|
+
}, 8, ["model", "rules", "label-width", "disabled"]);
|
77
|
+
};
|
65
78
|
}
|
66
|
-
})
|
67
|
-
|
68
|
-
inheritAttrs:
|
79
|
+
});
|
80
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
81
|
+
...{ name: "OFormString", inheritAttrs: false },
|
69
82
|
__name: "StringInput",
|
70
83
|
props: {
|
71
84
|
name: {},
|
@@ -79,36 +92,40 @@ const We = /* @__PURE__ */ y({
|
|
79
92
|
disabled: { type: Boolean },
|
80
93
|
readonly: { type: Boolean }
|
81
94
|
},
|
82
|
-
setup(
|
83
|
-
const
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
95
|
+
setup(__props) {
|
96
|
+
const normalizedSpan = useFormItemSpan();
|
97
|
+
const normalizedRules = useFormItemRules();
|
98
|
+
const elModel = useFormItemStringModel();
|
99
|
+
return (_ctx, _cache) => {
|
100
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
101
|
+
default: withCtx(() => [
|
102
|
+
createVNode(unref(ElFormItem), {
|
103
|
+
prop: _ctx.name,
|
104
|
+
label: _ctx.label,
|
105
|
+
"label-width": _ctx.labelWidth,
|
106
|
+
required: _ctx.required,
|
107
|
+
rules: unref(normalizedRules)
|
108
|
+
}, {
|
109
|
+
default: withCtx(() => [
|
110
|
+
createVNode(unref(ElInput), {
|
111
|
+
modelValue: unref(elModel),
|
112
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
113
|
+
maxlength: _ctx.maxlength,
|
114
|
+
placeholder: _ctx.placeholder,
|
115
|
+
disabled: _ctx.disabled,
|
116
|
+
readonly: _ctx.readonly
|
117
|
+
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
|
118
|
+
]),
|
119
|
+
_: 1
|
120
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
121
|
+
]),
|
122
|
+
_: 1
|
123
|
+
}, 8, ["span"]);
|
124
|
+
};
|
108
125
|
}
|
109
|
-
})
|
110
|
-
|
111
|
-
inheritAttrs:
|
126
|
+
});
|
127
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
128
|
+
...{ name: "OFormPassword", inheritAttrs: false },
|
112
129
|
__name: "PasswordInput",
|
113
130
|
props: {
|
114
131
|
name: {},
|
@@ -122,37 +139,41 @@ const We = /* @__PURE__ */ y({
|
|
122
139
|
disabled: { type: Boolean },
|
123
140
|
readonly: { type: Boolean }
|
124
141
|
},
|
125
|
-
setup(
|
126
|
-
const
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
142
|
+
setup(__props) {
|
143
|
+
const normalizedSpan = useFormItemSpan();
|
144
|
+
const normalizedRules = useFormItemRules();
|
145
|
+
const elModel = useFormItemStringModel();
|
146
|
+
return (_ctx, _cache) => {
|
147
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
148
|
+
default: withCtx(() => [
|
149
|
+
createVNode(unref(ElFormItem), {
|
150
|
+
prop: _ctx.name,
|
151
|
+
label: _ctx.label,
|
152
|
+
"label-width": _ctx.labelWidth,
|
153
|
+
required: _ctx.required,
|
154
|
+
rules: unref(normalizedRules)
|
155
|
+
}, {
|
156
|
+
default: withCtx(() => [
|
157
|
+
createVNode(unref(ElInput), {
|
158
|
+
modelValue: unref(elModel),
|
159
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
160
|
+
maxlength: _ctx.maxlength,
|
161
|
+
placeholder: _ctx.placeholder,
|
162
|
+
disabled: _ctx.disabled,
|
163
|
+
readonly: _ctx.readonly,
|
164
|
+
type: "password"
|
165
|
+
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly"])
|
166
|
+
]),
|
167
|
+
_: 1
|
168
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
169
|
+
]),
|
170
|
+
_: 1
|
171
|
+
}, 8, ["span"]);
|
172
|
+
};
|
152
173
|
}
|
153
|
-
})
|
154
|
-
|
155
|
-
inheritAttrs:
|
174
|
+
});
|
175
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
176
|
+
...{ name: "OFormTextarea", inheritAttrs: false },
|
156
177
|
__name: "Textarea",
|
157
178
|
props: {
|
158
179
|
name: {},
|
@@ -167,39 +188,43 @@ const We = /* @__PURE__ */ y({
|
|
167
188
|
readonly: { type: Boolean },
|
168
189
|
rows: {}
|
169
190
|
},
|
170
|
-
setup(
|
171
|
-
const
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
191
|
+
setup(__props) {
|
192
|
+
const normalizedSpan = useFormItemSpan();
|
193
|
+
const normalizedRules = useFormItemRules();
|
194
|
+
const elModel = useFormItemStringModel();
|
195
|
+
return (_ctx, _cache) => {
|
196
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
197
|
+
default: withCtx(() => [
|
198
|
+
createVNode(unref(ElFormItem), {
|
199
|
+
prop: _ctx.name,
|
200
|
+
label: _ctx.label,
|
201
|
+
"label-width": _ctx.labelWidth,
|
202
|
+
required: _ctx.required,
|
203
|
+
rules: unref(normalizedRules)
|
204
|
+
}, {
|
205
|
+
default: withCtx(() => [
|
206
|
+
createVNode(unref(ElInput), {
|
207
|
+
modelValue: unref(elModel),
|
208
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
209
|
+
maxlength: _ctx.maxlength,
|
210
|
+
placeholder: _ctx.placeholder,
|
211
|
+
disabled: _ctx.disabled,
|
212
|
+
readonly: _ctx.readonly,
|
213
|
+
type: "textarea",
|
214
|
+
rows: _ctx.rows,
|
215
|
+
resize: "none"
|
216
|
+
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "rows"])
|
217
|
+
]),
|
218
|
+
_: 1
|
219
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
220
|
+
]),
|
221
|
+
_: 1
|
222
|
+
}, 8, ["span"]);
|
223
|
+
};
|
199
224
|
}
|
200
|
-
})
|
201
|
-
|
202
|
-
inheritAttrs:
|
225
|
+
});
|
226
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
227
|
+
...{ name: "OFormSingleselect", inheritAttrs: false },
|
203
228
|
__name: "SingleSelect",
|
204
229
|
props: {
|
205
230
|
name: {},
|
@@ -214,52 +239,62 @@ const We = /* @__PURE__ */ y({
|
|
214
239
|
clearable: { type: Boolean },
|
215
240
|
filterable: { type: Boolean }
|
216
241
|
},
|
217
|
-
setup(
|
218
|
-
const
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
242
|
+
setup(__props) {
|
243
|
+
const attrs = useAttrs();
|
244
|
+
const normalizedSpan = useFormItemSpan();
|
245
|
+
const normalizedRules = useFormItemRules();
|
246
|
+
const normalizedDisabled = useFormItemDisabled();
|
247
|
+
const normalizedCode = useFormItemCode();
|
248
|
+
const elModel = useFormItemStringModel();
|
249
|
+
const content = computed(() => getSingleCodeContent(normalizedCode.value, elModel.value));
|
250
|
+
return (_ctx, _cache) => {
|
251
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
252
|
+
default: withCtx(() => [
|
253
|
+
createVNode(unref(ElFormItem), {
|
254
|
+
prop: _ctx.name,
|
255
|
+
label: _ctx.label,
|
256
|
+
"label-width": _ctx.labelWidth,
|
257
|
+
required: _ctx.required,
|
258
|
+
rules: unref(normalizedRules)
|
259
|
+
}, {
|
260
|
+
default: withCtx(() => [
|
261
|
+
unref(normalizedDisabled) ? (openBlock(), createBlock(unref(ElInput), {
|
262
|
+
key: 0,
|
263
|
+
"model-value": content.value,
|
264
|
+
placeholder: _ctx.placeholder,
|
265
|
+
disabled: true,
|
266
|
+
readonly: true
|
267
|
+
}, null, 8, ["model-value", "placeholder"])) : (openBlock(), createBlock(unref(ElSelect), {
|
268
|
+
key: 1,
|
269
|
+
modelValue: unref(elModel),
|
270
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
271
|
+
placeholder: _ctx.placeholder,
|
272
|
+
clearable: _ctx.clearable,
|
273
|
+
filterable: _ctx.filterable,
|
274
|
+
onChange: unref(attrs).onChange
|
275
|
+
}, {
|
276
|
+
default: withCtx(() => [
|
277
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(normalizedCode), (codeItem) => {
|
278
|
+
return openBlock(), createBlock(unref(ElOption), {
|
279
|
+
key: codeItem.value,
|
280
|
+
label: codeItem.content,
|
281
|
+
value: codeItem.value
|
282
|
+
}, null, 8, ["label", "value"]);
|
283
|
+
}), 128))
|
284
|
+
]),
|
285
|
+
_: 1
|
286
|
+
}, 8, ["modelValue", "placeholder", "clearable", "filterable", "onChange"]))
|
287
|
+
]),
|
288
|
+
_: 1
|
289
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
290
|
+
]),
|
291
|
+
_: 1
|
292
|
+
}, 8, ["span"]);
|
293
|
+
};
|
259
294
|
}
|
260
|
-
})
|
261
|
-
|
262
|
-
inheritAttrs:
|
295
|
+
});
|
296
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
297
|
+
...{ name: "OFormMultiselect", inheritAttrs: false },
|
263
298
|
__name: "MultiSelect",
|
264
299
|
props: {
|
265
300
|
name: {},
|
@@ -274,53 +309,64 @@ const We = /* @__PURE__ */ y({
|
|
274
309
|
collapseTags: { type: Boolean },
|
275
310
|
collapseTagsTooltip: { type: Boolean }
|
276
311
|
},
|
277
|
-
setup(
|
278
|
-
const
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
312
|
+
setup(__props) {
|
313
|
+
const attrs = useAttrs();
|
314
|
+
const normalizedSpan = useFormItemSpan();
|
315
|
+
const normalizedRules = useFormItemRules();
|
316
|
+
const normalizedDisabled = useFormItemDisabled();
|
317
|
+
const normalizedCode = useFormItemCode();
|
318
|
+
const elModel = useFormItemMultiModel();
|
319
|
+
const formContext = useFormContext();
|
320
|
+
const content = computed(() => getMultiCodeContent(normalizedCode.value, formContext.modelValue[__props.name]));
|
321
|
+
return (_ctx, _cache) => {
|
322
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
323
|
+
default: withCtx(() => [
|
324
|
+
createVNode(unref(ElFormItem), {
|
325
|
+
prop: _ctx.name,
|
326
|
+
label: _ctx.label,
|
327
|
+
"label-width": _ctx.labelWidth,
|
328
|
+
required: _ctx.required,
|
329
|
+
rules: unref(normalizedRules)
|
330
|
+
}, {
|
331
|
+
default: withCtx(() => [
|
332
|
+
unref(normalizedDisabled) ? (openBlock(), createBlock(unref(ElInput), {
|
333
|
+
key: 0,
|
334
|
+
"model-value": content.value,
|
335
|
+
placeholder: _ctx.placeholder,
|
336
|
+
disabled: true,
|
337
|
+
readonly: true
|
338
|
+
}, null, 8, ["model-value", "placeholder"])) : (openBlock(), createBlock(unref(ElSelect), {
|
339
|
+
key: 1,
|
340
|
+
modelValue: unref(elModel),
|
341
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
342
|
+
placeholder: _ctx.placeholder,
|
343
|
+
multiple: "",
|
344
|
+
"collapse-tags": _ctx.collapseTags,
|
345
|
+
"collapse-tags-tooltip": _ctx.collapseTagsTooltip,
|
346
|
+
onChange: unref(attrs).onChange
|
347
|
+
}, {
|
348
|
+
default: withCtx(() => [
|
349
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(normalizedCode), (codeItem) => {
|
350
|
+
return openBlock(), createBlock(unref(ElOption), {
|
351
|
+
key: codeItem.value,
|
352
|
+
label: codeItem.content,
|
353
|
+
value: codeItem.value
|
354
|
+
}, null, 8, ["label", "value"]);
|
355
|
+
}), 128))
|
356
|
+
]),
|
357
|
+
_: 1
|
358
|
+
}, 8, ["modelValue", "placeholder", "collapse-tags", "collapse-tags-tooltip", "onChange"]))
|
359
|
+
]),
|
360
|
+
_: 1
|
361
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
362
|
+
]),
|
363
|
+
_: 1
|
364
|
+
}, 8, ["span"]);
|
365
|
+
};
|
320
366
|
}
|
321
|
-
})
|
322
|
-
|
323
|
-
inheritAttrs:
|
367
|
+
});
|
368
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
369
|
+
...{ name: "OFormRadiogroup", inheritAttrs: false },
|
324
370
|
__name: "RadioGroup",
|
325
371
|
props: {
|
326
372
|
name: {},
|
@@ -332,46 +378,53 @@ const We = /* @__PURE__ */ y({
|
|
332
378
|
disabled: { type: Boolean },
|
333
379
|
code: {}
|
334
380
|
},
|
335
|
-
setup(
|
336
|
-
const
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
381
|
+
setup(__props) {
|
382
|
+
const normalizedSpan = useFormItemSpan();
|
383
|
+
const normalizedRules = useFormItemRules();
|
384
|
+
const normalizedCode = useFormItemCode();
|
385
|
+
const elModel = useFormItemStringModel();
|
386
|
+
return (_ctx, _cache) => {
|
387
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
388
|
+
default: withCtx(() => [
|
389
|
+
createVNode(unref(ElFormItem), {
|
390
|
+
prop: _ctx.name,
|
391
|
+
label: _ctx.label,
|
392
|
+
"label-width": _ctx.labelWidth,
|
393
|
+
required: _ctx.required,
|
394
|
+
rules: unref(normalizedRules)
|
395
|
+
}, {
|
396
|
+
default: withCtx(() => [
|
397
|
+
createVNode(unref(ElRadioGroup), {
|
398
|
+
modelValue: unref(elModel),
|
399
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
400
|
+
disabled: _ctx.disabled
|
401
|
+
}, {
|
402
|
+
default: withCtx(() => [
|
403
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(normalizedCode), (codeItem) => {
|
404
|
+
return openBlock(), createBlock(unref(ElRadio), {
|
405
|
+
key: codeItem.value,
|
406
|
+
value: codeItem.value
|
407
|
+
}, {
|
408
|
+
default: withCtx(() => [
|
409
|
+
createTextVNode(toDisplayString(codeItem.content), 1)
|
410
|
+
]),
|
411
|
+
_: 2
|
412
|
+
}, 1032, ["value"]);
|
413
|
+
}), 128))
|
414
|
+
]),
|
415
|
+
_: 1
|
416
|
+
}, 8, ["modelValue", "disabled"])
|
417
|
+
]),
|
418
|
+
_: 1
|
419
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
420
|
+
]),
|
421
|
+
_: 1
|
422
|
+
}, 8, ["span"]);
|
423
|
+
};
|
371
424
|
}
|
372
|
-
})
|
373
|
-
|
374
|
-
inheritAttrs:
|
425
|
+
});
|
426
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
427
|
+
...{ name: "OFormCheckboxgroup", inheritAttrs: false },
|
375
428
|
__name: "CheckboxGroup",
|
376
429
|
props: {
|
377
430
|
name: {},
|
@@ -383,42 +436,49 @@ const We = /* @__PURE__ */ y({
|
|
383
436
|
disabled: { type: Boolean },
|
384
437
|
code: {}
|
385
438
|
},
|
386
|
-
setup(
|
387
|
-
const
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
439
|
+
setup(__props) {
|
440
|
+
const normalizedSpan = useFormItemSpan();
|
441
|
+
const normalizedRules = useFormItemRules();
|
442
|
+
const normalizedCode = useFormItemCode();
|
443
|
+
const elModel = useFormItemMultiModel();
|
444
|
+
return (_ctx, _cache) => {
|
445
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
446
|
+
default: withCtx(() => [
|
447
|
+
createVNode(unref(ElFormItem), {
|
448
|
+
prop: _ctx.name,
|
449
|
+
label: _ctx.label,
|
450
|
+
"label-width": _ctx.labelWidth,
|
451
|
+
required: _ctx.required,
|
452
|
+
rules: unref(normalizedRules)
|
453
|
+
}, {
|
454
|
+
default: withCtx(() => [
|
455
|
+
createVNode(unref(ElCheckboxGroup), {
|
456
|
+
modelValue: unref(elModel),
|
457
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
458
|
+
disabled: _ctx.disabled
|
459
|
+
}, {
|
460
|
+
default: withCtx(() => [
|
461
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(normalizedCode), (codeItem) => {
|
462
|
+
return openBlock(), createBlock(unref(ElCheckbox), {
|
463
|
+
key: codeItem.value,
|
464
|
+
label: codeItem.content,
|
465
|
+
value: codeItem.value
|
466
|
+
}, null, 8, ["label", "value"]);
|
467
|
+
}), 128))
|
468
|
+
]),
|
469
|
+
_: 1
|
470
|
+
}, 8, ["modelValue", "disabled"])
|
471
|
+
]),
|
472
|
+
_: 1
|
473
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
474
|
+
]),
|
475
|
+
_: 1
|
476
|
+
}, 8, ["span"]);
|
477
|
+
};
|
418
478
|
}
|
419
|
-
})
|
420
|
-
|
421
|
-
inheritAttrs:
|
479
|
+
});
|
480
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
481
|
+
...{ name: "OFormCheckbox", inheritAttrs: false },
|
422
482
|
__name: "Checkbox",
|
423
483
|
props: {
|
424
484
|
name: {},
|
@@ -428,32 +488,35 @@ const We = /* @__PURE__ */ y({
|
|
428
488
|
rules: {},
|
429
489
|
disabled: { type: Boolean }
|
430
490
|
},
|
431
|
-
setup(
|
432
|
-
const
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
491
|
+
setup(__props) {
|
492
|
+
const normalizedSpan = useFormItemSpan();
|
493
|
+
const elModel = useFormItemBooleanModel();
|
494
|
+
return (_ctx, _cache) => {
|
495
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
496
|
+
default: withCtx(() => [
|
497
|
+
createVNode(unref(ElFormItem), {
|
498
|
+
prop: _ctx.name,
|
499
|
+
label: _ctx.label,
|
500
|
+
"label-width": _ctx.labelWidth,
|
501
|
+
rules: _ctx.rules
|
502
|
+
}, {
|
503
|
+
default: withCtx(() => [
|
504
|
+
createVNode(unref(ElCheckbox), {
|
505
|
+
modelValue: unref(elModel),
|
506
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
507
|
+
disabled: _ctx.disabled
|
508
|
+
}, null, 8, ["modelValue", "disabled"])
|
509
|
+
]),
|
510
|
+
_: 1
|
511
|
+
}, 8, ["prop", "label", "label-width", "rules"])
|
512
|
+
]),
|
513
|
+
_: 1
|
514
|
+
}, 8, ["span"]);
|
515
|
+
};
|
453
516
|
}
|
454
|
-
})
|
455
|
-
|
456
|
-
inheritAttrs:
|
517
|
+
});
|
518
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
519
|
+
...{ name: "OFormSwitch", inheritAttrs: false },
|
457
520
|
__name: "Switch",
|
458
521
|
props: {
|
459
522
|
name: {},
|
@@ -463,32 +526,35 @@ const We = /* @__PURE__ */ y({
|
|
463
526
|
rules: {},
|
464
527
|
disabled: { type: Boolean }
|
465
528
|
},
|
466
|
-
setup(
|
467
|
-
const
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
529
|
+
setup(__props) {
|
530
|
+
const normalizedSpan = useFormItemSpan();
|
531
|
+
const elModel = useFormItemBooleanModel();
|
532
|
+
return (_ctx, _cache) => {
|
533
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
534
|
+
default: withCtx(() => [
|
535
|
+
createVNode(unref(ElFormItem), {
|
536
|
+
prop: _ctx.name,
|
537
|
+
label: _ctx.label,
|
538
|
+
"label-width": _ctx.labelWidth,
|
539
|
+
rules: _ctx.rules
|
540
|
+
}, {
|
541
|
+
default: withCtx(() => [
|
542
|
+
createVNode(unref(ElSwitch), {
|
543
|
+
modelValue: unref(elModel),
|
544
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
545
|
+
disabled: _ctx.disabled
|
546
|
+
}, null, 8, ["modelValue", "disabled"])
|
547
|
+
]),
|
548
|
+
_: 1
|
549
|
+
}, 8, ["prop", "label", "label-width", "rules"])
|
550
|
+
]),
|
551
|
+
_: 1
|
552
|
+
}, 8, ["span"]);
|
553
|
+
};
|
488
554
|
}
|
489
|
-
})
|
490
|
-
|
491
|
-
inheritAttrs:
|
555
|
+
});
|
556
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
557
|
+
...{ name: "OFormDate", inheritAttrs: false },
|
492
558
|
__name: "DateInput",
|
493
559
|
props: {
|
494
560
|
name: {},
|
@@ -501,79 +567,123 @@ const We = /* @__PURE__ */ y({
|
|
501
567
|
placeholder: {},
|
502
568
|
disabled: { type: Boolean },
|
503
569
|
readonly: { type: Boolean },
|
504
|
-
editable: { type: Boolean, default:
|
505
|
-
clearable: { type: Boolean, default:
|
570
|
+
editable: { type: Boolean, default: true },
|
571
|
+
clearable: { type: Boolean, default: true },
|
506
572
|
format: { default: "YYYY-MM-DD" },
|
507
573
|
sourceFormat: {}
|
508
574
|
},
|
509
|
-
setup(
|
510
|
-
const
|
511
|
-
|
512
|
-
|
513
|
-
|
575
|
+
setup(__props) {
|
576
|
+
const normalizedSpan = useFormItemSpan();
|
577
|
+
const normalizedRules = useFormItemRules();
|
578
|
+
const isTimePicker = computed(() => __props.format.startsWith("H") || __props.format.startsWith("h") || __props.format.startsWith("m") || __props.format.startsWith("s"));
|
579
|
+
const normalizedSourceFormat = computed(() => {
|
580
|
+
if (__props.sourceFormat) {
|
581
|
+
return __props.sourceFormat;
|
582
|
+
}
|
583
|
+
if (isTimePicker.value) {
|
584
|
+
return "HH:mm:ss";
|
585
|
+
} else {
|
586
|
+
return "YYYY-MM-DD";
|
587
|
+
}
|
588
|
+
});
|
589
|
+
const dateType = computed(() => {
|
590
|
+
let picker = "date";
|
591
|
+
if (__props.format.indexOf("y") > -1 || __props.format.indexOf("Y") > -1) {
|
592
|
+
picker = "year";
|
593
|
+
}
|
594
|
+
if (__props.format.indexOf("M") > -1) {
|
595
|
+
picker = "month";
|
596
|
+
}
|
597
|
+
if (__props.format.indexOf("d") > -1 || __props.format.indexOf("D") > -1) {
|
598
|
+
picker = "date";
|
599
|
+
}
|
600
|
+
if (__props.format.indexOf("H") > -1 || __props.format.indexOf("h") > -1 || __props.format.indexOf("k") > -1 || __props.format.indexOf("m") > -1 || __props.format.indexOf("s") > -1 || __props.format.indexOf("S") > -1) {
|
601
|
+
picker = "datetime";
|
602
|
+
}
|
603
|
+
return picker;
|
604
|
+
});
|
605
|
+
const formContext = useFormContext();
|
606
|
+
const elModel = computed({
|
514
607
|
get: () => {
|
515
|
-
const
|
516
|
-
if (
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
608
|
+
const value = formContext.modelValue[__props.name];
|
609
|
+
if (!value) {
|
610
|
+
return void 0;
|
611
|
+
}
|
612
|
+
if (isDate(value)) {
|
613
|
+
return value;
|
614
|
+
} else if (isString(value)) {
|
615
|
+
const dayjsObj = dayjs(value, normalizedSourceFormat.value, true);
|
616
|
+
if (!dayjsObj.isValid()) {
|
617
|
+
throw new OrionError(`日期输入框的值无效,不符合${normalizedSourceFormat.value}格式`);
|
618
|
+
}
|
619
|
+
return dayjsObj.toDate();
|
620
|
+
} else {
|
621
|
+
throw new OrionError("日期输入框的值只能为字符串或日期类型");
|
526
622
|
}
|
527
623
|
},
|
528
|
-
set: (
|
529
|
-
|
624
|
+
set: (newValue) => {
|
625
|
+
if (__props.sourceFormat) {
|
626
|
+
if (!newValue) {
|
627
|
+
formContext.updateModelValue(__props.name, "");
|
628
|
+
} else {
|
629
|
+
formContext.updateModelValue(__props.name, dayjs(newValue).format(normalizedSourceFormat.value));
|
630
|
+
}
|
631
|
+
} else {
|
632
|
+
if (!newValue) {
|
633
|
+
formContext.updateModelValue(__props.name, void 0);
|
634
|
+
} else {
|
635
|
+
formContext.updateModelValue(__props.name, newValue);
|
636
|
+
}
|
637
|
+
}
|
530
638
|
}
|
531
639
|
});
|
532
|
-
return (
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
640
|
+
return (_ctx, _cache) => {
|
641
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
642
|
+
default: withCtx(() => [
|
643
|
+
createVNode(unref(ElFormItem), {
|
644
|
+
prop: _ctx.name,
|
645
|
+
label: _ctx.label,
|
646
|
+
"label-width": _ctx.labelWidth,
|
647
|
+
required: _ctx.required,
|
648
|
+
rules: unref(normalizedRules)
|
649
|
+
}, {
|
650
|
+
default: withCtx(() => [
|
651
|
+
isTimePicker.value ? (openBlock(), createBlock(unref(ElTimePicker), {
|
652
|
+
key: 0,
|
653
|
+
modelValue: elModel.value,
|
654
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => elModel.value = $event),
|
655
|
+
placeholder: _ctx.placeholder,
|
656
|
+
disabled: _ctx.disabled,
|
657
|
+
readonly: _ctx.readonly,
|
658
|
+
editable: _ctx.editable,
|
659
|
+
clearable: _ctx.clearable,
|
660
|
+
format: normalizedSourceFormat.value,
|
661
|
+
"arrow-control": "",
|
662
|
+
style: { "width": "100%" }
|
663
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "format"])) : (openBlock(), createBlock(unref(ElDatePicker), {
|
664
|
+
key: 1,
|
665
|
+
modelValue: elModel.value,
|
666
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => elModel.value = $event),
|
667
|
+
placeholder: _ctx.placeholder,
|
668
|
+
disabled: _ctx.disabled,
|
669
|
+
readonly: _ctx.readonly,
|
670
|
+
editable: _ctx.editable,
|
671
|
+
clearable: _ctx.clearable,
|
672
|
+
type: dateType.value,
|
673
|
+
format: normalizedSourceFormat.value,
|
674
|
+
style: { "width": "100%" }
|
675
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "editable", "clearable", "type", "format"]))
|
676
|
+
]),
|
677
|
+
_: 1
|
678
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
679
|
+
]),
|
680
|
+
_: 1
|
681
|
+
}, 8, ["span"]);
|
682
|
+
};
|
573
683
|
}
|
574
|
-
})
|
575
|
-
|
576
|
-
inheritAttrs:
|
684
|
+
});
|
685
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
686
|
+
...{ name: "OFormFile", inheritAttrs: false },
|
577
687
|
__name: "FileInput",
|
578
688
|
props: {
|
579
689
|
name: {},
|
@@ -584,76 +694,90 @@ const We = /* @__PURE__ */ y({
|
|
584
694
|
rules: {},
|
585
695
|
disabled: { type: Boolean }
|
586
696
|
},
|
587
|
-
setup(
|
588
|
-
const
|
589
|
-
|
590
|
-
|
697
|
+
setup(__props) {
|
698
|
+
const normalizedSpan = useFormItemSpan();
|
699
|
+
const normalizedRules = useFormItemRules();
|
700
|
+
const elModel = useFormItemStringModel();
|
701
|
+
watch(elModel, () => {
|
702
|
+
if (!elModel.value) {
|
703
|
+
file.value = "";
|
704
|
+
}
|
591
705
|
});
|
592
|
-
const
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
706
|
+
const file = ref("");
|
707
|
+
const fileRef = useTemplateRef("inputRef");
|
708
|
+
onMounted(() => {
|
709
|
+
fileRef.value.input.onchange = (event) => {
|
710
|
+
var _a;
|
711
|
+
elModel.value = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.files[0];
|
712
|
+
};
|
713
|
+
file.value = "";
|
714
|
+
});
|
715
|
+
return (_ctx, _cache) => {
|
716
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
717
|
+
default: withCtx(() => [
|
718
|
+
createVNode(unref(ElFormItem), {
|
719
|
+
prop: _ctx.name,
|
720
|
+
label: _ctx.label,
|
721
|
+
"label-width": _ctx.labelWidth,
|
722
|
+
required: _ctx.required,
|
723
|
+
rules: unref(normalizedRules)
|
724
|
+
}, {
|
725
|
+
default: withCtx(() => [
|
726
|
+
createVNode(unref(ElInput), {
|
727
|
+
ref: "inputRef",
|
728
|
+
modelValue: file.value,
|
729
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => file.value = $event),
|
730
|
+
disabled: _ctx.disabled,
|
731
|
+
type: "file",
|
732
|
+
"validate-event": false
|
733
|
+
}, null, 8, ["modelValue", "disabled"])
|
734
|
+
]),
|
735
|
+
_: 1
|
736
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
737
|
+
]),
|
738
|
+
_: 1
|
739
|
+
}, 8, ["span"]);
|
740
|
+
};
|
622
741
|
}
|
623
|
-
})
|
624
|
-
|
625
|
-
inheritAttrs:
|
742
|
+
});
|
743
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
744
|
+
...{ name: "OFormButtongroup", inheritAttrs: false },
|
626
745
|
__name: "ButtonGroup",
|
627
746
|
props: {
|
628
747
|
span: {},
|
629
748
|
gutter: { type: [Boolean, String] },
|
630
749
|
align: { default: "right" }
|
631
750
|
},
|
632
|
-
setup(
|
633
|
-
const
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
751
|
+
setup(__props) {
|
752
|
+
const style = computed(() => {
|
753
|
+
return {
|
754
|
+
textAlign: __props.align
|
755
|
+
};
|
756
|
+
});
|
757
|
+
const normalizedSpan = useFormItemSpan();
|
758
|
+
return (_ctx, _cache) => {
|
759
|
+
return openBlock(), createBlock(unref(ElCol), {
|
760
|
+
span: unref(normalizedSpan),
|
761
|
+
style: normalizeStyle(style.value)
|
762
|
+
}, {
|
763
|
+
default: withCtx(() => [
|
764
|
+
createVNode(unref(Space), {
|
765
|
+
gutter: _ctx.gutter,
|
766
|
+
style: { "margin-bottom": "18px" }
|
767
|
+
}, {
|
768
|
+
default: withCtx(() => [
|
769
|
+
renderSlot(_ctx.$slots, "default")
|
770
|
+
]),
|
771
|
+
_: 3
|
772
|
+
}, 8, ["gutter"])
|
773
|
+
]),
|
774
|
+
_: 3
|
775
|
+
}, 8, ["span", "style"]);
|
776
|
+
};
|
653
777
|
}
|
654
|
-
})
|
655
|
-
|
656
|
-
inheritAttrs:
|
778
|
+
});
|
779
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
780
|
+
...{ name: "OFormDiy", inheritAttrs: false },
|
657
781
|
__name: "DiyItem",
|
658
782
|
props: {
|
659
783
|
name: {},
|
@@ -663,29 +787,32 @@ const We = /* @__PURE__ */ y({
|
|
663
787
|
required: { type: Boolean },
|
664
788
|
rules: {}
|
665
789
|
},
|
666
|
-
setup(
|
667
|
-
const
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
790
|
+
setup(__props) {
|
791
|
+
const normalizedSpan = useFormItemSpan();
|
792
|
+
const normalizedRules = useFormItemRules();
|
793
|
+
return (_ctx, _cache) => {
|
794
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
795
|
+
default: withCtx(() => [
|
796
|
+
createVNode(unref(ElFormItem), {
|
797
|
+
prop: _ctx.name,
|
798
|
+
label: _ctx.label,
|
799
|
+
"label-width": _ctx.labelWidth,
|
800
|
+
required: _ctx.required,
|
801
|
+
rules: unref(normalizedRules)
|
802
|
+
}, {
|
803
|
+
default: withCtx(() => [
|
804
|
+
renderSlot(_ctx.$slots, "default")
|
805
|
+
]),
|
806
|
+
_: 3
|
807
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
808
|
+
]),
|
809
|
+
_: 3
|
810
|
+
}, 8, ["span"]);
|
811
|
+
};
|
685
812
|
}
|
686
|
-
})
|
687
|
-
|
688
|
-
inheritAttrs:
|
813
|
+
});
|
814
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
815
|
+
...{ name: "OFormLov", inheritAttrs: false },
|
689
816
|
__name: "LovInput",
|
690
817
|
props: {
|
691
818
|
name: {},
|
@@ -700,93 +827,133 @@ const We = /* @__PURE__ */ y({
|
|
700
827
|
readonly: { type: Boolean },
|
701
828
|
fillMapping: { type: [String, Function] }
|
702
829
|
},
|
703
|
-
setup(
|
704
|
-
const
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
830
|
+
setup(__props) {
|
831
|
+
const normalizedSpan = useFormItemSpan();
|
832
|
+
const normalizedRules = useFormItemRules();
|
833
|
+
const elModel = useFormItemStringModel();
|
834
|
+
const formContext = useFormContext();
|
835
|
+
const visible = ref(false);
|
836
|
+
const onVisibleChange = (val) => {
|
837
|
+
visible.value = val;
|
838
|
+
};
|
839
|
+
const changed = ref(false);
|
840
|
+
const onInput = () => {
|
841
|
+
var _a;
|
842
|
+
if (!changed.value) {
|
843
|
+
changed.value = true;
|
844
|
+
}
|
845
|
+
if (!visible.value) {
|
846
|
+
(_a = dropdownRef.value) == null ? void 0 : _a.handleOpen();
|
847
|
+
}
|
848
|
+
};
|
849
|
+
let keydownHandler;
|
850
|
+
const registerKeydownHandler = (handler) => {
|
851
|
+
keydownHandler = handler;
|
709
852
|
};
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
}, _ = () => {
|
717
|
-
if (s.value && A(t.fillMapping)) {
|
718
|
-
const b = {}, B = t.fillMapping.split(",");
|
719
|
-
for (let M = 0; M < B.length; M++) {
|
720
|
-
const C = B[M].split(":")[0].trim();
|
721
|
-
b[C] = void 0;
|
853
|
+
const onKeydown = (e) => {
|
854
|
+
var _a;
|
855
|
+
const fallthroughCodes = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "Space"];
|
856
|
+
if (fallthroughCodes.indexOf(e.code) > -1) {
|
857
|
+
if (visible.value) {
|
858
|
+
keydownHandler && keydownHandler(e.code);
|
722
859
|
}
|
723
|
-
|
860
|
+
e.stopPropagation();
|
724
861
|
}
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
862
|
+
const triggerCodes = ["ArrowUp", "ArrowDown"];
|
863
|
+
if (triggerCodes.indexOf(e.code) > -1 && !visible.value) {
|
864
|
+
(_a = dropdownRef.value) == null ? void 0 : _a.handleOpen();
|
865
|
+
}
|
866
|
+
};
|
867
|
+
const onChange = () => {
|
868
|
+
if (!changed.value) {
|
869
|
+
return;
|
870
|
+
}
|
871
|
+
if (isString(__props.fillMapping)) {
|
872
|
+
const data = {};
|
873
|
+
const pairs = __props.fillMapping.split(",");
|
874
|
+
for (let i = 0; i < pairs.length; i++) {
|
875
|
+
const dstName = pairs[i].split(":")[0].trim();
|
876
|
+
data[dstName] = void 0;
|
877
|
+
}
|
878
|
+
formContext.updateModelValueMulti(data);
|
879
|
+
}
|
880
|
+
};
|
881
|
+
const dropdownRef = useTemplateRef("dropdown");
|
882
|
+
const backfill = (params) => {
|
883
|
+
var _a;
|
884
|
+
(_a = dropdownRef.value) == null ? void 0 : _a.handleClose();
|
885
|
+
if (isString(__props.fillMapping)) {
|
886
|
+
const data = {};
|
887
|
+
const pairs = __props.fillMapping.split(",");
|
888
|
+
for (let i = 0; i < pairs.length; i++) {
|
889
|
+
const dstName = pairs[i].split(":")[0].trim();
|
890
|
+
const srcName = pairs[i].split(":")[1].trim();
|
891
|
+
const srcValue = params[srcName];
|
892
|
+
data[dstName] = srcValue;
|
893
|
+
}
|
894
|
+
formContext.updateModelValueMulti(data);
|
895
|
+
} else {
|
896
|
+
__props.fillMapping && __props.fillMapping(params);
|
897
|
+
}
|
898
|
+
if (changed.value) {
|
899
|
+
changed.value = false;
|
900
|
+
}
|
901
|
+
};
|
902
|
+
provide(
|
903
|
+
lovContextKey,
|
904
|
+
reactive({
|
905
|
+
lovValue: elModel,
|
906
|
+
backfill,
|
907
|
+
registerKeydownHandler
|
744
908
|
})
|
745
|
-
)
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
909
|
+
);
|
910
|
+
return (_ctx, _cache) => {
|
911
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
912
|
+
default: withCtx(() => [
|
913
|
+
createVNode(unref(ElFormItem), {
|
914
|
+
prop: _ctx.name,
|
915
|
+
label: _ctx.label,
|
916
|
+
"label-width": _ctx.labelWidth,
|
917
|
+
required: _ctx.required,
|
918
|
+
rules: unref(normalizedRules)
|
919
|
+
}, {
|
920
|
+
default: withCtx(() => [
|
921
|
+
createVNode(unref(ElDropdown), {
|
922
|
+
ref: "dropdown",
|
923
|
+
trigger: "click",
|
924
|
+
onVisibleChange,
|
925
|
+
style: { "width": "100%" }
|
926
|
+
}, {
|
927
|
+
dropdown: withCtx(() => [
|
928
|
+
renderSlot(_ctx.$slots, "default")
|
929
|
+
]),
|
930
|
+
default: withCtx(() => [
|
931
|
+
createVNode(unref(ElInput), {
|
932
|
+
modelValue: unref(elModel),
|
933
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(elModel) ? elModel.value = $event : null),
|
934
|
+
maxlength: _ctx.maxlength,
|
935
|
+
placeholder: _ctx.placeholder,
|
936
|
+
disabled: _ctx.disabled,
|
937
|
+
readonly: _ctx.readonly,
|
938
|
+
onInput,
|
939
|
+
onKeydown,
|
940
|
+
onChange,
|
941
|
+
"suffix-icon": unref(search_default)
|
942
|
+
}, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "suffix-icon"])
|
943
|
+
]),
|
944
|
+
_: 3
|
945
|
+
}, 512)
|
946
|
+
]),
|
947
|
+
_: 3
|
948
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
949
|
+
]),
|
950
|
+
_: 3
|
951
|
+
}, 8, ["span"]);
|
952
|
+
};
|
786
953
|
}
|
787
|
-
})
|
788
|
-
|
789
|
-
inheritAttrs:
|
954
|
+
});
|
955
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
956
|
+
...{ name: "OFormNumber", inheritAttrs: false },
|
790
957
|
__name: "NumberInput",
|
791
958
|
props: {
|
792
959
|
name: {},
|
@@ -803,78 +970,91 @@ const We = /* @__PURE__ */ y({
|
|
803
970
|
step: {},
|
804
971
|
stepStrictly: { type: Boolean },
|
805
972
|
precision: {},
|
806
|
-
controls: { type: Boolean, default:
|
973
|
+
controls: { type: Boolean, default: true },
|
807
974
|
controlsPosition: {}
|
808
975
|
},
|
809
|
-
setup(
|
810
|
-
const
|
976
|
+
setup(__props) {
|
977
|
+
const normalizedSpan = useFormItemSpan();
|
978
|
+
const normalizedRules = useFormItemRules();
|
979
|
+
const formContext = useFormContext();
|
980
|
+
const elModel = computed({
|
811
981
|
get: () => {
|
812
|
-
const
|
813
|
-
if (
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
982
|
+
const value = formContext.modelValue[__props.name];
|
983
|
+
if (!value) {
|
984
|
+
return void 0;
|
985
|
+
}
|
986
|
+
if (isNumber(value)) {
|
987
|
+
return value;
|
988
|
+
} else if (isString(value)) {
|
989
|
+
return toNumber(value);
|
990
|
+
} else {
|
991
|
+
throw new OrionError("数字输入框的值只能为字符串或数字类型");
|
819
992
|
}
|
820
993
|
},
|
821
|
-
set: (
|
822
|
-
|
994
|
+
set: (newValue) => {
|
995
|
+
if (!newValue) {
|
996
|
+
formContext.updateModelValue(__props.name, void 0);
|
997
|
+
} else {
|
998
|
+
formContext.updateModelValue(__props.name, newValue);
|
999
|
+
}
|
823
1000
|
}
|
824
1001
|
});
|
825
|
-
return (
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
1002
|
+
return (_ctx, _cache) => {
|
1003
|
+
return openBlock(), createBlock(unref(ElCol), { span: unref(normalizedSpan) }, {
|
1004
|
+
default: withCtx(() => [
|
1005
|
+
createVNode(unref(ElFormItem), {
|
1006
|
+
prop: _ctx.name,
|
1007
|
+
label: _ctx.label,
|
1008
|
+
"label-width": _ctx.labelWidth,
|
1009
|
+
required: _ctx.required,
|
1010
|
+
rules: unref(normalizedRules)
|
1011
|
+
}, {
|
1012
|
+
default: withCtx(() => [
|
1013
|
+
createVNode(unref(ElInputNumber), {
|
1014
|
+
modelValue: elModel.value,
|
1015
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => elModel.value = $event),
|
1016
|
+
placeholder: _ctx.placeholder,
|
1017
|
+
disabled: _ctx.disabled,
|
1018
|
+
readonly: _ctx.readonly,
|
1019
|
+
min: _ctx.min,
|
1020
|
+
max: _ctx.max,
|
1021
|
+
step: _ctx.step,
|
1022
|
+
"step-strictly": _ctx.stepStrictly,
|
1023
|
+
precision: _ctx.precision,
|
1024
|
+
controls: _ctx.controls,
|
1025
|
+
"controls-position": _ctx.controlsPosition,
|
1026
|
+
style: { "width": "100%" }
|
1027
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position"])
|
1028
|
+
]),
|
1029
|
+
_: 1
|
1030
|
+
}, 8, ["prop", "label", "label-width", "required", "rules"])
|
1031
|
+
]),
|
1032
|
+
_: 1
|
1033
|
+
}, 8, ["span"]);
|
1034
|
+
};
|
856
1035
|
}
|
857
|
-
})
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
1036
|
+
});
|
1037
|
+
const index = withInstall(_sfc_main$f, {
|
1038
|
+
StringInput: _sfc_main$e,
|
1039
|
+
PasswordInput: _sfc_main$d,
|
1040
|
+
Textarea: _sfc_main$c,
|
1041
|
+
SingleSelect: _sfc_main$b,
|
1042
|
+
MultiSelect: _sfc_main$a,
|
1043
|
+
RadioGroup: _sfc_main$9,
|
1044
|
+
CheckboxGroup: _sfc_main$8,
|
1045
|
+
Checkbox: _sfc_main$7,
|
1046
|
+
Switch: _sfc_main$6,
|
1047
|
+
DateInput: _sfc_main$5,
|
1048
|
+
FileInput: _sfc_main$4,
|
1049
|
+
ButtonGroup: _sfc_main$3,
|
1050
|
+
DiyItem: _sfc_main$2,
|
1051
|
+
LovInput: _sfc_main$1,
|
1052
|
+
NumberInput: _sfc_main
|
873
1053
|
});
|
874
1054
|
export {
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
1055
|
+
index as default,
|
1056
|
+
formContextKey,
|
1057
|
+
lovContextKey,
|
1058
|
+
default2 as useLov
|
879
1059
|
};
|
880
1060
|
//# sourceMappingURL=index.js.map
|