@cldemo/ui-kit 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buildLibs/all/index.cjs +8 -8
- package/buildLibs/all/index.js +12157 -12048
- package/buildLibs/common/globalConfig.cjs +1 -1
- package/buildLibs/common/globalConfig.js +29 -15
- package/buildLibs/common/i18n/en.cjs +1 -1
- package/buildLibs/common/i18n/en.js +3 -1
- package/buildLibs/common/i18n/zh_CN.cjs +1 -1
- package/buildLibs/common/i18n/zh_CN.js +3 -1
- package/buildLibs/common/index.cjs +1 -1
- package/buildLibs/common/index.js +26 -24
- package/buildLibs/mobile/index.cjs +5 -5
- package/buildLibs/mobile/index.js +5902 -5852
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js} +2 -2
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js +254 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js} +153 -145
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js} +67 -59
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js +2536 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js} +386 -375
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js +310 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js} +53 -47
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js} +66 -60
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js} +63 -55
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D_73B6av.js +1533 -0
- package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js} +102 -92
- package/buildLibs/types/All/index.d.ts +1 -1
- package/buildLibs/types/Common/globalConfig.d.ts +29 -0
- package/buildLibs/types/Common/globalTypes.d.ts +11 -0
- package/buildLibs/types/Common/i18n/en.d.ts +2 -0
- package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
- package/buildLibs/types/Common/index.d.ts +1 -1
- package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
- package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckbox.js +1 -1
- package/buildLibs/utils/Element/ClInput.cjs +1 -1
- package/buildLibs/utils/Element/ClInput.js +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
- package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumber.js +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
- package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
- package/buildLibs/utils/Element/ClInputPassword.js +1 -1
- package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
- package/buildLibs/utils/Element/ClInputSearch.js +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
- package/buildLibs/utils/Element/ClRadio.cjs +1 -1
- package/buildLibs/utils/Element/ClRadio.js +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-2THK822S.js +254 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js} +386 -375
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js} +2 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CATwJnes.js} +66 -60
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js} +3 -3
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CsCn637u.js +2 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js} +153 -145
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js +1533 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js +2536 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js} +53 -47
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DwBf338f.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js} +63 -55
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js +310 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js} +67 -59
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-oovIcT38.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js} +1 -1
- package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
- package/buildLibs/utils/Web/ClColorPicker.js +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.js +1 -1
- package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
- package/buildLibs/utils/Web/ClDateTime.js +1 -1
- package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
- package/buildLibs/utils/Web/ClFileUpload.js +1 -1
- package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
- package/buildLibs/utils/Web/ClInputTag.js +1 -1
- package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
- package/buildLibs/utils/Web/ClPaginate.js +1 -1
- package/buildLibs/utils/Web/ClSelect.cjs +1 -1
- package/buildLibs/utils/Web/ClSelect.js +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
- package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectMove.js +655 -647
- package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTag.js +1 -1
- package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTree.js +71 -63
- package/buildLibs/utils/Web/ClTable.cjs +1 -1
- package/buildLibs/utils/Web/ClTable.js +1 -1
- package/buildLibs/utils/Web/ClTree.cjs +1 -1
- package/buildLibs/utils/Web/ClTree.js +1 -1
- package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
- package/buildLibs/utils/Web/ClXEditable.js +10 -10
- package/buildLibs/web/index.cjs +7 -7
- package/buildLibs/web/index.js +10792 -10685
- package/docs/components/Element/Checkbox.md +2 -1
- package/docs/components/Element/Form.md +15 -0
- package/docs/components/Element/Input.md +2 -1
- package/docs/components/Element/InputNumber.md +2 -1
- package/docs/components/Element/InputNumberStepper.md +2 -1
- package/docs/components/Element/InputTextarea.md +2 -1
- package/docs/components/Element/Radio.md +2 -1
- package/docs/components/Web/DateTime.md +2 -1
- package/docs/components/Web/FileUpload.md +2 -1
- package/docs/components/Web/Select.md +2 -1
- package/docs/components/Web/SelectCascade.md +1 -0
- package/docs/components/Web/SelectMove.md +2 -1
- package/docs/components/Web/SelectTag.md +1 -0
- package/docs/components/Web/SelectTree.md +2 -1
- package/docs/components/Web/Tree.md +2 -1
- package/package.json +1 -1
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { defineComponent as tt, reactive as et, ref as D, computed as y, onMounted as st, nextTick as nt, watch as N, openBlock as E, createElementBlock as V, unref as B, toDisplayString as at, normalizeClass as ot, Fragment as lt, renderList as it, normalizeStyle as rt, createVNode as F, withCtx as ct } from "vue";
|
|
2
|
+
import o from "@cldemo/ui-kit/common/base";
|
|
3
|
+
import ut from "@cldemo/ui-kit/common/Element";
|
|
4
|
+
import { getPlaintextOutText as pt } from "@cldemo/ui-kit/common/globalConfig";
|
|
5
|
+
import { a as dt } from "./language-CZZEj4e3.js";
|
|
6
|
+
import { _ as ft } from "./Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js";
|
|
7
|
+
import { _ as ht } from "./Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
const mt = ["id"], gt = ["id"], Jt = /* @__PURE__ */ tt({
|
|
10
|
+
name: "ClSelectCascade",
|
|
11
|
+
__name: "Index",
|
|
12
|
+
props: {
|
|
13
|
+
id: String,
|
|
14
|
+
// desc: 自定义元素ID
|
|
15
|
+
value: [String, Number],
|
|
16
|
+
// desc: 选中的值
|
|
17
|
+
className: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
// desc: 自定义CSS类名
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
// desc: 是否禁用
|
|
26
|
+
},
|
|
27
|
+
list: {
|
|
28
|
+
type: Array,
|
|
29
|
+
default: () => []
|
|
30
|
+
// desc: 级联数据列表
|
|
31
|
+
},
|
|
32
|
+
placeholder: String,
|
|
33
|
+
// desc: 各层级占位符,多个用 | 分隔
|
|
34
|
+
isClear: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
// desc: 是否可清空
|
|
38
|
+
},
|
|
39
|
+
isSearch: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
// desc: 是否可搜索
|
|
43
|
+
},
|
|
44
|
+
parentKey: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "parentId"
|
|
47
|
+
// desc: 父级键名字段
|
|
48
|
+
},
|
|
49
|
+
topParentValue: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "0"
|
|
52
|
+
// desc: 顶级父值
|
|
53
|
+
},
|
|
54
|
+
width: String,
|
|
55
|
+
// desc: 各层级下拉宽度,多个用 | 分隔,需带单位(px/%)
|
|
56
|
+
isCheckValidate: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
// desc: 是否启用校验
|
|
60
|
+
},
|
|
61
|
+
validateRules: {
|
|
62
|
+
type: Array,
|
|
63
|
+
default: () => [{ r: "required" }]
|
|
64
|
+
// desc: 校验规则
|
|
65
|
+
},
|
|
66
|
+
isShowInMsg: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
// desc: 校验信息是否在消息中显示
|
|
70
|
+
},
|
|
71
|
+
isPlaintext: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
// desc: 是否纯文本只读模式,只渲染选中项层级文本不挂载各级下拉
|
|
75
|
+
},
|
|
76
|
+
plaintextEmptyText: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: void 0
|
|
79
|
+
// desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
|
|
80
|
+
},
|
|
81
|
+
plaintextLevelSeparator: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: " > "
|
|
84
|
+
// desc: 纯文本模式下级联层级之间的分隔符
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
emits: {
|
|
88
|
+
"update:value": (p) => !0,
|
|
89
|
+
// desc: 值变化时触发
|
|
90
|
+
"update:modelValue": (p) => !0,
|
|
91
|
+
// desc: 标准 v-model 支持(等价 update:value)
|
|
92
|
+
onChange: (p) => !0
|
|
93
|
+
// desc: 选中变化时触发
|
|
94
|
+
},
|
|
95
|
+
setup(p, { expose: K, emit: T }) {
|
|
96
|
+
const i = p, C = T, { optPageLanguage: b, getPageLanguage: M } = dt();
|
|
97
|
+
M("common");
|
|
98
|
+
const O = `selectCascade-${o.getRandom(5)}`, P = i.id, c = et({
|
|
99
|
+
lastValue: i.value,
|
|
100
|
+
isFirstDataFinish: !1
|
|
101
|
+
}), m = D([]), u = {
|
|
102
|
+
dataJson: {},
|
|
103
|
+
dataGroup: {},
|
|
104
|
+
parentIdsJson: {}
|
|
105
|
+
}, J = D(0), x = y(() => b.value.pleaseSelect), $ = y(() => {
|
|
106
|
+
const { placeholder: t } = i;
|
|
107
|
+
return o.isNonEmptyString(t) ? t.split("|") : [];
|
|
108
|
+
}), G = y(() => {
|
|
109
|
+
const { width: t } = i;
|
|
110
|
+
return o.isNonEmptyString(t) ? t.split("|") : [];
|
|
111
|
+
}), R = y(() => {
|
|
112
|
+
let t = { "panel-select-cascade": !0 };
|
|
113
|
+
return t = o.getJsonMerge(t, ut.getClassNameJson(i.className)), t;
|
|
114
|
+
}), j = (t) => {
|
|
115
|
+
t !== c.lastValue && (c.lastValue = t, C("update:value", t), C("update:modelValue", t), C("onChange", t));
|
|
116
|
+
}, k = (t) => o.isExistJsonKey(u.dataGroup, t), U = (t) => k(t) ? u.dataGroup[t] : [], I = (t) => o.isExistJsonKey(u.dataJson, t) ? u.dataJson[t] : null, S = () => `top_${i.topParentValue}`, w = (t) => {
|
|
117
|
+
const { parentKey: e, topParentValue: s } = i, a = {}, n = {};
|
|
118
|
+
o.isEmpty(t) || t.forEach((r) => {
|
|
119
|
+
const l = o.getJsonClone(r);
|
|
120
|
+
if (o.isEmpty(l?.id) || o.isEmpty(l?.[e]))
|
|
121
|
+
return;
|
|
122
|
+
const f = l.id.toString(), d = l[e].toString();
|
|
123
|
+
a[f] = l;
|
|
124
|
+
const h = d === s.toString() ? S() : d;
|
|
125
|
+
o.isExistJsonKey(n, h) || (n[h] = []), n[h].push(l);
|
|
126
|
+
}), u.dataJson = a, u.dataGroup = n, J.value += 1;
|
|
127
|
+
}, g = (t, e) => {
|
|
128
|
+
const s = {
|
|
129
|
+
idx: t,
|
|
130
|
+
pId: e,
|
|
131
|
+
placeholder: x.value,
|
|
132
|
+
list: [],
|
|
133
|
+
sty: {},
|
|
134
|
+
selected: ""
|
|
135
|
+
};
|
|
136
|
+
if (!o.isEmpty(e)) {
|
|
137
|
+
const l = U(e);
|
|
138
|
+
s.list = o.getListClone(l);
|
|
139
|
+
}
|
|
140
|
+
const a = $.value, n = a.length;
|
|
141
|
+
n > 0 && (n > t ? s.placeholder = o.isEmpty(a[t]) ? x.value : a[t] : n === 1 && (s.placeholder = a[0]));
|
|
142
|
+
const r = G.value;
|
|
143
|
+
return r.length > t && (o.isEmpty(r[t]) || (s.sty.width = r[t], s.sty.flex = "none")), s;
|
|
144
|
+
}, _ = (t, e) => {
|
|
145
|
+
const { parentKey: s, topParentValue: a } = i;
|
|
146
|
+
let n = [];
|
|
147
|
+
if (e && e.indexOf(t) > -1)
|
|
148
|
+
return [];
|
|
149
|
+
const r = e ? e.concat([t]) : [t];
|
|
150
|
+
if (o.isExistJsonKey(u.parentIdsJson, t))
|
|
151
|
+
n = u.parentIdsJson[t];
|
|
152
|
+
else {
|
|
153
|
+
const l = I(t);
|
|
154
|
+
if (l != null) {
|
|
155
|
+
const f = l[s].toString();
|
|
156
|
+
if (f !== a.toString()) {
|
|
157
|
+
const d = I(f);
|
|
158
|
+
if (d != null) {
|
|
159
|
+
n.push(f);
|
|
160
|
+
const h = _(f, r);
|
|
161
|
+
h.length > 0 && (n = n.concat(h));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
u.parentIdsJson[t] = n;
|
|
166
|
+
}
|
|
167
|
+
return n;
|
|
168
|
+
}, v = (t) => {
|
|
169
|
+
let e = o.isUndefined(t) ? i.value : t;
|
|
170
|
+
e != null && !o.isEmpty(e) && !o.isExistJsonKey(u.dataJson, e.toString()) && (e = "");
|
|
171
|
+
const s = [];
|
|
172
|
+
if (e == null || o.isEmpty(e))
|
|
173
|
+
s.push(g(0, S())), s.push(g(1, ""));
|
|
174
|
+
else {
|
|
175
|
+
const a = e.toString(), n = [..._(a)].reverse(), r = n.length;
|
|
176
|
+
if (r > 0) {
|
|
177
|
+
n.forEach((f, d) => {
|
|
178
|
+
const h = d === 0 ? S() : n[d - 1], L = g(d, h);
|
|
179
|
+
L.selected = f, s.push(L);
|
|
180
|
+
});
|
|
181
|
+
const l = g(r, n[r - 1]);
|
|
182
|
+
l.selected = a, s.push(l);
|
|
183
|
+
} else {
|
|
184
|
+
const l = g(0, S());
|
|
185
|
+
l.selected = a, s.push(l);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
m.value = s;
|
|
189
|
+
}, q = () => {
|
|
190
|
+
w(i.list), v(), c.isFirstDataFinish = !0, c.lastValue = i.value;
|
|
191
|
+
};
|
|
192
|
+
st(() => {
|
|
193
|
+
nt(() => {
|
|
194
|
+
q();
|
|
195
|
+
});
|
|
196
|
+
}), N(
|
|
197
|
+
() => i.value,
|
|
198
|
+
(t) => {
|
|
199
|
+
t !== c.lastValue && c.isFirstDataFinish && (v(), c.lastValue = t);
|
|
200
|
+
}
|
|
201
|
+
), N(
|
|
202
|
+
() => i.list,
|
|
203
|
+
(t) => {
|
|
204
|
+
if (!c.isFirstDataFinish) {
|
|
205
|
+
c.isFirstDataFinish = !0;
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
u.parentIdsJson = {}, w(t);
|
|
209
|
+
const { value: e } = i, s = e != null && !o.isEmpty(e) && o.isExistJsonKey(u.dataJson, e.toString()) ? e : "";
|
|
210
|
+
v(s), c.lastValue = s;
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
const z = () => !0, A = (t, e) => {
|
|
214
|
+
let s = "";
|
|
215
|
+
if (o.isEmpty(t) && e === 0)
|
|
216
|
+
v("");
|
|
217
|
+
else if (o.isEmpty(t)) {
|
|
218
|
+
if (m.value.splice(e + 1), e > 0) {
|
|
219
|
+
const a = m.value[e - 1];
|
|
220
|
+
a && (s = a.selected);
|
|
221
|
+
}
|
|
222
|
+
} else {
|
|
223
|
+
const a = t.toString();
|
|
224
|
+
k(a) ? (m.value.splice(e + 1), m.value.push(g(e + 1, a))) : (s = t, m.value.splice(e + 1));
|
|
225
|
+
}
|
|
226
|
+
j(s);
|
|
227
|
+
}, W = () => c.lastValue, H = (t) => {
|
|
228
|
+
const e = _(t), s = e.length > 0 ? e.slice().reverse().concat([t]) : [t], a = [];
|
|
229
|
+
return s.forEach((n) => {
|
|
230
|
+
const r = u.dataJson[n];
|
|
231
|
+
r != null && !o.isEmpty(r.name) && a.push(r.name);
|
|
232
|
+
}), a;
|
|
233
|
+
}, Q = () => {
|
|
234
|
+
const t = c.lastValue;
|
|
235
|
+
let e = "";
|
|
236
|
+
return t != null && !o.isEmpty(t) && (e = H(t.toString()).join(" → ")), {
|
|
237
|
+
value: t,
|
|
238
|
+
show: e || (t != null ? t.toString() : "")
|
|
239
|
+
};
|
|
240
|
+
}, X = (t) => {
|
|
241
|
+
const e = [], s = /* @__PURE__ */ new Set();
|
|
242
|
+
let a = t;
|
|
243
|
+
for (; o.isNonEmptyString(a) && !s.has(a); ) {
|
|
244
|
+
s.add(a);
|
|
245
|
+
const n = I(a);
|
|
246
|
+
if (n == null) break;
|
|
247
|
+
o.isNonEmptyString(n.name) && e.unshift(n.name);
|
|
248
|
+
const r = n[i.parentKey], l = r != null ? String(r) : "";
|
|
249
|
+
if (l === "" || l === String(i.topParentValue)) break;
|
|
250
|
+
a = l;
|
|
251
|
+
}
|
|
252
|
+
return e;
|
|
253
|
+
}, Y = y(() => {
|
|
254
|
+
i.list, J.value;
|
|
255
|
+
const t = c.lastValue;
|
|
256
|
+
if (t == null || o.isEmpty(t))
|
|
257
|
+
return "";
|
|
258
|
+
const e = o.isString(i.plaintextLevelSeparator) ? i.plaintextLevelSeparator : " > ", s = X(t.toString());
|
|
259
|
+
return s.length > 0 ? s.join(e) : t.toString();
|
|
260
|
+
}), Z = y(
|
|
261
|
+
() => pt("selectCascade", i.plaintextEmptyText, Y.value, i.value)
|
|
262
|
+
);
|
|
263
|
+
return K({
|
|
264
|
+
getValue: W,
|
|
265
|
+
getValueData: Q,
|
|
266
|
+
setValue: (t) => {
|
|
267
|
+
v(t), c.lastValue = t;
|
|
268
|
+
}
|
|
269
|
+
}), (t, e) => p.isPlaintext ? (E(), V("div", {
|
|
270
|
+
key: 0,
|
|
271
|
+
id: B(P),
|
|
272
|
+
class: "cl-plaintext-value"
|
|
273
|
+
}, at(Z.value), 9, mt)) : (E(), V("div", {
|
|
274
|
+
key: 1,
|
|
275
|
+
id: B(P),
|
|
276
|
+
class: ot(R.value)
|
|
277
|
+
}, [
|
|
278
|
+
(E(!0), V(lt, null, it(m.value, (s, a) => (E(), V("div", {
|
|
279
|
+
key: `${O}-${a}`,
|
|
280
|
+
class: "selectCascade-item",
|
|
281
|
+
style: rt(s.sty)
|
|
282
|
+
}, [
|
|
283
|
+
F(ft, {
|
|
284
|
+
isShowMsg: p.isShowInMsg,
|
|
285
|
+
isCheck: p.isCheckValidate,
|
|
286
|
+
checkValue: s.selected,
|
|
287
|
+
rules: p.validateRules
|
|
288
|
+
}, {
|
|
289
|
+
default: ct(() => [
|
|
290
|
+
F(ht, {
|
|
291
|
+
isClear: p.isClear,
|
|
292
|
+
isSearch: p.isSearch,
|
|
293
|
+
placeholder: s.placeholder,
|
|
294
|
+
list: s.list,
|
|
295
|
+
disabled: p.disabled,
|
|
296
|
+
value: s.selected,
|
|
297
|
+
"onUpdate:value": (n) => s.selected = n,
|
|
298
|
+
onOpenBefore: z,
|
|
299
|
+
onOnChange: (n) => A(n, a)
|
|
300
|
+
}, null, 8, ["isClear", "isSearch", "placeholder", "list", "disabled", "value", "onUpdate:value", "onOnChange"])
|
|
301
|
+
]),
|
|
302
|
+
_: 2
|
|
303
|
+
}, 1032, ["isShowMsg", "isCheck", "checkValue", "rules"])
|
|
304
|
+
], 4))), 128))
|
|
305
|
+
], 10, gt));
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
export {
|
|
309
|
+
Jt as _
|
|
310
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as te, useTemplateRef as ne, computed as
|
|
1
|
+
import { defineComponent as te, useTemplateRef as ne, computed as I, onMounted as fe, nextTick as pe, onBeforeUnmount as oe, openBlock as F, createElementBlock as R, normalizeClass as ae, renderSlot as ie, reactive as X, ref as me, watch as be, unref as ge, createVNode as L, createSlots as ye, withCtx as U, Fragment as Y } from "vue";
|
|
2
2
|
import le from "@cldemo/ui-kit/common/log";
|
|
3
3
|
import a from "@cldemo/ui-kit/common/base";
|
|
4
4
|
import j from "@cldemo/ui-kit/common/Element";
|
|
5
|
-
import { _ as ee } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as ee } from "./Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js";
|
|
6
6
|
import { Drag as we } from "@cldemo/ui-kit/common/Element/Event";
|
|
7
7
|
import { _ as z } from "./Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js";
|
|
8
8
|
const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
@@ -22,7 +22,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
22
22
|
isKeyDown: !1,
|
|
23
23
|
dragEvent: null,
|
|
24
24
|
sessionSource: null
|
|
25
|
-
}, f =
|
|
25
|
+
}, f = I(() => {
|
|
26
26
|
const n = a.getJsonMerge(
|
|
27
27
|
{ "inputNumberStepper-controls": !0 },
|
|
28
28
|
j.getClassNameJson(t.className)
|
|
@@ -45,15 +45,15 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
45
45
|
return n;
|
|
46
46
|
}, l = () => {
|
|
47
47
|
o.longDownInterval && (clearInterval(o.longDownInterval), o.longDownInterval = null);
|
|
48
|
-
},
|
|
48
|
+
}, x = (n) => {
|
|
49
49
|
o.isLongDownActive && o.sessionSource !== n || (o.isLongDownActive = !0, o.sessionSource = n, g(), l(), o.longDownInterval = setInterval(() => {
|
|
50
50
|
t.disabled ? D() : g();
|
|
51
51
|
}, 200));
|
|
52
|
-
},
|
|
52
|
+
}, B = (n) => {
|
|
53
53
|
if (o.sessionSource !== "mouse")
|
|
54
54
|
return;
|
|
55
55
|
const i = n.target;
|
|
56
|
-
b.value === n.target || b.value?.contains(i) ? o.isMoveBoundary && (o.isMoveBoundary = !1, !t.disabled && w() &&
|
|
56
|
+
b.value === n.target || b.value?.contains(i) ? o.isMoveBoundary && (o.isMoveBoundary = !1, !t.disabled && w() && x("mouse")) : (l(), o.isMoveBoundary = !0);
|
|
57
57
|
}, D = (n, i) => {
|
|
58
58
|
if (o.isLongDownActive) {
|
|
59
59
|
if (n && o.sessionSource && n !== o.sessionSource)
|
|
@@ -66,11 +66,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
66
66
|
if (t.disabled)
|
|
67
67
|
return !1;
|
|
68
68
|
const C = i, T = i;
|
|
69
|
-
let
|
|
70
|
-
return (C.buttons === 1 || i.type === "touchstart" || (T.touches?.length ?? 0) > 0) && (
|
|
69
|
+
let k = !1;
|
|
70
|
+
return (C.buttons === 1 || i.type === "touchstart" || (T.touches?.length ?? 0) > 0) && (k = w(), k && (o.isMoveBoundary = !1, x("mouse"))), k;
|
|
71
71
|
},
|
|
72
72
|
ing: (i) => {
|
|
73
|
-
|
|
73
|
+
B(i);
|
|
74
74
|
},
|
|
75
75
|
end: () => {
|
|
76
76
|
D("mouse");
|
|
@@ -79,23 +79,23 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
79
79
|
b.value && (o.dragEvent = new we(b.value, n));
|
|
80
80
|
};
|
|
81
81
|
fe(() => {
|
|
82
|
-
|
|
82
|
+
pe(() => {
|
|
83
83
|
M();
|
|
84
84
|
});
|
|
85
85
|
}), oe(() => {
|
|
86
86
|
D(), o.dragEvent && (o.dragEvent.end(), o.dragEvent = null);
|
|
87
87
|
});
|
|
88
|
-
const
|
|
88
|
+
const P = (n) => {
|
|
89
89
|
const i = n.key;
|
|
90
90
|
if (i === "Enter" || i === " ") {
|
|
91
91
|
if (t.disabled)
|
|
92
92
|
return;
|
|
93
|
-
n.preventDefault(), !o.isKeyDown && !o.isLongDownActive && w() && (o.isKeyDown = !0,
|
|
93
|
+
n.preventDefault(), !o.isKeyDown && !o.isLongDownActive && w() && (o.isKeyDown = !0, x("keyboard"));
|
|
94
94
|
}
|
|
95
|
-
},
|
|
95
|
+
}, _ = (n) => {
|
|
96
96
|
const i = n.key;
|
|
97
97
|
(i === "Enter" || i === " ") && o.isKeyDown && D("keyboard");
|
|
98
|
-
},
|
|
98
|
+
}, N = () => {
|
|
99
99
|
(o.isKeyDown || o.isLongDownActive) && D(void 0, !0);
|
|
100
100
|
};
|
|
101
101
|
return (n, i) => (F(), R("span", {
|
|
@@ -105,14 +105,14 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
105
105
|
role: "button",
|
|
106
106
|
tabindex: "0",
|
|
107
107
|
"aria-disabled": t.disabled,
|
|
108
|
-
onKeydown:
|
|
109
|
-
onKeyup:
|
|
110
|
-
onBlur:
|
|
108
|
+
onKeydown: P,
|
|
109
|
+
onKeyup: _,
|
|
110
|
+
onBlur: N
|
|
111
111
|
}, [
|
|
112
112
|
ie(n.$slots, "icon")
|
|
113
113
|
], 42, De));
|
|
114
114
|
}
|
|
115
|
-
}), Se = ["id"],
|
|
115
|
+
}), Se = ["id"], Ie = /* @__PURE__ */ te({
|
|
116
116
|
name: "ClInputNumberStepper",
|
|
117
117
|
components: {
|
|
118
118
|
ClInputNumber: ee,
|
|
@@ -223,13 +223,18 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
223
223
|
type: Boolean,
|
|
224
224
|
default: !1
|
|
225
225
|
// desc: 是否纯文本只读模式,只渲染显示文本(含千分位与小数位)不挂载输入框与加减按钮
|
|
226
|
+
},
|
|
227
|
+
plaintextEmptyText: {
|
|
228
|
+
type: String,
|
|
229
|
+
default: void 0
|
|
230
|
+
// desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
|
|
226
231
|
}
|
|
227
232
|
},
|
|
228
233
|
emits: ["update:value", "update:modelValue", "onChange", "onError"],
|
|
229
234
|
setup(u, { emit: A }) {
|
|
230
235
|
const t = u, h = A, b = ne("refElInput"), o = X({
|
|
231
236
|
isFocus: !1
|
|
232
|
-
}), f =
|
|
237
|
+
}), f = me(""), g = X({
|
|
233
238
|
subtractDisabled: !1,
|
|
234
239
|
addDisabled: !1
|
|
235
240
|
}), K = t.id, w = {
|
|
@@ -243,28 +248,28 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
243
248
|
}
|
|
244
249
|
};
|
|
245
250
|
let l = null;
|
|
246
|
-
const
|
|
251
|
+
const x = () => {
|
|
247
252
|
const e = t.btnStep;
|
|
248
253
|
return a.isFinite(e) && e > 0 ? e : 1;
|
|
249
|
-
},
|
|
250
|
-
const e = t.decimal, r =
|
|
254
|
+
}, B = I(() => {
|
|
255
|
+
const e = t.decimal, r = x().toString();
|
|
251
256
|
let S = e;
|
|
252
257
|
if (r.indexOf(".") > -1) {
|
|
253
258
|
const s = r.split(".")[1].length;
|
|
254
259
|
e < s && (S = s);
|
|
255
260
|
}
|
|
256
261
|
return S === -1 ? -1 : Math.max(0, Math.min(100, Math.round(S)));
|
|
257
|
-
}), D =
|
|
262
|
+
}), D = I(() => t.fillZeroCount > 0 && a.isFinite(t.fillZeroCount)), M = I(() => {
|
|
258
263
|
if (a.isNonEmptyString(t.btnClsIconSub))
|
|
259
264
|
return "";
|
|
260
265
|
const e = t.btnTheme || "leftRight";
|
|
261
266
|
return w[e] ? w[e].subtract : "";
|
|
262
|
-
}),
|
|
267
|
+
}), P = I(() => {
|
|
263
268
|
if (a.isNonEmptyString(t.btnClsIconAdd))
|
|
264
269
|
return "";
|
|
265
270
|
const e = t.btnTheme || "leftRight";
|
|
266
271
|
return w[e] ? w[e].add : "";
|
|
267
|
-
}),
|
|
272
|
+
}), _ = I(() => {
|
|
268
273
|
if (t.isPlaintext) {
|
|
269
274
|
let r = { "cl-plaintext-stepper": !0 };
|
|
270
275
|
return r = a.getJsonMerge(r, j.getClassNameJson(t.className)), r;
|
|
@@ -274,7 +279,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
274
279
|
"inputNumberStepper-disabled": t.disabled || !1
|
|
275
280
|
};
|
|
276
281
|
return e = a.getJsonMerge(e, j.getClassNameJson(t.className)), e[`inputNumberStepper-btn-${t.btnTheme || "leftRight"}`] = !0, e[`inputNumberStepper-btn-${t.btnShowType || "fixed"}`] = !0, (t.btnTheme || "leftRight") === "leftRight" && t.btnShape === "circle" && (e["inputNumberStepper-btnShape-circle"] = !0), e["inputNumberStepper-focus"] = o.isFocus, e[`inputNumberStepper-${t.size || "large"}`] = !0, e;
|
|
277
|
-
}),
|
|
282
|
+
}), N = () => {
|
|
278
283
|
const e = f.value;
|
|
279
284
|
h("update:value", e), h("update:modelValue", e), h("onChange", e);
|
|
280
285
|
}, n = (e) => {
|
|
@@ -286,8 +291,8 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
286
291
|
if (t.calculationOperateValueCallback) {
|
|
287
292
|
let c = null;
|
|
288
293
|
try {
|
|
289
|
-
const
|
|
290
|
-
|
|
294
|
+
const m = t.calculationOperateValueCallback({ value: e, type: r });
|
|
295
|
+
m && (c = m);
|
|
291
296
|
} catch {
|
|
292
297
|
h("onError", "数值计算回调执行失败");
|
|
293
298
|
}
|
|
@@ -295,26 +300,26 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
295
300
|
} else {
|
|
296
301
|
const c = r && !a.isEmpty(r);
|
|
297
302
|
if (c || !a.isEmpty(e)) {
|
|
298
|
-
const
|
|
299
|
-
if (a.isFinite(
|
|
300
|
-
const v = t.min,
|
|
301
|
-
let d =
|
|
303
|
+
const m = a.isEmpty(e) ? 0 : Number(e);
|
|
304
|
+
if (a.isFinite(m)) {
|
|
305
|
+
const v = t.min, p = t.max, { isLoop: y = !1 } = t, E = a.isUndefined(v), O = a.isUndefined(p), Q = x();
|
|
306
|
+
let d = m;
|
|
302
307
|
if (c) {
|
|
303
308
|
d += Q * (r === "subtract" ? -1 : 1);
|
|
304
309
|
const W = d.toString();
|
|
305
310
|
if (W.indexOf(".") > -1) {
|
|
306
|
-
const de = W.split(".")[1].length, J =
|
|
311
|
+
const de = W.split(".")[1].length, J = B.value;
|
|
307
312
|
J >= 0 && de > J && (d = Number(d.toFixed(J)));
|
|
308
313
|
}
|
|
309
314
|
}
|
|
310
|
-
!
|
|
315
|
+
!E && d <= v ? (y || ($ = !0), s = d < v && y && !O ? p : v, Z = d !== s) : !O && d >= p ? (y || (V = !0), s = d > p && y && !E ? v : p, Z = d !== s) : s = d;
|
|
311
316
|
}
|
|
312
317
|
}
|
|
313
318
|
}
|
|
314
|
-
if (typeof s == "number" &&
|
|
319
|
+
if (typeof s == "number" && B.value > 0 && (s.toString().indexOf(".") > -1 || S.indexOf(".") > -1) && (s = s.toFixed(B.value)), !a.isString(s) && !(typeof s == "number" && a.isFinite(s)) && (s = ""), D.value && !a.isEmpty(s) && a.isFinite(s)) {
|
|
315
320
|
const c = t.fillZeroCount;
|
|
316
321
|
c > 10 && le.warn("ClInputNumberStepper", "fillZeroCount 超过 10,按 10 处理", c);
|
|
317
|
-
const
|
|
322
|
+
const m = s.toString(), v = m.charAt(0) === "-", p = v ? m.slice(1) : m, y = p.indexOf("."), E = y > -1 ? p.slice(0, y) : p, O = y > -1 ? p.slice(y) : "", d = !/[eE]/.test(p) && E.length < c ? a.getFillZero(E, Math.min(c, 10)) : E;
|
|
318
323
|
s = (v ? "-" : "") + d + O;
|
|
319
324
|
}
|
|
320
325
|
return n(s.toString()), g.subtractDisabled = $, g.addDisabled = V, Z;
|
|
@@ -326,19 +331,19 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
326
331
|
}), be(
|
|
327
332
|
() => t.value,
|
|
328
333
|
(e, r) => {
|
|
329
|
-
e !== r && e !== f.value && i(e) &&
|
|
334
|
+
e !== r && e !== f.value && i(e) && N();
|
|
330
335
|
},
|
|
331
336
|
{ immediate: !0 }
|
|
332
337
|
);
|
|
333
|
-
const
|
|
338
|
+
const k = (e) => {
|
|
334
339
|
t.disabled || (e = a.removeReplace(e), n(e), l && (clearTimeout(l), l = null), l = setTimeout(() => {
|
|
335
|
-
a.isEmpty(f.value) ? (g.subtractDisabled = !1, g.addDisabled = !1) : i(f.value),
|
|
340
|
+
a.isEmpty(f.value) ? (g.subtractDisabled = !1, g.addDisabled = !1) : i(f.value), N();
|
|
336
341
|
}, 100));
|
|
337
342
|
}, se = (e) => {
|
|
338
343
|
if (!t.disabled && !t.isTextRead && T(e)) {
|
|
339
344
|
e.preventDefault(), l && (clearTimeout(l), l = null);
|
|
340
345
|
const r = e.key;
|
|
341
|
-
r === "ArrowLeft" || r === "ArrowDown" ? i(f.value, "subtract") : i(f.value, "add"),
|
|
346
|
+
r === "ArrowLeft" || r === "ArrowDown" ? i(f.value, "subtract") : i(f.value, "add"), N(), C(!0);
|
|
342
347
|
}
|
|
343
348
|
}, re = (e) => {
|
|
344
349
|
!t.disabled && !t.isTextRead && T(e) && (l && (clearTimeout(l), l = null), C(!0));
|
|
@@ -349,11 +354,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
349
354
|
}, G = (e) => {
|
|
350
355
|
l && (clearTimeout(l), l = null), i(f.value, e);
|
|
351
356
|
}, H = (e) => {
|
|
352
|
-
l && (clearTimeout(l), l = null),
|
|
357
|
+
l && (clearTimeout(l), l = null), N(), e || C(!0);
|
|
353
358
|
};
|
|
354
359
|
return (e, r) => (F(), R("div", {
|
|
355
360
|
id: ge(K),
|
|
356
|
-
class: ae(
|
|
361
|
+
class: ae(_.value)
|
|
357
362
|
}, [
|
|
358
363
|
L(ee, {
|
|
359
364
|
ref_key: "refElInput",
|
|
@@ -364,10 +369,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
364
369
|
isReadonly: u.isTextRead,
|
|
365
370
|
isClean: u.isClean,
|
|
366
371
|
isNumber: !D.value,
|
|
367
|
-
decimal:
|
|
372
|
+
decimal: B.value,
|
|
368
373
|
isPlaintext: u.isPlaintext,
|
|
374
|
+
plaintextEmptyText: u.plaintextEmptyText,
|
|
369
375
|
theme: "icon",
|
|
370
|
-
onOnChange:
|
|
376
|
+
onOnChange: k,
|
|
371
377
|
onOnKeydown: se,
|
|
372
378
|
onOnKeyup: re,
|
|
373
379
|
onOnFocus: ue,
|
|
@@ -380,7 +386,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
380
386
|
]),
|
|
381
387
|
key: "0"
|
|
382
388
|
} : void 0
|
|
383
|
-
]), 1032, ["value", "placeholder", "disabled", "isReadonly", "isClean", "isNumber", "decimal", "isPlaintext"]),
|
|
389
|
+
]), 1032, ["value", "placeholder", "disabled", "isReadonly", "isClean", "isNumber", "decimal", "isPlaintext", "plaintextEmptyText"]),
|
|
384
390
|
u.isPlaintext ? (F(), R(Y, { key: 1 }, [], 64)) : (F(), R(Y, { key: 0 }, [
|
|
385
391
|
L(q, {
|
|
386
392
|
className: "inputNumberStepper-subtract",
|
|
@@ -408,7 +414,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
408
414
|
}, {
|
|
409
415
|
icon: U(() => [
|
|
410
416
|
L(z, {
|
|
411
|
-
name:
|
|
417
|
+
name: P.value,
|
|
412
418
|
className: u.btnClsIconAdd
|
|
413
419
|
}, null, 8, ["name", "className"])
|
|
414
420
|
]),
|
|
@@ -419,5 +425,5 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
|
|
|
419
425
|
}
|
|
420
426
|
});
|
|
421
427
|
export {
|
|
422
|
-
|
|
428
|
+
Ie as _
|
|
423
429
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as A, useTemplateRef as J, ref as M, computed as b, onBeforeUnmount as U, watch as z, openBlock as v, createElementBlock as E, normalizeClass as P, unref as B, createVNode as j, withCtx as q, withKeys as f, withModifiers as h, toDisplayString as G, createBlock as H } from "vue";
|
|
2
2
|
import l from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import Q from "@cldemo/ui-kit/common/Element";
|
|
4
|
-
import { _ as T } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as T } from "./Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js";
|
|
5
5
|
import { _ } from "./Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js";
|
|
6
6
|
const W = ["id"], X = ["aria-label", "tabindex", "onKeydown"], ie = /* @__PURE__ */ A({
|
|
7
7
|
name: "ClInputSearch",
|