1
This commit is contained in:
61
uview-plus/components/u-tooltip/props.js
Normal file
61
uview-plus/components/u-tooltip/props.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 需要显示的提示文字
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tooltip.text
|
||||
},
|
||||
// 点击复制按钮时,复制的文本,为空则使用text值
|
||||
copyText: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tooltip.copyText
|
||||
},
|
||||
// 文本大小
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tooltip.size
|
||||
},
|
||||
// 字体颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => defProps.tooltip.color
|
||||
},
|
||||
// 弹出提示框时,文本的背景色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => defProps.tooltip.bgColor
|
||||
},
|
||||
// 弹出提示的方向,top-上方,bottom-下方
|
||||
direction: {
|
||||
type: String,
|
||||
default: () => defProps.tooltip.direction
|
||||
},
|
||||
// 弹出提示的z-index,nvue无效
|
||||
zIndex: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.tooltip.zIndex
|
||||
},
|
||||
// 是否显示复制按钮
|
||||
showCopy: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tooltip.showCopy
|
||||
},
|
||||
// 扩展的按钮组
|
||||
buttons: {
|
||||
type: Array,
|
||||
default: () => defProps.tooltip.buttons
|
||||
},
|
||||
// 是否显示透明遮罩以防止触摸穿透
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tooltip.overlay
|
||||
},
|
||||
// 是否显示复制成功或者失败的toast
|
||||
showToast: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tooltip.showToast
|
||||
}
|
||||
}
|
||||
})
|
||||
25
uview-plus/components/u-tooltip/tooltip.js
Normal file
25
uview-plus/components/u-tooltip/tooltip.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:25:14
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js
|
||||
*/
|
||||
export default {
|
||||
// tooltip 组件
|
||||
tooltip: {
|
||||
text: '',
|
||||
copyText: '',
|
||||
size: 14,
|
||||
color: '#606266',
|
||||
bgColor: 'transparent',
|
||||
direction: 'top',
|
||||
zIndex: 10071,
|
||||
showCopy: true,
|
||||
buttons: [],
|
||||
overlay: true,
|
||||
showToast: true
|
||||
}
|
||||
}
|
||||
342
uview-plus/components/u-tooltip/u-tooltip.vue
Normal file
342
uview-plus/components/u-tooltip/u-tooltip.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user