1
This commit is contained in:
90
uview-plus/components/u-tag/props.js
Normal file
90
uview-plus/components/u-tag/props.js
Normal file
@@ -0,0 +1,90 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 标签类型info、primary、success、warning、error
|
||||
type: {
|
||||
type: String,
|
||||
default: () => defProps.tag.type
|
||||
},
|
||||
// 不可用
|
||||
disabled: {
|
||||
type: [Boolean, String],
|
||||
default: () => defProps.tag.disabled
|
||||
},
|
||||
// 标签的大小,large,medium,mini
|
||||
size: {
|
||||
type: String,
|
||||
default: () => defProps.tag.size
|
||||
},
|
||||
// tag的形状,circle(两边半圆形), square(方形,带圆角)
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => defProps.tag.shape
|
||||
},
|
||||
// 标签文字
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tag.text
|
||||
},
|
||||
// 背景颜色,默认为空字符串,即不处理
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => defProps.tag.bgColor
|
||||
},
|
||||
// 标签字体颜色,默认为空字符串,即不处理
|
||||
color: {
|
||||
type: String,
|
||||
default: () => defProps.tag.color
|
||||
},
|
||||
// 标签的边框颜色
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: () => defProps.tag.borderColor
|
||||
},
|
||||
// 关闭按钮图标的颜色
|
||||
closeColor: {
|
||||
type: String,
|
||||
default: () => defProps.tag.closeColor
|
||||
},
|
||||
// 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
|
||||
name: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tag.name
|
||||
},
|
||||
// // 模式选择,dark|light|plain
|
||||
// mode: {
|
||||
// type: String,
|
||||
// default: 'light'
|
||||
// },
|
||||
// 镂空时是否填充背景色
|
||||
plainFill: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tag.plainFill
|
||||
},
|
||||
// 是否镂空
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tag.plain
|
||||
},
|
||||
// 是否可关闭
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tag.closable
|
||||
},
|
||||
// 是否显示
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tag.show
|
||||
},
|
||||
// 内置图标,或绝对路径的图片
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => defProps.tag.icon,
|
||||
},
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: () => defProps.tag.iconColor
|
||||
}
|
||||
}
|
||||
})
|
||||
30
uview-plus/components/u-tag/tag.js
Normal file
30
uview-plus/components/u-tag/tag.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:23:37
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js
|
||||
*/
|
||||
export default {
|
||||
// tag 组件
|
||||
tag: {
|
||||
type: 'primary',
|
||||
disabled: false,
|
||||
size: 'medium',
|
||||
shape: 'square',
|
||||
text: '',
|
||||
bgColor: '',
|
||||
color: '',
|
||||
borderColor: '',
|
||||
closeColor: '#C6C7CB',
|
||||
name: '',
|
||||
plainFill: false,
|
||||
plain: false,
|
||||
closable: false,
|
||||
show: true,
|
||||
icon: '',
|
||||
iconColor: ''
|
||||
}
|
||||
}
|
||||
368
uview-plus/components/u-tag/u-tag.vue
Normal file
368
uview-plus/components/u-tag/u-tag.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user