feat:转账插件

This commit is contained in:
2026-07-23 14:31:06 +08:00
parent 4916546322
commit d5a6a16ea5
560 changed files with 71777 additions and 44216 deletions
@@ -1,51 +1,69 @@
import { defineMixin } from '../../libs/vue'
import defProps from '../../libs/config/props.js'
export const props = defineMixin({
props: {
// tab的数据
list: {
type: Array,
default: () => defProps.subsection.list
},
// 当前活动的tab的index
current: {
type: [String, Number],
default: () => defProps.subsection.current
},
// 激活的颜色
activeColor: {
type: String,
default: () => defProps.subsection.activeColor
},
// 未激活的颜色
inactiveColor: {
type: String,
default: () => defProps.subsection.inactiveColor
},
// 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
mode: {
type: String,
default: () => defProps.subsection.mode
},
// 字体大小
fontSize: {
type: [String, Number],
default: () => defProps.subsection.fontSize
},
// 激活tab的字体是否加粗
bold: {
type: Boolean,
default: () => defProps.subsection.bold
},
// mode = button时,组件背景颜色
bgColor: {
type: String,
default: () => defProps.subsection.bgColor
},
// 从list元素对象中读取的键名
keyName: {
type: String,
default: () => defProps.subsection.keyName
}
}
})
import {defineMixin} from '../../libs/vue'
import SubsectionDefaultProps from './subsection'
import { registerComponentProps } from '../../libs/config/props.js'
const defProps = registerComponentProps(SubsectionDefaultProps)
export const props = defineMixin({
props: {
// tab的数据
list: {
type: Array,
default: () => defProps.subsection.list
},
// 当前活动的tab的index
current: {
type: [String, Number],
default: () => defProps.subsection.current
},
// 激活的颜色
activeColor: {
type: String,
default: () => defProps.subsection.activeColor
},
// 未激活的颜色
inactiveColor: {
type: String,
default: () => defProps.subsection.inactiveColor
},
// 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
mode: {
type: String,
default: () => defProps.subsection.mode
},
// 字体大小
fontSize: {
type: [String, Number],
default: () => defProps.subsection.fontSize
},
// 激活tab的字体是否加粗
bold: {
type: Boolean,
default: () => defProps.subsection.bold
},
// mode = button时,组件背景颜色
bgColor: {
type: String,
default: () => defProps.subsection.bgColor
},
// 从list元素对象中读取的键名
keyName: {
type: String,
default: () => defProps.subsection.keyName
},
// 从`list`元素对象中读取激活时的颜色 如果存在字段 优先级大于 activeColor
activeColorKeyName: {
type: String,
default: () => defProps.subsection.activeColorKeyName
},
// 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor
inactiveColorKeyName: {
type: String,
default: () => defProps.subsection.inactiveColorKeyName
},
// 是否禁用
disabled: {
type: Boolean,
default: () => defProps.subsection.disabled
}
}
})
@@ -1,23 +1,26 @@
/*
* @Author : LQ
* @Description :
* @version : 1.0
* @Date : 2021-08-20 16:44:21
* @LastAuthor : LQ
* @lastTime : 2021-08-20 17:12:20
* @FilePath : /u-view2.0/uview-ui/libs/config/props/subsection.js
*/
export default {
// subsection组件
subsection: {
list: [],
current: 0,
activeColor: '#3c9cff',
inactiveColor: '#303133',
mode: 'button',
fontSize: 12,
bold: true,
bgColor: '#eeeeef',
keyName: 'name'
}
}
/*
* @Author : LQ
* @Description :
* @version : 3.0
* @Date : 2021-08-20 16:44:21
* @LastAuthor : jry
* @lastTime : 2025-12-19 08:55:21
* @FilePath : /uview-plus/libs/config/props/subsection.js
*/
export default {
// subsection组件
subsection: {
list: [],
current: 0,
activeColor: '#3c9cff',
inactiveColor: '#303133',
mode: 'button',
fontSize: 12,
bold: true,
bgColor: '#eeeeef',
keyName: 'name',
activeColorKeyName: 'activeColorKey',
inactiveColorKeyName: 'inactiveColorKey',
disabled: false,
}
}
@@ -0,0 +1,41 @@
:root,
page,
body {
--up-subsection-bg-color: #eeeeef;
--up-subsection-bar-color: #ffffff;
--up-subsection-inactive-color: #303133;
--up-subsection-disabled-text-color: #c8c9cc;
--up-subsection-disabled-border-color: #d4d4d4;
--up-subsection-disabled-bar-color: #f5f5f5;
}
@media (prefers-color-scheme: dark) {
:root,
page,
body {
--up-subsection-bg-color: #2b2c30;
--up-subsection-bar-color: #3a3b40;
--up-subsection-inactive-color: #d1d5db;
--up-subsection-disabled-text-color: #6b7280;
--up-subsection-disabled-border-color: #3a3a3c;
--up-subsection-disabled-bar-color: #3a3a3c;
}
}
[data-up-theme='light'] {
--up-subsection-bg-color: #eeeeef;
--up-subsection-bar-color: #ffffff;
--up-subsection-inactive-color: #303133;
--up-subsection-disabled-text-color: #c8c9cc;
--up-subsection-disabled-border-color: #d4d4d4;
--up-subsection-disabled-bar-color: #f5f5f5;
}
[data-up-theme='dark'] {
--up-subsection-bg-color: #2b2c30;
--up-subsection-bar-color: #3a3b40;
--up-subsection-inactive-color: #d1d5db;
--up-subsection-disabled-text-color: #6b7280;
--up-subsection-disabled-border-color: #3a3a3c;
--up-subsection-disabled-bar-color: #3a3a3c;
}
@@ -1,318 +1,458 @@
<template>
<view
class="u-subsection"
ref="u-subsection"
:class="[`u-subsection--${mode}`]"
:style="[addStyle(customStyle), wrapperStyle]"
>
<view
class="u-subsection__bar cursor-pointer"
ref="u-subsection__bar"
:style="[barStyle]"
:class="[
mode === 'button' && 'u-subsection--button__bar',
innerCurrent === 0 &&
mode === 'subsection' &&
'u-subsection__bar--first',
innerCurrent > 0 &&
innerCurrent < list.length - 1 &&
mode === 'subsection' &&
'u-subsection__bar--center',
innerCurrent === list.length - 1 &&
mode === 'subsection' &&
'u-subsection__bar--last',
]"
></view>
<view
class="u-subsection__item cursor-pointer"
:class="[
`u-subsection__item--${index}`,
index < list.length - 1 &&
'u-subsection__item--no-border-right',
index === 0 && 'u-subsection__item--first',
index === list.length - 1 && 'u-subsection__item--last',
]"
:ref="`u-subsection__item--${index}`"
:style="[itemStyle(index)]"
@tap="clickHandler(index)"
v-for="(item, index) in list"
:key="index"
>
<text
class="u-subsection__item__text"
:style="[textStyle(index)]"
>{{ getText(item) }}</text
>
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin("dom");
const animation = uni.requireNativePlugin("animation");
// #endif
import { props } from "./props.js";
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
import { addStyle, addUnit, sleep } from '../../libs/function/index';
/**
* Subsection 分段器
* @description 该分段器一般用于用户从几个选项中选择某一个的场景
* @tutorial https://ijry.github.io/uview-plus/components/subsection.html
* @property {Array} list tab的数据
* @property {String | Number} current 当前活动的tab的index(默认 0 )
* @property {String} activeColor 激活时的颜色(默认 '#3c9cff' )
* @property {String} inactiveColor 未激活时的颜色(默认 '#303133' )
* @property {String} mode 模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
* @property {String | Number} fontSize 字体大小,单位px(默认 12 )
* @property {Boolean} bold 激活选项的字体是否加粗(默认 true )
* @property {String} bgColor 组件背景颜色,mode为button时有效(默认 '#eeeeef' )
* @property {Object} customStyle 定义需要用到的外部样式
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
*
* @event {Function} change 分段器选项发生改变时触发 回调 index:选项的index索引值,从0开始
* @example <u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
*/
export default {
name: "u-subsection",
mixins: [mpMixin, mixin, props],
data() {
return {
// 组件尺寸
itemRect: {
width: 0,
height: 0,
},
innerCurrent: '',
windowResizeCallback: {}
};
},
watch: {
list(newValue, oldValue) {
this.init();
},
current: {
immediate: true,
handler(n) {
if (n !== this.innerCurrent) {
this.innerCurrent = n
}
// #ifdef APP-NVUE
// 在安卓nvue上,如果通过translateX进行位移,到最后一个时,会导致右侧无法绘制圆角
// 故用animation模块进行位移
const ref = this.$refs?.["u-subsection__bar"]?.ref;
// 不存在ref的时候(理解为第一次初始化时,需要渲染dom,进行一定延时再获取ref),这里的100ms是经过测试得出的结果(某些安卓需要延时久一点),勿随意修改
sleep(ref ? 0 : 100).then(() => {
animation.transition(this.$refs["u-subsection__bar"].ref, {
styles: {
transform: `translateX(${
n * this.itemRect.width
}px)`,
transformOrigin: "center center",
},
duration: 300,
});
});
// #endif
},
},
},
computed: {
wrapperStyle() {
const style = {};
// button模式时,设置背景色
if (this.mode === "button") {
style.backgroundColor = this.bgColor;
}
return style;
},
// 滑块的样式
barStyle() {
const style = {};
style.width = `${this.itemRect.width}px`;
style.height = `${this.itemRect.height}px`;
// 通过translateX移动滑块,其移动的距离为索引*item的宽度
// #ifndef APP-NVUE
style.transform = `translateX(${
this.innerCurrent * this.itemRect.width
}px)`;
// #endif
if (this.mode === "subsection") {
// 在subsection模式下,需要动态设置滑块的圆角,因为移动滑块使用的是translateX,无法通过父元素设置overflow: hidden隐藏滑块的直角
style.backgroundColor = this.activeColor;
}
return style;
},
// 分段器item的样式
itemStyle(index) {
return (index) => {
const style = {};
if (this.mode === "subsection") {
// 设置border的样式
style.borderColor = this.activeColor;
style.borderWidth = "1px";
style.borderStyle = "solid";
}
return style;
};
},
// 分段器文字颜色
textStyle(index) {
return (index) => {
const style = {};
style.fontWeight =
this.bold && this.innerCurrent === index ? "bold" : "normal";
style.fontSize = addUnit(this.fontSize);
// subsection模式下,激活时默认为白色的文字
if (this.mode === "subsection") {
style.color =
this.innerCurrent === index ? "#fff" : this.inactiveColor;
} else {
// button模式下,激活时文字颜色默认为activeColor
style.color =
this.innerCurrent === index
? this.activeColor
: this.inactiveColor;
}
return style;
};
},
},
mounted() {
this.init();
this.windowResizeCallback = (res) => {
this.init();
}
uni.onWindowResize(this.windowResizeCallback)
},
beforeUnmount() {
uni.offWindowResize(this.windowResizeCallback)
},
emits: ["change"],
methods: {
addStyle,
init() {
this.innerCurrent = this.current
sleep().then(() => this.getRect());
},
// 判断展示文本
getText(item) {
return typeof item === 'object' ? item[this.keyName] : item
},
// 获取组件的尺寸
getRect() {
// #ifndef APP-NVUE
this.$uGetRect(".u-subsection__item--0").then((size) => {
this.itemRect = size;
});
// #endif
// #ifdef APP-NVUE
const ref = this.$refs["u-subsection__item--0"][0];
ref &&
dom.getComponentRect(ref, (res) => {
this.itemRect = res.size;
});
// #endif
},
clickHandler(index) {
this.innerCurrent = index
this.$emit("change", index);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
.u-subsection {
@include flex;
position: relative;
overflow: hidden;
/* #ifndef APP-NVUE */
width: 100%;
box-sizing: border-box;
/* #endif */
&--button {
height: 34px;
background-color: rgb(238, 238, 239);
padding: 3px;
border-radius: 4px;
align-items: stretch;
&__bar {
background-color: #ffffff;
border-radius: 4px !important;
}
}
&--subsection {
height: 32px;
}
&__bar {
position: absolute;
/* #ifndef APP-NVUE */
transition-property: transform, color;
transition-duration: 0.3s;
transition-timing-function: ease-in-out;
/* #endif */
&--first {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
&--center {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
&--last {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
&__item {
@include flex;
flex: 1;
justify-content: center;
align-items: center;
// vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
position: relative;
&--no-border-right {
border-right-width: 0 !important;
}
&--first {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
&--last {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
&__text {
font-size: 12px;
line-height: 14px;
@include flex;
align-items: center;
transition-property: color;
transition-duration: 0.3s;
}
}
}
</style>
<template>
<view
class="u-subsection"
ref="u-subsection"
:class="[`u-subsection--${mode}`]"
:style="[addStyle(customStyle), wrapperStyle]"
>
<view
class="u-subsection__bar cursor-pointer"
ref="u-subsection__bar"
:style="[barStyle]"
:class="[
mode === 'button' && 'u-subsection--button__bar',
innerCurrent === 0 &&
mode === 'subsection' &&
'u-subsection__bar--first',
innerCurrent > 0 &&
innerCurrent < list.length - 1 &&
mode === 'subsection' &&
'u-subsection__bar--center',
innerCurrent === list.length - 1 &&
mode === 'subsection' &&
'u-subsection__bar--last',
]"
></view>
<view
class="u-subsection__item cursor-pointer"
:class="[
`u-subsection__item--${index}`,
index < list.length - 1 &&
'u-subsection__item--no-border-right',
index === 0 && 'u-subsection__item--first',
index === list.length - 1 && 'u-subsection__item--last',
getTextViewDisableClass(index),
]"
:ref="`u-subsection__item--${index}`"
:style="[itemStyle(index)]"
@tap="clickHandler(index)"
v-for="(item, index) in list"
:key="index"
>
<text
class="u-subsection__item__text"
:class="[disabled ? 'u-subsection--disabled' : '']"
:style="[textStyle(index,item)]"
>{{ getText(item) }}</text
>
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin("dom");
const animation = uni.requireNativePlugin("animation");
// #endif
import { props } from "./props.js";
import { mpMixin } from '../../libs/mixin/mpMixin';
import { mixin } from '../../libs/mixin/mixin';
import { addStyle, addUnit, sleep } from '../../libs/function/index';
/**
* Subsection 分段器
* @description 该分段器一般用于用户从几个选项中选择某一个的场景
* @tutorial https://uview-plus.jiangruyi.com/components/subsection.html
* @property {Array} list tab的数据
* @property {String | Number} current 当前活动的tab的index(默认 0 )
* @property {String} activeColor 激活时的颜色(默认 '#3c9cff' )
* @property {String} inactiveColor 未激活时的颜色(默认 '#303133' )
* @property {String} mode 模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
* @property {String | Number} fontSize 字体大小,单位px(默认 12 )
* @property {Boolean} bold 激活选项的字体是否加粗(默认 true )
* @property {String} bgColor 组件背景颜色,mode为button时有效(默认 '#eeeeef' )
* @property {Object} customStyle 定义需要用到的外部样式
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
* @property {String} activeColorKeyName 从`list`元素对象中读取激活时的颜色(默认 'activeColorKey' ) 如果存在字段 优先级大于 activeColor
* @property {String} inactiveColorKeyName 从`list`元素对象中读取未激活时的颜色 (默认 'inactiveColorKey' )如果存在字段 优先级大于 inactiveColor
* @property {Boolean} disabled 是否禁用分段器 (默认 false )
*
* @event {Function} change 分段器选项发生改变时触发 回调 index:选项的index索引值,从0开始
* @example <u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
*/
export default {
name: "u-subsection",
mixins: [mpMixin, mixin, props],
data() {
return {
// 组件尺寸
itemRect: {
width: 0,
height: 0,
},
innerCurrent: '',
windowResizeCallback: {}
};
},
watch: {
list(newValue, oldValue) {
this.init();
},
current: {
immediate: true,
handler(n) {
if (n !== this.innerCurrent) {
this.innerCurrent = Number(n)
}
// #ifdef APP-NVUE
// 在安卓nvue上,如果通过translateX进行位移,到最后一个时,会导致右侧无法绘制圆角
// 故用animation模块进行位移
const ref = this.$refs?.["u-subsection__bar"]?.ref;
// 不存在ref的时候(理解为第一次初始化时,需要渲染dom,进行一定延时再获取ref),这里的100ms是经过测试得出的结果(某些安卓需要延时久一点),勿随意修改
sleep(ref ? 0 : 100).then(() => {
animation.transition(this.$refs["u-subsection__bar"].ref, {
styles: {
transform: `translateX(${
n * this.itemRect.width
}px)`,
transformOrigin: "center center",
},
duration: 300,
});
});
// #endif
},
},
},
computed: {
isDarkMode() {
return this.$u?.theme?.mode === 'dark';
},
resolvedInactiveColor() {
if (this.upHasProp('inactiveColor')) return this.inactiveColor;
return this.upThemeVar(
'--up-subsection-inactive-color',
this.isDarkMode
? (this.$u?.color?.contentColor || '#d1d5db')
: '#303133'
);
},
resolvedButtonBgColor() {
if (this.upHasProp('bgColor')) return this.bgColor;
return this.upThemeVar(
'--up-subsection-bg-color',
this.isDarkMode ? '#2b2c30' : '#eeeeef'
);
},
resolvedButtonBarColor() {
if (this.disabled) {
return this.upThemeVar(
'--up-subsection-disabled-bar-color',
this.isDarkMode ? '#3a3a3c' : '#f5f5f5'
);
}
return this.upThemeVar(
'--up-subsection-bar-color',
this.isDarkMode ? '#3a3b40' : '#ffffff'
);
},
resolvedDisabledTextColor() {
return this.upThemeVar(
'--up-subsection-disabled-text-color',
this.isDarkMode
? (this.$u?.color?.lightColor || '#6b7280')
: '#c8c9cc'
);
},
resolvedDisabledBorderColor() {
return this.upThemeVar(
'--up-subsection-disabled-border-color',
this.isDarkMode
? (this.$u?.color?.borderColor || '#3a3a3c')
: '#d4d4d4'
);
},
wrapperStyle() {
const style = {};
// button模式时,设置背景色
if (this.mode === "button") {
style.backgroundColor = this.resolvedButtonBgColor;
}
return style;
},
// 滑块的样式
barStyle() {
const style = {};
style.width = `${this.itemRect.width}px`;
style.height = `${this.itemRect.height}px`;
// 通过translateX移动滑块,其移动的距离为索引*item的宽度
// #ifndef APP-NVUE
style.transform = `translateX(${
this.innerCurrent * this.itemRect.width
}px)`;
// #endif
if (this.mode === "subsection") {
// 在subsection模式下,需要动态设置滑块的圆角,因为移动滑块使用的是translateX,无法通过父元素设置overflow: hidden隐藏滑块的直角
style.backgroundColor = this.disabled
? this.resolvedDisabledBorderColor
: this.activeColor;
} else {
style.backgroundColor = this.resolvedButtonBarColor;
}
return style;
},
// 分段器item的样式
itemStyle(index) {
return (index) => {
const style = {};
if (this.mode === "subsection") {
// 设置border的样式
style.borderColor = this.disabled
? this.resolvedDisabledBorderColor
: this.activeColor;
style.borderWidth = "1px";
style.borderStyle = "solid";
}
return style;
};
},
// 分段器文字颜色
textStyle(index,item) {
return (index,item) => {
const style = {};
if (this.disabled) {
style.fontWeight = 'normal';
style.fontSize = addUnit(this.fontSize);
style.color = this.resolvedDisabledTextColor;
return style;
}
style.fontWeight =
this.bold && this.innerCurrent === index ? "bold" : "normal";
style.fontSize = addUnit(this.fontSize);
let activeColorTemp = null;
let inactiveColorTemp = null;
// 如果是对象并且设置了对应的背景色字段 则优先使用设置的字段
if(typeof item === 'object' && item[this.activeColorKeyName]){
activeColorTemp = item[this.activeColorKeyName];
}
if(typeof item === 'object' && item[this.inactiveColorKeyName]){
inactiveColorTemp = item[this.inactiveColorKeyName];
}
// subsection模式下,激活时默认为白色的文字
if (this.mode === "subsection") {
// 判断当前是否激活
if(this.innerCurrent === index){
// 判断当前是否有自定义的颜色
style.color = activeColorTemp ? activeColorTemp : '#FFF'
// style.color = activeColorTemp ? activeColorTemp : this.activeColor
}
else{
// 判断当前是否有自定义的颜色
style.color = inactiveColorTemp ? inactiveColorTemp : this.resolvedInactiveColor;
}
}
else {
// button模式下,激活时文字颜色默认为activeColor
if(this.innerCurrent === index){
// 判断当前是否有自定义的颜色
style.color = activeColorTemp ? activeColorTemp : this.activeColor
}
else{
// 判断当前是否有自定义的颜色
style.color = inactiveColorTemp ? inactiveColorTemp : this.resolvedInactiveColor;
}
}
return style;
};
},
},
mounted() {
this.init();
// #ifndef APP || MP-WEIXIN || MP-LARK|| MP-QQ || H5
this.windowResizeCallback = (res) => {
this.init();
}
uni.onWindowResize(this.windowResizeCallback)
// #endif
},
beforeUnmount() {
// #ifndef APP || MP-WEIXIN || MP-LARK|| MP-QQ || H5
uni.offWindowResize(this.windowResizeCallback)
// #endif
},
emits: ["change", "update:current"],
methods: {
addStyle,
init() {
this.innerCurrent = this.current
sleep().then(() => this.getRect());
},
// 判断展示文本
getText(item) {
return typeof item === 'object' ? item[this.keyName] : item
},
// 获取组件的尺寸
getRect() {
// #ifndef APP-NVUE
this.$uGetRect(".u-subsection__item--0").then((size) => {
this.itemRect = size;
});
// #endif
// #ifdef APP-NVUE
const ref = this.$refs["u-subsection__item--0"][0];
ref &&
dom.getComponentRect(ref, (res) => {
this.itemRect = res.size;
});
// #endif
},
clickHandler(index) {
// 防止某些平台 css 无法阻止点击事件 在此处拦截
if(this.disabled){
return
}
this.innerCurrent = index;
this.$emit('update:current', index);
this.$emit("change", index);
},
/**
* 获取当前文字区域的 class禁用样式
* @param index
*/
getTextViewDisableClass(index){
// 禁用状态下
if(this.disabled){
// 判断模式
if(this.mode === 'button'){
return 'item-button--disabled'
}
else{
return 'item-subsection--disabled'
}
}
return '';
}
},
};
</script>
<style lang="scss">
@import "./theme-vars.scss";
</style>
<style lang="scss" scoped>
.u-subsection {
@include flex;
position: relative;
overflow: hidden;
/* #ifndef APP-NVUE */
width: 100%;
box-sizing: border-box;
/* #endif */
&--button {
height: 34px;
background-color: rgb(238, 238, 239);
padding: 3px;
border-radius: 4px;
align-items: stretch;
&__bar {
background-color: #ffffff;
border-radius: 4px !important;
}
}
&--subsection {
height: 32px;
}
&__bar {
position: absolute;
/* #ifndef APP-NVUE */
transition-property: transform, color;
transition-duration: 0.3s;
transition-timing-function: ease-in-out;
/* #endif */
&--first {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
&--center {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
&--last {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
&__item {
@include flex;
flex: 1;
justify-content: center;
align-items: center;
// vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
position: relative;
&--no-border-right {
border-right-width: 0 !important;
}
&--first {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
&--last {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
&__text {
font-size: 12px;
line-height: 14px;
@include flex;
align-items: center;
transition-property: color;
transition-duration: 0.3s;
}
}
// 禁用标志
//
//&--subsectio--disabled{
// cursor: no-drop;
// background: #FFFFFF !important;
// color: #BDBDBD !important;
// border-color: #BDBDBD !important;
//}
//
//&--button--disabled{
// cursor: no-drop;
// color: #BDBDBD !important;
// border-color: #BDBDBD !important;
//}
}
.item-button--disabled{
cursor: no-drop;
}
.item-subsection--disabled{
cursor: no-drop;
background: transparent !important;
}
</style>