1
This commit is contained in:
22
uview-plus/components/u-notify/notify.js
Normal file
22
uview-plus/components/u-notify/notify.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:10:21
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/notify.js
|
||||
*/
|
||||
export default {
|
||||
// notify组件
|
||||
notify: {
|
||||
top: 0,
|
||||
type: 'primary',
|
||||
color: '#ffffff',
|
||||
bgColor: '',
|
||||
message: '',
|
||||
duration: 3000,
|
||||
fontSize: 15,
|
||||
safeAreaInsetTop: false
|
||||
}
|
||||
}
|
||||
51
uview-plus/components/u-notify/props.js
Normal file
51
uview-plus/components/u-notify/props.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 到顶部的距离
|
||||
top: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.notify.top
|
||||
},
|
||||
// 是否展示组件
|
||||
// show: {
|
||||
// type: Boolean,
|
||||
// default: () => defProps.notify.show
|
||||
// },
|
||||
// type主题,primary,success,warning,error
|
||||
type: {
|
||||
type: String,
|
||||
default: () => defProps.notify.type
|
||||
},
|
||||
// 字体颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => defProps.notify.color
|
||||
},
|
||||
// 背景颜色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => defProps.notify.bgColor
|
||||
},
|
||||
// 展示的文字内容
|
||||
message: {
|
||||
type: String,
|
||||
default: () => defProps.notify.message
|
||||
},
|
||||
// 展示时长,为0时不消失,单位ms
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.notify.duration
|
||||
},
|
||||
// 字体大小
|
||||
fontSize: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.notify.fontSize
|
||||
},
|
||||
// 是否留出顶部安全距离(状态栏高度)
|
||||
safeAreaInsetTop: {
|
||||
type: Boolean,
|
||||
default: () => defProps.notify.safeAreaInsetTop
|
||||
}
|
||||
}
|
||||
})
|
||||
217
uview-plus/components/u-notify/u-notify.vue
Normal file
217
uview-plus/components/u-notify/u-notify.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user