feat: 表单编辑按钮权限
This commit is contained in:
@ -8,13 +8,13 @@
|
||||
</slot>
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button style="margin-right: 10px" type="primary" @click="editForm" v-if="mode === 'view'">
|
||||
<a-button style="margin-right: 10px" type="primary" @click="editForm" v-if="mode === 'view' && showEdit">
|
||||
<slot name="icon">
|
||||
<edit-outlined />
|
||||
</slot>
|
||||
编辑
|
||||
</a-button>
|
||||
<a-button type="primary" @click="handleSubmit" v-else>
|
||||
<a-button type="primary" @click="handleSubmit" v-else-if="showEdit">
|
||||
<slot name="icon">
|
||||
<check-circle-outlined />
|
||||
</slot>
|
||||
@ -45,7 +45,8 @@ const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||
const router = useRouter();
|
||||
const { currentRoute } = router;
|
||||
|
||||
const { formPath } = currentRoute.value.query;
|
||||
const { formPath, canEdit } = currentRoute.value.query;
|
||||
const showEdit = ref(canEdit === '0' ? false : true)
|
||||
const pathArr = formPath.split('/');
|
||||
|
||||
const tabStore = useMultipleTabStore();
|
||||
|
||||
Reference in New Issue
Block a user