@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
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
| tipMode | `String` | `'tooltip'` | 否 | tipMsg 交互方式,可选: tooltip, clickCallback |
|
|
22
22
|
| checkChangeBefore | `Function` | `undefined` | 否 | 选中切换前的校验回调,返回false阻止切换,返回其他值或无返回值时默认为true |
|
|
23
23
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项文本不挂载复选框 |
|
|
24
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
24
25
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
25
26
|
|
|
26
27
|
## Slots
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
|
|
132
133
|
### isPlaintext 纯文本只读
|
|
133
134
|
|
|
134
|
-
设置 `:isPlaintext="true"` 后只渲染选中项的 name 文本,不挂载任何复选框;多选值由 `plaintextSeparator` 连接,默认
|
|
135
|
+
设置 `:isPlaintext="true"` 后只渲染选中项的 name 文本,不挂载任何复选框;多选值由 `plaintextSeparator` 连接,默认 `,`;空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值
|
|
135
136
|
|
|
136
137
|
```vue
|
|
137
138
|
<cl-checkbox
|
|
@@ -302,6 +302,21 @@
|
|
|
302
302
|
</cl-form>
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
+
### plaintextEmptyText 空值占位与全局配置
|
|
306
|
+
|
|
307
|
+
只读态空值默认渲染 `-`,可逐实例传 `plaintextEmptyText` 覆盖,也可用 `setGlobalConfig` 一处配置全站生效;合并优先级:props 显式值 > 组件配置段 > plaintextGlobal 段 > 默认 "-",显式传空串表示关闭占位。全量安装用 `app.use(ClLibs, { globalsOption: { plaintextGlobal: { ... } } })` 效果相同。值非空但列表无对应项(数据未加载完或 id 已失效)时显示原值,不显示占位
|
|
308
|
+
|
|
309
|
+
```vue
|
|
310
|
+
// 入口配置一次,跨组件统一空值占位(按需加载)
|
|
311
|
+
import { setGlobalConfig } from '@cldemo/ui-kit/common';
|
|
312
|
+
|
|
313
|
+
setGlobalConfig({
|
|
314
|
+
plaintextGlobal: { plaintextEmptyText: '(空)' },
|
|
315
|
+
select: { plaintextEmptyText: '--' },
|
|
316
|
+
});
|
|
317
|
+
// 优先级:props 显式值 > 组件配置段 > plaintextGlobal 段 > 默认 '-'
|
|
318
|
+
```
|
|
319
|
+
|
|
305
320
|
### rules 规则
|
|
306
321
|
|
|
307
322
|
校验规则支持字符串与对象混合:字符串 `\`、对象 `{r: 规则名, p: 参数, m: 自定义消息}`,消息中的 `%s` 占位符会被规则参数替换
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| isReadonly | `Boolean` | `false` | 否 | 是否只读 |
|
|
26
26
|
| isClean | `Boolean` | `true` | 否 | 是否显示清除按钮 |
|
|
27
27
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染文本不挂载输入控件(不渲染 prepend/append/suffix 插槽) |
|
|
28
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
28
29
|
| changeDelayTime | `Number` | `200` | 否 | 延迟变更时间(毫秒) |
|
|
29
30
|
|
|
30
31
|
## Slots
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
|
|
131
132
|
### isPlaintext 纯文本只读
|
|
132
133
|
|
|
133
|
-
设置 `:isPlaintext="true"`
|
|
134
|
+
设置 `:isPlaintext="true"` 后组件只渲染文本内容,不挂载输入框、清除按钮等交互控件,空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);适用于详情页与只读表单回显
|
|
134
135
|
|
|
135
136
|
```vue
|
|
136
137
|
<cl-input
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
| isImmediateThousand | `Boolean` | `true` | 否 | 输入过程中是否立即应用千分位 |
|
|
31
31
|
| changeDelayTime | `Number` | `200` | 否 | 变更延迟时间(毫秒) |
|
|
32
32
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染显示文本(含千分位与小数位)不挂载输入框 |
|
|
33
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
33
34
|
|
|
34
35
|
## Slots
|
|
35
36
|
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
|
|
132
133
|
### isPlaintext 纯文本只读
|
|
133
134
|
|
|
134
|
-
设置 `:isPlaintext="true"` 后组件只渲染数值文本(沿用 `isThousand` 千分位与 `decimal`
|
|
135
|
+
设置 `:isPlaintext="true"` 后组件只渲染数值文本(沿用 `isThousand` 千分位与 `decimal` 小数位格式化),不挂载输入框与清除按钮,空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);该组件无分隔符参数
|
|
135
136
|
|
|
136
137
|
```vue
|
|
137
138
|
<div class="m-b-10">
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
| operateBtnDownBeforeCallback | `Function as PropType<(() => boolean) \| undefined>` | `undefined` | 否 | 按钮长按前的回调(返回 false 阻止长按,须同步返回) |
|
|
32
32
|
| calculationOperateValueCallback | `Function as PropType<` | `undefined` | 否 | 数值计算回调(返回 { value, subtractDisabled, addDisabled }) |
|
|
33
33
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染显示文本(含千分位与小数位)不挂载输入框与加减按钮 |
|
|
34
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
34
35
|
|
|
35
36
|
## Slots
|
|
36
37
|
|
|
@@ -195,7 +196,7 @@
|
|
|
195
196
|
|
|
196
197
|
### isPlaintext 纯文本只读
|
|
197
198
|
|
|
198
|
-
设置 `:isPlaintext="true"`
|
|
199
|
+
设置 `:isPlaintext="true"` 后组件只渲染数值文本(含千分位与小数位),不挂载输入框、也不渲染加减按钮,空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);该组件没有分隔符参数(`plaintextSeparator` / `plaintextLevelSeparator`),无需传入
|
|
199
200
|
|
|
200
201
|
```vue
|
|
201
202
|
<cl-button :label="optIsPlaintext ? '切换为编辑态' : '切换为只读态'" @onClick="onTogglePlaintext"></cl-button>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
| changeDelayTime | `Number` | `200` | 否 | onChangeDelay 防抖延迟毫秒数 |
|
|
23
23
|
| heightMax | `String` | `` | 否 | 最大高度 |
|
|
24
24
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染文本不挂载文本域(\n 与 <br> 均按换行呈现) |
|
|
25
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
25
26
|
|
|
26
27
|
## Events
|
|
27
28
|
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
|
|
135
136
|
### isPlaintext 纯文本只读
|
|
136
137
|
|
|
137
|
-
设置 `:isPlaintext="true"` 后组件只渲染多行纯文本,不挂载 textarea 与清除按钮,内容中的换行标记(`\\n` 与 `<br>`)按真实换行保留显示(`white-space: pre-wrap
|
|
138
|
+
设置 `:isPlaintext="true"` 后组件只渲染多行纯文本,不挂载 textarea 与清除按钮,内容中的换行标记(`\\n` 与 `<br>`)按真实换行保留显示(`white-space: pre-wrap`),空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);本组件无分隔符参数,绑定值为单个字符串,无需拼接分隔符
|
|
138
139
|
|
|
139
140
|
```vue
|
|
140
141
|
<cl-button
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
| tipMode | `String` | `'tooltip'` | 否 | tipMsg 交互方式,可选: tooltip, clickCallback |
|
|
21
21
|
| checkChangeBefore | `Function` | `undefined` | 否 | 选中切换前的校验回调,返回false阻止切换 |
|
|
22
22
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项文本不挂载单选框 |
|
|
23
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
23
24
|
|
|
24
25
|
## Slots
|
|
25
26
|
|
|
@@ -155,7 +156,7 @@
|
|
|
155
156
|
|
|
156
157
|
### isPlaintext 纯文本只读
|
|
157
158
|
|
|
158
|
-
设置 `:isPlaintext="true"` 后组件只渲染当前选中项的 `name`
|
|
159
|
+
设置 `:isPlaintext="true"` 后组件只渲染当前选中项的 `name` 文本,不挂载任何单选框,空值渲染为占位文本(默认 `-` ,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值;该组件无分隔符参数
|
|
159
160
|
|
|
160
161
|
```vue
|
|
161
162
|
<cl-radio
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
| isUseDropdownArrow | `Boolean` | `true` | 否 | 是否显示弹出层三角箭头 |
|
|
31
31
|
| checkCallback | `Function` | `` | 否 | 校验回调,返回 false 阻止选择;default 模式参数为 Dayjs 实例,range 模式参数为 (start, end) 字符串 |
|
|
32
32
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染格式化后的日期文本不挂载日历面板 |
|
|
33
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
33
34
|
| plaintextSeparator | `String` | `' ~ '` | 否 | 纯文本模式下 range 模式起止日期的分隔符 |
|
|
34
35
|
| appendContainer | `String` | `` | 否 | 面板挂载容器,空为当前父元素,body 挂到 body,或指定选择器(需为触发元素的上级,如表格滚动容器外的容器) |
|
|
35
36
|
|
|
@@ -298,7 +299,7 @@
|
|
|
298
299
|
|
|
299
300
|
### isPlaintext 纯文本只读
|
|
300
301
|
|
|
301
|
-
设置 `:isPlaintext="true"` 只渲染格式化后的日期时间文本,不挂载选择面板范围模式(`theme="range"`)起止日期用 `plaintextSeparator` 连接,默认
|
|
302
|
+
设置 `:isPlaintext="true"` 只渲染格式化后的日期时间文本,不挂载选择面板范围模式(`theme="range"`)起止日期用 `plaintextSeparator` 连接,默认 `\`;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖)
|
|
302
303
|
|
|
303
304
|
```vue
|
|
304
305
|
<div>
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
| isShowUploadIng | `Boolean` | `true` | 否 | 是否显示上传中状态 |
|
|
37
37
|
| serverFileCallback | `Function` | `` | 否 | 服务端文件保存回调 |
|
|
38
38
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,图片渲染为 img、视频渲染为 video、其他渲染为文件名 |
|
|
39
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
39
40
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下非媒体文件名之间的分隔符 |
|
|
40
41
|
|
|
41
42
|
## Slots
|
|
@@ -393,7 +394,7 @@ default 主题除图片外同样可用于视频等文件上传:设置 `checkFo
|
|
|
393
394
|
|
|
394
395
|
### isPlaintext 纯文本只读
|
|
395
396
|
|
|
396
|
-
设置 `isPlaintext` 进入纯文本只读模式:按文件类型只读渲染,图片渲染为 `img`(src 为文件地址)、视频渲染为 `video`(带 controls)、其他类型渲染为文件名,不挂载上传区与上传按钮;非媒体文件名之间由 `plaintextSeparator` 连接,默认
|
|
397
|
+
设置 `isPlaintext` 进入纯文本只读模式:按文件类型只读渲染,图片渲染为 `img`(src 为文件地址)、视频渲染为 `video`(带 controls)、其他类型渲染为文件名,不挂载上传区与上传按钮;非媒体文件名之间由 `plaintextSeparator` 连接,默认 `,`,可显式传入自定义分隔符;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖)
|
|
397
398
|
|
|
398
399
|
```vue
|
|
399
400
|
<cl-file-upload
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
| showDropDownTextFormatSub | `String` | `` | 否 | 二级下拉项文本格式化,${xxx} 格式 |
|
|
38
38
|
| isOutMerge | `Boolean` | `true` | 否 | 级联多选时,所有子级选中后是否合并为父级 id(true 合并,false 保持叶子 id) |
|
|
39
39
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项文本不挂载下拉面板 |
|
|
40
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
40
41
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
41
42
|
| plaintextLevelSeparator | `String` | `' > '` | 否 | 纯文本模式下级联层级之间的分隔符 |
|
|
42
43
|
| onOpenBefore | `Function` | `` | 否 | 下拉面板打开前的回调函数,返回 false 可阻止打开 |
|
|
@@ -278,7 +279,7 @@
|
|
|
278
279
|
|
|
279
280
|
### isPlaintext 纯文本只读
|
|
280
281
|
|
|
281
|
-
设置 `:isPlaintext="true"` 后只渲染选中项的 `name` 文本,不挂载下拉面板与虚拟滚动;多选各项由 `plaintextSeparator`(默认 `,`)连接,级联层级由 `plaintextLevelSeparator`(默认 ` > `)连接;配置了 `showTextFormat`
|
|
282
|
+
设置 `:isPlaintext="true"` 后只渲染选中项的 `name` 文本,不挂载下拉面板与虚拟滚动;多选各项由 `plaintextSeparator`(默认 `,`)连接,级联层级由 `plaintextLevelSeparator`(默认 ` > `)连接;配置了 `showTextFormat` 时优先按其格式化结果展示;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值
|
|
282
283
|
|
|
283
284
|
```vue
|
|
284
285
|
<cl-button
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
| validateRules | `Array as PropType<Record<string` | `() => [{ r: 'required' }]` | 否 | 校验规则 |
|
|
25
25
|
| isShowInMsg | `Boolean` | `true` | 否 | 校验信息是否在消息中显示 |
|
|
26
26
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项层级文本不挂载各级下拉 |
|
|
27
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
27
28
|
| plaintextLevelSeparator | `String` | `' > '` | 否 | 纯文本模式下级联层级之间的分隔符 |
|
|
28
29
|
|
|
29
30
|
## 方法
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
| parentKey | `String` | `'parentId'` | 否 | 父级关联字段名 |
|
|
37
37
|
| topParentValue | `String` | `'0'` | 否 | 顶级父值标识 |
|
|
38
38
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项层级文本不挂载穿梭面板 |
|
|
39
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
39
40
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
40
41
|
| plaintextLevelSeparator | `String` | `' > '` | 否 | 纯文本模式下级联层级之间的分隔符 |
|
|
41
42
|
| appendContainer | `String` | `` | 否 | 面板挂载容器,空为当前父元素,body 挂到 body,或指定选择器(需为触发元素的上级,如滚动容器外的容器) |
|
|
@@ -203,7 +204,7 @@
|
|
|
203
204
|
|
|
204
205
|
### isPlaintext 纯文本只读
|
|
205
206
|
|
|
206
|
-
设置 `isPlaintext` 进入纯文本只读模式:只渲染选中项自顶向下的完整层级路径文本(如 `广东省 > 广州市 > 天河区`),不挂载穿梭面板;多个选中项之间由 `plaintextSeparator` 连接,默认 `,`,单项层级之间由 `plaintextLevelSeparator` 连接,默认 ` >
|
|
207
|
+
设置 `isPlaintext` 进入纯文本只读模式:只渲染选中项自顶向下的完整层级路径文本(如 `广东省 > 广州市 > 天河区`),不挂载穿梭面板;多个选中项之间由 `plaintextSeparator` 连接,默认 `,`,单项层级之间由 `plaintextLevelSeparator` 连接,默认 ` > `,均可显式传入自定义分隔符;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值
|
|
207
208
|
|
|
208
209
|
```vue
|
|
209
210
|
<div class="m-b-10">
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
| isRadioClickCancel | `Boolean` | `` | 否 | 单选模式下点击已选中项是否取消选中 |
|
|
23
23
|
| checkChangeBefore | `Function` | `` | 否 | 选中变更前的异步校验,返回 false 阻止变更 |
|
|
24
24
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项文本不挂载选项列表 |
|
|
25
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
25
26
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
26
27
|
|
|
27
28
|
## Slots
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
| highlightMode | `String` | `'full'` | 否 | 搜索高亮模式,默认整条文本高亮,可选: full, whole |
|
|
33
33
|
| highlightColor | `String` | `` | 否 | 搜索高亮背景色,配合 highlightMode 使用 |
|
|
34
34
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项层级文本不挂载下拉面板 |
|
|
35
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
35
36
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
36
37
|
| plaintextLevelSeparator | `String` | `' > '` | 否 | 纯文本模式下级联层级之间的分隔符 |
|
|
37
38
|
| appendContainer | `String` | `` | 否 | 面板挂载容器,空为当前父元素,body 挂到 body,或指定选择器(需为触发元素的上级,如滚动容器外的容器) |
|
|
@@ -285,7 +286,7 @@
|
|
|
285
286
|
|
|
286
287
|
### isPlaintext 纯文本只读
|
|
287
288
|
|
|
288
|
-
设置 `isPlaintext` 进入纯文本只读模式:只渲染选中项自顶向下的完整层级路径文本(如 `研发中心 > 前端组 > 组件库小组`),不挂载下拉树;多个选中项之间由 `plaintextSeparator` 连接,默认 `,`,单项层级之间由 `plaintextLevelSeparator` 连接,默认 ` >
|
|
289
|
+
设置 `isPlaintext` 进入纯文本只读模式:只渲染选中项自顶向下的完整层级路径文本(如 `研发中心 > 前端组 > 组件库小组`),不挂载下拉树;多个选中项之间由 `plaintextSeparator` 连接,默认 `,`,单项层级之间由 `plaintextLevelSeparator` 连接,默认 ` > `,均可显式传入自定义分隔符;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值
|
|
289
290
|
|
|
290
291
|
```vue
|
|
291
292
|
<div class="m-b-10">
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| highlightMode | `String` | `` | 否 | 搜索高亮模式,可选: full, whole |
|
|
26
26
|
| highlightColor | `String` | `` | 否 | 搜索高亮背景色;空则使用默认高亮样式 |
|
|
27
27
|
| isPlaintext | `Boolean` | `false` | 否 | 是否纯文本只读模式,只渲染选中项层级文本不挂载树 |
|
|
28
|
+
| plaintextEmptyText | `String` | `undefined` | 否 | 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段) |
|
|
28
29
|
| plaintextSeparator | `String` | `'` | 否 | 纯文本模式下多个选中项之间的分隔符 |
|
|
29
30
|
| plaintextLevelSeparator | `String` | `' > '` | 否 | 纯文本模式下级联层级之间的分隔符 |
|
|
30
31
|
|
|
@@ -133,7 +134,7 @@
|
|
|
133
134
|
|
|
134
135
|
### isPlaintext 纯文本只读
|
|
135
136
|
|
|
136
|
-
设置 `isPlaintext` 进入纯文本只读模式:只渲染已选中节点的完整层级路径文本(不挂载树),多个选中项之间用 `plaintextSeparator` 连接(默认 `,`),单个选中项各层级之间用 `plaintextLevelSeparator` 连接(默认 ` >
|
|
137
|
+
设置 `isPlaintext` 进入纯文本只读模式:只渲染已选中节点的完整层级路径文本(不挂载树),多个选中项之间用 `plaintextSeparator` 连接(默认 `,`),单个选中项各层级之间用 `plaintextLevelSeparator` 连接(默认 ` > `);第二个示例显式传入自定义分隔符;空值渲染为占位文本(默认 `-`,可用 `plaintextEmptyText` 或全局配置覆盖);值非空但列表无对应项时显示原值
|
|
137
138
|
|
|
138
139
|
```vue
|
|
139
140
|
<cl-button
|
package/package.json
CHANGED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, ref as x, computed as k, onMounted as X, nextTick as B, onBeforeUnmount as Y, watch as N, resolveDirective as Z, openBlock as l, createElementBlock as r, unref as d, normalizeClass as b, toDisplayString as D, Fragment as p, renderList as ee, normalizeStyle as te, createElementVNode as f, renderSlot as ie, withDirectives as J, createVNode as ne, createTextVNode as se, createBlock as M, withModifiers as ae } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
|
-
import i from "@cldemo/ui-kit/common/base";
|
|
5
|
-
import le from "@cldemo/ui-kit/common/Element";
|
|
6
|
-
import { _ as I } from "./Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js";
|
|
7
|
-
import { t as oe } from "./index-DhoB4dp5.js";
|
|
8
|
-
const re = ["id"], ce = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "cl-plaintext-value"
|
|
11
|
-
}, ue = ["id", "name", "value", "disabled", "checked", "onClick"], de = ["for"], me = { key: 0 }, Se = /* @__PURE__ */ W({
|
|
12
|
-
name: "ClRadio",
|
|
13
|
-
directives: {
|
|
14
|
-
cltooltip: oe
|
|
15
|
-
},
|
|
16
|
-
__name: "Index",
|
|
17
|
-
props: {
|
|
18
|
-
id: String,
|
|
19
|
-
// desc: 组件实例唯一标识,用于多实例场景下 DOM 查询限定
|
|
20
|
-
name: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: !0
|
|
23
|
-
// desc: 表单name属性
|
|
24
|
-
},
|
|
25
|
-
value: {
|
|
26
|
-
type: [String, Number],
|
|
27
|
-
required: !0
|
|
28
|
-
// desc: 当前选中值
|
|
29
|
-
},
|
|
30
|
-
className: String,
|
|
31
|
-
// desc: 自定义CSS类名
|
|
32
|
-
disabled: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: !1
|
|
35
|
-
// desc: 是否禁用整个单选框组
|
|
36
|
-
},
|
|
37
|
-
list: {
|
|
38
|
-
type: Array,
|
|
39
|
-
default: () => []
|
|
40
|
-
// desc: 单选项数据列表
|
|
41
|
-
},
|
|
42
|
-
width: String,
|
|
43
|
-
// desc: 单选项宽度
|
|
44
|
-
isInline: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !0
|
|
47
|
-
// desc: 是否行内显示
|
|
48
|
-
},
|
|
49
|
-
tipMode: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: "tooltip",
|
|
52
|
-
// desc: tipMsg 交互方式 | enum: tooltip, clickCallback
|
|
53
|
-
validator: (v) => ["tooltip", "clickCallback"].includes(v)
|
|
54
|
-
},
|
|
55
|
-
checkChangeBefore: {
|
|
56
|
-
type: Function,
|
|
57
|
-
// desc: 选中切换前的校验回调,返回false阻止切换 | param: (selectValue: string) => boolean | Promise<boolean>
|
|
58
|
-
default: void 0
|
|
59
|
-
},
|
|
60
|
-
isPlaintext: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: !1
|
|
63
|
-
// desc: 是否纯文本只读模式,只渲染选中项文本不挂载单选框
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
emits: ["update:value", "update:modelValue", "onChange", "onInit", "onError", "onTipClick"],
|
|
67
|
-
setup(v, { expose: P, emit: T }) {
|
|
68
|
-
const n = v, y = T, h = `rd-${i.getRandom(8)}`, C = i.isEmpty(n.name) ? h + "_name" : n.name, q = n.id, o = x(n.value?.toString() || "");
|
|
69
|
-
let u = {};
|
|
70
|
-
const V = x(0), c = x(!1), m = {
|
|
71
|
-
isProcessing: !1,
|
|
72
|
-
// 防止并发点击
|
|
73
|
-
_initEmitted: !1
|
|
74
|
-
// 防止重复 emit onInit
|
|
75
|
-
}, F = k(() => {
|
|
76
|
-
if (n.isPlaintext)
|
|
77
|
-
return [];
|
|
78
|
-
const e = n.list;
|
|
79
|
-
return i.isArray(e) ? e.filter((s) => !i.isEmpty(s)) : [];
|
|
80
|
-
}), L = k(() => {
|
|
81
|
-
n.list, V.value;
|
|
82
|
-
const e = o.value;
|
|
83
|
-
if (i.isEmpty(e)) return "";
|
|
84
|
-
const s = i.isExistJsonKey(u, e) ? u[e] : void 0;
|
|
85
|
-
return s && i.isNonEmptyString(s.name) ? s.name : e;
|
|
86
|
-
}), K = k(() => i.getJsonMerge(
|
|
87
|
-
{ "panel-radio": !0 },
|
|
88
|
-
le.getClassNameJson(n.className)
|
|
89
|
-
)), R = k(() => {
|
|
90
|
-
const e = {
|
|
91
|
-
radio: !0,
|
|
92
|
-
"radio-default": !0
|
|
93
|
-
};
|
|
94
|
-
return e["radio-inline"] = n.isInline ?? !0, e;
|
|
95
|
-
}), $ = (e) => {
|
|
96
|
-
y("update:value", e), y("update:modelValue", e);
|
|
97
|
-
}, z = (e) => {
|
|
98
|
-
const s = e.id?.toString() ?? "";
|
|
99
|
-
$(s), y("onChange", s, i.getJsonClone(e));
|
|
100
|
-
}, _ = () => {
|
|
101
|
-
m._initEmitted || (m._initEmitted = !0, B(() => {
|
|
102
|
-
y("onInit");
|
|
103
|
-
}));
|
|
104
|
-
}, A = (e) => {
|
|
105
|
-
const s = {}, { width: a } = n;
|
|
106
|
-
return e && !i.isEmpty(e.width) ? s.width = e.width : i.isEmpty(a) || (s.width = n.width), s;
|
|
107
|
-
}, U = () => i.isExistJsonKey(u, o.value) ? o.value : "", E = (e) => {
|
|
108
|
-
u = i.isEmpty(e) ? {} : i.getJsonByList(e), V.value += 1;
|
|
109
|
-
}, g = () => {
|
|
110
|
-
if (c.value) {
|
|
111
|
-
const e = i.isEmpty(o.value) ? "" : o.value;
|
|
112
|
-
i.isExistJsonKey(u, e) || (o.value = "", $(""));
|
|
113
|
-
}
|
|
114
|
-
}, S = (e) => {
|
|
115
|
-
e !== o.value && (o.value = e?.toString() || "");
|
|
116
|
-
}, j = () => {
|
|
117
|
-
c.value = n.list.length !== 0, E(n.list), g();
|
|
118
|
-
};
|
|
119
|
-
X(() => {
|
|
120
|
-
B(() => {
|
|
121
|
-
j();
|
|
122
|
-
});
|
|
123
|
-
}), Y(() => {
|
|
124
|
-
u = {}, c.value = !1, m._initEmitted = !1;
|
|
125
|
-
}), N(c, (e) => {
|
|
126
|
-
e && _();
|
|
127
|
-
}), N(
|
|
128
|
-
() => n.list,
|
|
129
|
-
(e) => {
|
|
130
|
-
c.value || (c.value = !0, e.length === 0 && g(), _());
|
|
131
|
-
},
|
|
132
|
-
{ deep: !0 }
|
|
133
|
-
), N(
|
|
134
|
-
[() => n.value, () => n.list],
|
|
135
|
-
([e, s]) => {
|
|
136
|
-
const a = s || [];
|
|
137
|
-
!c.value && a.length > 0 && (c.value = !0, _()), E(a), S(e), g();
|
|
138
|
-
},
|
|
139
|
-
{ deep: !0 }
|
|
140
|
-
);
|
|
141
|
-
const G = (e) => {
|
|
142
|
-
y("onTipClick", e);
|
|
143
|
-
}, H = async (e) => {
|
|
144
|
-
if (!(!e || e.isDisabled || n.disabled || m.isProcessing) && !i.isEmpty(e.id)) {
|
|
145
|
-
m.isProcessing = !0;
|
|
146
|
-
try {
|
|
147
|
-
const s = String(e.id ?? "");
|
|
148
|
-
if (s === o.value)
|
|
149
|
-
return;
|
|
150
|
-
let a = !0;
|
|
151
|
-
if (n.checkChangeBefore)
|
|
152
|
-
try {
|
|
153
|
-
a = await n.checkChangeBefore(s), a = i.isBoolean(a) ? a : !0;
|
|
154
|
-
} catch {
|
|
155
|
-
a = !1;
|
|
156
|
-
}
|
|
157
|
-
if (n.disabled || e.isDisabled)
|
|
158
|
-
return;
|
|
159
|
-
a && (o.value = s, z(e));
|
|
160
|
-
} catch (s) {
|
|
161
|
-
y("onError", s);
|
|
162
|
-
} finally {
|
|
163
|
-
m.isProcessing = !1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}, w = () => U();
|
|
167
|
-
return P({
|
|
168
|
-
getValue: w,
|
|
169
|
-
getValueData: () => {
|
|
170
|
-
const e = w();
|
|
171
|
-
return i.isExistJsonKey(u, e) ? i.getJsonClone(u[e]) : {};
|
|
172
|
-
},
|
|
173
|
-
setValue: (e) => {
|
|
174
|
-
m.isProcessing || (S(e), g());
|
|
175
|
-
},
|
|
176
|
-
runInitComplete: () => {
|
|
177
|
-
c.value || (c.value = !0, E(n.list), S(n.value), g(), _());
|
|
178
|
-
}
|
|
179
|
-
}), (e, s) => {
|
|
180
|
-
const a = Z("cltooltip");
|
|
181
|
-
return l(), r("div", {
|
|
182
|
-
class: b(K.value),
|
|
183
|
-
id: d(q)
|
|
184
|
-
}, [
|
|
185
|
-
v.isPlaintext ? (l(), r("div", ce, D(L.value), 1)) : (l(), r(p, { key: 1 }, [], 64)),
|
|
186
|
-
(l(!0), r(p, null, ee(F.value, (t, O) => (l(), r(p, {
|
|
187
|
-
key: `${h}-${t.id ?? ""}-${O}`
|
|
188
|
-
}, [
|
|
189
|
-
t && (t.isShow || t.isShow === void 0) ? (l(), r("div", {
|
|
190
|
-
key: 0,
|
|
191
|
-
class: b(R.value),
|
|
192
|
-
style: te(A(t))
|
|
193
|
-
}, [
|
|
194
|
-
f("span", null, [
|
|
195
|
-
f("span", null, [
|
|
196
|
-
f("input", {
|
|
197
|
-
type: "radio",
|
|
198
|
-
id: `${h}_${d(C)}_${t.id ?? ""}`,
|
|
199
|
-
name: d(C),
|
|
200
|
-
value: t.id ?? "",
|
|
201
|
-
disabled: t.isDisabled || v.disabled,
|
|
202
|
-
checked: (t.id?.toString() ?? "") === o.value,
|
|
203
|
-
onClick: (Q) => H(t)
|
|
204
|
-
}, null, 8, ue),
|
|
205
|
-
f("label", {
|
|
206
|
-
for: `${h}_${d(C)}_${t.id ?? ""}`
|
|
207
|
-
}, [
|
|
208
|
-
ie(e.$slots, "default", { data: t }, () => [
|
|
209
|
-
t.icon && t.icon.length > 0 ? J((l(), r("span", me, [
|
|
210
|
-
ne(I, {
|
|
211
|
-
name: t.icon
|
|
212
|
-
}, null, 8, ["name"])
|
|
213
|
-
])), [
|
|
214
|
-
[a, { html: t.name, className: "tooltip-modal" }]
|
|
215
|
-
]) : (l(), r(p, { key: 1 }, [
|
|
216
|
-
se(D(t.name), 1)
|
|
217
|
-
], 64))
|
|
218
|
-
])
|
|
219
|
-
], 8, de)
|
|
220
|
-
]),
|
|
221
|
-
t.tipMsg && t.tipMsg.length > 0 ? (l(), r(p, { key: 0 }, [
|
|
222
|
-
v.tipMode === "tooltip" ? J((l(), M(I, {
|
|
223
|
-
key: 0,
|
|
224
|
-
name: d(i).isNonEmptyString(t.tipIcon) ? void 0 : "question-circle",
|
|
225
|
-
className: d(i).isNonEmptyString(t.tipIcon) ? t.tipIcon : void 0,
|
|
226
|
-
class: "radio-icon-tip"
|
|
227
|
-
}, null, 8, ["name", "className"])), [
|
|
228
|
-
[a, { html: t.tipMsg, className: "tooltip-modal" }]
|
|
229
|
-
]) : (l(), M(I, {
|
|
230
|
-
key: 1,
|
|
231
|
-
name: d(i).isNonEmptyString(t.tipIcon) ? void 0 : "question-circle",
|
|
232
|
-
className: d(i).isNonEmptyString(t.tipIcon) ? t.tipIcon : void 0,
|
|
233
|
-
class: "radio-icon-tip",
|
|
234
|
-
onClick: ae((Q) => G(t), ["stop"])
|
|
235
|
-
}, null, 8, ["name", "className", "onClick"]))
|
|
236
|
-
], 64)) : (l(), r(p, { key: 1 }, [], 64))
|
|
237
|
-
])
|
|
238
|
-
], 6)) : (l(), r(p, { key: 1 }, [], 64))
|
|
239
|
-
], 64))), 128))
|
|
240
|
-
], 10, re);
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
export {
|
|
245
|
-
Se as _
|
|
246
|
-
};
|