feat:转账插件
This commit is contained in:
@@ -1,31 +1,34 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 标题
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.title
|
||||
},
|
||||
// 描述文本
|
||||
desc: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.desc
|
||||
},
|
||||
// 图标大小
|
||||
iconSize: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.iconSize
|
||||
},
|
||||
// 当前步骤是否处于失败状态
|
||||
error: {
|
||||
type: Boolean,
|
||||
default: () => defProps.stepsItem.error
|
||||
},
|
||||
// 自定义样式
|
||||
itemStyle: {
|
||||
type: [Object],
|
||||
default: {}
|
||||
},
|
||||
}
|
||||
})
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import StepsItemDefaultProps from './stepsItem'
|
||||
import { registerComponentProps } from '../../libs/config/props.js'
|
||||
|
||||
const defProps = registerComponentProps(StepsItemDefaultProps)
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 标题
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.title
|
||||
},
|
||||
// 描述文本
|
||||
desc: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.desc
|
||||
},
|
||||
// 图标大小
|
||||
iconSize: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.stepsItem.iconSize
|
||||
},
|
||||
// 当前步骤是否处于失败状态
|
||||
error: {
|
||||
type: Boolean,
|
||||
default: () => defProps.stepsItem.error
|
||||
},
|
||||
// 自定义样式
|
||||
itemStyle: {
|
||||
type: [Object],
|
||||
default: {}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:12:55
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/stepsItem.js
|
||||
*/
|
||||
export default {
|
||||
// steps-item组件
|
||||
stepsItem: {
|
||||
title: '',
|
||||
desc: '',
|
||||
iconSize: 17,
|
||||
error: false
|
||||
}
|
||||
}
|
||||
/*
|
||||
* @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/stepsItem.js
|
||||
*/
|
||||
export default {
|
||||
// steps-item组件
|
||||
stepsItem: {
|
||||
title: '',
|
||||
desc: '',
|
||||
iconSize: 17,
|
||||
error: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,34 +12,42 @@
|
||||
|
||||
</view>
|
||||
<view class="u-steps-item__wrapper__icon" v-else-if="parentData.activeIcon || parentData.inactiveIcon">
|
||||
<u-icon :name="index <= parentData.current ? parentData.activeIcon : parentData.inactiveIcon"
|
||||
<up-icon :name="index <= parentData.current ? parentData.activeIcon : parentData.inactiveIcon"
|
||||
:size="iconSize"
|
||||
:color="index <= parentData.current ? parentData.activeColor : parentData.inactiveColor">
|
||||
</u-icon>
|
||||
</up-icon>
|
||||
</view>
|
||||
<view v-else :style="{
|
||||
backgroundColor: statusClass === 'process' ? parentData.activeColor : 'transparent',
|
||||
borderColor: statusColor
|
||||
}" class="u-steps-item__wrapper__circle">
|
||||
<text v-if="statusClass === 'process' || statusClass === 'wait'"
|
||||
class="u-steps-item__wrapper__circle__text" :style="{
|
||||
color: index == parentData.current ? '#ffffff' : parentData.inactiveColor
|
||||
}">{{ index + 1}}</text>
|
||||
<u-icon v-else :color="statusClass === 'error' ? 'error' : parentData.activeColor" size="12"
|
||||
:name="statusClass === 'error' ? 'close' : 'checkmark'"></u-icon>
|
||||
<text v-if="statusClass === 'process' || statusClass === 'wait'"
|
||||
class="u-steps-item__wrapper__circle__text" :style="{
|
||||
color: index == parentData.current ? activeStepTextColor : parentData.inactiveColor
|
||||
}">{{ index + 1}}</text>
|
||||
<up-icon v-else :color="statusClass === 'error' ? 'error' : parentData.activeColor" size="12"
|
||||
:name="statusClass === 'error' ? 'close' : 'checkmark'"></up-icon>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="u-steps-item__content" :class="[`u-steps-item__content--${parentData.direction}`]"
|
||||
:style="[contentStyle]">
|
||||
<slot name="content">
|
||||
</slot>
|
||||
<view class="u-steps-item__content" :class="[`u-steps-item__content--${parentData.direction}`,
|
||||
parentData.current == index ? 'u-steps-item__content--current' : '']"
|
||||
:style="[contentStyle]">
|
||||
<slot name="content" :index="index">
|
||||
</slot>
|
||||
<template v-if="!$slots['content']">
|
||||
<up-text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px"
|
||||
:size="parentData.current == index ? 14 : 13"></up-text>
|
||||
<slot name="desc">
|
||||
<up-text :text="desc" type="tips" size="12"></up-text>
|
||||
</slot>
|
||||
<view class="u-steps-item__content__title">
|
||||
<slot name="title">
|
||||
</slot>
|
||||
<up-text v-if="!$slots['title']" :text="title" lineHeight="20px"
|
||||
:type="parentData.current == index ? 'main' : 'content'"
|
||||
:size="parentData.current == index ? 14 : 13"></up-text>
|
||||
</view>
|
||||
<view class="u-steps-item__content__desc">
|
||||
<slot name="desc">
|
||||
</slot>
|
||||
<up-text v-if="!$slots['desc']" :text="desc" type="tips" size="12"></up-text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<!-- <view
|
||||
@@ -162,8 +170,8 @@
|
||||
}
|
||||
return colorTmp
|
||||
},
|
||||
contentStyle() {
|
||||
const style = {}
|
||||
contentStyle() {
|
||||
const style = {}
|
||||
if (this.parentData.direction === 'column') {
|
||||
style.marginLeft = this.parentData.dot ? '2px' : '6px'
|
||||
style.marginTop = this.parentData.dot ? '0px' : '6px'
|
||||
@@ -171,10 +179,13 @@
|
||||
style.marginTop = this.parentData.dot ? '2px' : '6px'
|
||||
style.marginLeft = this.parentData.dot ? '2px' : '6px'
|
||||
}
|
||||
|
||||
return style
|
||||
}
|
||||
},
|
||||
|
||||
return style
|
||||
},
|
||||
activeStepTextColor() {
|
||||
return this.upThemeVar('--up-white', '#ffffff')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.parent && this.parent.updateFromChild()
|
||||
sleep().then(() => {
|
||||
@@ -221,7 +232,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../libs/css/components.scss";
|
||||
|
||||
.u-steps-item {
|
||||
flex: 1;
|
||||
@@ -240,13 +250,13 @@
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
@include flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border-radius: 50px;
|
||||
&__wrapper {
|
||||
@include flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: var(--up-card-bg-color, #fff);
|
||||
border-radius: 50px;
|
||||
|
||||
&--column {
|
||||
width: 20px;
|
||||
@@ -307,6 +317,12 @@
|
||||
@include flex;
|
||||
flex: 1;
|
||||
|
||||
&__title {
|
||||
// #ifdef H5
|
||||
cursor: pointer;
|
||||
// #endif
|
||||
}
|
||||
|
||||
&--row {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user