Appearance
InputTag
说明
基于el-tag
的封装
可选参数
typescript
defineProps({
config: {
type: Object as () => {
buttonAttrs: Record<string, any>;
inputAttrs: Record<string, any>;
tagAttrs: Record<string, any>;
},
default: () => ({
buttonAttrs: {}, //可配置 el-button 的所有 props 和自定义属性
inputAttrs: {}, //可配置 el-input 的所有 props 和自定义属性:
tagAttrs: {}, //可配置 el-tag 的所有 props 和自定义属性:
}),
},
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
使用
vue
<script setup lang="ts">
import InputTag from "liyao-vue-common"
const attr = {
buttonAttrs: {
btnText: "新增标签"
}
}
</script>
<template>
<div>
<InputTag :config="attr"></InputTag>
</div>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17