换ubuntu
This commit is contained in:
2
utils/dist/steps/index.d.ts
vendored
2
utils/dist/steps/index.d.ts
vendored
@@ -1 +1 @@
|
||||
export {};
|
||||
export {};
|
||||
|
||||
44
utils/dist/steps/index.js
vendored
44
utils/dist/steps/index.js
vendored
@@ -1,22 +1,22 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { GREEN } from '../common/color';
|
||||
VantComponent({
|
||||
props: {
|
||||
icon: String,
|
||||
steps: Array,
|
||||
active: Number,
|
||||
direction: {
|
||||
type: String,
|
||||
value: 'horizontal'
|
||||
},
|
||||
activeColor: {
|
||||
type: String,
|
||||
value: GREEN
|
||||
},
|
||||
activeIcon: {
|
||||
type: String,
|
||||
value: 'checked'
|
||||
},
|
||||
inactiveIcon: String
|
||||
}
|
||||
});
|
||||
import { VantComponent } from '../common/component';
|
||||
import { GREEN } from '../common/color';
|
||||
VantComponent({
|
||||
props: {
|
||||
icon: String,
|
||||
steps: Array,
|
||||
active: Number,
|
||||
direction: {
|
||||
type: String,
|
||||
value: 'horizontal'
|
||||
},
|
||||
activeColor: {
|
||||
type: String,
|
||||
value: GREEN
|
||||
},
|
||||
activeIcon: {
|
||||
type: String,
|
||||
value: 'checked'
|
||||
},
|
||||
inactiveIcon: String
|
||||
}
|
||||
});
|
||||
|
||||
12
utils/dist/steps/index.json
vendored
12
utils/dist/steps/index.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
|
||||
102
utils/dist/steps/index.wxml
vendored
102
utils/dist/steps/index.wxml
vendored
@@ -1,51 +1,51 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view class="custom-class {{ utils.bem('steps', [direction]) }}">
|
||||
<view class="van-step__wrapper">
|
||||
<view
|
||||
wx:for="{{ steps }}"
|
||||
wx:key="index"
|
||||
class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline"
|
||||
>
|
||||
<view class="van-step__title" style="{{ index === active ? 'color: ' + activeColor : '' }}">
|
||||
<view>{{ item.text }}</view>
|
||||
<view>{{ item.desc }}</view>
|
||||
</view>
|
||||
<view class="van-step__circle-container">
|
||||
<block wx:if="{{ index !== active }}">
|
||||
<van-icon
|
||||
wx:if="{{ inactiveIcon }}"
|
||||
color="#969799"
|
||||
name="{{ inactiveIcon }}"
|
||||
custom-class="van-step__icon"
|
||||
/>
|
||||
<view
|
||||
wx:else
|
||||
class="van-step__circle"
|
||||
style="{{ index < active ? 'background-color: ' + activeColor : '' }}"
|
||||
/>
|
||||
</block>
|
||||
|
||||
<van-icon wx:else name="{{ activeIcon }}" color="{{ activeColor }}" custom-class="van-step__icon" />
|
||||
</view>
|
||||
<view
|
||||
wx:if="{{ index !== steps.length - 1 }}"
|
||||
class="van-step__line" style="{{ index < active ? 'background-color: ' + activeColor : '' }}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<wxs module="status">
|
||||
function get(index, active) {
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
module.exports = get;
|
||||
</wxs>
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view class="custom-class {{ utils.bem('steps', [direction]) }}">
|
||||
<view class="van-step__wrapper">
|
||||
<view
|
||||
wx:for="{{ steps }}"
|
||||
wx:key="index"
|
||||
class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline"
|
||||
>
|
||||
<view class="van-step__title" style="{{ index === active ? 'color: ' + activeColor : '' }}">
|
||||
<view>{{ item.text }}</view>
|
||||
<view>{{ item.desc }}</view>
|
||||
</view>
|
||||
<view class="van-step__circle-container">
|
||||
<block wx:if="{{ index !== active }}">
|
||||
<van-icon
|
||||
wx:if="{{ inactiveIcon }}"
|
||||
color="#969799"
|
||||
name="{{ inactiveIcon }}"
|
||||
custom-class="van-step__icon"
|
||||
/>
|
||||
<view
|
||||
wx:else
|
||||
class="van-step__circle"
|
||||
style="{{ index < active ? 'background-color: ' + activeColor : '' }}"
|
||||
/>
|
||||
</block>
|
||||
|
||||
<van-icon wx:else name="{{ activeIcon }}" color="{{ activeColor }}" custom-class="van-step__icon" />
|
||||
</view>
|
||||
<view
|
||||
wx:if="{{ index !== steps.length - 1 }}"
|
||||
class="van-step__line" style="{{ index < active ? 'background-color: ' + activeColor : '' }}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<wxs module="status">
|
||||
function get(index, active) {
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
module.exports = get;
|
||||
</wxs>
|
||||
|
||||
Reference in New Issue
Block a user