mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
refactor: eslint src --fix
This commit is contained in:
@@ -1,21 +1,11 @@
|
||||
<template>
|
||||
<span v-if="!dictItem"></span>
|
||||
<span v-else-if="!dictItem.color">{{ dictItem.label }}</span>
|
||||
<a-tag v-else-if="dictItem.color === 'primary'" color="arcoblue">{{
|
||||
dictItem.label
|
||||
}}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'success'" color="green">{{
|
||||
dictItem.label
|
||||
}}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'warning'" color="orangered">{{
|
||||
dictItem.label
|
||||
}}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'error'" color="red">{{
|
||||
dictItem.label
|
||||
}}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'default'" color="gray">{{
|
||||
dictItem.label
|
||||
}}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'primary'" color="arcoblue">{{ dictItem.label }}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'success'" color="green">{{ dictItem.label }}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'warning'" color="orangered">{{ dictItem.label }}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'error'" color="red">{{ dictItem.label }}</a-tag>
|
||||
<a-tag v-else-if="dictItem.color === 'default'" color="gray">{{ dictItem.label }}</a-tag>
|
||||
<a-tag v-else :color="dictItem.color">{{ dictItem.label }}</a-tag>
|
||||
</template>
|
||||
|
||||
@@ -27,19 +17,17 @@ defineOptions({ name: 'GiCellTag' })
|
||||
const props = defineProps({
|
||||
dict: {
|
||||
type: Array<LabelValueState>,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
value: {
|
||||
type: [Number, String],
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const dictItem = computed(() =>
|
||||
props.dict.find(
|
||||
(d) => d.value === String(props.value) || d.value === Number(props.value),
|
||||
),
|
||||
);
|
||||
props.dict.find((d) => d.value === String(props.value) || d.value === Number(props.value))
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user