ll-plus 2.6.17 → 2.6.18
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/es/components/advanced-filtering/index.d.ts +388 -0
- package/es/components/advanced-filtering/src/advanced-filtering.vue.d.ts +194 -0
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +194 -0
- package/es/components/cropper/index.d.ts +19 -0
- package/es/components/cropper/src/cropper-image.d.ts +2 -0
- package/es/components/cropper/src/cropper-image.vue.d.ts +6 -0
- package/es/components/cropper/src/cropper-modal.vue.d.ts +13 -0
- package/es/components/form/index.d.ts +197 -0
- package/es/components/form/src/components/form-component.vue.d.ts +3 -0
- package/es/components/form/src/config/form.d.ts +3 -0
- package/es/components/form/src/form.vue.d.ts +194 -0
- package/es/components/icon-picker/index.d.ts +4 -0
- package/es/components/icon-picker/src/components/modal.vue.d.ts +4 -0
- package/es/components/icon-picker/src/icon-picker.vue.d.ts +4 -0
- package/es/components/input/index.d.ts +2 -0
- package/es/components/input/src/input.vue.d.ts +2 -0
- package/es/components/input-number/index.d.ts +2 -0
- package/es/components/input-number/src/input-number.vue.d.ts +2 -0
- package/es/components/key-value/index.d.ts +1493 -338
- package/es/components/key-value/src/components/key-value-item.vue.d.ts +385 -0
- package/es/components/key-value/src/key-value.vue.d.ts +1493 -338
- package/es/components/number-range/index.d.ts +2 -0
- package/es/components/number-range/src/number-range.vue.d.ts +2 -0
- package/es/packages/components/cropper/src/cropper-image.mjs +8 -0
- package/es/packages/components/cropper/src/cropper-image.mjs.map +1 -1
- package/es/packages/components/cropper/src/cropper-image.vue2.mjs +43 -22
- package/es/packages/components/cropper/src/cropper-image.vue2.mjs.map +1 -1
- package/es/packages/components/cropper/src/cropper-modal.vue2.mjs +108 -72
- package/es/packages/components/cropper/src/cropper-modal.vue2.mjs.map +1 -1
- package/es/packages/components/form/src/components/form-component.vue2.mjs +19 -2
- package/es/packages/components/form/src/components/form-component.vue2.mjs.map +1 -1
- package/es/packages/components/form/src/config/form.mjs +21 -0
- package/es/packages/components/form/src/config/form.mjs.map +1 -1
- package/es/packages/components/form/src/form.vue2.mjs +56 -5
- package/es/packages/components/form/src/form.vue2.mjs.map +1 -1
- package/es/packages/components/icon-picker/src/components/modal.vue2.mjs +97 -76
- package/es/packages/components/icon-picker/src/components/modal.vue2.mjs.map +1 -1
- package/es/packages/components/input/src/input.vue2.mjs +8 -1
- package/es/packages/components/input/src/input.vue2.mjs.map +1 -1
- package/es/packages/components/input-number/src/input-number.vue2.mjs +8 -1
- package/es/packages/components/input-number/src/input-number.vue2.mjs.map +1 -1
- package/es/packages/components/key-value/src/config/key-value.mjs +2 -2
- package/es/packages/components/key-value/src/config/key-value.mjs.map +1 -1
- package/index.full.js +362 -175
- package/index.full.min.js +17 -17
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +21 -21
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +362 -175
- package/lib/components/advanced-filtering/index.d.ts +388 -0
- package/lib/components/advanced-filtering/src/advanced-filtering.vue.d.ts +194 -0
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +194 -0
- package/lib/components/cropper/index.d.ts +19 -0
- package/lib/components/cropper/src/cropper-image.d.ts +2 -0
- package/lib/components/cropper/src/cropper-image.vue.d.ts +6 -0
- package/lib/components/cropper/src/cropper-modal.vue.d.ts +13 -0
- package/lib/components/form/index.d.ts +197 -0
- package/lib/components/form/src/components/form-component.vue.d.ts +3 -0
- package/lib/components/form/src/config/form.d.ts +3 -0
- package/lib/components/form/src/form.vue.d.ts +194 -0
- package/lib/components/icon-picker/index.d.ts +4 -0
- package/lib/components/icon-picker/src/components/modal.vue.d.ts +4 -0
- package/lib/components/icon-picker/src/icon-picker.vue.d.ts +4 -0
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/input/src/input.vue.d.ts +2 -0
- package/lib/components/input-number/index.d.ts +2 -0
- package/lib/components/input-number/src/input-number.vue.d.ts +2 -0
- package/lib/components/key-value/index.d.ts +1493 -338
- package/lib/components/key-value/src/components/key-value-item.vue.d.ts +385 -0
- package/lib/components/key-value/src/key-value.vue.d.ts +1493 -338
- package/lib/components/number-range/index.d.ts +2 -0
- package/lib/components/number-range/src/number-range.vue.d.ts +2 -0
- package/lib/packages/components/cropper/src/cropper-image.js +8 -0
- package/lib/packages/components/cropper/src/cropper-image.js.map +1 -1
- package/lib/packages/components/cropper/src/cropper-image.vue2.js +42 -21
- package/lib/packages/components/cropper/src/cropper-image.vue2.js.map +1 -1
- package/lib/packages/components/cropper/src/cropper-modal.vue2.js +107 -71
- package/lib/packages/components/cropper/src/cropper-modal.vue2.js.map +1 -1
- package/lib/packages/components/form/src/components/form-component.vue2.js +18 -1
- package/lib/packages/components/form/src/components/form-component.vue2.js.map +1 -1
- package/lib/packages/components/form/src/config/form.js +21 -0
- package/lib/packages/components/form/src/config/form.js.map +1 -1
- package/lib/packages/components/form/src/form.vue2.js +54 -3
- package/lib/packages/components/form/src/form.vue2.js.map +1 -1
- package/lib/packages/components/icon-picker/src/components/modal.vue2.js +96 -75
- package/lib/packages/components/icon-picker/src/components/modal.vue2.js.map +1 -1
- package/lib/packages/components/input/src/input.vue2.js +8 -1
- package/lib/packages/components/input/src/input.vue2.js.map +1 -1
- package/lib/packages/components/input-number/src/input-number.vue2.js +8 -1
- package/lib/packages/components/input-number/src/input-number.vue2.js.map +1 -1
- package/lib/packages/components/key-value/src/config/key-value.js +2 -2
- package/lib/packages/components/key-value/src/config/key-value.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css/icon-picker.css +1 -1
- package/theme-chalk/css/index.css +1 -1
- package/types/packages/components/advanced-filtering/index.d.ts +388 -0
- package/types/packages/components/advanced-filtering/src/advanced-filtering.vue.d.ts +194 -0
- package/types/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +194 -0
- package/types/packages/components/cropper/index.d.ts +19 -0
- package/types/packages/components/cropper/src/cropper-image.d.ts +2 -0
- package/types/packages/components/cropper/src/cropper-image.vue.d.ts +6 -0
- package/types/packages/components/cropper/src/cropper-modal.vue.d.ts +13 -0
- package/types/packages/components/form/index.d.ts +197 -0
- package/types/packages/components/form/src/components/form-component.vue.d.ts +3 -0
- package/types/packages/components/form/src/config/form.d.ts +3 -0
- package/types/packages/components/form/src/form.vue.d.ts +194 -0
- package/types/packages/components/icon-picker/index.d.ts +4 -0
- package/types/packages/components/icon-picker/src/components/modal.vue.d.ts +4 -0
- package/types/packages/components/icon-picker/src/icon-picker.vue.d.ts +4 -0
- package/types/packages/components/input/index.d.ts +2 -0
- package/types/packages/components/input/src/input.vue.d.ts +2 -0
- package/types/packages/components/input-number/index.d.ts +2 -0
- package/types/packages/components/input-number/src/input-number.vue.d.ts +2 -0
- package/types/packages/components/key-value/index.d.ts +1493 -338
- package/types/packages/components/key-value/src/components/key-value-item.vue.d.ts +385 -0
- package/types/packages/components/key-value/src/key-value.vue.d.ts +1493 -338
- package/types/packages/components/number-range/index.d.ts +2 -0
- package/types/packages/components/number-range/src/number-range.vue.d.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, reactive, unref, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, reactive, ref, nextTick, unref, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
2
|
import { omit, has } from 'lodash-es';
|
|
3
3
|
import '../config/index.mjs';
|
|
4
4
|
import { formComponentProps, formComponentEmits } from '../config/form-component.mjs';
|
|
@@ -9,10 +9,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
__name: "form-component",
|
|
10
10
|
props: formComponentProps,
|
|
11
11
|
emits: formComponentEmits,
|
|
12
|
-
setup(__props, { emit: __emit }) {
|
|
12
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
13
13
|
const props = __props;
|
|
14
14
|
const emits = __emit;
|
|
15
15
|
const formData = reactive(props.formData);
|
|
16
|
+
const componentRef = ref();
|
|
16
17
|
const getBindValue = (item) => {
|
|
17
18
|
const obj = { ...item };
|
|
18
19
|
return omit(obj, ["label", "onChange", "change"]);
|
|
@@ -27,13 +28,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
}
|
|
28
29
|
emits("changeField", item);
|
|
29
30
|
};
|
|
31
|
+
const focus = async () => {
|
|
32
|
+
await nextTick();
|
|
33
|
+
console.log(componentRef.value);
|
|
34
|
+
componentRef.value?.focus();
|
|
35
|
+
};
|
|
36
|
+
const getItem = () => {
|
|
37
|
+
return props.item;
|
|
38
|
+
};
|
|
39
|
+
__expose({
|
|
40
|
+
focus,
|
|
41
|
+
getItem
|
|
42
|
+
});
|
|
30
43
|
return (_ctx, _cache) => {
|
|
31
44
|
return unref(checkedType).includes(_ctx.item.type) ? (openBlock(), createBlock(resolveDynamicComponent(`ll-${_ctx.item.type}`), mergeProps({
|
|
32
45
|
key: 0,
|
|
46
|
+
ref_key: "componentRef",
|
|
47
|
+
ref: componentRef,
|
|
33
48
|
checked: formData[_ctx.item.key],
|
|
34
49
|
"onUpdate:checked": _cache[0] || (_cache[0] = ($event) => formData[_ctx.item.key] = $event)
|
|
35
50
|
}, getBindValue(_ctx.item), { onChange: handleChange }), null, 16, ["checked"])) : (openBlock(), createBlock(resolveDynamicComponent(`ll-${_ctx.item.type}`), mergeProps({
|
|
36
51
|
key: 1,
|
|
52
|
+
ref_key: "componentRef",
|
|
53
|
+
ref: componentRef,
|
|
37
54
|
value: formData[_ctx.item.key],
|
|
38
55
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => formData[_ctx.item.key] = $event)
|
|
39
56
|
}, getBindValue(_ctx.item), { onChange: handleChange }), null, 16, ["value"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-component.vue2.mjs","sources":["../../../../../../../packages/components/form/src/components/form-component.vue"],"sourcesContent":["<template>\n <template v-if=\"checkedType.includes(item.type)\">\n <component\n :is=\"`ll-${item.type}`\"\n v-model:checked=\"formData[item.key]\"\n v-bind=\"getBindValue(item)\"\n @change=\"handleChange\"\n />\n </template>\n <template v-else>\n <component\n :is=\"`ll-${item.type}`\"\n v-model:value=\"formData[item.key]\"\n v-bind=\"getBindValue(item)\"\n @change=\"handleChange\"\n />\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { reactive } from 'vue'\nimport { omit, has } from 'lodash-es'\nimport {\n formComponentProps,\n formComponentEmits,\n checkedType,\n type FormColumn\n} from '../config'\n\nconst props = defineProps(formComponentProps)\n\nconst emits = defineEmits(formComponentEmits)\n\nconst formData = reactive(props.formData)\n\nconst getBindValue = (item: FormColumn) => {\n const obj = { ...item }\n return omit(obj, ['label', 'onChange', 'change'])\n}\n\nconst handleChange = (...arg) => {\n const item: FormColumn = props.item\n if (has(item, 'change')) {\n item.change(...arg)\n }\n if (has(item, 'onChange')) {\n item.onChange(...arg)\n }\n emits('changeField', item)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"form-component.vue2.mjs","sources":["../../../../../../../packages/components/form/src/components/form-component.vue"],"sourcesContent":["<template>\n <template v-if=\"checkedType.includes(item.type)\">\n <component\n :is=\"`ll-${item.type}`\"\n ref=\"componentRef\"\n v-model:checked=\"formData[item.key]\"\n v-bind=\"getBindValue(item)\"\n @change=\"handleChange\"\n />\n </template>\n <template v-else>\n <component\n :is=\"`ll-${item.type}`\"\n ref=\"componentRef\"\n v-model:value=\"formData[item.key]\"\n v-bind=\"getBindValue(item)\"\n @change=\"handleChange\"\n />\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { nextTick, reactive, ref } from 'vue'\nimport { omit, has } from 'lodash-es'\nimport {\n formComponentProps,\n formComponentEmits,\n checkedType,\n type FormColumn\n} from '../config'\n\nconst props = defineProps(formComponentProps)\n\nconst emits = defineEmits(formComponentEmits)\n\nconst formData = reactive(props.formData)\n\nconst componentRef = ref()\n\nconst getBindValue = (item: FormColumn) => {\n const obj = { ...item }\n return omit(obj, ['label', 'onChange', 'change'])\n}\n\nconst handleChange = (...arg) => {\n const item: FormColumn = props.item\n if (has(item, 'change')) {\n item.change(...arg)\n }\n if (has(item, 'onChange')) {\n item.onChange(...arg)\n }\n emits('changeField', item)\n}\n// 获取焦点\nconst focus = async () => {\n await nextTick()\n console.log(componentRef.value)\n componentRef.value?.focus()\n}\n\nconst getItem = () => {\n return props.item\n}\ndefineExpose({\n focus,\n getItem\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AA+BA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,QAAA,GAAW,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAExC,IAAA,MAAM,eAAe,GAAI,EAAA,CAAA;AAEzB,IAAM,MAAA,YAAA,GAAe,CAAC,IAAqB,KAAA;AACzC,MAAM,MAAA,GAAA,GAAM,EAAE,GAAG,IAAK,EAAA,CAAA;AACtB,MAAA,OAAO,KAAK,GAAK,EAAA,CAAC,OAAS,EAAA,UAAA,EAAY,QAAQ,CAAC,CAAA,CAAA;AAAA,KAClD,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,IAAI,GAAQ,KAAA;AAC/B,MAAA,MAAM,OAAmB,KAAM,CAAA,IAAA,CAAA;AAC/B,MAAI,IAAA,GAAA,CAAI,IAAM,EAAA,QAAQ,CAAG,EAAA;AACvB,QAAK,IAAA,CAAA,MAAA,CAAO,GAAG,GAAG,CAAA,CAAA;AAAA,OACpB;AACA,MAAI,IAAA,GAAA,CAAI,IAAM,EAAA,UAAU,CAAG,EAAA;AACzB,QAAK,IAAA,CAAA,QAAA,CAAS,GAAG,GAAG,CAAA,CAAA;AAAA,OACtB;AACA,MAAA,KAAA,CAAM,eAAe,IAAI,CAAA,CAAA;AAAA,KAC3B,CAAA;AAEA,IAAA,MAAM,QAAQ,YAAY;AACxB,MAAA,MAAM,QAAS,EAAA,CAAA;AACf,MAAQ,OAAA,CAAA,GAAA,CAAI,aAAa,KAAK,CAAA,CAAA;AAC9B,MAAA,YAAA,CAAa,OAAO,KAAM,EAAA,CAAA;AAAA,KAC5B,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,OAAO,KAAM,CAAA,IAAA,CAAA;AAAA,KACf,CAAA;AACA,IAAa,QAAA,CAAA;AAAA,MACX,KAAA;AAAA,MACA,OAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -41,6 +41,27 @@ const formProps = buildProps({
|
|
|
41
41
|
loading: {
|
|
42
42
|
type: Boolean,
|
|
43
43
|
default: false
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* @description 自动聚焦
|
|
47
|
+
*/
|
|
48
|
+
autoFocus: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* @description 是否全体禁用
|
|
54
|
+
*/
|
|
55
|
+
disabled: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* @description 当某一规则校验不通过时,是否停止剩下的规则的校验
|
|
61
|
+
*/
|
|
62
|
+
validateErrorStop: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
44
65
|
}
|
|
45
66
|
});
|
|
46
67
|
const formEmits = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.mjs","sources":["../../../../../../../packages/components/form/src/config/form.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type {\n FormItemProps,\n RowProps,\n ColProps,\n FormProps as AntFormProps\n} from 'ant-design-vue'\nimport type { TooltipProps } from '@ll-plus/components'\nimport type Form from '../form.vue'\n\ntype FormType<T = any> = (\n | 'input'\n | 'input-number'\n | 'cascader'\n | 'checkbox'\n | 'checkbox-group'\n | 'code-editor'\n | 'date-picker'\n | 'time-picker'\n | 'date-range'\n | 'time-range'\n | 'radio'\n | 'radio-group'\n | 'select'\n | 'switch'\n | 'textarea'\n | 'upload-image'\n) &\n T\n\nexport interface FormChangeEvent {\n item: FormColumn\n value: any\n formData: FormData\n}\nexport interface BasicFormColumn extends FormItemProps {\n label?: string\n key: string\n spanCol?: number | 24 // 一行几条\n colOptions?: ColProps\n tip?: string\n tipConfig?: TooltipProps\n type: FormType\n unit?: string\n change?: () => void\n rowOptions?: RowProps\n children?: FormColumn[]\n [key: string]: any\n}\n\nexport type FormColumn<T = any> = BasicFormColumn & T\n\nexport type FormData = Record<string, any>\n\nexport const formProps = buildProps({\n /**\n * @description 表单项列表\n */\n formColumns: {\n type: definePropType<FormColumn[]>(Array),\n default: () => []\n },\n /**\n * @description 展开的行变化时触发\n */\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({\n layout: 'horizontal'\n })\n },\n /**\n * @description 展开的行变化时触发\n */\n formData: {\n type: definePropType<FormData>(Object),\n default: () => ({})\n },\n /**\n * @description 展开的行变化时触发\n */\n rowOptions: {\n type: definePropType<RowProps>(Object),\n default: () => ({\n gutter: 16\n })\n },\n /**\n * @description 表单加载状态\n */\n loading: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const formEmits = {\n /**\n * @description 表单项值改变时触发\n */\n change: (params: FormChangeEvent) => !!params\n}\n\n// props\nexport type FormProps = ExtractPropTypes<typeof formProps>\n\n// emits\nexport type FormEmits = typeof formEmits\n\n// instance\nexport type FormInstance = InstanceType<typeof Form>\n"],"names":[],"mappings":";;;;AAwDO,MAAM,YAAY,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIlC,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,KAAK,CAAA;AAAA,IACxC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,MAAM,CAAA;AAAA,IACzC,SAAS,OAAO;AAAA,MACd,MAAQ,EAAA,YAAA;AAAA,KACV,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAA,EAAM,eAAyB,MAAM,CAAA;AAAA,IACrC,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAA,EAAM,eAAyB,MAAM,CAAA;AAAA,IACrC,SAAS,OAAO;AAAA,MACd,MAAQ,EAAA,EAAA;AAAA,KACV,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,SAAY,GAAA;AAAA;AAAA;AAAA;AAAA,EAIvB,MAAQ,EAAA,CAAC,MAA4B,KAAA,CAAC,CAAC,MAAA;AACzC;;;;"}
|
|
1
|
+
{"version":3,"file":"form.mjs","sources":["../../../../../../../packages/components/form/src/config/form.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type {\n FormItemProps,\n RowProps,\n ColProps,\n FormProps as AntFormProps\n} from 'ant-design-vue'\nimport type { TooltipProps } from '@ll-plus/components'\nimport type Form from '../form.vue'\n\ntype FormType<T = any> = (\n | 'input'\n | 'input-number'\n | 'cascader'\n | 'checkbox'\n | 'checkbox-group'\n | 'code-editor'\n | 'date-picker'\n | 'time-picker'\n | 'date-range'\n | 'time-range'\n | 'radio'\n | 'radio-group'\n | 'select'\n | 'switch'\n | 'textarea'\n | 'upload-image'\n) &\n T\n\nexport interface FormChangeEvent {\n item: FormColumn\n value: any\n formData: FormData\n}\nexport interface BasicFormColumn extends FormItemProps {\n label?: string\n key: string\n spanCol?: number | 24 // 一行几条\n colOptions?: ColProps\n tip?: string\n tipConfig?: TooltipProps\n type: FormType\n unit?: string\n change?: () => void\n rowOptions?: RowProps\n children?: FormColumn[]\n [key: string]: any\n}\n\nexport type FormColumn<T = any> = BasicFormColumn & T\n\nexport type FormData = Record<string, any>\n\nexport const formProps = buildProps({\n /**\n * @description 表单项列表\n */\n formColumns: {\n type: definePropType<FormColumn[]>(Array),\n default: () => []\n },\n /**\n * @description 展开的行变化时触发\n */\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({\n layout: 'horizontal'\n })\n },\n /**\n * @description 展开的行变化时触发\n */\n formData: {\n type: definePropType<FormData>(Object),\n default: () => ({})\n },\n /**\n * @description 展开的行变化时触发\n */\n rowOptions: {\n type: definePropType<RowProps>(Object),\n default: () => ({\n gutter: 16\n })\n },\n /**\n * @description 表单加载状态\n */\n loading: {\n type: Boolean,\n default: false\n },\n /**\n * @description 自动聚焦\n */\n autoFocus: {\n type: Boolean,\n default: false\n },\n /**\n * @description 是否全体禁用\n */\n disabled: {\n type: Boolean,\n default: false\n },\n /**\n * @description 当某一规则校验不通过时,是否停止剩下的规则的校验\n */\n validateErrorStop: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const formEmits = {\n /**\n * @description 表单项值改变时触发\n */\n change: (params: FormChangeEvent) => !!params\n}\n\n// props\nexport type FormProps = ExtractPropTypes<typeof formProps>\n\n// emits\nexport type FormEmits = typeof formEmits\n\n// instance\nexport type FormInstance = InstanceType<typeof Form>\n"],"names":[],"mappings":";;;;AAwDO,MAAM,YAAY,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIlC,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,KAAK,CAAA;AAAA,IACxC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,MAAM,CAAA;AAAA,IACzC,SAAS,OAAO;AAAA,MACd,MAAQ,EAAA,YAAA;AAAA,KACV,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAA,EAAM,eAAyB,MAAM,CAAA;AAAA,IACrC,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAA,EAAM,eAAyB,MAAM,CAAA;AAAA,IACrC,SAAS,OAAO;AAAA,MACd,MAAQ,EAAA,EAAA;AAAA,KACV,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,iBAAmB,EAAA;AAAA,IACjB,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,SAAY,GAAA;AAAA;AAAA;AAAA;AAAA,EAIvB,MAAQ,EAAA,CAAC,MAA4B,KAAA,CAAC,CAAC,MAAA;AACzC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, reactive, ref, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, mergeProps, normalizeProps, guardReactiveProps, Fragment, renderList, createBlock, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
-
import { omit, isEmpty } from 'lodash-es';
|
|
1
|
+
import { defineComponent, reactive, ref, computed, watch, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, mergeProps, normalizeProps, guardReactiveProps, Fragment, renderList, createBlock, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
import { has, omit, isEmpty } from 'lodash-es';
|
|
3
3
|
import './config/index.mjs';
|
|
4
4
|
import '../../../utils/index.mjs';
|
|
5
5
|
import FormComponent from './components/form-component.vue.mjs';
|
|
@@ -18,9 +18,46 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const bem = createNamespace("form");
|
|
19
19
|
const formData = reactive(props.formData);
|
|
20
20
|
const formRef = ref();
|
|
21
|
+
const formComponents = ref([]);
|
|
22
|
+
const computedFormColumns = computed(() => {
|
|
23
|
+
return props.formColumns.map((e) => {
|
|
24
|
+
e.disabled = has(e, "disabled") ? e.disabled : props.disabled;
|
|
25
|
+
if (e.children && e.children.length) {
|
|
26
|
+
e.children.map((a) => {
|
|
27
|
+
a.disabled = has(a, "disabled") ? a.disabled : props.disabled;
|
|
28
|
+
return a;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const validateFields = computed(() => {
|
|
35
|
+
return props.formColumns.filter((e) => e.required || has(e, "rules") && e.rules.length > 0).map((e) => {
|
|
36
|
+
return e.key;
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const computedFormOptions = computed(() => {
|
|
40
|
+
return {
|
|
41
|
+
scrollToFirstError: !props.validateErrorStop,
|
|
42
|
+
...props.formOptions
|
|
43
|
+
};
|
|
44
|
+
});
|
|
21
45
|
const id = ref(`ll-form-${+/* @__PURE__ */ new Date()}`);
|
|
22
46
|
const validate = async () => {
|
|
23
|
-
|
|
47
|
+
if (props.validateErrorStop) {
|
|
48
|
+
clearValidate();
|
|
49
|
+
let bool = true;
|
|
50
|
+
if (!validateFields.value.length)
|
|
51
|
+
return bool;
|
|
52
|
+
for (const i of validateFields.value) {
|
|
53
|
+
bool = await formRef.value.validateFields([i]);
|
|
54
|
+
if (!bool) {
|
|
55
|
+
return bool;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
return await formRef.value.validateFields();
|
|
60
|
+
}
|
|
24
61
|
};
|
|
25
62
|
const resetFields = async () => {
|
|
26
63
|
return await formRef.value.resetFields();
|
|
@@ -60,6 +97,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
97
|
immediate: true
|
|
61
98
|
}
|
|
62
99
|
);
|
|
100
|
+
onMounted(async () => {
|
|
101
|
+
await nextTick();
|
|
102
|
+
if (props.autoFocus) {
|
|
103
|
+
for (const element of formComponents.value) {
|
|
104
|
+
const item = element?.getItem();
|
|
105
|
+
if (["input", "textarea", "input-number"].includes(item.type)) {
|
|
106
|
+
element?.focus();
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
63
112
|
__expose({
|
|
64
113
|
validate,
|
|
65
114
|
resetFields,
|
|
@@ -83,7 +132,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
83
132
|
spinning: props.loading
|
|
84
133
|
}, {
|
|
85
134
|
default: withCtx(() => [
|
|
86
|
-
createVNode(_component_a_form, mergeProps(
|
|
135
|
+
createVNode(_component_a_form, mergeProps(computedFormOptions.value, {
|
|
87
136
|
id: id.value,
|
|
88
137
|
ref_key: "formRef",
|
|
89
138
|
ref: formRef,
|
|
@@ -98,7 +147,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
147
|
(openBlock(true), createElementBlock(
|
|
99
148
|
Fragment,
|
|
100
149
|
null,
|
|
101
|
-
renderList(
|
|
150
|
+
renderList(computedFormColumns.value, (item, index) => {
|
|
102
151
|
return openBlock(), createBlock(_component_a_col, mergeProps({
|
|
103
152
|
key: index,
|
|
104
153
|
ref_for: true
|
|
@@ -209,6 +258,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
209
258
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
210
259
|
)) : (openBlock(), createBlock(FormComponent, {
|
|
211
260
|
key: 1,
|
|
261
|
+
ref_for: true,
|
|
262
|
+
ref: (el) => formComponents.value[index] = el,
|
|
212
263
|
item,
|
|
213
264
|
"form-data": formData,
|
|
214
265
|
onChangeField: handleChangeField
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.vue2.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-spin :spinning=\"props.loading\">\n <a-form\n v-bind=\"props.formOptions\"\n :id=\"id\"\n ref=\"formRef\"\n :model=\"props.formData\"\n >\n <a-row v-bind=\"props.rowOptions\">\n <a-col\n v-for=\"(item, index) in props.formColumns\"\n :key=\"index\"\n v-bind=\"item?.colOptions ?? {}\"\n :span=\"item?.spanCol ?? 24\"\n >\n <slot name=\"formItem\" :item=\"item\" :index=\"index\">\n <ll-form-item\n :name=\"item?.key ?? index\"\n :class=\"getFormItemClass(item)\"\n v-bind=\"getBindValue(item)\"\n >\n <template #label>\n <slot name=\"label\" :item=\"item\" :index=\"index\">\n <span>{{ item.label }}</span>\n <span v-if=\"item?.tip\" :class=\"bem.e('tooltip-wrapper')\">\n <ll-tooltip\n style=\"margin-left: 8px\"\n :overlay-class-name=\"bem.e('tooltip')\"\n :arrow-point-at-center=\"true\"\n :max-width=\"item?.tipConfig?.maxWidth ?? 406\"\n :placement=\"item?.tipConfig?.placement ?? 'top'\"\n :tip=\"item.tip\"\n :font-size=\"'16px'\"\n v-bind=\"item?.tipConfig\"\n />\n </span>\n </slot>\n </template>\n <slot name=\"content\" :item=\"item\" :index=\"index\">\n <template v-if=\"!isEmpty(item.children)\">\n <a-row :gutter=\"5\" v-bind=\"item.rowOptions\">\n <a-col\n v-for=\"(child, childIndex) in item.children\"\n :key=\"childIndex\"\n :style=\"{\n display: 'flex',\n 'align-items': 'center'\n }\"\n v-bind=\"item?.colOptions ?? {}\"\n >\n <slot name=\"children\" :item=\"child\" :index=\"index\">\n <form-component\n :item=\"child\"\n :form-data=\"formData\"\n @change-field=\"handleChangeField\"\n />\n </slot>\n </a-col>\n </a-row>\n </template>\n <form-component\n v-else\n :item=\"item\"\n :form-data=\"formData\"\n @change-field=\"handleChangeField\"\n />\n </slot>\n </ll-form-item>\n </slot>\n </a-col>\n </a-row>\n </a-form>\n </a-spin>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { reactive, ref, watch } from 'vue'\nimport { omit, isEmpty } from 'lodash-es'\nimport { formProps, formEmits, type FormColumn } from './config'\n\nimport type { NamePath } from 'ant-design-vue/es/form/interface'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport formComponent from './components/form-component.vue'\n\n// 定义组件名称\ndefineOptions({ name: 'LlForm' })\n\n// Props\nconst props = defineProps(formProps)\n\nconst emits = defineEmits(formEmits)\n\nconst bem = createNamespace('form')\n\nconst formData = reactive(props.formData)\n\nconst formRef = ref()\n\nconst id = ref(`ll-form-${+new Date()}`)\n\nconst validate = async () => {\n return await formRef.value.validateFields()\n}\n\nconst resetFields = async () => {\n return await formRef.value.resetFields()\n}\n\nconst clearValidate = async (nameList?: NamePath[]) => {\n return await formRef.value.clearValidate(nameList)\n}\n\nconst scrollToField = async (name: NamePath, options?: ScrollOptions) => {\n return await formRef.value.scrollToField(name, options)\n}\n\nconst getBindValue = (item: FormColumn) => {\n const obj = { ...item }\n return omit(obj, ['label'])\n}\n\nconst getFormItemClass = (item = {} as FormColumn) => {\n if (props.formOptions.layout === 'horizontal') {\n if (item?.labelCol) {\n return item.labelCol.span && item.labelCol.span >= 24\n ? bem.is('label-top')\n : bem.is('label-left')\n } else {\n return bem.is('label-left')\n }\n }\n return bem.is('label-top')\n}\n\nconst handleChangeField = (item: FormColumn) => {\n emits('change', { item, value: formData[item.key], formData })\n}\n\n// watch(\n// () => formData,\n// val => {\n// emits('change', val)\n// },\n// {\n// deep: true\n// }\n// )\n\nwatch(\n () => props.formData,\n async val => {\n for (const i in val) {\n formData[i] = val[i]\n }\n },\n {\n deep: true,\n immediate: true\n }\n)\n\ndefineExpose({\n validate,\n resetFields,\n clearValidate,\n scrollToField\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA2FA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,MAAM,CAAA,CAAA;AAElC,IAAM,MAAA,QAAA,GAAW,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAExC,IAAA,MAAM,UAAU,GAAI,EAAA,CAAA;AAEpB,IAAA,MAAM,KAAK,GAAI,CAAA,CAAA,QAAA,EAAW,iBAAK,IAAA,IAAA,EAAM,CAAE,CAAA,CAAA,CAAA;AAEvC,IAAA,MAAM,WAAW,YAAY;AAC3B,MAAO,OAAA,MAAM,OAAQ,CAAA,KAAA,CAAM,cAAe,EAAA,CAAA;AAAA,KAC5C,CAAA;AAEA,IAAA,MAAM,cAAc,YAAY;AAC9B,MAAO,OAAA,MAAM,OAAQ,CAAA,KAAA,CAAM,WAAY,EAAA,CAAA;AAAA,KACzC,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,OAAO,QAA0B,KAAA;AACrD,MAAA,OAAO,MAAM,OAAA,CAAQ,KAAM,CAAA,aAAA,CAAc,QAAQ,CAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,OAAO,IAAA,EAAgB,OAA4B,KAAA;AACvE,MAAA,OAAO,MAAM,OAAA,CAAQ,KAAM,CAAA,aAAA,CAAc,MAAM,OAAO,CAAA,CAAA;AAAA,KACxD,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,CAAC,IAAqB,KAAA;AACzC,MAAM,MAAA,GAAA,GAAM,EAAE,GAAG,IAAK,EAAA,CAAA;AACtB,MAAA,OAAO,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"form.vue2.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-spin :spinning=\"props.loading\">\n <a-form\n v-bind=\"computedFormOptions\"\n :id=\"id\"\n ref=\"formRef\"\n :model=\"props.formData\"\n >\n <a-row v-bind=\"props.rowOptions\">\n <a-col\n v-for=\"(item, index) in computedFormColumns\"\n :key=\"index\"\n v-bind=\"item?.colOptions ?? {}\"\n :span=\"item?.spanCol ?? 24\"\n >\n <slot name=\"formItem\" :item=\"item\" :index=\"index\">\n <ll-form-item\n :name=\"item?.key ?? index\"\n :class=\"getFormItemClass(item)\"\n v-bind=\"getBindValue(item)\"\n >\n <template #label>\n <slot name=\"label\" :item=\"item\" :index=\"index\">\n <span>{{ item.label }}</span>\n <span v-if=\"item?.tip\" :class=\"bem.e('tooltip-wrapper')\">\n <ll-tooltip\n style=\"margin-left: 8px\"\n :overlay-class-name=\"bem.e('tooltip')\"\n :arrow-point-at-center=\"true\"\n :max-width=\"item?.tipConfig?.maxWidth ?? 406\"\n :placement=\"item?.tipConfig?.placement ?? 'top'\"\n :tip=\"item.tip\"\n :font-size=\"'16px'\"\n v-bind=\"item?.tipConfig\"\n />\n </span>\n </slot>\n </template>\n <slot name=\"content\" :item=\"item\" :index=\"index\">\n <template v-if=\"!isEmpty(item.children)\">\n <a-row :gutter=\"5\" v-bind=\"item.rowOptions\">\n <a-col\n v-for=\"(child, childIndex) in item.children\"\n :key=\"childIndex\"\n :style=\"{\n display: 'flex',\n 'align-items': 'center'\n }\"\n v-bind=\"item?.colOptions ?? {}\"\n >\n <slot name=\"children\" :item=\"child\" :index=\"index\">\n <form-component\n :item=\"child\"\n :form-data=\"formData\"\n @change-field=\"handleChangeField\"\n />\n </slot>\n </a-col>\n </a-row>\n </template>\n <form-component\n v-else\n :ref=\"el => (formComponents[index] = el)\"\n :item=\"item\"\n :form-data=\"formData\"\n @change-field=\"handleChangeField\"\n />\n </slot>\n </ll-form-item>\n </slot>\n </a-col>\n </a-row>\n </a-form>\n </a-spin>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { reactive, ref, watch, onMounted, nextTick, computed } from 'vue'\nimport { omit, isEmpty, has } from 'lodash-es'\nimport { formProps, formEmits, type FormColumn } from './config'\n\nimport type { NamePath } from 'ant-design-vue/es/form/interface'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport formComponent from './components/form-component.vue'\n\n// 定义组件名称\ndefineOptions({ name: 'LlForm' })\n\n// Props\nconst props = defineProps(formProps)\n\nconst emits = defineEmits(formEmits)\n\nconst bem = createNamespace('form')\n\nconst formData = reactive(props.formData)\n\nconst formRef = ref()\n\nconst formComponents = ref<InstanceType<typeof formComponent>[]>([])\n\nconst computedFormColumns = computed(() => {\n return props.formColumns.map(e => {\n e.disabled = has(e, 'disabled') ? e.disabled : props.disabled\n if (e.children && e.children.length) {\n e.children.map(a => {\n a.disabled = has(a, 'disabled') ? a.disabled : props.disabled\n return a\n })\n }\n return e\n })\n})\n\nconst validateFields = computed(() => {\n return props.formColumns\n .filter(e => e.required || (has(e, 'rules') && e.rules.length > 0))\n .map(e => {\n return e.key\n })\n})\n\nconst computedFormOptions = computed(() => {\n return {\n scrollToFirstError: !props.validateErrorStop,\n ...props.formOptions\n }\n})\n\nconst id = ref(`ll-form-${+new Date()}`)\n\nconst validate = async () => {\n if (props.validateErrorStop) {\n clearValidate()\n let bool = true\n if (!validateFields.value.length) return bool\n for (const i of validateFields.value) {\n bool = await formRef.value.validateFields([i])\n if (!bool) {\n return bool\n }\n }\n } else {\n return await formRef.value.validateFields()\n }\n}\n\nconst resetFields = async () => {\n return await formRef.value.resetFields()\n}\n\nconst clearValidate = async (nameList?: NamePath[]) => {\n return await formRef.value.clearValidate(nameList)\n}\n\nconst scrollToField = async (name: NamePath, options?: ScrollOptions) => {\n return await formRef.value.scrollToField(name, options)\n}\n\nconst getBindValue = (item: FormColumn) => {\n const obj = { ...item }\n return omit(obj, ['label'])\n}\n\nconst getFormItemClass = (item = {} as FormColumn) => {\n if (props.formOptions.layout === 'horizontal') {\n if (item?.labelCol) {\n return item.labelCol.span && item.labelCol.span >= 24\n ? bem.is('label-top')\n : bem.is('label-left')\n } else {\n return bem.is('label-left')\n }\n }\n return bem.is('label-top')\n}\n\nconst handleChangeField = (item: FormColumn) => {\n emits('change', { item, value: formData[item.key], formData })\n}\n\nwatch(\n () => props.formData,\n async val => {\n for (const i in val) {\n formData[i] = val[i]\n }\n },\n {\n deep: true,\n immediate: true\n }\n)\n\nonMounted(async () => {\n await nextTick()\n if (props.autoFocus) {\n for (const element of formComponents.value) {\n const item = element?.getItem()\n if (['input', 'textarea', 'input-number'].includes(item.type)) {\n element?.focus()\n break\n }\n }\n }\n})\n\ndefineExpose({\n validate,\n resetFields,\n clearValidate,\n scrollToField\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4FA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,MAAM,CAAA,CAAA;AAElC,IAAM,MAAA,QAAA,GAAW,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAExC,IAAA,MAAM,UAAU,GAAI,EAAA,CAAA;AAEpB,IAAM,MAAA,cAAA,GAAiB,GAA0C,CAAA,EAAE,CAAA,CAAA;AAEnE,IAAM,MAAA,mBAAA,GAAsB,SAAS,MAAM;AACzC,MAAO,OAAA,KAAA,CAAM,WAAY,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA;AAChC,QAAA,CAA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CAAA;AACf,YAAA,MAAA;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,QAAA;AAAA,MACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, watch, watchEffect, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
2
|
import '../../../../utils/index.mjs';
|
|
3
3
|
import '../config/index.mjs';
|
|
4
|
+
import '../../../../hooks/index.mjs';
|
|
4
5
|
import { iconPickerModalProps, iconPickerModalEmits } from '../config/modal.mjs';
|
|
6
|
+
import { useScroll } from '../../../../hooks/use-scroll/index.mjs';
|
|
5
7
|
import { createNamespace } from '../../../../utils/create-namespace.mjs';
|
|
6
8
|
|
|
7
9
|
"use strict";
|
|
@@ -15,10 +17,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
17
|
setup(__props, { emit: __emit }) {
|
|
16
18
|
const props = __props;
|
|
17
19
|
const emits = __emit;
|
|
20
|
+
const { scrollPosition, isHasScrollBar, scrollRef } = useScroll();
|
|
18
21
|
const searchIconValue = ref("");
|
|
19
22
|
const selectIcon = ref("");
|
|
20
23
|
const iconList = ref([]);
|
|
21
24
|
const bem = createNamespace("icon-picker-modal");
|
|
25
|
+
const isShowContentBottomBox = computed(() => {
|
|
26
|
+
return isHasScrollBar.value && scrollPosition.value !== "bottom";
|
|
27
|
+
});
|
|
22
28
|
const handleOk = () => {
|
|
23
29
|
emits("changeIconValue", selectIcon.value);
|
|
24
30
|
emits("update:visible");
|
|
@@ -30,13 +36,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
36
|
(newVisible) => {
|
|
31
37
|
if (newVisible)
|
|
32
38
|
searchIconValue.value = "";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
watch(
|
|
36
|
-
() => props.value,
|
|
37
|
-
(newV) => {
|
|
38
|
-
if (newV)
|
|
39
|
-
selectIcon.value = newV;
|
|
39
|
+
if (newVisible && props.value)
|
|
40
|
+
selectIcon.value = props.value;
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
43
|
immediate: true
|
|
@@ -56,97 +57,117 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
(ele) => ~ele.font_class.indexOf(searchIconValue.value)
|
|
57
58
|
);
|
|
58
59
|
});
|
|
60
|
+
watchEffect(() => {
|
|
61
|
+
if (props.visible) {
|
|
62
|
+
if (isHasScrollBar && scrollRef.value && !scrollRef.value.scrollTop) {
|
|
63
|
+
scrollRef.value.scrollTop = 0;
|
|
64
|
+
scrollPosition.value = "top";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
59
68
|
return (_ctx, _cache) => {
|
|
60
69
|
const _component_ll_icon = resolveComponent("ll-icon");
|
|
61
70
|
const _component_a_input = resolveComponent("a-input");
|
|
62
71
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
63
72
|
const _component_a_button = resolveComponent("a-button");
|
|
64
73
|
const _component_a_space = resolveComponent("a-space");
|
|
65
|
-
const
|
|
66
|
-
return openBlock(), createBlock(
|
|
74
|
+
const _component_ll_new_modal = resolveComponent("ll-new-modal");
|
|
75
|
+
return openBlock(), createBlock(_component_ll_new_modal, {
|
|
67
76
|
open: _ctx.visible,
|
|
68
77
|
title: "\u56FE\u6807\u9009\u62E9",
|
|
69
78
|
class: normalizeClass(`icon-picker-modal-wrapper ${unref(bem).b()}`),
|
|
70
79
|
width: "766px",
|
|
71
80
|
keyboard: false,
|
|
72
81
|
"mask-closable": false,
|
|
82
|
+
"is-show-footer-shadow": isShowContentBottomBox.value,
|
|
83
|
+
"footer-shadow-placement": "outer",
|
|
73
84
|
onOk: handleOk,
|
|
74
85
|
onCancel: handleCancel
|
|
75
86
|
}, {
|
|
76
|
-
|
|
87
|
+
default: withCtx(() => [
|
|
77
88
|
createElementVNode(
|
|
78
89
|
"div",
|
|
79
90
|
{
|
|
80
|
-
class: normalizeClass(unref(bem).e("
|
|
91
|
+
class: normalizeClass(unref(bem).e("modal-content"))
|
|
81
92
|
},
|
|
82
93
|
[
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
createElementVNode(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
class: normalizeClass(unref(bem).e("input-container"))
|
|
98
|
+
},
|
|
99
|
+
[
|
|
100
|
+
createVNode(_component_a_form_item, { name: "h" }, {
|
|
101
|
+
default: withCtx(() => [
|
|
102
|
+
createVNode(_component_a_input, {
|
|
103
|
+
value: searchIconValue.value,
|
|
104
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchIconValue.value = $event),
|
|
105
|
+
class: normalizeClass(unref(bem).e("input")),
|
|
106
|
+
"allow-clear": "",
|
|
107
|
+
placeholder: "\u641C\u7D22..."
|
|
108
|
+
}, {
|
|
109
|
+
prefix: withCtx(() => [
|
|
110
|
+
createVNode(_component_ll_icon, { "icon-name": "icon-search" })
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
/* STABLE */
|
|
114
|
+
}, 8, ["value", "class"])
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
/* STABLE */
|
|
118
|
+
})
|
|
119
|
+
],
|
|
120
|
+
2
|
|
121
|
+
/* CLASS */
|
|
122
|
+
),
|
|
123
|
+
createElementVNode(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
ref_key: "scrollRef",
|
|
127
|
+
ref: scrollRef,
|
|
128
|
+
class: normalizeClass(unref(bem).e("list"))
|
|
129
|
+
},
|
|
130
|
+
[
|
|
131
|
+
createVNode(_component_a_space, {
|
|
132
|
+
size: [16, 16],
|
|
133
|
+
wrap: "",
|
|
134
|
+
class: normalizeClass(unref(bem).e("space"))
|
|
91
135
|
}, {
|
|
92
|
-
|
|
93
|
-
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
(openBlock(true), createElementBlock(
|
|
138
|
+
Fragment,
|
|
139
|
+
null,
|
|
140
|
+
renderList(iconList.value, (item) => {
|
|
141
|
+
return openBlock(), createBlock(_component_a_button, {
|
|
142
|
+
key: item.icon_id,
|
|
143
|
+
type: "default",
|
|
144
|
+
class: normalizeClass([
|
|
145
|
+
unref(bem).e("button"),
|
|
146
|
+
selectIcon.value === item.font_class ? unref(bem).is("active") : ""
|
|
147
|
+
]),
|
|
148
|
+
onClick: ($event) => handleSelectIcon(item)
|
|
149
|
+
}, {
|
|
150
|
+
icon: withCtx(() => [
|
|
151
|
+
createVNode(_component_ll_icon, {
|
|
152
|
+
"icon-name": "icon-" + item.font_class,
|
|
153
|
+
style: { "font-size": "28px" }
|
|
154
|
+
}, null, 8, ["icon-name"])
|
|
155
|
+
]),
|
|
156
|
+
_: 2
|
|
157
|
+
/* DYNAMIC */
|
|
158
|
+
}, 1032, ["class", "onClick"]);
|
|
159
|
+
}),
|
|
160
|
+
128
|
|
161
|
+
/* KEYED_FRAGMENT */
|
|
162
|
+
))
|
|
94
163
|
]),
|
|
95
164
|
_: 1
|
|
96
165
|
/* STABLE */
|
|
97
|
-
}, 8, ["
|
|
98
|
-
]
|
|
99
|
-
|
|
100
|
-
/*
|
|
101
|
-
|
|
102
|
-
],
|
|
103
|
-
2
|
|
104
|
-
/* CLASS */
|
|
105
|
-
)
|
|
106
|
-
]),
|
|
107
|
-
default: withCtx(() => [
|
|
108
|
-
createElementVNode(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
class: normalizeClass(unref(bem).e("list"))
|
|
112
|
-
},
|
|
113
|
-
[
|
|
114
|
-
createVNode(_component_a_space, {
|
|
115
|
-
size: [16, 16],
|
|
116
|
-
wrap: "",
|
|
117
|
-
class: normalizeClass(unref(bem).e("space"))
|
|
118
|
-
}, {
|
|
119
|
-
default: withCtx(() => [
|
|
120
|
-
(openBlock(true), createElementBlock(
|
|
121
|
-
Fragment,
|
|
122
|
-
null,
|
|
123
|
-
renderList(iconList.value, (item) => {
|
|
124
|
-
return openBlock(), createBlock(_component_a_button, {
|
|
125
|
-
key: item.icon_id,
|
|
126
|
-
type: "default",
|
|
127
|
-
class: normalizeClass([
|
|
128
|
-
unref(bem).e("button"),
|
|
129
|
-
selectIcon.value === item.font_class ? unref(bem).is("active") : ""
|
|
130
|
-
]),
|
|
131
|
-
onClick: ($event) => handleSelectIcon(item)
|
|
132
|
-
}, {
|
|
133
|
-
icon: withCtx(() => [
|
|
134
|
-
createVNode(_component_ll_icon, {
|
|
135
|
-
"icon-name": "icon-" + item.font_class,
|
|
136
|
-
style: { "font-size": "28px" }
|
|
137
|
-
}, null, 8, ["icon-name"])
|
|
138
|
-
]),
|
|
139
|
-
_: 2
|
|
140
|
-
/* DYNAMIC */
|
|
141
|
-
}, 1032, ["class", "onClick"]);
|
|
142
|
-
}),
|
|
143
|
-
128
|
|
144
|
-
/* KEYED_FRAGMENT */
|
|
145
|
-
))
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
/* STABLE */
|
|
149
|
-
}, 8, ["class"])
|
|
166
|
+
}, 8, ["class"])
|
|
167
|
+
],
|
|
168
|
+
2
|
|
169
|
+
/* CLASS */
|
|
170
|
+
)
|
|
150
171
|
],
|
|
151
172
|
2
|
|
152
173
|
/* CLASS */
|
|
@@ -154,7 +175,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
175
|
]),
|
|
155
176
|
_: 1
|
|
156
177
|
/* STABLE */
|
|
157
|
-
}, 8, ["open", "class"]);
|
|
178
|
+
}, 8, ["open", "class", "is-show-footer-shadow"]);
|
|
158
179
|
};
|
|
159
180
|
}
|
|
160
181
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.vue2.mjs","sources":["../../../../../../../packages/components/icon-picker/src/components/modal.vue"],"sourcesContent":["<template>\n <ll-modal\n :open=\"visible\"\n :title=\"'图标选择'\"\n :class=\"`icon-picker-modal-wrapper ${bem.b()}`\"\n width=\"766px\"\n :keyboard=\"false\"\n :mask-closable=\"false\"\n @ok=\"handleOk\"\n @cancel=\"handleCancel\"\n >\n <
|
|
1
|
+
{"version":3,"file":"modal.vue2.mjs","sources":["../../../../../../../packages/components/icon-picker/src/components/modal.vue"],"sourcesContent":["<template>\n <ll-new-modal\n :open=\"visible\"\n :title=\"'图标选择'\"\n :class=\"`icon-picker-modal-wrapper ${bem.b()}`\"\n width=\"766px\"\n :keyboard=\"false\"\n :mask-closable=\"false\"\n :is-show-footer-shadow=\"isShowContentBottomBox\"\n footer-shadow-placement=\"outer\"\n @ok=\"handleOk\"\n @cancel=\"handleCancel\"\n >\n <div :class=\"bem.e('modal-content')\">\n <div :class=\"bem.e('input-container')\">\n <a-form-item name=\"h\">\n <a-input\n v-model:value=\"searchIconValue\"\n :class=\"bem.e('input')\"\n allow-clear\n placeholder=\"搜索...\"\n >\n <template #prefix>\n <ll-icon icon-name=\"icon-search\" />\n </template>\n </a-input>\n </a-form-item>\n </div>\n <div ref=\"scrollRef\" :class=\"bem.e('list')\">\n <a-space :size=\"[16, 16]\" wrap :class=\"bem.e('space')\">\n <a-button\n v-for=\"item in iconList\"\n :key=\"item.icon_id\"\n type=\"default\"\n :class=\"[\n bem.e('button'),\n selectIcon === item.font_class ? bem.is('active') : ''\n ]\"\n @click=\"handleSelectIcon(item)\"\n >\n <template #icon>\n <ll-icon\n :icon-name=\"'icon-' + item.font_class\"\n style=\"font-size: 28px\"\n />\n </template>\n </a-button>\n </a-space>\n </div>\n </div>\n </ll-new-modal>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, watch, watchEffect } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\nimport { iconPickerModalProps, iconPickerModalEmits } from '../config'\n\nimport type { IconPickerItem } from '../config'\nimport { useScroll } from '@ll-plus/hooks'\n\ndefineOptions({\n name: 'LlIconPickerModal'\n})\n\nconst props = defineProps(iconPickerModalProps)\nconst emits = defineEmits(iconPickerModalEmits)\n\nconst { scrollPosition, isHasScrollBar, scrollRef } = useScroll()\n\nconst searchIconValue = ref('')\nconst selectIcon = ref('')\nconst iconList = ref<IconPickerItem[]>([])\nconst bem = createNamespace('icon-picker-modal')\n\n// 是否显示内容区域底部的阴影div\nconst isShowContentBottomBox = computed(() => {\n return isHasScrollBar.value && scrollPosition.value !== 'bottom'\n})\n\nconst handleOk = () => {\n emits('changeIconValue', selectIcon.value)\n emits('update:visible')\n}\nconst handleCancel = () => emits('update:visible')\nconst handleSelectIcon = (icon: IconPickerItem) =>\n (selectIcon.value = icon?.font_class as string)\n\nwatch(\n () => props.visible,\n newVisible => {\n // 清空查询值\n if (newVisible) searchIconValue.value = ''\n\n if (newVisible && props.value) selectIcon.value = props.value\n },\n {\n immediate: true\n }\n)\nwatch(\n () => props.data,\n newData => {\n iconList.value = [...newData]\n },\n {\n immediate: true\n }\n)\nwatch(searchIconValue, () => {\n iconList.value = props.data.filter(\n ele => ~ele.font_class!.indexOf(searchIconValue.value)\n )\n})\n\n// 滚动条回到顶部\nwatchEffect(() => {\n if (props.visible) {\n // 头部有步骤条回到顶部\n if (isHasScrollBar && scrollRef.value && !scrollRef.value.scrollTop) {\n scrollRef.value.scrollTop = 0\n scrollPosition.value = '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AAA,OACb;AAAA,KACF,CAAA;AACA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA,MACZ,CAAW,OAAA,KAAA;AACT,QAAS,QAAA,CAAA,KAAA,GAAQ,CAAC,GAAG,OAAO,CAAA,CAAA;AAAA,OAC9B;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AACA,IAAA,KAAA,CAAM,iBAAiB,MAAM;AAC3B,MAAS,QAAA,CAAA,KAAA,GAAQ,MAAM,IAAK,CAAA,MAAA;AAAA,QAC1B,SAAO,CAAC,GAAA,CAAI,UAAY,CAAA,OAAA,CAAQ,gBAAgB,KAAK,CAAA;AAAA,OACvD,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAA,WAAA,CAAY,MAAM;AAChB,MAAA,IAAI,MAAM,OAAS,EAAA;AAEjB,QAAA,IAAI,kBAAkB,SAAU,CAAA,KAAA,IAAS,CAAC,SAAA,CAAU,MAAM,SAAW,EAAA;AACnE,UAAA,SAAA,CAAU,MAAM,SAAY,GAAA,CAAA,CAAA;AAC5B,UAAA,cAAA,CAAe,KAAQ,GAAA,KAAA,CAAA;AAAA,SACzB;AAAA,OACF;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,10 +9,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
...{ name: "LlInput" },
|
|
10
10
|
__name: "input",
|
|
11
11
|
props: inputProps,
|
|
12
|
-
setup(__props) {
|
|
12
|
+
setup(__props, { expose: __expose }) {
|
|
13
13
|
const bem = createNamespace("input");
|
|
14
14
|
const props = __props;
|
|
15
15
|
const innerValue = ref("");
|
|
16
|
+
const inputRef = ref();
|
|
16
17
|
watchEffect(() => {
|
|
17
18
|
if (props.value !== innerValue.value) {
|
|
18
19
|
innerValue.value = props.value;
|
|
@@ -23,9 +24,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
const attrs = { ...useAttrs(), ...props };
|
|
24
25
|
return attrs;
|
|
25
26
|
});
|
|
27
|
+
const focus = () => {
|
|
28
|
+
inputRef.value.focus();
|
|
29
|
+
};
|
|
30
|
+
__expose({ focus });
|
|
26
31
|
return (_ctx, _cache) => {
|
|
27
32
|
const _component_ll_icon = resolveComponent("ll-icon");
|
|
28
33
|
return openBlock(), createBlock(resolveDynamicComponent(unref(componentType)), mergeProps({
|
|
34
|
+
ref_key: "inputRef",
|
|
35
|
+
ref: inputRef,
|
|
29
36
|
class: unref(bem).b()
|
|
30
37
|
}, computedAttrs.value), createSlots({
|
|
31
38
|
_: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <component
|
|
1
|
+
{"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <component\n :is=\"componentType\"\n ref=\"inputRef\"\n :class=\"bem.b()\"\n v-bind=\"computedAttrs\"\n >\n <template v-for=\"item in Object.keys($slots)\" :key=\"item\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"prefixIcon\" #prefix>\n <ll-icon :icon-name=\"prefixIcon\" class-name=\"prefix-icon\" />\n </template>\n <template v-if=\"suffixIcon\" #suffix>\n <ll-icon :icon-name=\"suffixIcon\" class-name=\"suffix-icon\" />\n </template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, useAttrs, watchEffect } from 'vue'\nimport { Input } from 'ant-design-vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport { InputValue, inputProps } from './input'\n\ndefineOptions({ name: 'LlInput' })\n\nconst bem = createNamespace('input')\n\nconst props = defineProps(inputProps)\n\nconst innerValue = ref<InputValue>('')\n\nconst inputRef = ref()\n\nwatchEffect(() => {\n if (props.value !== innerValue.value) {\n innerValue.value = props.value\n }\n})\n\nconst componentType = props.showPassword ? Input.Password : Input\n\nconst computedAttrs = computed(() => {\n const attrs = { ...useAttrs(), ...props }\n\n return attrs\n})\n\nconst focus = () => {\n inputRef.value.focus()\n}\n\ndefineExpose({ focus })\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BA,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAEnC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,UAAA,GAAa,IAAgB,EAAE,CAAA,CAAA;AAErC,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAA,WAAA,CAAY,MAAM;AAChB,MAAI,IAAA,KAAA,CAAM,KAAU,KAAA,UAAA,CAAW,KAAO,EAAA;AACpC,QAAA,UAAA,CAAW,QAAQ,KAAM,CAAA,KAAA,CAAA;AAAA,OAC3B;AAAA,KACD,CAAA,CAAA;AAED,IAAA,MAAM,aAAgB,GAAA,KAAA,CAAM,YAAe,GAAA,KAAA,CAAM,QAAW,GAAA,KAAA,CAAA;AAE5D,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,MAAM,QAAQ,EAAE,GAAG,QAAS,EAAA,EAAG,GAAG,KAAM,EAAA,CAAA;AAExC,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,QAAQ,MAAM;AAClB,MAAA,QAAA,CAAS,MAAM,KAAM,EAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAa,QAAA,CAAA,EAAE,OAAO,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,12 +17,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
__name: "input-number",
|
|
18
18
|
props: inputNumberProps,
|
|
19
19
|
emits: inputNumberEmits,
|
|
20
|
-
setup(__props, { emit: __emit }) {
|
|
20
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
21
21
|
const props = __props;
|
|
22
22
|
const emit = __emit;
|
|
23
23
|
const bem = createNamespace("input-number");
|
|
24
24
|
const attrs = useAttrs();
|
|
25
25
|
const innerValue = ref("");
|
|
26
|
+
const inputRef = ref();
|
|
26
27
|
const integerCongfig = computed(() => {
|
|
27
28
|
let obj = {};
|
|
28
29
|
if (props.integer) {
|
|
@@ -60,6 +61,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
61
|
emit("update:value", value);
|
|
61
62
|
emit("change", value);
|
|
62
63
|
}
|
|
64
|
+
const focus = () => {
|
|
65
|
+
inputRef.value.focus();
|
|
66
|
+
};
|
|
67
|
+
__expose({ focus });
|
|
63
68
|
return (_ctx, _cache) => {
|
|
64
69
|
return openBlock(), createElementBlock(
|
|
65
70
|
"div",
|
|
@@ -75,6 +80,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
80
|
},
|
|
76
81
|
[
|
|
77
82
|
createVNode(unref(InputNumber), mergeProps({
|
|
83
|
+
ref_key: "inputRef",
|
|
84
|
+
ref: inputRef,
|
|
78
85
|
value: innerValue.value,
|
|
79
86
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event)
|
|
80
87
|
}, getBindValue.value, { onChange }), createSlots({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.vue2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <div v-if=\"!detailed\" :class=\"bem.e('container')\">\n <InputNumber\n v-model:value=\"innerValue\"\n v-bind=\"getBindValue\"\n @change=\"onChange\"\n >\n <template v-for=\"item in Object.keys($slots)\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"getBindValue.unit\" #addonAfter>\n <div :class=\"bem.e('unit')\">\n {{ getBindValue.unit }}\n </div>\n </template>\n </InputNumber>\n </div>\n\n <p\n v-if=\"detailed\"\n :class=\"bem.e('detailed')\"\n :title=\"thousands ? thousandsFormat(innerValue) : innerValue\"\n >\n <span v-if=\"$attrs.addonBefore\">{{ $attrs.addonBefore }}</span>\n {{ thousands ? thousandsFormat(innerValue) : innerValue }}\n <span v-if=\"$attrs.addonAfter\">{{ $attrs.addonAfter }}</span>\n </p>\n <p\n v-if=\"isAmountChinese && getChineseName\"\n :class=\"bem.e('amount-chinese-name')\"\n >\n {{ getChineseName }}\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch, useAttrs } from 'vue'\nimport { InputNumber } from 'ant-design-vue'\nimport { isNil } from 'lodash-es'\nimport {\n getAmountChinese,\n thousandsFormat,\n createNamespace\n} from '@ll-plus/utils'\nimport { inputNumberProps, inputNumberEmits } from './input-number'\nimport { integerDict, type Integer } from './config'\nimport type { InputNumberProps } from 'ant-design-vue'\ndefineOptions({ name: 'LlInputNumber' })\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\nconst bem = createNamespace('input-number')\nconst attrs = useAttrs()\nconst innerValue = ref('')\nconst integerCongfig = computed(() => {\n let obj = {} as Integer\n if (props.integer) {\n obj = integerDict[props.integer]\n }\n return obj\n})\n\nconst getBindValue = computed(() => {\n const bindValue = {\n ...attrs,\n ...integerCongfig.value\n } as InputNumberProps & { unit: string }\n if (props.thousands) {\n bindValue.formatter = (value: string | number) => thousandsFormat(value)\n bindValue.parser = (value: string) => value.replace(/\\$\\s?|(,*)/g, '')\n }\n return bindValue\n})\n\nconst getChineseName = computed(() => {\n let str = ''\n str =\n !props.isAmountChinese || isNil(innerValue.value)\n ? ''\n : getAmountChinese(Number(innerValue.value))\n return str\n})\n\nwatch(\n () => props.value,\n val => {\n setValue(val)\n },\n { immediate: true }\n)\n\nfunction setValue(value) {\n innerValue.value = isNil(value) || isNaN(value) ? null : value\n // (!value && value !== 0) || isNaN(value) ? null : Number(value)\n}\nfunction onChange(value) {\n emit('update:value', value)\n emit('change', value)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"input-number.vue2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <div v-if=\"!detailed\" :class=\"bem.e('container')\">\n <InputNumber\n ref=\"inputRef\"\n v-model:value=\"innerValue\"\n v-bind=\"getBindValue\"\n @change=\"onChange\"\n >\n <template v-for=\"item in Object.keys($slots)\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"getBindValue.unit\" #addonAfter>\n <div :class=\"bem.e('unit')\">\n {{ getBindValue.unit }}\n </div>\n </template>\n </InputNumber>\n </div>\n\n <p\n v-if=\"detailed\"\n :class=\"bem.e('detailed')\"\n :title=\"thousands ? thousandsFormat(innerValue) : innerValue\"\n >\n <span v-if=\"$attrs.addonBefore\">{{ $attrs.addonBefore }}</span>\n {{ thousands ? thousandsFormat(innerValue) : innerValue }}\n <span v-if=\"$attrs.addonAfter\">{{ $attrs.addonAfter }}</span>\n </p>\n <p\n v-if=\"isAmountChinese && getChineseName\"\n :class=\"bem.e('amount-chinese-name')\"\n >\n {{ getChineseName }}\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch, useAttrs } from 'vue'\nimport { InputNumber } from 'ant-design-vue'\nimport { isNil } from 'lodash-es'\nimport {\n getAmountChinese,\n thousandsFormat,\n createNamespace\n} from '@ll-plus/utils'\nimport { inputNumberProps, inputNumberEmits } from './input-number'\nimport { integerDict, type Integer } from './config'\nimport type { InputNumberProps } from 'ant-design-vue'\ndefineOptions({ name: 'LlInputNumber' })\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\nconst bem = createNamespace('input-number')\nconst attrs = useAttrs()\nconst innerValue = ref('')\nconst inputRef = ref()\nconst integerCongfig = computed(() => {\n let obj = {} as Integer\n if (props.integer) {\n obj = integerDict[props.integer]\n }\n return obj\n})\n\nconst getBindValue = computed(() => {\n const bindValue = {\n ...attrs,\n ...integerCongfig.value\n } as InputNumberProps & { unit: string }\n if (props.thousands) {\n bindValue.formatter = (value: string | number) => thousandsFormat(value)\n bindValue.parser = (value: string) => value.replace(/\\$\\s?|(,*)/g, '')\n }\n return bindValue\n})\n\nconst getChineseName = computed(() => {\n let str = ''\n str =\n !props.isAmountChinese || isNil(innerValue.value)\n ? ''\n : getAmountChinese(Number(innerValue.value))\n return str\n})\n\nwatch(\n () => props.value,\n val => {\n setValue(val)\n },\n { immediate: true }\n)\n\nfunction setValue(value) {\n innerValue.value = isNil(value) || isNaN(value) ? null : value\n // (!value && value !== 0) || isNaN(value) ? null : Number(value)\n}\nfunction onChange(value) {\n emit('update:value', value)\n emit('change', value)\n}\n\nconst focus = () => {\n inputRef.value.focus()\n}\n\ndefineExpose({ focus })\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAmDA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAM,MAAA,GAAA,GAAM,gBAAgB,cAAc,CAAA,CAAA;AAC1C,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAM,MAAA,UAAA,GAAa,IAAI,EAAE,CAAA,CAAA;AACzB,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AACrB,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM;AACpC,MAAA,IAAI,MAAM,EAAC,CAAA;AACX,MAAA,IAAI,MAAM,OAAS,EAAA;AACjB,QAAM,GAAA,GAAA,WAAA,CAAY,MAAM,OAAO,CAAA,CAAA;AAAA,OACjC;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,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