@tdh-ui/base 1.0.2 → 1.0.3

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.
Files changed (55) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +12 -4
  3. package/dist/index.full.min.js +3 -3
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +3 -3
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +12 -4
  8. package/dist/locale/ar.js +1 -1
  9. package/dist/locale/ar.min.js +1 -1
  10. package/dist/locale/ar.min.mjs +1 -1
  11. package/dist/locale/ar.mjs +1 -1
  12. package/dist/locale/en.js +1 -1
  13. package/dist/locale/en.min.js +1 -1
  14. package/dist/locale/en.min.mjs +1 -1
  15. package/dist/locale/en.mjs +1 -1
  16. package/dist/locale/zh-cn.js +1 -1
  17. package/dist/locale/zh-cn.min.js +1 -1
  18. package/dist/locale/zh-cn.min.mjs +1 -1
  19. package/dist/locale/zh-cn.mjs +1 -1
  20. package/es/components/calendar/style/css.mjs +1 -1
  21. package/es/components/calendar/style/index.mjs +1 -1
  22. package/es/components/dropdown/style/css.mjs +1 -1
  23. package/es/components/dropdown/style/index.mjs +1 -1
  24. package/es/components/form-plus/src/form-plus.mjs +11 -2
  25. package/es/components/form-plus/src/form-plus.mjs.map +1 -1
  26. package/es/components/form-plus/style/css.mjs +24 -0
  27. package/es/components/form-plus/style/index.mjs +24 -0
  28. package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  29. package/es/components/tree-v2/style/css.mjs +1 -1
  30. package/es/components/tree-v2/style/index.mjs +1 -1
  31. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  32. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  33. package/es/version.mjs +1 -1
  34. package/es/version.mjs.map +1 -1
  35. package/lib/components/calendar/style/css.js +1 -1
  36. package/lib/components/calendar/style/index.js +1 -1
  37. package/lib/components/dropdown/style/css.js +1 -1
  38. package/lib/components/dropdown/style/index.js +1 -1
  39. package/lib/components/form-plus/src/form-plus.js +58 -49
  40. package/lib/components/form-plus/src/form-plus.js.map +1 -1
  41. package/lib/components/form-plus/style/css.js +25 -0
  42. package/lib/components/form-plus/style/index.js +25 -0
  43. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  44. package/lib/components/tree-v2/style/css.js +1 -1
  45. package/lib/components/tree-v2/style/index.js +1 -1
  46. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  47. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  48. package/lib/version.js +1 -1
  49. package/lib/version.js.map +1 -1
  50. package/package.json +1 -1
  51. package/theme-chalk/el-form-plus.css +1 -0
  52. package/theme-chalk/index.css +1 -1
  53. package/theme-chalk/src/form-plus.scss +5 -0
  54. package/theme-chalk/src/index.scss +2 -0
  55. package/web-types.json +1 -1
@@ -1,25 +1,26 @@
1
1
  require("../../../_virtual/_rolldown/runtime.js");
2
- const require_index = require("../../form/index.js");
3
- const require_index$1 = require("../../input/index.js");
4
- const require_index$2 = require("../../autocomplete/index.js");
5
- const require_index$3 = require("../../time-picker/index.js");
6
- const require_index$4 = require("../../checkbox/index.js");
7
- const require_index$5 = require("../../select/index.js");
8
- const require_index$6 = require("../../radio/index.js");
9
- const require_index$7 = require("../../cascader-panel/index.js");
10
- const require_index$8 = require("../../cascader/index.js");
11
- const require_index$9 = require("../../row/index.js");
12
- const require_index$10 = require("../../col/index.js");
13
- const require_index$11 = require("../../color-picker/index.js");
14
- const require_index$12 = require("../../date-picker/index.js");
15
- const require_index$13 = require("../../input-number/index.js");
16
- const require_index$14 = require("../../rate/index.js");
17
- const require_index$15 = require("../../slider/index.js");
18
- const require_index$16 = require("../../switch/index.js");
19
- const require_index$17 = require("../../time-select/index.js");
20
- const require_index$18 = require("../../transfer/index.js");
21
- const require_index$19 = require("../../tree/index.js");
22
- const require_index$20 = require("../../upload/index.js");
2
+ const require_index = require("../../../hooks/use-namespace/index.js");
3
+ const require_index$1 = require("../../form/index.js");
4
+ const require_index$2 = require("../../input/index.js");
5
+ const require_index$3 = require("../../autocomplete/index.js");
6
+ const require_index$4 = require("../../time-picker/index.js");
7
+ const require_index$5 = require("../../checkbox/index.js");
8
+ const require_index$6 = require("../../select/index.js");
9
+ const require_index$7 = require("../../radio/index.js");
10
+ const require_index$8 = require("../../cascader-panel/index.js");
11
+ const require_index$9 = require("../../cascader/index.js");
12
+ const require_index$10 = require("../../row/index.js");
13
+ const require_index$11 = require("../../col/index.js");
14
+ const require_index$12 = require("../../color-picker/index.js");
15
+ const require_index$13 = require("../../date-picker/index.js");
16
+ const require_index$14 = require("../../input-number/index.js");
17
+ const require_index$15 = require("../../rate/index.js");
18
+ const require_index$16 = require("../../slider/index.js");
19
+ const require_index$17 = require("../../switch/index.js");
20
+ const require_index$18 = require("../../time-select/index.js");
21
+ const require_index$19 = require("../../transfer/index.js");
22
+ const require_index$20 = require("../../tree/index.js");
23
+ const require_index$21 = require("../../upload/index.js");
23
24
  const require_types = require("./types.js");
24
25
  let lodash_unified = require("lodash-unified");
25
26
  let vue = require("vue");
