添加字段
This commit is contained in:
parent
64e9f863f7
commit
caec7e41fa
|
|
@ -9,10 +9,20 @@
|
|||
<a-input v-model:value="formData.categoryName" placeholder="请输入一级分类" maxLength="10" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-col :span="24" style="margin-top: 50px;">
|
||||
<!-- <a-col :span="24" style="margin-top: 50px;">
|
||||
<a-form-item label="图标" v-bind="validateInfos.icon" id="ConfigMaterialMedicationForm-icon" name="icon">
|
||||
<IconPicker v-model:value="formData.icon" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="24" style="margin-top: 50px;">
|
||||
<a-form-item label="默认图标" v-bind="validateInfos.appIconPath" id="ConfigMaterialMedicationForm-appIconPath" name="appIconPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.appIconPath" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 50px;">
|
||||
<a-form-item label="选中图标" v-bind="validateInfos.appCheckIconPath" id="ConfigMaterialMedicationForm-appCheckIconPath" name="appCheckIconPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.appCheckIconPath" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -31,6 +41,7 @@
|
|||
import { saveOrUpdate } from '../ConfigMaterialCategory.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
import { IconPicker } from '/@/components/Icon/index';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
|
|
@ -44,6 +55,8 @@
|
|||
id: '',
|
||||
categoryName: '',
|
||||
icon: '',
|
||||
appCheckIconPath: '',
|
||||
appIconPath: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
|
|
@ -52,6 +65,8 @@
|
|||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
categoryName: [{ required: true, message: '请输入一级分类', trigger: 'blur' }],
|
||||
appIconPath: [{ required: true, message: '请上传默认图标', trigger: 'blur' }],
|
||||
appCheckIconPath: [{ required: true, message: '请上传选中图标', trigger: 'blur' }],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue