主题样式
主题配置表
属性名 | 值 | 描述 |
---|---|---|
id | 'DefaultMode' | 主题的唯一标识符 |
name | '默认' | 主题名称 |
unit | 'rpx' | 单位 |
infonormal | '#909399' | 信息提示正常状态颜色 |
infodark | '#82848a' | 信息提示深色状态颜色 |
infodisabled | '#c8c9cc' | 信息提示禁用状态颜色 |
infolight | '#f4f4f5' | 信息提示浅色状态颜色 |
primarynormal | '#2979ff' | 主要颜色正常状态颜色 |
primarydark | '#2b85e4' | 主要颜色深色状态颜色 |
primarydisabled | '#a0cfff' | 主要颜色禁用状态颜色 |
primarylight | '#dcedff' | 主要颜色浅色状态颜色 |
successnormal | '#19be6b' | 成功状态正常颜色 |
successdark | '#18b566' | 成功状态深色颜色 |
successdisabled | '#71d5a1' | 成功状态禁用颜色 |
successlight | '#DFEAE2' | 成功状态浅色颜色 |
warningnormal | '#ff9900' | 警告状态正常颜色 |
warningdark | '#f29100' | 警告状态深色颜色 |
warningdisabled | '#fcbd71' | 警告状态禁用颜色 |
warninglight | '#fff1dd' | 警告状态浅色颜色 |
errornormal | '#fa3534' | 错误状态正常颜色 |
errordark | '#dd6161' | 错误状态深色颜色 |
errordisabled | '#fab6b6' | 错误状态禁用颜色 |
errorlight | '#ffe0e0' | 错误状态浅色颜色 |
colornormal | '#333333' | 文本颜色正常状态 |
colordark | '#606266' | 文本颜色深色状态 |
colordisabled | '#909399' | 文本颜色禁用状态 |
colorlight | '#c0c4cc' | 文本颜色浅色状态 |
colorinverse | '#ffffff' | 文本颜色反色状态 |
bgcolorview | '#ffffff' | 视图背景颜色 |
bgcolorpage | '#f8f8f8' | 页面背景颜色 |
borderbase | '#DCDFE6' | 基础边框颜色 |
borderlight | '#E4E7ED' | 浅色边框颜色 |
borderlighter | '#EBEEF5' | 更浅色边框颜色 |
borderextralight | '#F2F6FC' | 额外浅色边框颜色 |
radiuslarge | 20 | 大尺寸圆角半径 |
radiusmedium | 16 | 中等尺寸圆角半径 |
radiussmall | 12 | 小尺寸圆角半径 |
radiusmini | 8 | 迷你尺寸圆角半径 |
marginlarge | 32 | 大尺寸外边距 |
marginmedium | 28 | 中等尺寸外边距 |
marginsmall | 24 | 小尺寸外边距 |
marginmini | 20 | 迷你尺寸外边距 |
paddinglarge | 24 | 大尺寸内边距 |
paddingmedium | 20 | 中等尺寸内边距 |
paddingsmall | 16 | 小尺寸内边距 |
paddingmini | 12 | 迷你尺寸内边距 |
sizelarge | 36 | 大尺寸字体大小 |
sizemedium | 28 | 中等尺寸字体大小 |
sizesmall | 24 | 小尺寸字体大小 |
sizemini | 22 | 迷你尺寸字体大小 |
背景主题样式
css | 说明 | style | 备注 |
---|---|---|---|
tdb | type='' effect='' | background-color:bgcolorview; | background-color:#ffffff; |
tdb.i | type='info' effect='' | background-color:infonormal; | background-color:#909399; |
tdb.i.d | type='info' effect='dark' | background-color:infodark; | background-color:#82848a; |
tdb.i.di | type='info' effect='disabled' | background-color:infodisabled; | background-color:#c8c9cc; |
tdb.i.l | type='info' effect='light' | background-color:infolight; | background-color:#f4f4f5; |
tdb.i.l.red or tdb.i..red or bg.red | type='info' effect='light' color:red | background-color:red; | 自定义颜色覆盖主题 |
tdb.e | type='error' effect='' | background-color:errornormal; | background-color:#fa3534; |
tdb.e.d | type='error' effect='dark' | background-color:errordark; | background-color:#dd6161; |
tdb.e.di | type='error' effect='disabled' | background-color:errordisabled; | background-color:#fab6b6; |
tdb.e.l | type='error' effect='light' | background-color:errorlight; | background-color:#ffe0e0; |
tdb.e.l.red or tdb.e..red or bg.red | type='error' effect='light' color:red | background-color:red; | 自定义颜色覆盖主题 |
tdb.w | type='warning' effect='' | background-color:warningnormal; | background-color:#ff9900; |
tdb.w.d | type='warning' effect='dark' | background-color:warningdark; | background-color:#f29100; |
tdb.w.di | type='warning' effect='disabled' | background-color:warningdisabled; | background-color:#fcbd71; |
tdb.w.l | type='warning' effect='light' | background-color:warninglight; | background-color:#fff1dd; |
tdb.w.l.red or tdb.e..red or bg.red | type='warning' effect='light' color:red | background-color:red; | 自定义颜色覆盖主题 |
tdb.s | type='success' effect='' | background-color:successnormal; | background-color:#19be6b; |
tdb.s.d | type='success' effect='dark' | background-color:successdark; | background-color:#18b566; |
tdb.s.di | type='success' effect='disabled' | background-color:successdisabled; | background-color:#71d5a1; |
tdb.s.l | type='success' effect='light' | background-color:successlight; | background-color:#DFEAE2; |
tdb.s.l.red or tdb.e..red or bg.red | type='success' effect='light' color:red | background-color:red; | 自定义颜色覆盖主题 |
tdb.p | type='primary' effect='' | background-color:primarynormal; | background-color:#2979ff; |
tdb.p.d | type='primary' effect='dark' | background-color:primarydark; | background-color:#2b85e4; |
tdb.p.di | type='primary' effect='disabled' | background-color:primarydisabled; | background-color:#a0cfff; |
tdb.p.l | type='primary' effect='light' | background-color:primarylight; | background-color:#dcedff; |
tdb.p.l.red or tdb.e..red or bg.red | type='primary' effect='light' color:red | background-color:red; | 自定义颜色覆盖主题 |
文字颜色(作为前景的时候使用)
css | 说明 | style | 备注 |
---|---|---|---|
tdc | type='' effect='' | color:colornormal; | color:#333333; |
tdc.i | type='info' effect='' | color:colorinverse; | color:#ffffff; |
tdc.i.d | type='info' effect='dark' | color:colorinverse; | color:#ffffff; |
tdc.i.di | type='info' effect='disabled' | color:colorinverse; | color:#ffffff; |
tdc.i.l | type='info' effect='light' | color:infonormal; | color:#909399; |
tdc.i.l.red or tdc.i..red or c.red | type='info' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tdc.e | type='error' effect='' | color:colorinverse; | color:#ffffff; |
tdc.e.d | type='error' effect='dark' | color:colorinverse; | color:#ffffff; |
tdc.e.di | type='error' effect='disabled' | color:colorinverse; | color:#ffffff; |
tdc.e.l | type='error' effect='light' | color:errornormal; | color:#fa3534; |
tdc.e.l.red or tdc.e..red or c.red | type='error' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tdc.w | type='warning' effect='' | color:colorinverse; | color:#ffffff; |
tdc.w.d | type='warning' effect='dark' | color:colorinverse; | color:#ffffff; |
tdc.w.di | type='warning' effect='disabled' | color:colorinverse; | color:#ffffff; |
tdc.w.l | type='warning' effect='light' | color:warningnormal; | color:#ff9900; |
tdc.w.l.red or tdc.e..red or c.red | type='warning' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tdc.s | type='success' effect='' | color:colorinverse; | color:#ffffff; |
tdc.s.d | type='success' effect='dark' | color:colorinverse; | color:#ffffff; |
tdc.s.di | type='success' effect='disabled' | color:colorinverse; | color:#ffffff; |
tdc.s.l | type='success' effect='light' | color:successnormal; | color:#19be6b; |
tdc.s.l.red or tdc.e..red or c.red | type='success' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tdc.p | type='primary' effect='' | color:colorinverse; | color:#ffffff; |
tdc.p.d | type='primary' effect='dark' | color:colorinverse; | color:#ffffff; |
tdc.p.di | type='primary' effect='disabled' | color:colorinverse; | color:#ffffff; |
tdc.p.l | type='primary' effect='light' | color:primarynormal; | color:#2979ff; |
tdc.p.l.red or tdc.e..red or c.red | type='primary' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
文字颜色对照
css | 说明 | style | 备注 |
---|---|---|---|
tqc | type='' effect='' | color:colornormal; | color:#333333; |
tqc..n (默认等同于tqc ) | type='' effect='normal' | color:colornormal; | color:#333333; |
tqc..d | type='' effect='dark' | color:colordark; | color:#606266; |
tqc..di | type='' effect='disabled' | color:colordisabled; | color:#909399; |
tqc..l | type='' effect='light' | color:colorlight; | color:#c0c4cc; |
tqc.i | type='info' effect='' | color:infonormal; | color:#909399; |
tqc.i.d | type='info' effect='dark' | color:infodark; | color:#82848a; |
tqc.i.di | type='info' effect='disabled' | color:infodisabled; | color:#c8c9cc; |
tqc.i.l | type='info' effect='light' | color:infolight; | color:#f4f4f5; |
tqc.i.l.red or tqc.i..red or c.red | type='info' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tqc.e | type='error' effect='' | color:errornormal; | color:#fa3534; |
ttd.e.d | type='error' effect='dark' | color:errordark; | color:#dd6161; |
ttd.e.di | type='error' effect='disabled' | color:errordisabled; | color:#fab6b6; |
tqc.e.l | type='error' effect='light' | color:errorlight; | color:#ffe0e0; |
tqc.e.l.red or tqc.e..red or c.red | type='error' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tqc.w | type='warning' effect='' | color:warningnormal; | color:#ffffff; |
tqc.w.d | type='warning' effect='dark' | color:warningdark; | color:#ffffff; |
tqc.w.di | type='warning' effect='disabled' | color:warningdisabled; | color:#ffffff; |
tqc.w.l | type='warning' effect='light' | color:warninglight; | color:#ff9900; |
tqc.w.l.red or tqc.e..red or c.red | type='warning' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tqc.s | type='success' effect='' | color:colorinverse; | color:#ffffff; |
tqc.s.d | type='success' effect='dark' | color:colorinverse; | color:#ffffff; |
tqc.s.di | type='success' effect='disabled' | color:colorinverse; | color:#ffffff; |
tqc.s.l | type='success' effect='light' | color:successnormal; | color:#19be6b; |
tqc.s.l.red or tqc.e..red or c.red | type='success' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
tqc.p | type='primary' effect='' | color:colorinverse; | color:#ffffff; |
tqc.p.d | type='primary' effect='dark' | color:colorinverse; | color:#ffffff; |
tqc.p.di | type='primary' effect='disabled' | color:colorinverse; | color:#ffffff; |
tqc.p.l | type='primary' effect='light' | color:primarynormal; | color:#2979ff; |
tqc.p.l.red or tqc.e..red or c.red | type='primary' effect='light' color:red | color:red; | 自定义颜色覆盖主题 |
圆角主题
css | 说明 | style | 备注 |
---|---|---|---|
tdr | size='' 等同于 size='medium' | border-radius:radiusmedium; | border-radius:16rpx; |
tdr.mi | size='mini' | border-radius:radiusmini; | border-radius:8rpx; |
tdr.s | size='small' | border-radius:radiussmall; | border-radius:12rpx; |
tdr.m | size='medium'(默认值) | border-radius:radiusmedium; | border-radius:16rpx; |
tdr.l | size='large' | border-radius:radiuslarge; | border-radius:20rpx; |
tdr.l.30 tdr.l.15px r.25 | size='large' size=30 | border-radius:30rpx; border-radius:15px; border-radius:25rpx; | 自定义字体大小覆盖主题 |
tdr.l..u | size='large' option='u'(左上角) | border-top-left-radius:radiuslarge; | border-top-left-radius:20rpx; |
tdr.l..r | size='large' option='r'(右上角) | border-top-right-radius:radiuslarge; | border-top-left-radius:20rpx; |
tdr.l..b | size='large' option='b'(右下角) | border-bottom-right-radius:radiuslarge; | border-top-left-radius:20rpx; |
tdr.l..l | size='large' option='l'(左下角) | border-bottom-left-radius:radiuslarge; | border-top-left-radius:20rpx; |
tdr.l..ur ,tdr.l..bl ,tdr.l..ulr ,... | size='large' option='ur'(u r b l 可自由组合) | border-top-left-radius:radiuslarge;border-top-right-radius:radiuslarge; | border-top-left-radius:20rpx;border-top-right-radius:20rpx; |
外边距
css | 说明 | style | 备注 |
---|---|---|---|
tdm | size='' 等同于 size='medium' | margin:radiusmedium; | margin:16rpx; |
tdm.mi | size='mini' | margin:radiusmini; | margin:8rpx; |
tdm.s | size='small' | margin:radiussmall; | margin:12rpx; |
tdm.m | size='medium'(默认值) | margin:radiusmedium; | margin:16rpx; |
tdm.l | size='large' | margin:radiuslarge; | margin:20rpx; |
tdm.l.30 tdm.l.15px r.25 | size='large' size=30 | margin:30rpx; margin:15px; margin:25rpx; | 自定义字体大小覆盖主题 |
tdm.l..t | size='large' option='t' | margin-top:radiuslarge; | margin-top:20rpx; |
tdm.l..b | size='large' option='b' | margin-bottom:radiuslarge; | margin-top:20rpx; |
tdm.l..l | size='large' option='l' | margin-left:radiuslarge; | margin-left:20rpx; |
tdm.l..r | size='large' option='r' | margin-right:radiuslarge; | margin-right:20rpx; |
tdm.l..ur ,tdm.l..bl ,tdm.l..ulr ,... | size='large' option='ur'(t b l r 可自由组合) | margin-left:radiuslarge;margin-right:radiuslarge; | margin-left:20rpx;margin-right:20rpx; |
内边距
css | 说明 | style | 备注 |
---|---|---|---|
tdp | size='' 等同于 size='medium' | padding:radiusmedium; | padding:16rpx; |
tdp.mi | size='mini' | padding:radiusmini; | padding:8rpx; |
tdp.s | size='small' | padding:radiussmall; | padding:12rpx; |
tdp.m | size='medium'(默认值) | padding:radiusmedium; | padding:16rpx; |
tdp.l | size='large' | padding:radiuslarge; | padding:20rpx; |
tdp.l.30 tdp.l.15px r.25 | size='large' size=30 | padding:30rpx; padding:15px; padding:25rpx; | 自定义字体大小覆盖主题 |
tdp.l..t | size='large' option='t' | padding-top:radiuslarge; | padding-top:20rpx; |
tdp.l..b | size='large' option='b' | padding-bottom:radiuslarge; | padding-top:20rpx; |
tdp.l..l | size='large' option='l' | padding-left:radiuslarge; | padding-left:20rpx; |
tdp.l..r | size='large' option='r' | padding-right:radiuslarge; | padding-right:20rpx; |
tdp.l..ur ,tdp.l..bl ,tdp.l..ulr ,... | size='large' option='ur'(t b l r 可自由组合) | padding-left:radiuslarge;padding-right:radiuslarge; | padding-left:20rpx;padding-right:20rpx; |
边框
css | 说明 | style | 备注 |
---|---|---|---|
tbc | type='' effect='' | border:1px solid borderlight | border:1px solid #E4E7ED; |
tbc.i | type='info' effect='normal' | border:1px solid infonormal | border:1px solid #909399; |
tbc.i.d | type='info' effect='dark' | border:1px solid infodark | border:1px solid #82848a; |
tbc.i.di | type='info' effect='disabled' | border:1px solid infodisabled | border:1px solid #c8c9cc; |
tbc.i.l | type='info' effect='light' | border:1px solid infolight | border:1px solid #f4f4f5; |
tbc.p | type='primary' effect='normal' | border:1px solid primarynormal | border:1px solid #2979ff; |
tbc.p.d | type='primary' effect='dark' | border:1px solid primarydark | border:1px solid #2b85e4; |
tbc.p.di | type='primary' effect='disabled' | border:1px solid primarydisabled | border:1px solid #a0cfff; |
tbc.p.l | type='primary' effect='light' | border:1px solid primarylight | border:1px solid #dcedff; |
tbc.s | type='success' effect='normal' | border:1px solid successnormal | border:1px solid #19be6b; |
tbc.s.d | type='success' effect='dark' | border:1px solid successdark | border:1px solid #18b566; |
tbc.s.di | type='success' effect='disabled' | border:1px solid successdisabled | border:1px solid #71d5a1; |
tbc.s.l | type='success' effect='light' | border:1px solid successlight | border:1px solid #DFEAE2; |
tbc.w | type='warning' effect='normal' | border:1px solid warningnormal | border:1px solid #ff9900; |
tbc.w.d | type='warning' effect='dark' | border:1px solid warningdark | border:1px solid #f29100; |
tbc.w.di | type='warning' effect='disabled' | border:1px solid warningdisabled | border:1px solid #fcbd71; |
tbc.w.l | type='warning' effect='light' | border:1px solid warninglight | border:1px solid #fff1dd; |
tbc.e | type='error' effect='normal' | border:1px solid errornormal | border:1px solid #fa3534; |
tbc.e.d | type='error' effect='dark' | border:1px solid errordark | border:1px solid #dd6161; |
tbc.e.di | type='error' effect='disabled' | border:1px solid errordisabled | border:1px solid #fab6b6; |
tbc.e.l | type='error' effect='light' | border:1px solid errorlight | border:1px solid #ffe0e0; |
tbc.e.l.red or tbc...red or bc.red | type='error' effect='light' color='red' | border:1px solid red; | 自定义边框颜色覆盖主题色 |
tbc.e.l..l | type='error' effect='light' color='red' option='l' | border-left:1px solid red; | |
tbc.e.l..r | type='error' effect='light' color='red' option='l' | border-right:1px solid red; | |
tbc.e.l..t | type='error' effect='light' color='red' option='l' | border-top:1px solid red; | |
tbc.e.l..b | type='error' effect='light' color='red' option='l' | border-bottom:1px solid red; | |
tbc.e.l..tb tbc.e.l..lr tbc.e.l..ltb | type='error' effect='light' color='red' option='l' | border-bottom:1px solid red; | 第四个参数为方向可自由组合 |
文本主题尺寸
css | 说明 | style | 备注 |
---|---|---|---|
tts | size='medium'(默认值) | font-size:sizemedium; | font-size:28rpx; |
tts.mi | size='mini' | font-size:sizemedium; | font-size:22rpx; |
tts.s | size='sizesmall' | font-size:sizemedium; | font-size:24rpx; |
tts.m | size='medium' | font-size:sizemedium; | font-size:28rpx; |
tts.l | size='sizelarge' | font-size:sizemedium; | font-size:36rpx; |
tts.l.30 tts.l.15px s.18 | size='sizelarge' default=30 | font-size:30rpx; font-size:15px; font-size:18rpx; | 自定义字体大小覆盖主题大小 |
页面背景
css | 说明 | style | 备注 |
---|---|---|---|
tpg | background-color:bgcolorpage; | background-color:#f8f8f8; |
元素背景
css | 说明 | style | 备注 |
---|---|---|---|
tvg | background-color:bgcolorview; | background-color:#ffffff; |