fmt
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="always" style="width: 55%; margin: 0 auto">
|
||||
<agent-form ref="agentFormRef" v-model="form" is-add/>
|
||||
<agent-form ref="agentFormRef" v-model="form" is-add />
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button @click="$router.go(-1)">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
@ -10,32 +10,30 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import AgentForm from '@/views/components/AgentForm'
|
||||
import {reactive, ref, toRefs} from "vue";
|
||||
import AgentForm from "@/views/components/AgentForm";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
labelWidth: {
|
||||
type: Number,
|
||||
default: 120
|
||||
}
|
||||
})
|
||||
default: 120,
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
form: {
|
||||
industrys: [],
|
||||
id_image: {}
|
||||
}
|
||||
})
|
||||
const {form} = toRefs(data)
|
||||
const agentFormRef = ref()
|
||||
id_image: {},
|
||||
},
|
||||
});
|
||||
const { form } = toRefs(data);
|
||||
const agentFormRef = ref();
|
||||
const submitForm = async () => {
|
||||
if (!agentFormRef.value) return
|
||||
const valid = await agentFormRef.value.validateForm()
|
||||
if (!agentFormRef.value) return;
|
||||
const valid = await agentFormRef.value.validateForm();
|
||||
if (valid) {
|
||||
// TODO: submit agent
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
Reference in New Issue
Block a user