-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: up-tag组件支持uni-app-x及up-transition修复
- Loading branch information
jry
committed
Aug 27, 2024
1 parent
b3ff2ae
commit 81ced03
Showing
8 changed files
with
537 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { defineMixin } from '../../libs/vue' | ||
import defProps from './tag' | ||
let crtProp = defProps['tag'] as UTSJSONObject | ||
|
||
export const propsTag = defineMixin({ | ||
props: { | ||
// 标签类型info、primary、success、warning、error | ||
type: { | ||
type: String, | ||
default: crtProp['type'] | ||
}, | ||
// 不可用 | ||
disabled: { | ||
type: [Boolean, String], | ||
default: crtProp['disabled'] | ||
}, | ||
// 标签的大小,large,medium,mini | ||
size: { | ||
type: String, | ||
default: crtProp['size'] | ||
}, | ||
// tag的形状,circle(两边半圆形), square(方形,带圆角) | ||
shape: { | ||
type: String, | ||
default: crtProp['shape'] | ||
}, | ||
// 标签文字 | ||
text: { | ||
type: [String, Number], | ||
default: crtProp['text'] | ||
}, | ||
// 背景颜色,默认为空字符串,即不处理 | ||
bgColor: { | ||
type: String, | ||
default: crtProp['bgColor'] | ||
}, | ||
// 标签字体颜色,默认为空字符串,即不处理 | ||
color: { | ||
type: String, | ||
default: crtProp['color'] | ||
}, | ||
// 标签的边框颜色 | ||
borderColor: { | ||
type: String, | ||
default: crtProp['borderColor'] | ||
}, | ||
// 关闭按钮图标的颜色 | ||
closeColor: { | ||
type: String, | ||
default: crtProp['closeColor'] | ||
}, | ||
// 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了 | ||
name: { | ||
type: [String, Number], | ||
default: crtProp['name'] | ||
}, | ||
// // 模式选择,dark|light|plain | ||
// mode: { | ||
// type: String, | ||
// default: 'light' | ||
// }, | ||
// 镂空时是否填充背景色 | ||
plainFill: { | ||
type: Boolean, | ||
default: crtProp['plainFill'] | ||
}, | ||
// 是否镂空 | ||
plain: { | ||
type: Boolean, | ||
default: crtProp['plain'] | ||
}, | ||
// 是否可关闭 | ||
closable: { | ||
type: Boolean, | ||
default: crtProp['closable'] | ||
}, | ||
// 是否显示 | ||
show: { | ||
type: Boolean, | ||
default: crtProp['show'] | ||
}, | ||
// 内置图标,或绝对路径的图片 | ||
icon: { | ||
type: String, | ||
default: crtProp['icon,'] | ||
}, | ||
iconColor: { | ||
type: String, | ||
default: crtProp['iconColor'] | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* @Author : LQ,jry | ||
* @Description : | ||
* @version : 3.0 | ||
* @Date : 2021-08-20 16:44:21 | ||
* @LastAuthor : jry | ||
* @lastTime : 2024-08-20 14:20:58 | ||
* @FilePath : /uview-plus/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: '' | ||
} | ||
} as UTSJSONObject |
Oops, something went wrong.