orion-design 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/README.md +5 -5
  2. package/dist/components/Button/index.js +11 -10
  3. package/dist/components/Button/index.js.map +1 -1
  4. package/dist/components/Form/FileInput/FileInput.vue.d.ts +1 -1
  5. package/dist/components/Form/hooks/FormItemValidateTrigger.d.ts +15 -0
  6. package/dist/components/Form/hooks/FormItemValidateTrigger.js +18 -0
  7. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -0
  8. package/dist/components/Form/hooks/index.d.ts +10 -0
  9. package/dist/components/Form/hooks/index.js +83 -0
  10. package/dist/components/Form/hooks/index.js.map +1 -0
  11. package/dist/components/Form/index.js +180 -182
  12. package/dist/components/Form/index.js.map +1 -1
  13. package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +7 -7
  14. package/dist/components/Pagetable/index.js +182 -180
  15. package/dist/components/Pagetable/index.js.map +1 -1
  16. package/dist/components/Pagetable/utils/index.js +82 -82
  17. package/dist/components/Pagetable/utils/index.js.map +1 -1
  18. package/dist/components/_util/arrays.js.map +1 -1
  19. package/dist/components/_util/browser.js.map +1 -1
  20. package/dist/components/_util/dom/aria.js.map +1 -1
  21. package/dist/components/_util/dom/element.js.map +1 -1
  22. package/dist/components/_util/dom/event.js.map +1 -1
  23. package/dist/components/_util/dom/position.js.map +1 -1
  24. package/dist/components/_util/dom/scroll.js.map +1 -1
  25. package/dist/components/_util/dom/style.js.map +1 -1
  26. package/dist/components/_util/easings.js.map +1 -1
  27. package/dist/components/_util/error.js.map +1 -1
  28. package/dist/components/_util/i18n.js.map +1 -1
  29. package/dist/components/_util/objects.js.map +1 -1
  30. package/dist/components/_util/raf.js.map +1 -1
  31. package/dist/components/_util/rand.js.map +1 -1
  32. package/dist/components/_util/strings.js.map +1 -1
  33. package/dist/components/_util/throttleByRaf.js.map +1 -1
  34. package/dist/components/_util/types.js.map +1 -1
  35. package/dist/components/_util/typescript.js.map +1 -1
  36. package/dist/components/_util/vue/global-node.js.map +1 -1
  37. package/dist/components/_util/vue/icon.js.map +1 -1
  38. package/dist/components/_util/vue/install.js.map +1 -1
  39. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  40. package/dist/components/_util/vue/refs.js.map +1 -1
  41. package/dist/components/_util/vue/size.js.map +1 -1
  42. package/dist/components/_util/vue/validator.js.map +1 -1
  43. package/dist/components/_util/vue/vnode.js.map +1 -1
  44. package/dist/index.css +1 -1
  45. package/dist/version/version.d.ts +1 -1
  46. package/dist/version/version.js +1 -1
  47. package/dist/version/version.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/components/Form/hooks/useForm.d.ts +0 -10
  50. package/dist/components/Form/hooks/useForm.js +0 -82
  51. package/dist/components/Form/hooks/useForm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Form/Form.vue","../../../src/components/Form/StringInput/StringInput.vue","../../../src/components/Form/PasswordInput/PasswordInput.vue","../../../src/components/Form/Textarea/Textarea.vue","../../../src/components/Form/SingleSelect/SingleSelect.vue","../../../src/components/Form/MultiSelect/MultiSelect.vue","../../../src/components/Form/RadioGroup/RadioGroup.vue","../../../src/components/Form/CheckboxGroup/CheckboxGroup.vue","../../../src/components/Form/Checkbox/Checkbox.vue","../../../src/components/Form/Switch/Switch.vue","../../../src/components/Form/DateInput/DateInput.vue","../../../src/components/Form/FileInput/FileInput.vue","../../../src/components/Form/ButtonGroup/ButtonGroup.vue","../../../src/components/Form/DiyItem/DiyItem.vue","../../../src/components/Form/index.ts"],"sourcesContent":["<template>\r\n <el-form\r\n ref=\"form\"\r\n :model=\"modelValue\"\r\n :rules=\"rules\"\r\n :label-width=\"itemLabelWidth\"\r\n :disabled=\"disabled\"\r\n >\r\n <el-row :gutter=\"16\">\r\n <slot></slot>\r\n </el-row>\r\n </el-form>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { provide, reactive, toRef, useTemplateRef } from 'vue'\r\nimport { ElForm, ElRow } from 'element-plus'\r\nimport { type FormProps, type FormExpose, formContextKey } from './Form'\r\n\r\ndefineOptions({ name: 'OForm' })\r\n\r\nconst {\r\n rules,\r\n itemSpan = 6,\r\n itemLabelWidth = 'auto',\r\n disabled = false,\r\n modelValue\r\n} = defineProps<FormProps>()\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst updateModelValue = (name: string, value: any) => {\r\n emit('update:modelValue', { ...modelValue, [name]: value })\r\n}\r\n\r\nconst formRef = useTemplateRef('form')\r\n\r\nconst validate: FormExpose['validate'] = async () => {\r\n return await formRef.value!.validate()\r\n}\r\n\r\ndefineExpose({\r\n validate\r\n})\r\n\r\nprovide(\r\n formContextKey,\r\n reactive({\r\n modelValue: toRef(() => modelValue),\r\n updateModelValue,\r\n rules: toRef(() => rules),\r\n itemSpan: toRef(() => itemSpan),\r\n disabled: toRef(() => disabled)\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormSpan, useFormRules, useFormDirectModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormString', extendOptions: { trigger: 'blur' } })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } =\r\n defineProps<StringInputProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst elModel = useFormDirectModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n type=\"password\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormSpan, useFormRules, useFormDirectModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormPassword', extendOptions: { trigger: 'blur' } })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } =\r\n defineProps<PasswordInputProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst elModel = useFormDirectModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n type=\"textarea\"\r\n :rows=\"rows\"\r\n :resize=\"'none'\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormSpan, useFormRules, useFormDirectModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormTextarea', extendOptions: { trigger: 'blur' } })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, rows } =\r\n defineProps<TextareaProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst elModel = useFormDirectModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-if=\"normalizedDisabled\"\r\n :model-value=\"content\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"true\"\r\n :readonly=\"true\"\r\n />\r\n <el-select\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :clearable=\"clearable\"\r\n :filterable=\"filterable\"\r\n >\r\n <el-option\r\n v-for=\"codeItem in normalizedCode\"\r\n :key=\"codeItem.value\"\r\n :label=\"codeItem.content\"\r\n :value=\"codeItem.value\"\r\n />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport {\r\n useFormSpan,\r\n useFormRules,\r\n useFormDisabled,\r\n useFormCode,\r\n useFormDirectModel\r\n} from '../hooks/useForm'\r\nimport { getSingleCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormSingleselect', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required, placeholder, clearable, filterable } =\r\n defineProps<SingleSelectProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedDisabled = useFormDisabled()\r\nconst normalizedCode = useFormCode()\r\nconst elModel = useFormDirectModel()\r\nconst content = computed(() => getSingleCodeContent(normalizedCode.value, elModel.value))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-if=\"normalizedDisabled\"\r\n :model-value=\"content\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"true\"\r\n :readonly=\"true\"\r\n />\r\n <el-select v-else v-model=\"elModel\" :placeholder=\"placeholder\" multiple>\r\n <el-option\r\n v-for=\"codeItem in normalizedCode\"\r\n :key=\"codeItem.value\"\r\n :label=\"codeItem.content\"\r\n :value=\"codeItem.value\"\r\n />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { MultiSelectProps } from './MultiSelect'\r\nimport {\r\n useFormContext,\r\n useFormSpan,\r\n useFormRules,\r\n useFormDisabled,\r\n useFormCode,\r\n useFormMultiModel\r\n} from '../hooks/useForm'\r\nimport { getMultiCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormMultiselect', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required, placeholder } = defineProps<MultiSelectProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedDisabled = useFormDisabled()\r\nconst normalizedCode = useFormCode()\r\nconst elModel = useFormMultiModel()\r\nconst formContext = useFormContext()!\r\nconst content = computed(() =>\r\n getMultiCodeContent(normalizedCode.value, formContext.modelValue[name])\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-radio-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-radio v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :value=\"codeItem.value\">\r\n {{ codeItem.content }}\r\n </el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormSpan, useFormRules, useFormCode, useFormDirectModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormRadiogroup', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<RadioGroupProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedCode = useFormCode()\r\nconst elModel = useFormDirectModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-checkbox-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-checkbox\r\n v-for=\"codeItem in normalizedCode\"\r\n :key=\"codeItem.value\"\r\n :label=\"codeItem.content\"\r\n :value=\"codeItem.value\"\r\n />\r\n </el-checkbox-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormSpan, useFormRules, useFormCode, useFormMultiModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormCheckboxgroup', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxGroupProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedCode = useFormCode()\r\nconst elModel = useFormMultiModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-checkbox v-model=\"elModel\" :disabled=\"disabled\"></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormBooleanModel, useFormSpan } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormCheckbox', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<CheckboxProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst elModel = useFormBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-switch v-model=\"elModel\" :disabled=\"disabled\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormBooleanModel, useFormSpan } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormSwitch', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<SwitchProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst elModel = useFormBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-time-picker\r\n v-if=\"isTimePicker\"\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :format=\"normalizedSourceFormat\"\r\n arrow-control\r\n style=\"width: 100%\"\r\n />\r\n <el-date-picker\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :type=\"dateType\"\r\n :format=\"normalizedSourceFormat\"\r\n style=\"width: 100%\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElDatePicker, ElTimePicker, dayjs } from 'element-plus'\r\nimport type { DateInputProps } from './DateInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\nimport { isDate, isString } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormDate', extendOptions: { trigger: 'blur' } })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n editable,\r\n clearable,\r\n format = 'YYYY-MM-DD',\r\n sourceFormat\r\n} = defineProps<DateInputProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\n\r\nconst isTimePicker = computed(\r\n () =>\r\n format.startsWith('H') ||\r\n format.startsWith('h') ||\r\n format.startsWith('m') ||\r\n format.startsWith('s')\r\n)\r\n\r\nconst normalizedSourceFormat = computed(() => {\r\n if (sourceFormat) {\r\n return sourceFormat\r\n }\r\n if (isTimePicker.value) {\r\n return 'HH:mm:ss'\r\n } else {\r\n return 'YYYY-MM-DD'\r\n }\r\n})\r\n\r\nconst dateType = computed(() => {\r\n let picker: 'date' | 'year' | 'month' | 'datetime' = 'date'\r\n\r\n // 配置年 yyyy指年 YYYY指周年,年末年初的值可能有所变化\r\n if (format.indexOf('y') > -1 || format.indexOf('Y') > -1) {\r\n picker = 'year'\r\n }\r\n\r\n // 配置月,M指月份,m指分钟\r\n if (format.indexOf('M') > -1) {\r\n picker = 'month'\r\n }\r\n\r\n // 配置日,d指星期,D指月的天,DDD指年的天\r\n if (format.indexOf('d') > -1 || format.indexOf('D') > -1) {\r\n picker = 'date'\r\n }\r\n\r\n // 配置小时,H指24小时制(0~23),k指24小时制(1~24),h指12小时制,m指分钟,s指秒,S指小数秒\r\n if (\r\n format.indexOf('H') > -1 ||\r\n format.indexOf('h') > -1 ||\r\n format.indexOf('k') > -1 ||\r\n format.indexOf('m') > -1 ||\r\n format.indexOf('s') > -1 ||\r\n format.indexOf('S') > -1\r\n ) {\r\n picker = 'datetime'\r\n }\r\n\r\n return picker\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst modelType = computed(() => {\r\n const value = formContext.modelValue[name as string]\r\n if (isString(value)) {\r\n return 'string'\r\n } else if (isDate(value)) {\r\n return 'date'\r\n } else {\r\n throw new OrionError('日期输入框的值只能为字符串或日期类型')\r\n }\r\n})\r\n\r\nconst elModel = computed<Date | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (modelType.value == 'date') {\r\n return value as Date\r\n } else {\r\n const dayjsObj = dayjs(value, normalizedSourceFormat.value, true)\r\n if (!dayjsObj.isValid()) {\r\n throw new OrionError(`日期输入框的值无效,不符合${normalizedSourceFormat.value}格式`)\r\n }\r\n return dayjsObj.toDate()\r\n }\r\n },\r\n set: (newValue) => {\r\n if (modelType.value == 'date') {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n } else {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, '')\r\n } else {\r\n formContext.updateModelValue(name, dayjs(newValue).format(normalizedSourceFormat.value))\r\n }\r\n }\r\n }\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n ref=\"inputRef\"\r\n v-model=\"file\"\r\n :disabled=\"disabled\"\r\n type=\"file\"\r\n :validate-event=\"false\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, useTemplateRef, watch } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormSpan, useFormRules, useFormDirectModel } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormFile', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<FileInputProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst elModel = useFormDirectModel()\r\nwatch(elModel, () => {\r\n if (!elModel.value) {\r\n file.value = ''\r\n }\r\n})\r\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('inputRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n elModel.value = event?.target?.files[0]\r\n }\r\n file.value = ''\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\" :style=\"style\">\r\n <space :gutter=\"gutter\" style=\"margin-bottom: 18px\"> <slot></slot> </space>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol } from 'element-plus'\r\nimport type { ButtonGroupProps } from './ButtonGroup'\r\nimport Space from '../../Space'\r\nimport { useFormSpan } from '../hooks/useForm'\r\nimport { computed, CSSProperties } from 'vue'\r\n\r\ndefineOptions({ name: 'OFormButtongroup' })\r\n\r\nconst { gutter, align = 'right' } = defineProps<ButtonGroupProps>()\r\nconst style = computed<CSSProperties>(() => {\r\n return {\r\n textAlign: align\r\n }\r\n})\r\n\r\nconst normalizedSpan = useFormSpan()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <slot></slot>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem } from 'element-plus'\r\nimport type { DiyItemProps } from './DiyItem'\r\nimport { useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormDiy', extendOptions: {} })\r\n\r\nconst { name, label, labelWidth, required } = defineProps<DiyItemProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Form from './Form.vue'\r\nimport StringInput from './StringInput/StringInput.vue'\r\nimport PasswordInput from './PasswordInput/PasswordInput.vue'\r\nimport Textarea from './Textarea/Textarea.vue'\r\nimport SingleSelect from './SingleSelect/SingleSelect.vue'\r\nimport MultiSelect from './MultiSelect/MultiSelect.vue'\r\nimport RadioGroup from './RadioGroup/RadioGroup.vue'\r\nimport CheckboxGroup from './CheckboxGroup/CheckboxGroup.vue'\r\nimport Checkbox from './Checkbox/Checkbox.vue'\r\nimport Switch from './Switch/Switch.vue'\r\nimport DateInput from './DateInput/DateInput.vue'\r\nimport FileInput from './FileInput/FileInput.vue'\r\nimport ButtonGroup from './ButtonGroup/ButtonGroup.vue'\r\nimport DiyItem from './DiyItem/DiyItem.vue'\r\n\r\nexport default withInstall<\r\n typeof Form,\r\n {\r\n StringInput: typeof StringInput\r\n PasswordInput: typeof PasswordInput\r\n Textarea: typeof Textarea\r\n SingleSelect: typeof SingleSelect\r\n MultiSelect: typeof MultiSelect\r\n RadioGroup: typeof RadioGroup\r\n CheckboxGroup: typeof CheckboxGroup\r\n Checkbox: typeof Checkbox\r\n Switch: typeof Switch\r\n DateInput: typeof DateInput\r\n FileInput: typeof FileInput\r\n ButtonGroup: typeof ButtonGroup\r\n DiyItem: typeof DiyItem\r\n }\r\n>(Form, {\r\n StringInput,\r\n PasswordInput,\r\n Textarea,\r\n SingleSelect,\r\n MultiSelect,\r\n RadioGroup,\r\n CheckboxGroup,\r\n Checkbox,\r\n Switch,\r\n DateInput,\r\n FileInput,\r\n ButtonGroup,\r\n DiyItem\r\n})\r\n\r\nexport * from './Form'\r\nexport * from './StringInput'\r\nexport * from './PasswordInput'\r\nexport * from './Textarea'\r\nexport * from './SingleSelect'\r\nexport * from './MultiSelect'\r\nexport * from './RadioGroup'\r\nexport * from './CheckboxGroup'\r\nexport * from './Checkbox'\r\nexport * from './Switch'\r\nexport * from './DateInput'\r\nexport * from './FileInput'\r\nexport * from './ButtonGroup'\r\nexport * from './DiyItem'\r\n"],"names":["emit","__emit","updateModelValue","name","value","__props","formRef","useTemplateRef","__expose","provide","formContextKey","reactive","toRef","normalizedSpan","useFormSpan","normalizedRules","useFormRules","elModel","useFormDirectModel","normalizedDisabled","useFormDisabled","normalizedCode","useFormCode","content","computed","getSingleCodeContent","useFormMultiModel","formContext","useFormContext","getMultiCodeContent","useFormBooleanModel","isTimePicker","normalizedSourceFormat","dateType","picker","modelType","isString","isDate","OrionError","dayjsObj","dayjs","newValue","watch","file","ref","fileRef","onMounted","event","_a","style","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup","DiyItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,UAAMA,IAAOC,GAEPC,IAAmB,CAACC,GAAcC,MAAe;AAChD,MAAAJ,EAAA,qBAAqB,EAAE,GAAGK,cAAY,CAACF,CAAI,GAAGC,EAAA,CAAO;AAAA,IAAA,GAGtDE,IAAUC,EAAe,MAAM;AAMxB,WAAAC,EAAA;AAAA,MACX,UALuC,YAChC,MAAMF,EAAQ,MAAO;IAI5B,CACD,GAEDG;AAAA,MACEC;AAAA,MACAC,EAAS;AAAA,QACP,YAAYC,EAAM,MAAMP,EAAU,UAAA;AAAA,QAClC,kBAAAH;AAAA,QACA,OAAOU,EAAM,MAAMP,EAAA,KAAK;AAAA,QACxB,UAAUO,EAAM,MAAMP,EAAA,QAAQ;AAAA,QAC9B,UAAUO,EAAM,MAAMP,EAAQ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;;;;;;;;;;;;;;ICNTkC,KAAAC,EAiBbC,IAAM;AAAA,EAAA,aACNC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,cACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,YACAC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,QACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,SACAC;AACF,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Form/Form.vue","../../../src/components/Form/StringInput/StringInput.vue","../../../src/components/Form/PasswordInput/PasswordInput.vue","../../../src/components/Form/Textarea/Textarea.vue","../../../src/components/Form/SingleSelect/SingleSelect.vue","../../../src/components/Form/MultiSelect/MultiSelect.vue","../../../src/components/Form/RadioGroup/RadioGroup.vue","../../../src/components/Form/CheckboxGroup/CheckboxGroup.vue","../../../src/components/Form/Checkbox/Checkbox.vue","../../../src/components/Form/Switch/Switch.vue","../../../src/components/Form/DateInput/DateInput.vue","../../../src/components/Form/FileInput/FileInput.vue","../../../src/components/Form/ButtonGroup/ButtonGroup.vue","../../../src/components/Form/DiyItem/DiyItem.vue","../../../src/components/Form/index.ts"],"sourcesContent":["<template>\r\n <el-form ref=\"form\" :model=\"modelValue\" :rules=\"rules\" :label-width=\"itemLabelWidth\" :disabled=\"disabled\">\r\n <el-row :gutter=\"16\">\r\n <slot></slot>\r\n </el-row>\r\n </el-form>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { provide, reactive, toRef, useTemplateRef } from 'vue'\r\nimport { ElForm, ElRow } from 'element-plus'\r\nimport { type FormProps, type FormExpose, formContextKey } from './Form'\r\n\r\ndefineOptions({ name: 'OForm', inheritAttrs: false })\r\n\r\nconst { rules, itemSpan = 6, itemLabelWidth = 'auto', disabled = false, modelValue } = defineProps<FormProps>()\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst updateModelValue = (name: string, value: any) => {\r\n emit('update:modelValue', { ...modelValue, [name]: value })\r\n}\r\n\r\nconst formRef = useTemplateRef('form')\r\n\r\nconst validate: FormExpose['validate'] = async () => {\r\n return await formRef.value!.validate()\r\n}\r\n\r\ndefineExpose({\r\n validate,\r\n})\r\n\r\nprovide(\r\n formContextKey,\r\n reactive({\r\n modelValue: toRef(() => modelValue),\r\n updateModelValue,\r\n rules: toRef(() => rules),\r\n itemSpan: toRef(() => itemSpan),\r\n disabled: toRef(() => disabled),\r\n })\r\n)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\" :readonly=\"readonly\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormString', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<StringInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-model=\"elModel\" :maxlength=\"maxlength\" :placeholder=\"placeholder\" :disabled=\"disabled\" :readonly=\"readonly\" type=\"password\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormPassword', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly } = defineProps<PasswordInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input\r\n v-model=\"elModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n type=\"textarea\"\r\n :rows=\"rows\"\r\n :resize=\"'none'\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormTextarea', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, rows } = defineProps<TextareaProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select v-else v-model=\"elModel\" :placeholder=\"placeholder\" :clearable=\"clearable\" :filterable=\"filterable\">\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemStringModel } from '../hooks'\r\nimport { getSingleCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormSingleselect', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, placeholder, clearable, filterable } = defineProps<SingleSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\nconst content = computed(() => getSingleCodeContent(normalizedCode.value, elModel.value))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input v-if=\"normalizedDisabled\" :model-value=\"content\" :placeholder=\"placeholder\" :disabled=\"true\" :readonly=\"true\" />\r\n <el-select v-else v-model=\"elModel\" :placeholder=\"placeholder\" multiple>\r\n <el-option v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { MultiSelectProps } from './MultiSelect'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules, useFormItemDisabled, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\nimport { getMultiCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormMultiselect', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, placeholder } = defineProps<MultiSelectProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedDisabled = useFormItemDisabled()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\nconst formContext = useFormContext()!\r\nconst content = computed(() => getMultiCodeContent(normalizedCode.value, formContext.modelValue[name]))\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-radio-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-radio v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :value=\"codeItem.value\">\r\n {{ codeItem.content }}\r\n </el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormRadiogroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<RadioGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemStringModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-checkbox-group v-model=\"elModel\" :disabled=\"disabled\">\r\n <el-checkbox v-for=\"codeItem in normalizedCode\" :key=\"codeItem.value\" :label=\"codeItem.content\" :value=\"codeItem.value\" />\r\n </el-checkbox-group>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemCode, useFormItemMultiModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckboxgroup', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxGroupProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst normalizedCode = useFormItemCode()\r\nconst elModel = useFormItemMultiModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-checkbox v-model=\"elModel\" :disabled=\"disabled\"></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormCheckbox', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<CheckboxProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :rules=\"rules\">\r\n <el-switch v-model=\"elModel\" :disabled=\"disabled\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormItemBooleanModel, useFormItemSpan } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormSwitch', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, rules, disabled } = defineProps<SwitchProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst elModel = useFormItemBooleanModel()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-time-picker\r\n v-if=\"isTimePicker\"\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :format=\"normalizedSourceFormat\"\r\n arrow-control\r\n style=\"width: 100%\"\r\n />\r\n <el-date-picker\r\n v-else\r\n v-model=\"elModel\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :editable=\"editable\"\r\n :clearable=\"clearable\"\r\n :type=\"dateType\"\r\n :format=\"normalizedSourceFormat\"\r\n style=\"width: 100%\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { ElCol, ElFormItem, ElDatePicker, ElTimePicker, dayjs } from 'element-plus'\r\nimport type { DateInputProps } from './DateInput'\r\nimport { useFormContext, useFormItemSpan, useFormItemRules } from '../hooks'\r\nimport { isDate, isString } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ndefineOptions({ name: 'OFormDate', inheritAttrs: false })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n editable,\r\n clearable,\r\n format = 'YYYY-MM-DD',\r\n sourceFormat,\r\n} = defineProps<DateInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n\r\nconst isTimePicker = computed(() => format.startsWith('H') || format.startsWith('h') || format.startsWith('m') || format.startsWith('s'))\r\n\r\nconst normalizedSourceFormat = computed(() => {\r\n if (sourceFormat) {\r\n return sourceFormat\r\n }\r\n if (isTimePicker.value) {\r\n return 'HH:mm:ss'\r\n } else {\r\n return 'YYYY-MM-DD'\r\n }\r\n})\r\n\r\nconst dateType = computed(() => {\r\n let picker: 'date' | 'year' | 'month' | 'datetime' = 'date'\r\n\r\n // 配置年 yyyy指年 YYYY指周年,年末年初的值可能有所变化\r\n if (format.indexOf('y') > -1 || format.indexOf('Y') > -1) {\r\n picker = 'year'\r\n }\r\n\r\n // 配置月,M指月份,m指分钟\r\n if (format.indexOf('M') > -1) {\r\n picker = 'month'\r\n }\r\n\r\n // 配置日,d指星期,D指月的天,DDD指年的天\r\n if (format.indexOf('d') > -1 || format.indexOf('D') > -1) {\r\n picker = 'date'\r\n }\r\n\r\n // 配置小时,H指24小时制(0~23),k指24小时制(1~24),h指12小时制,m指分钟,s指秒,S指小数秒\r\n if (\r\n format.indexOf('H') > -1 ||\r\n format.indexOf('h') > -1 ||\r\n format.indexOf('k') > -1 ||\r\n format.indexOf('m') > -1 ||\r\n format.indexOf('s') > -1 ||\r\n format.indexOf('S') > -1\r\n ) {\r\n picker = 'datetime'\r\n }\r\n\r\n return picker\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst modelType = computed(() => {\r\n const value = formContext.modelValue[name as string]\r\n if (isString(value)) {\r\n return 'string'\r\n } else if (isDate(value)) {\r\n return 'date'\r\n } else {\r\n throw new OrionError('日期输入框的值只能为字符串或日期类型')\r\n }\r\n})\r\n\r\nconst elModel = computed<Date | undefined>({\r\n get: () => {\r\n const value = formContext.modelValue[name]\r\n if (!value) {\r\n return undefined\r\n }\r\n if (modelType.value == 'date') {\r\n return value as Date\r\n } else {\r\n const dayjsObj = dayjs(value, normalizedSourceFormat.value, true)\r\n if (!dayjsObj.isValid()) {\r\n throw new OrionError(`日期输入框的值无效,不符合${normalizedSourceFormat.value}格式`)\r\n }\r\n return dayjsObj.toDate()\r\n }\r\n },\r\n set: (newValue) => {\r\n if (modelType.value == 'date') {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, undefined)\r\n } else {\r\n formContext.updateModelValue(name, newValue)\r\n }\r\n } else {\r\n if (!newValue) {\r\n formContext.updateModelValue(name, '')\r\n } else {\r\n formContext.updateModelValue(name, dayjs(newValue).format(normalizedSourceFormat.value))\r\n }\r\n }\r\n },\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <el-input ref=\"inputRef\" v-model=\"file\" :disabled=\"disabled\" type=\"file\" :validate-event=\"false\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, useTemplateRef, watch } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormItemSpan, useFormItemRules, useFormItemStringModel } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormFile', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<FileInputProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\nconst elModel = useFormItemStringModel()\r\nwatch(elModel, () => {\r\n if (!elModel.value) {\r\n file.value = ''\r\n }\r\n})\r\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('inputRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n elModel.value = event?.target?.files[0]\r\n }\r\n file.value = ''\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\" :style=\"style\">\r\n <space :gutter=\"gutter\" style=\"margin-bottom: 18px\"> <slot></slot> </space>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol } from 'element-plus'\r\nimport type { ButtonGroupProps } from './ButtonGroup'\r\nimport Space from '../../Space'\r\nimport { useFormItemSpan } from '../hooks'\r\nimport { computed, CSSProperties } from 'vue'\r\n\r\ndefineOptions({ name: 'OFormButtongroup', inheritAttrs: false })\r\n\r\nconst { gutter, align = 'right' } = defineProps<ButtonGroupProps>()\r\nconst style = computed<CSSProperties>(() => {\r\n return {\r\n textAlign: align,\r\n }\r\n})\r\n\r\nconst normalizedSpan = useFormItemSpan()\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item :prop=\"name\" :label=\"label\" :label-width=\"labelWidth\" :required=\"required\" :rules=\"normalizedRules\">\r\n <slot></slot>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ElCol, ElFormItem } from 'element-plus'\r\nimport type { DiyItemProps } from './DiyItem'\r\nimport { useFormItemSpan, useFormItemRules } from '../hooks'\r\n\r\ndefineOptions({ name: 'OFormDiy', inheritAttrs: false })\r\n\r\nconst { name, label, labelWidth, required } = defineProps<DiyItemProps>()\r\nconst normalizedSpan = useFormItemSpan()\r\nconst normalizedRules = useFormItemRules()\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Form from './Form.vue'\r\nimport StringInput from './StringInput/StringInput.vue'\r\nimport PasswordInput from './PasswordInput/PasswordInput.vue'\r\nimport Textarea from './Textarea/Textarea.vue'\r\nimport SingleSelect from './SingleSelect/SingleSelect.vue'\r\nimport MultiSelect from './MultiSelect/MultiSelect.vue'\r\nimport RadioGroup from './RadioGroup/RadioGroup.vue'\r\nimport CheckboxGroup from './CheckboxGroup/CheckboxGroup.vue'\r\nimport Checkbox from './Checkbox/Checkbox.vue'\r\nimport Switch from './Switch/Switch.vue'\r\nimport DateInput from './DateInput/DateInput.vue'\r\nimport FileInput from './FileInput/FileInput.vue'\r\nimport ButtonGroup from './ButtonGroup/ButtonGroup.vue'\r\nimport DiyItem from './DiyItem/DiyItem.vue'\r\n\r\nexport default withInstall<\r\n typeof Form,\r\n {\r\n StringInput: typeof StringInput\r\n PasswordInput: typeof PasswordInput\r\n Textarea: typeof Textarea\r\n SingleSelect: typeof SingleSelect\r\n MultiSelect: typeof MultiSelect\r\n RadioGroup: typeof RadioGroup\r\n CheckboxGroup: typeof CheckboxGroup\r\n Checkbox: typeof Checkbox\r\n Switch: typeof Switch\r\n DateInput: typeof DateInput\r\n FileInput: typeof FileInput\r\n ButtonGroup: typeof ButtonGroup\r\n DiyItem: typeof DiyItem\r\n }\r\n>(Form, {\r\n StringInput,\r\n PasswordInput,\r\n Textarea,\r\n SingleSelect,\r\n MultiSelect,\r\n RadioGroup,\r\n CheckboxGroup,\r\n Checkbox,\r\n Switch,\r\n DateInput,\r\n FileInput,\r\n ButtonGroup,\r\n DiyItem\r\n})\r\n\r\nexport * from './Form'\r\nexport * from './StringInput'\r\nexport * from './PasswordInput'\r\nexport * from './Textarea'\r\nexport * from './SingleSelect'\r\nexport * from './MultiSelect'\r\nexport * from './RadioGroup'\r\nexport * from './CheckboxGroup'\r\nexport * from './Checkbox'\r\nexport * from './Switch'\r\nexport * from './DateInput'\r\nexport * from './FileInput'\r\nexport * from './ButtonGroup'\r\nexport * from './DiyItem'\r\n"],"names":["emit","__emit","updateModelValue","name","value","__props","formRef","useTemplateRef","__expose","provide","formContextKey","reactive","toRef","normalizedSpan","useFormItemSpan","normalizedRules","useFormItemRules","elModel","useFormItemStringModel","normalizedDisabled","useFormItemDisabled","normalizedCode","useFormItemCode","content","computed","getSingleCodeContent","useFormItemMultiModel","formContext","useFormContext","getMultiCodeContent","useFormItemBooleanModel","isTimePicker","normalizedSourceFormat","dateType","picker","modelType","isString","isDate","OrionError","dayjsObj","dayjs","newValue","watch","file","ref","fileRef","onMounted","event","_a","style","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup","DiyItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAMA,IAAOC,GAEPC,IAAmB,CAACC,GA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,WAAAuC,EAAU,MAAM;AACd,MAAAD,EAAQ,MAAO,MAAO,WAAW,CAACE,MAAU;;AAE1C,QAAA9B,EAAQ,SAAQ+B,IAAAD,KAAA,gBAAAA,EAAO,WAAP,gBAAAC,EAAe,MAAM;AAAA,MAAC,GAExCL,EAAK,QAAQ;AAAA,IAAA,CACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClBK,UAAAM,IAAQzB,EAAwB,OAC7B;AAAA,MACL,WAAWnB,EAAA;AAAA,IAAA,EAEd,GAEKQ,IAAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNvB,UAAMD,IAAiBC,KACjBC,IAAkBC;;;;;;;;;;;;;;;;;;;ICATkC,KAAAC,EAiBbC,IAAM;AAAA,EAAA,aACNC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,cACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,YACAC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AAAAA,EAAA,QACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,WACAC;AAAAA,EAAA,aACAC;AAAAA,EAAA,SACAC;AACF,CAAC;"}
@@ -1,24 +1,24 @@
1
1
  import { PropType, ExtractPropTypes } from 'vue';
2
2
  export declare const pagetableCellButtonProps: () => {
3
3
  type: {
4
- type: PropType<"primary">;
5
- default: "primary";
4
+ type: PropType<string>;
5
+ default: string;
6
6
  };
7
7
  };
8
8
  export type PagetableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableCellButtonProps>>>;
9
9
  declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
10
10
  type: {
11
- type: PropType<"primary">;
12
- default: "primary";
11
+ type: PropType<string>;
12
+ default: string;
13
13
  };
14
14
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<ExtractPropTypes<{
15
15
  type: {
16
- type: PropType<"primary">;
17
- default: "primary";
16
+ type: PropType<string>;
17
+ default: string;
18
18
  };
19
19
  }>> & Readonly<{
20
20
  onClick?: ((...args: any[]) => any) | undefined;
21
21
  }>, {
22
- type: "primary";
22
+ type: string;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
24
  export default _default;