@@ -30,25 +31,25 @@ function _isSlot(s) {
30
31
  const defaultRowConfig = { gutter: 20 };
31
32
  const defaultColConfig = { span: 12 };
32
33
  const formControlMap = {
33
- Input: require_index$1.ElInput,
34
- InputNumber: require_index$13.ElInputNumber,
35
- Select: require_index$5.ElSelect,
36
- Radio: require_index$6.ElRadioGroup,
37
- CheckBox: require_index$4.ElCheckboxGroup,
38
- Switch: require_index$16.ElSwitch,
39
- DatePicker: require_index$12.ElDatePicker,
40
- DateTimePicker: require_index$12.ElDatePicker,
41
- TimePicker: require_index$3.ElTimePicker,
42
- TimeSelect: require_index$17.ElTimeSelect,
43
- Cascader: require_index$8.ElCascader,
44
- CascaderPanel: require_index$7.ElCascaderPanel,
45
- ColorPicker: require_index$11.ElColorPicker,
46
- Slider: require_index$15.ElSlider,
47
- Rate: require_index$14.ElRate,
48
- Transfer: require_index$18.ElTransfer,
49
- Tree: require_index$19.ElTree,
50
- Autocomplete: require_index$2.ElAutocomplete,
51
- Upload: require_index$20.ElUpload
34
+ Input: require_index$2.ElInput,
35
+ InputNumber: require_index$14.ElInputNumber,
36
+ Select: require_index$6.ElSelect,
37
+ Radio: require_index$7.ElRadioGroup,
38
+ CheckBox: require_index$5.ElCheckboxGroup,
39
+ Switch: require_index$17.ElSwitch,
40
+ DatePicker: require_index$13.ElDatePicker,
41
+ DateTimePicker: require_index$13.ElDatePicker,
42
+ TimePicker: require_index$4.ElTimePicker,
43
+ TimeSelect: require_index$18.ElTimeSelect,
44
+ Cascader: require_index$9.ElCascader,
45
+ CascaderPanel: require_index$8.ElCascaderPanel,
46
+ ColorPicker: require_index$12.ElColorPicker,
47
+ Slider: require_index$16.ElSlider,
48
+ Rate: require_index$15.ElRate,
49
+ Transfer: require_index$19.ElTransfer,
50
+ Tree: require_index$20.ElTree,
51
+ Autocomplete: require_index$3.ElAutocomplete,
52
+ Upload: require_index$21.ElUpload
52
53
  };
53
54
  const hiddenItem = (item, model) => {
54
55
  if ((0, lodash_unified.isFunction)(item.hidden)) return item.hidden(model);
@@ -66,6 +67,7 @@ var form_plus_default = /* @__PURE__ */ (0, vue.defineComponent)({
66
67
  props: require_types.formPlusProps,
67
68
  emits: ["change", "update:modelValue"],
68
69
  setup(props, { attrs, emit, expose, slots }) {
70
+ const ns = require_index.useNamespace("form-plus");
69
71
  const formRef = (0, vue.ref)();
70
72
  const model = (0, vue.reactive)({});
71
73
  const syncLock = (0, vue.ref)(false);
@@ -136,18 +138,18 @@ var form_plus_default = /* @__PURE__ */ (0, vue.defineComponent)({
136
138
  };
137
139
  const renderOptionChildren = (items, type) => {
138
140
  if (!(0, lodash_unified.isArray)(items)) return null;
139
- if (type === "Select") return items.map((item) => (0, vue.createVNode)(require_index$5.ElOption, {
141
+ if (type === "Select") return items.map((item) => (0, vue.createVNode)(require_index$6.ElOption, {
140
142
  "key": item.value ?? item.label,
141
143
  "label": item.label,
142
144
  "value": item.value,
143
145
  "disabled": item.disabled
144
146
  }, null));
145
- if (type === "Radio") return items.map((item) => (0, vue.createVNode)(require_index$6.ElRadio, {
147
+ if (type === "Radio") return items.map((item) => (0, vue.createVNode)(require_index$7.ElRadio, {
146
148
  "key": item.value ?? item.label,
147
149
  "label": item.value,
148
150
  "disabled": item.disabled
149
151
  }, { default: () => [item.label] }));
150
- if (type === "CheckBox") return items.map((item) => (0, vue.createVNode)(require_index$4.ElCheckbox, {
152
+ if (type === "CheckBox") return items.map((item) => (0, vue.createVNode)(require_index$5.ElCheckbox, {
151
153
  "key": item.value ?? item.label,
152
154
  "label": item.value,
153
155
  "disabled": item.disabled
@@ -200,7 +202,7 @@ var form_plus_default = /* @__PURE__ */ (0, vue.defineComponent)({
200
202
  if (option.type === "Grid") return renderOptions(option.childrens || [], option.layout ?? props.layout);
201
203
  const control = renderControl(option);
202
204
  const moreControls = (0, lodash_unified.isArray)(option.more) ? option.more.map((item) => renderControl(item)) : [];
203
- return (0, vue.createVNode)(require_index.ElFormItem, {
205
+ return (0, vue.createVNode)(require_index$1.ElFormItem, {
204
206
  label: option.label,
205
207
  prop: option.noField ? void 0 : option.field,
206
208
  rules: option.rules
@@ -227,10 +229,10 @@ var form_plus_default = /* @__PURE__ */ (0, vue.defineComponent)({
227
229
  ...option.config?.col || {}
228
230
  };
229
231
  const key = option.field || `${option.type || "item"}-${index}`;
230
- return (0, vue.createVNode)(require_index$10.ElCol, (0, vue.mergeProps)({ "key": key }, colConfig), _isSlot(node) ? node : { default: () => [node] });
232
+ return (0, vue.createVNode)(require_index$11.ElCol, (0, vue.mergeProps)({ "key": key }, colConfig), _isSlot(node) ? node : { default: () => [node] });
231
233
  }).filter(Boolean);
232
234
  if (!useLayout) return (0, vue.createVNode)(vue.Fragment, null, [nodes]);
233
- return (0, vue.createVNode)(require_index$9.ElRow, rowConfig, _isSlot(nodes) ? nodes : { default: () => [nodes] });
235
+ return (0, vue.createVNode)(require_index$10.ElRow, rowConfig, _isSlot(nodes) ? nodes : { default: () => [nodes] });
234
236
  };
235
237
  expose({
236
238
  validate: (...args) => formRef.value?.validate(...args),
@@ -242,9 +244,16 @@ var form_plus_default = /* @__PURE__ */ (0, vue.defineComponent)({
242
244
  });
243
245
  return () => {
244
246
  let _slot2;
245
- return (0, vue.createVNode)(require_index.ElForm, {
246
- ...attrs,
247
- ...props.config || {},
247
+ const attrsProps = attrs;
248
+ const configProps = props.config || {};
249
+ return (0, vue.createVNode)(require_index$1.ElForm, {
250
+ ...attrsProps,
251
+ ...configProps,
252
+ class: [
253
+ ns.b(),
254
+ attrsProps.class,
255
+ configProps.class
256
+ ],
248
257
  model,
249
258
  ref: formRef
250
259
  }, _isSlot(_slot2 = renderOptions(props.options, props.layout)) ? _slot2 : { default: () => [_slot2] });
@@ -1 +1 @@
1
- {"version":3,"file":"form-plus.js","names":["computed","defineComponent","nextTick","reactive","ref","watch","createVNode","_createVNode","mergeProps","_mergeProps","isVNode","_isVNode","Fragment","_Fragment","cloneDeep","isArray","isEqual","isFunction","ElAutocomplete","ElCascader","ElCascaderPanel","ElCheckbox","ElCheckboxGroup","ElCol","ElColorPicker","ElDatePicker","ElForm","ElFormItem","ElInput","ElInputNumber","ElOption","ElSelect","ElRadio","ElRadioGroup","ElRate","ElRow","ElSlider","ElSwitch","ElTimePicker","ElTimeSelect","ElTransfer","ElTree","ElUpload","formPlusProps","_isSlot","s","Object","prototype","toString","call","defaultRowConfig","gutter","defaultColConfig","span","formControlMap","Input","InputNumber","Select","Radio","CheckBox","Switch","DatePicker","DateTimePicker","TimePicker","TimeSelect","Cascader","CascaderPanel","ColorPicker","Slider","Rate","Transfer","Tree","Autocomplete","Upload","hiddenItem","item","model","hidden","eachOption","options","cb","forEach","option","more","length","type","childrens","name","props","emits","setup","attrs","emit","expose","slots","formRef","syncLock","modelSource","modelValue","applyOptionDefaults","noField","field","undefined","value","syncModel","keys","key","assign","nextModel","immediate","deep","runModelChange","modelChange","on","emitModelUpdate","previousModel","setFieldValue","resetFields","args","getControlEvents","events","entries","reduce","result","eventName","fn","eventKey","startsWith","charAt","toUpperCase","slice","renderOptionChildren","items","map","label","disabled","default","renderControl","_slot","customSlot","custom","Control","attrsProps","optionItems","updateModel","renderSingleOption","show","renderOptions","layout","control","moreControls","formItemProps","prop","rules","layoutConfig","configObject","rowConfig","row","globalColConfig","col","useLayout","nodes","index","node","colConfig","unifyOptions","config","filter","Boolean","validate","validateField","clearValidate","_slot2","formProps"],"sources":["../../../../../../packages/components/form-plus/src/form-plus.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, reactive, ref, watch } from 'vue'\nimport { cloneDeep, isArray, isEqual, isFunction } from 'lodash-unified'\nimport { ElAutocomplete } from '@tdh-ui/components/autocomplete'\nimport { ElCascader } from '@tdh-ui/components/cascader'\nimport { ElCascaderPanel } from '@tdh-ui/components/cascader-panel'\nimport { ElCheckbox, ElCheckboxGroup } from '@tdh-ui/components/checkbox'\nimport { ElCol } from '@tdh-ui/components/col'\nimport { ElColorPicker } from '@tdh-ui/components/color-picker'\nimport { ElDatePicker } from '@tdh-ui/components/date-picker'\nimport { ElForm, ElFormItem } from '@tdh-ui/components/form'\nimport { ElInput } from '@tdh-ui/components/input'\nimport { ElInputNumber } from '@tdh-ui/components/input-number'\nimport { ElOption, ElSelect } from '@tdh-ui/components/select'\nimport { ElRadio, ElRadioGroup } from '@tdh-ui/components/radio'\nimport { ElRate } from '@tdh-ui/components/rate'\nimport { ElRow } from '@tdh-ui/components/row'\nimport { ElSlider } from '@tdh-ui/components/slider'\nimport { ElSwitch } from '@tdh-ui/components/switch'\nimport { ElTimePicker } from '@tdh-ui/components/time-picker'\nimport { ElTimeSelect } from '@tdh-ui/components/time-select'\nimport { ElTransfer } from '@tdh-ui/components/transfer'\nimport { ElTree } from '@tdh-ui/components/tree'\nimport { ElUpload } from '@tdh-ui/components/upload'\nimport { formPlusProps } from './types'\n\nimport type { FormInstance } from '@tdh-ui/components/form'\nimport type { FormPlusOption } from './types'\nimport type { VNode } from 'vue'\n\nconst defaultRowConfig = { gutter: 20 }\nconst defaultColConfig = { span: 12 }\n\nconst formControlMap: Record<string, any> = {\n Input: ElInput,\n InputNumber: ElInputNumber,\n Select: ElSelect,\n Radio: ElRadioGroup,\n CheckBox: ElCheckboxGroup,\n Switch: ElSwitch,\n DatePicker: ElDatePicker,\n DateTimePicker: ElDatePicker,\n TimePicker: ElTimePicker,\n TimeSelect: ElTimeSelect,\n Cascader: ElCascader,\n CascaderPanel: ElCascaderPanel,\n ColorPicker: ElColorPicker,\n Slider: ElSlider,\n Rate: ElRate,\n Transfer: ElTransfer,\n Tree: ElTree,\n Autocomplete: ElAutocomplete,\n Upload: ElUpload,\n}\n\nconst hiddenItem = (item: FormPlusOption, model: Record<string, any>) => {\n if (isFunction(item.hidden)) return item.hidden(model)\n return !!item.hidden\n}\n\nconst eachOption = (\n options: FormPlusOption[],\n cb: (option: FormPlusOption) => void\n) => {\n options.forEach((option) => {\n cb(option)\n if (isArray(option.more) && option.more.length) eachOption(option.more, cb)\n if (\n option.type === 'Grid' &&\n isArray(option.childrens) &&\n option.childrens.length\n ) {\n eachOption(option.childrens, cb)\n }\n })\n}\n\nexport default defineComponent({\n name: 'ElFormPlus',\n props: formPlusProps,\n emits: ['change', 'update:modelValue'],\n setup(props, { attrs, emit, expose, slots }) {\n const formRef = ref<FormInstance>()\n const model = reactive<Record<string, any>>({})\n const syncLock = ref(false)\n\n const modelSource = computed(() => props.modelValue ?? {})\n\n const applyOptionDefaults = () => {\n eachOption(props.options, (option) => {\n if (option.noField || !option.field) return\n if (model[option.field] === undefined && option.value !== undefined) {\n model[option.field] = cloneDeep(option.value)\n }\n })\n }\n\n const syncModel = (value: Record<string, any>) => {\n syncLock.value = true\n Object.keys(model).forEach((key) => {\n delete model[key]\n })\n Object.assign(model, cloneDeep(value))\n applyOptionDefaults()\n syncLock.value = false\n }\n\n watch(\n modelSource,\n (value) => {\n const nextModel = value || {}\n if (isEqual(nextModel, model)) return\n syncModel(nextModel)\n },\n { immediate: true, deep: true }\n )\n\n watch(\n () => props.options,\n () => {\n applyOptionDefaults()\n },\n { immediate: true, deep: true }\n )\n\n const runModelChange = (field: string) => {\n eachOption(props.options, (option) => {\n if (option.field !== field) return\n const modelChange = option.on?.modelChange\n if (isFunction(modelChange)) {\n modelChange(model[field], props.options, model, {\n formRef: formRef.value,\n })\n }\n })\n }\n\n const emitModelUpdate = (previousModel: Record<string, any>) => {\n const modelValue = cloneDeep(model)\n if (isEqual(modelValue, previousModel)) return\n emit('change', modelValue)\n emit('update:modelValue', modelValue)\n }\n\n const setFieldValue = (field: string, value: any) => {\n if (isEqual(model[field], value)) return\n const previousModel = cloneDeep(model)\n model[field] = value\n runModelChange(field)\n emitModelUpdate(previousModel)\n }\n\n const resetFields = async (...args: any[]) => {\n const previousModel = cloneDeep(model)\n formRef.value?.resetFields(...args)\n await nextTick()\n emitModelUpdate(previousModel)\n }\n\n const getControlEvents = (option: FormPlusOption) => {\n const events = option.on || {}\n return Object.entries(events).reduce(\n (result, [eventName, fn]) => {\n if (!isFunction(fn) || eventName === 'modelChange') return result\n const eventKey =\n eventName.startsWith('on') && eventName.length > 2\n ? eventName\n : `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`\n ;(result as Record<string, any>)[eventKey] = (...args: any[]) =>\n fn(...args, props.options, model)\n return result\n },\n {} as Record<string, any>\n )\n }\n\n const renderOptionChildren = (items: any[], type: string) => {\n if (!isArray(items)) return null\n if (type === 'Select') {\n return items.map((item) => (\n <ElOption\n key={item.value ?? item.label}\n label={item.label}\n value={item.value}\n disabled={item.disabled}\n />\n ))\n }\n if (type === 'Radio') {\n return items.map((item) => (\n <ElRadio\n key={item.value ?? item.label}\n label={item.value}\n disabled={item.disabled}\n >\n {item.label}\n </ElRadio>\n ))\n }\n if (type === 'CheckBox') {\n return items.map((item) => (\n <ElCheckbox\n key={item.value ?? item.label}\n label={item.value}\n disabled={item.disabled}\n >\n {item.label}\n </ElCheckbox>\n ))\n }\n return null\n }\n\n const renderControl = (option: FormPlusOption) => {\n if (!option.type) return null\n if (option.type === 'Custom' || option.type === 'SuperCustom') {\n const customSlot = option.field ? slots[option.field] : undefined\n if (customSlot) return customSlot({ model, option, setFieldValue })\n if (slots.custom) return slots.custom({ model, option, setFieldValue })\n return null\n }\n\n const Control = formControlMap[option.type]\n if (!Control) return null\n const attrsProps = option.attrs || {}\n const events = getControlEvents(option)\n const optionItems = option.options || attrsProps.options || []\n const modelValue = option.field ? model[option.field] : undefined\n const updateModel = (value: any) => {\n if (!option.field) return\n setFieldValue(option.field, value)\n }\n\n if (option.type === 'DateTimePicker') {\n return (\n <Control\n {...attrsProps}\n type=\"datetime\"\n {...events}\n modelValue={modelValue}\n onUpdate:modelValue={updateModel}\n />\n )\n }\n\n if (option.type === 'Upload') {\n return (\n <Control\n {...attrsProps}\n {...events}\n fileList={modelValue}\n onUpdate:fileList={updateModel}\n />\n )\n }\n\n return (\n <Control\n {...attrsProps}\n {...events}\n modelValue={modelValue}\n onUpdate:modelValue={updateModel}\n >\n {renderOptionChildren(optionItems, option.type)}\n </Control>\n )\n }\n\n const renderSingleOption = (option: FormPlusOption): VNode | null => {\n if (hiddenItem(option, model)) return null\n if (option.show === false) return null\n\n if (option.type === 'Grid') {\n return renderOptions(\n option.childrens || [],\n option.layout ?? props.layout\n )\n }\n\n const control = renderControl(option)\n const moreControls = isArray(option.more)\n ? option.more.map((item) => renderControl(item))\n : []\n\n const formItemProps = {\n label: option.label,\n prop: option.noField ? undefined : option.field,\n rules: option.rules,\n } as Record<string, any>\n\n return (\n <ElFormItem {...formItemProps}>\n {control}\n {moreControls}\n </ElFormItem>\n )\n }\n\n const renderOptions = (\n options: FormPlusOption[],\n layoutConfig: boolean | Record<string, any> | undefined\n ) => {\n const configObject =\n layoutConfig && typeof layoutConfig === 'object' ? layoutConfig : {}\n const rowConfig = { ...defaultRowConfig, ...(configObject.row || {}) }\n const globalColConfig = {\n ...defaultColConfig,\n ...(configObject.col || {}),\n }\n const useLayout = layoutConfig !== false\n const nodes = options\n .map((option, index) => {\n const node = renderSingleOption(option)\n if (!node) return null\n if (!useLayout) return node\n const colConfig = {\n ...globalColConfig,\n ...(props.unifyOptions?.config?.col || {}),\n ...(option.config?.col || {}),\n }\n const key = option.field || `${option.type || 'item'}-${index}`\n return (\n <ElCol key={key} {...colConfig}>\n {node}\n </ElCol>\n )\n })\n .filter(Boolean)\n\n if (!useLayout) return <>{nodes}</>\n return <ElRow {...rowConfig}>{nodes}</ElRow>\n }\n\n expose({\n validate: (...args: any[]) => formRef.value?.validate(...args),\n validateField: (...args: any[]) => formRef.value?.validateField(...args),\n resetFields,\n clearValidate: (...args: any[]) => formRef.value?.clearValidate(...args),\n model,\n formRef,\n })\n\n return () => {\n const formProps = {\n ...(attrs as Record<string, any>),\n ...(props.config || {}),\n model,\n ref: formRef,\n }\n return (\n <ElForm {...formProps}>\n {renderOptions(props.options, props.layout)}\n </ElForm>\n )\n }\n },\n}) as unknown as {\n new (): {\n validate: FormInstance['validate']\n validateField: FormInstance['validateField']\n resetFields: FormInstance['resetFields']\n clearValidate: FormInstance['clearValidate']\n model: Record<string, any>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBuC,SAAA4C,QAAAC,GAAA;AAAA,QAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,EAAA,KAAA,qBAAA,EAAA,GAAA,IAAA,SAAAA,EAAA;;AAMvC,MAAMK,mBAAmB,EAAEC,QAAQ,IAAI;AACvC,MAAMC,mBAAmB,EAAEC,MAAM,IAAI;AAErC,MAAMC,iBAAsC;CAC1CC,OAAO3B,gBAAAA;CACP4B,aAAa3B,iBAAAA;CACb4B,QAAQ1B,gBAAAA;CACR2B,OAAOzB,gBAAAA;CACP0B,UAAUrC,gBAAAA;CACVsC,QAAQvB,iBAAAA;CACRwB,YAA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ACAmB;GACD,CAAC;AAEF,eAAa;GAAA,IAAA6E;AAOX,WAAA,GAAA,IAAA,aAAAlJ,cAAAA,QANkB;IAChB,GAAIiE;IACJ,GAAIH,MAAM8E,UAAU,EAAE;IACtB1F;IACAxE,KAAK2F;IACN,EAEsBnD,QAAAgI,SAClBzB,cAAc3D,MAAMT,SAASS,MAAM4D,OAAO,CAAA,GAAAwB,SAAA,EAAApC,eAAA,CAAAoC,OAAA,EAAA,CAAA;;;CAKpD,CAAC"}
1
+ {"version":3,"file":"form-plus.js","names":["computed","defineComponent","nextTick","reactive","ref","watch","createVNode","_createVNode","mergeProps","_mergeProps","isVNode","_isVNode","Fragment","_Fragment","cloneDeep","isArray","isEqual","isFunction","ElAutocomplete","ElCascader","ElCascaderPanel","ElCheckbox","ElCheckboxGroup","ElCol","ElColorPicker","ElDatePicker","ElForm","ElFormItem","ElInput","ElInputNumber","ElOption","ElSelect","ElRadio","ElRadioGroup","ElRate","ElRow","ElSlider","ElSwitch","ElTimePicker","ElTimeSelect","ElTransfer","ElTree","ElUpload","useNamespace","formPlusProps","_isSlot","s","Object","prototype","toString","call","defaultRowConfig","gutter","defaultColConfig","span","formControlMap","Input","InputNumber","Select","Radio","CheckBox","Switch","DatePicker","DateTimePicker","TimePicker","TimeSelect","Cascader","CascaderPanel","ColorPicker","Slider","Rate","Transfer","Tree","Autocomplete","Upload","hiddenItem","item","model","hidden","eachOption","options","cb","forEach","option","more","length","type","childrens","name","props","emits","setup","attrs","emit","expose","slots","ns","formRef","syncLock","modelSource","modelValue","applyOptionDefaults","noField","field","undefined","value","syncModel","keys","key","assign","nextModel","immediate","deep","runModelChange","modelChange","on","emitModelUpdate","previousModel","setFieldValue","resetFields","args","getControlEvents","events","entries","reduce","result","eventName","fn","eventKey","startsWith","charAt","toUpperCase","slice","renderOptionChildren","items","map","label","disabled","default","renderControl","_slot","customSlot","custom","Control","attrsProps","optionItems","updateModel","renderSingleOption","show","renderOptions","layout","control","moreControls","formItemProps","prop","rules","layoutConfig","configObject","rowConfig","row","globalColConfig","col","useLayout","nodes","index","node","colConfig","unifyOptions","config","filter","Boolean","validate","validateField","clearValidate","_slot2","configProps","formProps","class","b"],"sources":["../../../../../../packages/components/form-plus/src/form-plus.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, reactive, ref, watch } from 'vue'\nimport { cloneDeep, isArray, isEqual, isFunction } from 'lodash-unified'\nimport { ElAutocomplete } from '@tdh-ui/components/autocomplete'\nimport { ElCascader } from '@tdh-ui/components/cascader'\nimport { ElCascaderPanel } from '@tdh-ui/components/cascader-panel'\nimport { ElCheckbox, ElCheckboxGroup } from '@tdh-ui/components/checkbox'\nimport { ElCol } from '@tdh-ui/components/col'\nimport { ElColorPicker } from '@tdh-ui/components/color-picker'\nimport { ElDatePicker } from '@tdh-ui/components/date-picker'\nimport { ElForm, ElFormItem } from '@tdh-ui/components/form'\nimport { ElInput } from '@tdh-ui/components/input'\nimport { ElInputNumber } from '@tdh-ui/components/input-number'\nimport { ElOption, ElSelect } from '@tdh-ui/components/select'\nimport { ElRadio, ElRadioGroup } from '@tdh-ui/components/radio'\nimport { ElRate } from '@tdh-ui/components/rate'\nimport { ElRow } from '@tdh-ui/components/row'\nimport { ElSlider } from '@tdh-ui/components/slider'\nimport { ElSwitch } from '@tdh-ui/components/switch'\nimport { ElTimePicker } from '@tdh-ui/components/time-picker'\nimport { ElTimeSelect } from '@tdh-ui/components/time-select'\nimport { ElTransfer } from '@tdh-ui/components/transfer'\nimport { ElTree } from '@tdh-ui/components/tree'\nimport { ElUpload } from '@tdh-ui/components/upload'\nimport { useNamespace } from '@tdh-ui/hooks'\nimport { formPlusProps } from './types'\n\nimport type { FormInstance } from '@tdh-ui/components/form'\nimport type { FormPlusOption } from './types'\nimport type { VNode } from 'vue'\n\nconst defaultRowConfig = { gutter: 20 }\nconst defaultColConfig = { span: 12 }\n\nconst formControlMap: Record<string, any> = {\n Input: ElInput,\n InputNumber: ElInputNumber,\n Select: ElSelect,\n Radio: ElRadioGroup,\n CheckBox: ElCheckboxGroup,\n Switch: ElSwitch,\n DatePicker: ElDatePicker,\n DateTimePicker: ElDatePicker,\n TimePicker: ElTimePicker,\n TimeSelect: ElTimeSelect,\n Cascader: ElCascader,\n CascaderPanel: ElCascaderPanel,\n ColorPicker: ElColorPicker,\n Slider: ElSlider,\n Rate: ElRate,\n Transfer: ElTransfer,\n Tree: ElTree,\n Autocomplete: ElAutocomplete,\n Upload: ElUpload,\n}\n\nconst hiddenItem = (item: FormPlusOption, model: Record<string, any>) => {\n if (isFunction(item.hidden)) return item.hidden(model)\n return !!item.hidden\n}\n\nconst eachOption = (\n options: FormPlusOption[],\n cb: (option: FormPlusOption) => void\n) => {\n options.forEach((option) => {\n cb(option)\n if (isArray(option.more) && option.more.length) eachOption(option.more, cb)\n if (\n option.type === 'Grid' &&\n isArray(option.childrens) &&\n option.childrens.length\n ) {\n eachOption(option.childrens, cb)\n }\n })\n}\n\nexport default defineComponent({\n name: 'ElFormPlus',\n props: formPlusProps,\n emits: ['change', 'update:modelValue'],\n setup(props, { attrs, emit, expose, slots }) {\n const ns = useNamespace('form-plus')\n const formRef = ref<FormInstance>()\n const model = reactive<Record<string, any>>({})\n const syncLock = ref(false)\n\n const modelSource = computed(() => props.modelValue ?? {})\n\n const applyOptionDefaults = () => {\n eachOption(props.options, (option) => {\n if (option.noField || !option.field) return\n if (model[option.field] === undefined && option.value !== undefined) {\n model[option.field] = cloneDeep(option.value)\n }\n })\n }\n\n const syncModel = (value: Record<string, any>) => {\n syncLock.value = true\n Object.keys(model).forEach((key) => {\n delete model[key]\n })\n Object.assign(model, cloneDeep(value))\n applyOptionDefaults()\n syncLock.value = false\n }\n\n watch(\n modelSource,\n (value) => {\n const nextModel = value || {}\n if (isEqual(nextModel, model)) return\n syncModel(nextModel)\n },\n { immediate: true, deep: true }\n )\n\n watch(\n () => props.options,\n () => {\n applyOptionDefaults()\n },\n { immediate: true, deep: true }\n )\n\n const runModelChange = (field: string) => {\n eachOption(props.options, (option) => {\n if (option.field !== field) return\n const modelChange = option.on?.modelChange\n if (isFunction(modelChange)) {\n modelChange(model[field], props.options, model, {\n formRef: formRef.value,\n })\n }\n })\n }\n\n const emitModelUpdate = (previousModel: Record<string, any>) => {\n const modelValue = cloneDeep(model)\n if (isEqual(modelValue, previousModel)) return\n emit('change', modelValue)\n emit('update:modelValue', modelValue)\n }\n\n const setFieldValue = (field: string, value: any) => {\n if (isEqual(model[field], value)) return\n const previousModel = cloneDeep(model)\n model[field] = value\n runModelChange(field)\n emitModelUpdate(previousModel)\n }\n\n const resetFields = async (...args: any[]) => {\n const previousModel = cloneDeep(model)\n formRef.value?.resetFields(...args)\n await nextTick()\n emitModelUpdate(previousModel)\n }\n\n const getControlEvents = (option: FormPlusOption) => {\n const events = option.on || {}\n return Object.entries(events).reduce(\n (result, [eventName, fn]) => {\n if (!isFunction(fn) || eventName === 'modelChange') return result\n const eventKey =\n eventName.startsWith('on') && eventName.length > 2\n ? eventName\n : `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`\n ;(result as Record<string, any>)[eventKey] = (...args: any[]) =>\n fn(...args, props.options, model)\n return result\n },\n {} as Record<string, any>\n )\n }\n\n const renderOptionChildren = (items: any[], type: string) => {\n if (!isArray(items)) return null\n if (type === 'Select') {\n return items.map((item) => (\n <ElOption\n key={item.value ?? item.label}\n label={item.label}\n value={item.value}\n disabled={item.disabled}\n />\n ))\n }\n if (type === 'Radio') {\n return items.map((item) => (\n <ElRadio\n key={item.value ?? item.label}\n label={item.value}\n disabled={item.disabled}\n >\n {item.label}\n </ElRadio>\n ))\n }\n if (type === 'CheckBox') {\n return items.map((item) => (\n <ElCheckbox\n key={item.value ?? item.label}\n label={item.value}\n disabled={item.disabled}\n >\n {item.label}\n </ElCheckbox>\n ))\n }\n return null\n }\n\n const renderControl = (option: FormPlusOption) => {\n if (!option.type) return null\n if (option.type === 'Custom' || option.type === 'SuperCustom') {\n const customSlot = option.field ? slots[option.field] : undefined\n if (customSlot) return customSlot({ model, option, setFieldValue })\n if (slots.custom) return slots.custom({ model, option, setFieldValue })\n return null\n }\n\n const Control = formControlMap[option.type]\n if (!Control) return null\n const attrsProps = option.attrs || {}\n const events = getControlEvents(option)\n const optionItems = option.options || attrsProps.options || []\n const modelValue = option.field ? model[option.field] : undefined\n const updateModel = (value: any) => {\n if (!option.field) return\n setFieldValue(option.field, value)\n }\n\n if (option.type === 'DateTimePicker') {\n return (\n <Control\n {...attrsProps}\n type=\"datetime\"\n {...events}\n modelValue={modelValue}\n onUpdate:modelValue={updateModel}\n />\n )\n }\n\n if (option.type === 'Upload') {\n return (\n <Control\n {...attrsProps}\n {...events}\n fileList={modelValue}\n onUpdate:fileList={updateModel}\n />\n )\n }\n\n return (\n <Control\n {...attrsProps}\n {...events}\n modelValue={modelValue}\n onUpdate:modelValue={updateModel}\n >\n {renderOptionChildren(optionItems, option.type)}\n </Control>\n )\n }\n\n const renderSingleOption = (option: FormPlusOption): VNode | null => {\n if (hiddenItem(option, model)) return null\n if (option.show === false) return null\n\n if (option.type === 'Grid') {\n return renderOptions(\n option.childrens || [],\n option.layout ?? props.layout\n )\n }\n\n const control = renderControl(option)\n const moreControls = isArray(option.more)\n ? option.more.map((item) => renderControl(item))\n : []\n\n const formItemProps = {\n label: option.label,\n prop: option.noField ? undefined : option.field,\n rules: option.rules,\n } as Record<string, any>\n\n return (\n <ElFormItem {...formItemProps}>\n {control}\n {moreControls}\n </ElFormItem>\n )\n }\n\n const renderOptions = (\n options: FormPlusOption[],\n layoutConfig: boolean | Record<string, any> | undefined\n ) => {\n const configObject =\n layoutConfig && typeof layoutConfig === 'object' ? layoutConfig : {}\n const rowConfig = { ...defaultRowConfig, ...(configObject.row || {}) }\n const globalColConfig = {\n ...defaultColConfig,\n ...(configObject.col || {}),\n }\n const useLayout = layoutConfig !== false\n const nodes = options\n .map((option, index) => {\n const node = renderSingleOption(option)\n if (!node) return null\n if (!useLayout) return node\n const colConfig = {\n ...globalColConfig,\n ...(props.unifyOptions?.config?.col || {}),\n ...(option.config?.col || {}),\n }\n const key = option.field || `${option.type || 'item'}-${index}`\n return (\n <ElCol key={key} {...colConfig}>\n {node}\n </ElCol>\n )\n })\n .filter(Boolean)\n\n if (!useLayout) return <>{nodes}</>\n return <ElRow {...rowConfig}>{nodes}</ElRow>\n }\n\n expose({\n validate: (...args: any[]) => formRef.value?.validate(...args),\n validateField: (...args: any[]) => formRef.value?.validateField(...args),\n resetFields,\n clearValidate: (...args: any[]) => formRef.value?.clearValidate(...args),\n model,\n formRef,\n })\n\n return () => {\n const attrsProps = attrs as Record<string, any>\n const configProps = (props.config || {}) as Record<string, any>\n const formProps = {\n ...attrsProps,\n ...configProps,\n class: [ns.b(), attrsProps.class, configProps.class],\n model,\n ref: formRef,\n }\n return (\n <ElForm {...formProps}>\n {renderOptions(props.options, props.layout)}\n </ElForm>\n )\n }\n },\n}) as unknown as {\n new (): {\n validate: FormInstance['validate']\n validateField: FormInstance['validateField']\n resetFields: FormInstance['resetFields']\n clearValidate: FormInstance['clearValidate']\n model: Record<string, any>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBuC,SAAA6C,QAAAC,GAAA;AAAA,QAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,EAAA,KAAA,qBAAA,EAAA,GAAA,IAAA,SAAAA,EAAA;;AAMvC,MAAMK,mBAAmB,EAAEC,QAAQ,IAAI;AACvC,MAAMC,mBAAmB,EAAEC,MAAM,IAAI;AAErC,MAAMC,iBAAsC;CAC1CC,OAAO5B,gBAAAA;CACP6B,aAAa5B,iBAAAA;CACb6B,QAAQ3B,gBAAAA;CACR4B,OAAO1B,gBAAAA;CACP2B,UAAUtC,gBAAAA;CACVuC,QAAQxB,iBAAAA;CACRyB,YAAYrC,iBAAAA;CACZsC,gBAAgBtC,iBAAAA;CAChBuC,YAAY1B,gBAAAA;CACZ2B,YAAY1B,iBAAAA;CACZ2B,UAAU/C,gBAAAA;CAC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AAMmF,cAAetF,MAAM+E,UAAU,EAA0B;AAQ/D,WAAA,GAAA,IAAA,aAAA9I,gBAAAA,QAPkB;IAChB,GAAGsH;IACH,GAAG+B;IACHE,OAAO;KAACjF,GAAGkF,GAAG;KAAElC,WAAWiC;KAAOF,YAAYE;KAAM;IACpDpG;IACAzE,KAAK6F;IACN,EAEsBpD,QAAAiI,SAClBzB,cAAc5D,MAAMT,SAASS,MAAM6D,OAAO,CAAA,GAAAwB,SAAA,EAAApC,eAAA,CAAAoC,OAAA,EAAA,CAAA;;;CAKpD,CAAC"}
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../base/style/css.js");
3
+ require("../../input/style/css.js");
4
+ require("../../autocomplete/style/css.js");
5
+ require("../../checkbox/style/css.js");
6
+ require("../../select/style/css.js");
7
+ require("../../radio/style/css.js");
8
+ require("../../cascader-panel/style/css.js");
9
+ require("../../cascader/style/css.js");
10
+ require("../../col/style/css.js");
11
+ require("../../color-picker/style/css.js");
12
+ require("../../date-picker/style/css.js");
13
+ require("../../form/style/css.js");
14
+ require("../../form-item/style/css.js");
15
+ require("../../input-number/style/css.js");
16
+ require("../../rate/style/css.js");
17
+ require("../../row/style/css.js");
18
+ require("../../slider/style/css.js");
19
+ require("../../switch/style/css.js");
20
+ require("../../time-picker/style/css.js");
21
+ require("../../time-select/style/css.js");
22
+ require("../../transfer/style/css.js");
23
+ require("../../tree/style/css.js");
24
+ require("../../upload/style/css.js");
25
+ require("@tdh-ui/base/theme-chalk/el-form-plus.css");
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../base/style/index.js");
3
+ require("../../input/style/index.js");
4
+ require("../../autocomplete/style/index.js");
5
+ require("../../checkbox/style/index.js");
6
+ require("../../select/style/index.js");
7
+ require("../../radio/style/index.js");
8
+ require("../../cascader-panel/style/index.js");
9
+ require("../../cascader/style/index.js");
10
+ require("../../col/style/index.js");
11
+ require("../../color-picker/style/index.js");
12
+ require("../../date-picker/style/index.js");
13
+ require("../../form/style/index.js");
14
+ require("../../form-item/style/index.js");
15
+ require("../../input-number/style/index.js");
16
+ require("../../rate/style/index.js");
17
+ require("../../row/style/index.js");
18
+ require("../../slider/style/index.js");
19
+ require("../../switch/style/index.js");
20
+ require("../../time-picker/style/index.js");
21
+ require("../../time-select/style/index.js");
22
+ require("../../transfer/style/index.js");
23
+ require("../../tree/style/index.js");
24
+ require("../../upload/style/index.js");
25
+ require("@tdh-ui/base/theme-chalk/src/form-plus.scss");
@@ -18,8 +18,8 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
18
18
  };
19
19
  }>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
20
20
  pick: (...args: any[]) => void;
21
- "select-range": (...args: any[]) => void;
22
21
  "set-picker-option": (...args: any[]) => void;
22
+ "select-range": (...args: any[]) => void;
23
23
  }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
24
24
  datetimeRole: StringConstructor;
25
25
  parsedValue: {
@@ -36,8 +36,8 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
36
36
  };
37
37
  }>> & Readonly<{
38
38
  onPick?: ((...args: any[]) => any) | undefined;
39
- "onSelect-range"?: ((...args: any[]) => any) | undefined;
40
39
  "onSet-picker-option"?: ((...args: any[]) => any) | undefined;
40
+ "onSelect-range"?: ((...args: any[]) => any) | undefined;
41
41
  }>, {
42
42
  visible: boolean;
43
43
  format: string;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../base/style/css.js");
3
3
  require("../../checkbox/style/css.js");
4
- require("../../virtual-list/style/css.js");
5
4
  require("../../text/style/css.js");
5
+ require("../../virtual-list/style/css.js");
6
6
  require("@tdh-ui/base/theme-chalk/el-tree.css");
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../base/style/index.js");
3
3
  require("../../checkbox/style/index.js");
4
- require("../../virtual-list/style/index.js");
5
4
  require("../../text/style/index.js");
5
+ require("../../virtual-list/style/index.js");
6
6
  require("@tdh-ui/base/theme-chalk/src/tree.scss");
@@ -239,10 +239,10 @@ declare const DynamicSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
239
239
  innerElement: string | Record<string, any>;
240
240
  innerProps: Record<string, unknown>;
241
241
  perfMode: boolean;
242
- itemKey: GridItemKeyGetter;
243
242
  columnCache: number;
244
243
  initScrollLeft: number;
245
244
  initScrollTop: number;
245
+ itemKey: GridItemKeyGetter;
246
246
  rowCache: number;
247
247
  scrollbarStartGap: number;
248
248
  scrollbarEndGap: number;
@@ -232,10 +232,10 @@ declare const FixedSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
232
232
  innerElement: string | Record<string, any>;
233
233
  innerProps: Record<string, unknown>;
234
234
  perfMode: boolean;
235
- itemKey: GridItemKeyGetter;
236
235
  columnCache: number;
237
236
  initScrollLeft: number;
238
237
  initScrollTop: number;
238
+ itemKey: GridItemKeyGetter;
239
239
  rowCache: number;
240
240
  scrollbarStartGap: number;
241
241
  scrollbarEndGap: number;
package/lib/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region ../../packages/base/version.ts
3
- const version = "1.0.2";
3
+ const version = "1.0.3";
4
4
  //#endregion
5
5
  exports.version = version;
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../../packages/base/version.ts"],"sourcesContent":["export const version = '1.0.2'\n"],"mappings":";;AAAA,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../../packages/base/version.ts"],"sourcesContent":["export const version = '1.0.3'\n"],"mappings":";;AAAA,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdh-ui/base",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "tdh-base-ui",
@@ -0,0 +1 @@
1
+ .el-form-plus{width:100%}