orion-design 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Throne/index.d.ts +2 -10
- package/dist/Throne/index.js.map +1 -1
- package/dist/components/Button/Button.vue.d.ts +15 -1
- package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/dist/components/Button/ButtonGroup/ButtonGroup.js +2 -0
- package/dist/components/Button/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/Button/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
- package/dist/components/Button/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Button/ButtonGroup/index.js +2 -0
- package/dist/components/Button/ButtonGroup/index.js.map +1 -0
- package/dist/components/Button/index.d.ts +20 -1
- package/dist/components/Button/index.js +36 -18
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/Form/DiyItem/DiyItem.d.ts +9 -0
- package/dist/components/Form/DiyItem/DiyItem.js +2 -0
- package/dist/components/Form/DiyItem/DiyItem.js.map +1 -0
- package/dist/components/Form/DiyItem/DiyItem.vue.d.ts +17 -0
- package/dist/components/Form/DiyItem/index.d.ts +1 -0
- package/dist/components/Form/DiyItem/index.js +2 -0
- package/dist/components/Form/DiyItem/index.js.map +1 -0
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +1 -0
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/Switch/Switch.d.ts +0 -1
- package/dist/components/Form/hooks/useForm.d.ts +0 -1
- package/dist/components/Form/hooks/useForm.js +28 -28
- package/dist/components/Form/hooks/useForm.js.map +1 -1
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/index.js +287 -241
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/types.d.ts +11 -0
- package/dist/components/types.js +2 -0
- package/dist/components/types.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/package.json +6 -3
@@ -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/index.ts"],"sourcesContent":["<template>\r\n <el-form\r\n ref=\"formRef\"\r\n v-model=\"model\"\r\n :model=\"model\"\r\n :rules=\"rules\"\r\n :label-width=\"labelWidth\"\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, 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 = 8,\r\n itemLabelWidth: labelWidth = 'auto',\r\n disabled = false\r\n} = defineProps<FormProps>()\r\nconst model = defineModel<Record<string, any>>()\r\n\r\nconst formRef = useTemplateRef('formRef')\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(formContextKey, {\r\n model: model.value!,\r\n rules,\r\n itemSpan\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormString' })\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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormPassword' })\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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormTextarea' })\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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport {\r\n useFormContext,\r\n useFormSpan,\r\n useFormRules,\r\n useFormDisabled,\r\n useFormCode\r\n} from '../hooks/useForm'\r\nimport { getSingleCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormSingleselect' })\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 content = computed(() => getSingleCodeContent(normalizedCode.value, itemModel.value))\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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, toRef } 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} from '../hooks/useForm'\r\nimport { getMultiCodeContent } from '../utils'\r\n\r\ndefineOptions({ name: 'OFormMultiselect' })\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 content = computed(() => getMultiCodeContent(normalizedCode.value, itemModel.value))\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\nconst elModel = computed<string[]>({\r\n get: () => {\r\n if (!itemModel.value) {\r\n return []\r\n }\r\n return (itemModel.value as string).split(',')\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = newValue.join(',')\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-radio-group v-model=\"itemModel\" :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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormContext, useFormSpan, useFormRules, useFormCode } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormRadiogroup' })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<RadioGroupProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedCode = useFormCode()\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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 { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormContext, useFormSpan, useFormRules, useFormCode } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormCheckboxgroup' })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxGroupProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\nconst normalizedCode = useFormCode()\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\nconst elModel = computed<string[]>({\r\n get: () => {\r\n if (!itemModel.value) {\r\n return []\r\n }\r\n return (itemModel.value as string).split(',')\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = newValue.join(',')\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-checkbox\r\n v-model=\"itemModel\"\r\n :disabled=\"disabled\"\r\n true-value=\"1\"\r\n false-value=\"0\"\r\n ></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormCheckbox' })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<CheckboxProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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-switch v-model=\"itemModel\" :disabled=\"disabled\" active-value=\"1\" inactive-value=\"0\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormSwitch' })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<SwitchProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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 />\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 />\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' })\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 itemModel = toRef(formContext.model, name)\r\nconst modelType = computed(() => {\r\n if (isString(itemModel.value)) {\r\n return 'string'\r\n } else if (isDate(itemModel.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 if (!itemModel.value) {\r\n return undefined\r\n }\r\n if (modelType.value == 'date') {\r\n return itemModel.value\r\n } else {\r\n const dayjsObj = dayjs(itemModel.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 itemModel.value = undefined\r\n } else {\r\n itemModel.value = newValue\r\n }\r\n } else {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = 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 ref=\"fileRef\" v-model=\"file\" :disabled=\"disabled\" type=\"file\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, toRef, useTemplateRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormFile' })\r\n\r\nconst { name, label, labelWidth, required, disabled } = defineProps<FileInputProps>()\r\nconst normalizedSpan = useFormSpan()\r\nconst normalizedRules = useFormRules()\r\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('fileRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n itemModel.value = event?.target?.files[0]\r\n }\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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","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\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 }\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})\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\n"],"names":["model","_useModel","__props","formRef","useTemplateRef","__expose","provide","formContextKey","normalizedSpan","useFormSpan","normalizedRules","useFormRules","formContext","useFormContext","itemModel","toRef","normalizedDisabled","useFormDisabled","normalizedCode","useFormCode","content","computed","getSingleCodeContent","getMultiCodeContent","elModel","newValue","isTimePicker","normalizedSourceFormat","dateType","picker","modelType","isString","isDate","OrionError","dayjsObj","dayjs","file","ref","fileRef","onMounted","event","_a","style","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BM,UAAAA,IAAQC,EAAgCC,GAAA,YAAC,GAEzCC,IAAUC,EAAe,SAAS;AAM3B,WAAAC,EAAA;AAAA,MACX,UALuC,YAChC,MAAMF,EAAQ,MAAO;IAI5B,CACD,GAEDG,EAAQC,IAAgB;AAAA,MACtB,OAAOP,EAAM;AAAA,MACb,OAAIE,EAAA;AAAA,MACJ,UAAOA,EAAA;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,UAAMM,IAAiBC,KACjBC,IAAkBC,KAElBC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOV,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACH/C,UAAMM,IAAiBC,KACjBC,IAAkBC,KAElBC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOV,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACF/C,UAAMM,IAAiBC,KACjBC,IAAkBC,KAElBC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOV,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACc/C,UAAMM,IAAiBC,KACjBC,IAAkBC,KAClBK,IAAqBC,KACrBC,IAAiBC,KACjBC,IAAUC,EAAS,MAAMC,GAAqBJ,EAAe,OAAOJ,EAAU,KAAK,CAAC,GAEpFF,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOV,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACd/C,UAAMM,IAAiBC,KACjBC,IAAkB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ACAC;AAAAA,EAAA,aACAC;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\r\n ref=\"formRef\"\r\n v-model=\"model\"\r\n :model=\"model\"\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 { rules, itemSpan = 6, itemLabelWidth = 'auto', disabled = false } = defineProps<FormProps>()\r\nconst model = defineModel<Record<string, any>>()\r\n\r\nconst formRef = useTemplateRef('formRef')\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 model: model.value!,\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormContext, useFormSpan, useFormRules } 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormContext, useFormSpan, useFormRules } 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormContext, useFormSpan, useFormRules } 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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=\"itemModel\"\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, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'\r\nimport type { SingleSelectProps } from './SingleSelect'\r\nimport {\r\n useFormContext,\r\n useFormSpan,\r\n useFormRules,\r\n useFormDisabled,\r\n useFormCode\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 content = computed(() => getSingleCodeContent(normalizedCode.value, itemModel.value))\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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, toRef } 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} 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 content = computed(() => getMultiCodeContent(normalizedCode.value, itemModel.value))\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\nconst elModel = computed<string[]>({\r\n get: () => {\r\n if (!itemModel.value) {\r\n return []\r\n }\r\n return (itemModel.value as string).split(',')\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = newValue.join(',')\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-radio-group v-model=\"itemModel\" :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 { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElRadioGroup, ElRadio } from 'element-plus'\r\nimport type { RadioGroupProps } from './RadioGroup'\r\nimport { useFormContext, useFormSpan, useFormRules, useFormCode } 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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 { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElCheckboxGroup, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxGroupProps } from './CheckboxGroup'\r\nimport { useFormContext, useFormSpan, useFormRules, useFormCode } 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\nconst elModel = computed<string[]>({\r\n get: () => {\r\n if (!itemModel.value) {\r\n return []\r\n }\r\n return (itemModel.value as string).split(',')\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = newValue.join(',')\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\" :rules=\"rules\">\r\n <el-checkbox\r\n v-model=\"itemModel\"\r\n :disabled=\"disabled\"\r\n true-value=\"1\"\r\n false-value=\"0\"\r\n ></el-checkbox>\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElCheckbox } from 'element-plus'\r\nimport type { CheckboxProps } from './Checkbox'\r\nimport { useFormContext, 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, 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\" :rules=\"rules\">\r\n <el-switch v-model=\"itemModel\" :disabled=\"disabled\" active-value=\"1\" inactive-value=\"0\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElSwitch } from 'element-plus'\r\nimport type { SwitchProps } from './Switch'\r\nimport { useFormContext, 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\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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 itemModel = toRef(formContext.model, name)\r\nconst modelType = computed(() => {\r\n if (isString(itemModel.value)) {\r\n return 'string'\r\n } else if (isDate(itemModel.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 if (!itemModel.value) {\r\n return undefined\r\n }\r\n if (modelType.value == 'date') {\r\n return itemModel.value\r\n } else {\r\n const dayjsObj = dayjs(itemModel.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 itemModel.value = undefined\r\n } else {\r\n itemModel.value = newValue\r\n }\r\n } else {\r\n if (!newValue) {\r\n itemModel.value = ''\r\n } else {\r\n itemModel.value = 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 ref=\"fileRef\" v-model=\"file\" :disabled=\"disabled\" type=\"file\" />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, ref, toRef, useTemplateRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { FileInputProps } from './FileInput'\r\nimport { useFormContext, useFormSpan, useFormRules } 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\n\r\nconst file = ref('')\r\nconst fileRef = useTemplateRef('fileRef')\r\nonMounted(() => {\r\n fileRef.value!.input!.onchange = (event) => {\r\n //@ts-ignore\r\n itemModel.value = event?.target?.files[0]\r\n }\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\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":["model","_useModel","__props","formRef","useTemplateRef","__expose","provide","formContextKey","reactive","toRef","normalizedSpan","useFormSpan","normalizedRules","useFormRules","formContext","useFormContext","itemModel","normalizedDisabled","useFormDisabled","normalizedCode","useFormCode","content","computed","getSingleCodeContent","getMultiCodeContent","elModel","newValue","isTimePicker","normalizedSourceFormat","dateType","picker","modelType","isString","isDate","OrionError","dayjsObj","dayjs","file","ref","fileRef","onMounted","event","_a","style","index","withInstall","Form","StringInput","PasswordInput","Textarea","SingleSelect","MultiSelect","RadioGroup","CheckboxGroup","Checkbox","Switch","DateInput","FileInput","ButtonGroup","DiyItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBM,UAAAA,IAAQC,EAAgCC,GAAA,YAAC,GAEzCC,IAAUC,EAAe,SAAS;AAM3B,WAAAC,EAAA;AAAA,MACX,UALuC,YAChC,MAAMF,EAAQ,MAAO;IAI5B,CACD,GAEDG;AAAA,MACEC;AAAA,MACAC,EAAS;AAAA,QACP,OAAOR,EAAM;AAAA,QACb,OAAOS,EAAM,MAAMP,EAAA,KAAK;AAAA,QACxB,UAAUO,EAAM,MAAMP,EAAA,QAAQ;AAAA,QAC9B,UAAUO,EAAM,MAAMP,EAAQ,QAAA;AAAA,MAAA,CAC/B;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtID,UAAMN,IAAiBC,KACjBC,IAAkBC,KAElBwB,IAAOC,EAAI,EAAE,GACbC,IAAUnC,EAAe,SAAS;AACxC,IAAAoC,EAAU,MAAM;AACd,MAAAD,EAAQ,MAAO,MAAO,WAAW,CAACE,MAAU;;AAE1C,QAAAzB,EAAU,SAAQ0B,IAAAD,KAAA,gBAAAA,EAAO,WAAP,gBAAAC,EAAe,MAAM;AAAA,MAAC;AAAA,IAC1C,CACD;AAED,UAAM5B,IAAcC,KACdC,IAAYP,EAAMK,EAAY,OAAOZ,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBzC,UAAAyC,IAAQrB,EAAwB,OAC7B;AAAA,MACL,WAAWpB;MAEd,GAEKQ,IAAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAvB,UAAMD,IAAiBC,KACjBC,IAAkBC;;;;;;;;;;;;;;;;;;;ICNT+B,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;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
:root{--orion-flex-gutter: 8px;--orion-space-gutter: 8px}.orion-space{display:inline-flex;align-items:center;gap:var(--orion-space-gutter)}.orion-space.vertical{display:flex;flex-direction:column;align-items:center;gap:var(--orion-space-gutter)}.orion-flex{display:flex;outline:none}.orion-flex-row{flex-direction:row;width:100%;overflow:auto}.orion-flex-justify-start{justify-content:start}.orion-flex-column{width:100%;flex-direction:column;overflow:auto}.orion-flex>.orion-flexitem{overflow:auto;outline:none}.orion-flex>.orion-flexitem-auto{flex:0 0 auto}.orion-flex>.orion-flexitem-fixed{flex:none}.orion-flex>.orion-flexitem-fill{flex:1 1 0px}.orion-pagetbale{height:100%;display:flex;flex-direction:column;gap:4px}.orion-pagetbale>.pagetable-wrapper{flex:1 1 0px;overflow:auto}.orion-pagetbale>.pagination-wrapper{flex:0 0 auto}.orion-pagetbale .cell-numbercolumn{text-align:right}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "0.1.
|
1
|
+
declare const _default: "0.1.7";
|
2
2
|
export default _default;
|
package/dist/version/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.
|
1
|
+
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.7';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "orion-design",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.7",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"type": "module",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -10,8 +10,9 @@
|
|
10
10
|
],
|
11
11
|
"scripts": {
|
12
12
|
"dev": "vite build --mode dev --watch",
|
13
|
-
"build": "
|
14
|
-
"version": "node ./scripts/generate-version.cjs"
|
13
|
+
"build": "vue-tsc && vite build",
|
14
|
+
"version": "node ./scripts/generate-version.cjs",
|
15
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
15
16
|
},
|
16
17
|
"dependencies": {
|
17
18
|
"js-base64": "^3.7.7",
|
@@ -28,6 +29,8 @@
|
|
28
29
|
"@vitejs/plugin-vue": "^5.1.2",
|
29
30
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
30
31
|
"axios": "^1.7.7",
|
32
|
+
"conventional-changelog": "^6.0.0",
|
33
|
+
"conventional-changelog-cli": "^5.0.0",
|
31
34
|
"dayjs": "^1.11.13",
|
32
35
|
"decimal.js": "^10.4.3",
|
33
36
|
"element-plus": "^2.8.4",
|