update
This commit is contained in:
4
src/scss/global.scss
Normal file
4
src/scss/global.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
.test {
|
||||
border: 1px solid red;
|
||||
@apply box-border;
|
||||
}
|
||||
3
src/scss/index.scss
Normal file
3
src/scss/index.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
Page {
|
||||
--primary-color: #2D5CF6;
|
||||
}
|
||||
131
src/scss/thorui.config.js
Normal file
131
src/scss/thorui.config.js
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
基础组件props属性全局配置文件。优先级:全局配置文件props < 单独设置组件props
|
||||
温馨提示:未设置则使用组件内默认值,避免出错,请勿删减以下配置,切勿修改key,仅可修改key对应值。
|
||||
组件属性介绍请查看文档
|
||||
*/
|
||||
|
||||
//组件内主色配置
|
||||
const color = {
|
||||
primary: '#2D5CF6',
|
||||
success: '#07c160',
|
||||
warning: '#ff7900',
|
||||
danger: '#EB0909',
|
||||
pink: '#f74d54',
|
||||
blue: '#2D5CF6',
|
||||
link: '#586c94'
|
||||
}
|
||||
|
||||
const propsConfig = {
|
||||
//组件内主色配置
|
||||
color,
|
||||
//组件名称,字体图标组件 tui-icon
|
||||
tuiIcon: {
|
||||
//组件属性值
|
||||
size: 32,
|
||||
unit: 'px',
|
||||
color: '#999'
|
||||
},
|
||||
//按钮组件 tui-button
|
||||
tuiButton: {
|
||||
height: '96rpx',
|
||||
size: 32,
|
||||
},
|
||||
//列表项组件 tui-list-cell
|
||||
tuiListCell: {
|
||||
arrowColor: '#c0c0c0',
|
||||
lineColor: '#eaeef1',
|
||||
lineLeft: 30,
|
||||
padding: '26rpx 30rpx',
|
||||
color: '#333',
|
||||
size: 28,
|
||||
},
|
||||
//按钮组件 tui-form-button
|
||||
tuiFormButton: {
|
||||
background: color.primary,
|
||||
color: '#fff',
|
||||
height: '96rpx',
|
||||
size: 32,
|
||||
radius: '6rpx',
|
||||
},
|
||||
//文本组件 tui-text
|
||||
tuiText: {
|
||||
size: 32,
|
||||
unit: 'rpx',
|
||||
color: ''
|
||||
},
|
||||
//输入框组件 tui-input
|
||||
tuiInput: {
|
||||
requiredColor: color.danger,
|
||||
labelSize: 32,
|
||||
labelColor: '#333',
|
||||
size: 32,
|
||||
color: '#333',
|
||||
padding: '26rpx 30rpx',
|
||||
backgroundColor: '#FFFFFF',
|
||||
radius: 0
|
||||
},
|
||||
//表单项组件 tui-form-item
|
||||
tuiFormItem: {
|
||||
padding: '28rpx 30rpx',
|
||||
labelSize: 32,
|
||||
labelColor: '#333',
|
||||
labelFontWeight: 400,
|
||||
asteriskColor: color.danger,
|
||||
background: '#fff',
|
||||
arrowColor: '#c0c0c0',
|
||||
borderColor: '#eaeef1',
|
||||
radius: '0rpx',
|
||||
position: 2
|
||||
},
|
||||
//表单校验组件 tui-form
|
||||
tuiForm: {
|
||||
tipBackgroundColor: color.pink,
|
||||
duration: 2000
|
||||
},
|
||||
//全局方法,调用 uni.$tui.toast
|
||||
toast(text, duration, success) {
|
||||
uni.showToast({
|
||||
// #ifndef MP-ALIPAY
|
||||
duration: duration || 2000,
|
||||
// #endif
|
||||
title: text || "出错啦~",
|
||||
icon: success ? 'success' : 'none'
|
||||
})
|
||||
},
|
||||
//全局方法,调用 uni.$tui.modal
|
||||
modal(title, content, showCancel, callback, confirmColor, confirmText) {
|
||||
uni.showModal({
|
||||
title: title || '提示',
|
||||
content: content,
|
||||
showCancel: showCancel,
|
||||
cancelColor: "#555",
|
||||
confirmColor: confirmColor || color.primary,
|
||||
confirmText: confirmText || "确定",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
callback && callback(true)
|
||||
} else {
|
||||
callback && callback(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//跳转页面,调用:uni.$tui.href
|
||||
href(url, isMain) {
|
||||
if (isMain) {
|
||||
uni.switchTab({
|
||||
url: url
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
}
|
||||
},
|
||||
//全局方法,rpx转px:调用 uni.$tui.rpx2px
|
||||
rpx2px(value) {
|
||||
return uni.upx2px(value)
|
||||
}
|
||||
}
|
||||
|
||||
export default propsConfig
|
||||
1
src/scss/uni.scss
Normal file
1
src/scss/uni.scss
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user