feat: 组件库替换
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="form-container">
|
||||
<a-form :model="formData" ref="formRef" layout="vertical">
|
||||
<a-form-item
|
||||
<Form :model="formData" ref="formRef" layout="vertical">
|
||||
<FormItem
|
||||
v-for="(field, index) in formFields"
|
||||
:key="index"
|
||||
:label="field.props.label"
|
||||
:field="field.props.name"
|
||||
:name="field.props.name"
|
||||
:rules="field.props.rules"
|
||||
:tooltip="field.props.tip"
|
||||
>
|
||||
@ -21,9 +21,6 @@
|
||||
v-model:value="formData[field.props.name]"
|
||||
:placeholder="field?.props?.placeholder"
|
||||
/>
|
||||
<!-- <a-color-picker v-if="field.type === 'color_picker'"
|
||||
style="width: 500px; height: 200px"
|
||||
v-model="formData[field.props.name]" /> -->
|
||||
<ImageUpload
|
||||
v-if="field.type == 'upload_image'"
|
||||
v-model="formData[field.props.name]"
|
||||
@ -43,8 +40,8 @@
|
||||
{{ option.label }}
|
||||
</Option>
|
||||
</Select>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Button class="submit-btn" type="primary" :disabled="loading" @click="handleSubmit">提交执行</Button>
|
||||
</div>
|
||||
</template>
|
||||
@ -52,9 +49,10 @@
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
import ImageUpload from '@/components/upload/ImageUpload.vue';
|
||||
import FileUpload from '@/components/upload/FileUpload.vue';
|
||||
import { Button, Input, Select } from 'ant-design-vue';
|
||||
import { Button, Input, Select, Row, Col, Form } from 'ant-design-vue';
|
||||
const { TextArea } = Input;
|
||||
const { Option } = Select;
|
||||
const { Item: FormItem } = Form;
|
||||
|
||||
const props = defineProps({
|
||||
formFields: {
|
||||
|
||||
Reference in New Issue
Block a user