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