feat: demo
This commit is contained in:
parent
b661237366
commit
a14f516bd0
@ -16,7 +16,10 @@ export const tagTypes: TagType = {
|
||||
orange: { color: 'orange', label: 'orange' },
|
||||
/** 自定义预设 color可以为16进制颜色 */
|
||||
pink: { color: 'pink', label: 'pink' },
|
||||
primary: { color: 'processing', label: '主要(primary)' },
|
||||
/**
|
||||
* 新版processing参数有问题 暂时用blue代替
|
||||
*/
|
||||
primary: { color: 'blue', label: '主要(primary)' },
|
||||
purple: { color: 'purple', label: 'purple' },
|
||||
red: { color: 'red', label: 'red' },
|
||||
success: { color: 'success', label: '成功(success)' },
|
||||
|
@ -3,7 +3,14 @@ import { onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
|
||||
import { preferences } from '@vben/preferences';
|
||||
|
||||
import { Tag as ATag, Button, Card, Select } from 'ant-design-vue';
|
||||
import {
|
||||
Tag as ATag,
|
||||
Button,
|
||||
Card,
|
||||
RadioButton,
|
||||
RadioGroup,
|
||||
Select,
|
||||
} from 'ant-design-vue';
|
||||
|
||||
import { DictTag } from '#/components/Dict';
|
||||
import { useDictStore } from '#/store/dict';
|
||||
@ -26,6 +33,8 @@ onBeforeUnmount(() => intervalId && clearInterval(intervalId));
|
||||
|
||||
const sexOptions = getDictOptions('sys_user_sex');
|
||||
const disabledDict = getDict('sys_normal_disable');
|
||||
const select = ref('pc');
|
||||
const deviceOptions = getDictOptions('sys_device_type');
|
||||
|
||||
const dictStore = useDictStore();
|
||||
onMounted(() => {
|
||||
@ -52,9 +61,20 @@ onMounted(() => {
|
||||
class="w-[200px]"
|
||||
placeholder="请选择性别"
|
||||
/>
|
||||
<div class="flex gap-[6px]">
|
||||
<DictTag :dicts="disabledDict" value="0" />
|
||||
<DictTag :dicts="disabledDict" value="1" />
|
||||
</div>
|
||||
<RadioGroup v-model:value="select" button-style="solid">
|
||||
<RadioButton
|
||||
v-for="item in deviceOptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
>
|
||||
{{ item.label }}
|
||||
</RadioButton>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="tag测试: (processing有问题)">
|
||||
<ATag :bordered="false" color="processing">processing</ATag>
|
||||
|
Loading…
Reference in New Issue
Block a user