fix: bugs

pull/15/head
xingyuv 2023-03-07 09:41:01 +08:00
parent 65e3652534
commit 004d214a11
3 changed files with 12 additions and 3 deletions

View File

@ -109,7 +109,13 @@ const toggleClick = () => {
v-bind="getBindItemValue(item)"
>
<template #label>
<slot :name="`${item.field}-label`" :label="item.label">{{ item.label }}</slot>
<slot
:name="`${item.field}-label`"
:row="{
label: item.label
}"
>{{ item.label }}</slot
>
</template>
<template #default>

View File

@ -282,7 +282,7 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[
// 给options添加国际化
const filterOptions = (options: Recordable, labelField?: string) => {
return options.map((v: Recordable) => {
return options?.map((v: Recordable) => {
if (labelField) {
v['labelField'] = t(v.labelField)
} else {

View File

@ -409,7 +409,10 @@ watch(
{
icon: 'ep:close',
label: t('common.closeTab'),
disabled: !!visitedViews?.length && selectedTag?.meta.affix
disabled: !!visitedViews?.length && selectedTag?.meta.affix,
command: () => {
closeSelectedTag(selectedTag!)
}
},
{
divided: true,