style: dict

This commit is contained in:
dap 2024-09-09 16:56:25 +08:00
parent 83cfe991f5
commit 4259f96c2b
2 changed files with 16 additions and 32 deletions

View File

@ -1,28 +1,20 @@
<script setup lang="ts">
import type { DictData } from '#/api/system/dict/dict-data-model';
import { computed, watch } from 'vue';
import { computed } from 'vue';
import { Tag } from 'ant-design-vue';
import { tagTypes } from './data';
const props = withDefaults(
defineProps<{
interface Props {
dicts: DictData[]; // dict
value: number | string; // value
}>(),
{
dicts: undefined,
},
);
}
watch(
() => props.dicts,
(value) => {
console.log('dicts change', value);
},
);
const props = withDefaults(defineProps<Props>(), {
dicts: undefined,
});
const color = computed<string>(() => {
// eslint-disable-next-line eqeqeq

View File

@ -1,28 +1,20 @@
<script setup lang="ts">
import type { DictData } from '#/api/system/dict/dict-data-model';
import { computed, watch } from 'vue';
import { computed } from 'vue';
import { Tag } from 'ant-design-vue';
import { tagTypes } from './data';
const props = withDefaults(
defineProps<{
interface Props {
dicts: DictData[]; // dict
value: number | string; // value
}>(),
{
dicts: undefined,
},
);
}
watch(
() => props.dicts,
(value) => {
console.log('dicts change', value);
},
);
const props = withDefaults(defineProps<Props>(), {
dicts: undefined,
});
const color = computed<string>(() => {
// eslint-disable-next-line eqeqeq