飘泊客 1 year ago
parent 287d63a4d6
commit 8c96b99105

@ -1,8 +1,8 @@
<template> <template>
<a-dropdown> <a-dropdown>
<TranslationOutlined style="font-size: 18px" /> <!-- <TranslationOutlined style="font-size: 18px" /> -->
<template #overlay> <!-- <template #overlay>
<a-menu :selected-keys="[i18nStore.language]"> <a-menu :selected-keys="[i18nStore.language]">
<a-menu-item <a-menu-item
v-for="language of supportLanguage" v-for="language of supportLanguage"
@ -13,7 +13,7 @@
{{ language.title }} {{ language.title }}
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</template> </template> -->
</a-dropdown> </a-dropdown>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

@ -30,11 +30,13 @@ const props = defineProps(
) )
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'update:value', selectedValue: SelectRoleValue): void (e: 'update:value', selectedValue: SelectRoleValue): Array<any>,
(e: 'changes', selectedValue: SelectRoleValue): Array<any>
}>() }>()
const onChange = (selectedValue: SelectValue) => { const onChange = (selectedValue: SelectValue) => {
emits('update:value', selectedValue as SelectRoleValue) emits('update:value', selectedValue as SelectRoleValue)
emits('changes', selectedValue as SelectRoleValue)
} }
const filterOption = (input: string, option: any) => { const filterOption = (input: string, option: any) => {

@ -59,6 +59,7 @@
mode="multiple" mode="multiple"
allow-clear allow-clear
placeholder="请选择" placeholder="请选择"
@changes="updateRole"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -145,7 +146,11 @@ const handleSubmit = () => {
} }
) )
} }
const updateRole = () => {
if (formModel.roleCodes.length > 1) {
formModel.roleCodes.splice(-1)
}
}
/* 弹窗关闭方法 */ /* 弹窗关闭方法 */
const handleClose = () => { const handleClose = () => {
closeModal() closeModal()

Loading…
Cancel
Save