<template>
<el-dialog width="400px" v-model="visible" :title="title" center>
<el-form ref="formRef" :model="form" :rules="registerRules" class="register-form" label-width="auto">
</el-form>
</el-dialog>
</template>
<script setup name="ProjectAddOrEdit">
const emitsEventList = defineEmits(['done', 'update:visible'])
const props = defineProps({
visible: {
type: Boolean,
default: false
},
registerId: [String, Number]
})
const visible = computed({
get: () => props.visible,
set: () => emitsEventList('update:visible'),
});
const { proxy } = getCurrentInstance();
const title = ref('新增');
</script>
<style lang="scss" scoped></style>
vue3封装el-dialog弹窗
最新推荐文章于 2024-08-22 10:22:21 发布