换ubuntu
This commit is contained in:
2
utils/dist/progress/index.d.ts
vendored
2
utils/dist/progress/index.d.ts
vendored
@@ -1 +1 @@
|
||||
export {};
|
||||
export {};
|
||||
|
||||
76
utils/dist/progress/index.js
vendored
76
utils/dist/progress/index.js
vendored
@@ -1,38 +1,38 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { BLUE } from '../common/color';
|
||||
import { addUnit } from '../common/utils';
|
||||
VantComponent({
|
||||
props: {
|
||||
inactive: Boolean,
|
||||
percentage: Number,
|
||||
pivotText: String,
|
||||
pivotColor: String,
|
||||
trackColor: String,
|
||||
showPivot: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
value: BLUE
|
||||
},
|
||||
textColor: {
|
||||
type: String,
|
||||
value: '#fff'
|
||||
},
|
||||
strokeWidth: {
|
||||
type: null,
|
||||
observer: 'setStrokeWidthUnit'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
strokeWidthUnit: '4px'
|
||||
},
|
||||
methods: {
|
||||
setStrokeWidthUnit(val) {
|
||||
this.setData({
|
||||
strokeWidthUnit: addUnit(val)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
import { VantComponent } from '../common/component';
|
||||
import { BLUE } from '../common/color';
|
||||
import { addUnit } from '../common/utils';
|
||||
VantComponent({
|
||||
props: {
|
||||
inactive: Boolean,
|
||||
percentage: Number,
|
||||
pivotText: String,
|
||||
pivotColor: String,
|
||||
trackColor: String,
|
||||
showPivot: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
value: BLUE
|
||||
},
|
||||
textColor: {
|
||||
type: String,
|
||||
value: '#fff'
|
||||
},
|
||||
strokeWidth: {
|
||||
type: null,
|
||||
observer: 'setStrokeWidthUnit'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
strokeWidthUnit: '4px'
|
||||
},
|
||||
methods: {
|
||||
setStrokeWidthUnit(val) {
|
||||
this.setData({
|
||||
strokeWidthUnit: addUnit(val)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
6
utils/dist/progress/index.json
vendored
6
utils/dist/progress/index.json
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
|
||||
38
utils/dist/progress/index.wxml
vendored
38
utils/dist/progress/index.wxml
vendored
@@ -1,19 +1,19 @@
|
||||
<wxs src="./index.wxs" module="getters" />
|
||||
|
||||
<view
|
||||
class="van-progress custom-class"
|
||||
style="height: {{ strokeWidthUnit }}; {{ trackColor ? 'background: ' + trackColor : '' }}"
|
||||
>
|
||||
<view
|
||||
class="van-progress__portion"
|
||||
style="width: {{ percentage }}%; background: {{ inactive ? '#cacaca' : color }}"
|
||||
>
|
||||
<view
|
||||
wx:if="{{ showPivot && getters.text(pivotText, percentage) }}"
|
||||
style="color: {{ textColor }}; background: {{ pivotColor ? pivotColor : inactive ? '#cacaca' : color }}"
|
||||
class="van-progress__pivot"
|
||||
>
|
||||
{{ getters.text(pivotText, percentage) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wxs src="./index.wxs" module="getters" />
|
||||
|
||||
<view
|
||||
class="van-progress custom-class"
|
||||
style="height: {{ strokeWidthUnit }}; {{ trackColor ? 'background: ' + trackColor : '' }}"
|
||||
>
|
||||
<view
|
||||
class="van-progress__portion"
|
||||
style="width: {{ percentage }}%; background: {{ inactive ? '#cacaca' : color }}"
|
||||
>
|
||||
<view
|
||||
wx:if="{{ showPivot && getters.text(pivotText, percentage) }}"
|
||||
style="color: {{ textColor }}; background: {{ pivotColor ? pivotColor : inactive ? '#cacaca' : color }}"
|
||||
class="van-progress__pivot"
|
||||
>
|
||||
{{ getters.text(pivotText, percentage) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
10
utils/dist/progress/index.wxs
vendored
10
utils/dist/progress/index.wxs
vendored
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
text: function(pivotText, percentage) {
|
||||
return pivotText || percentage + '%';
|
||||
}
|
||||
};
|
||||
module.exports = {
|
||||
text: function(pivotText, percentage) {
|
||||
return pivotText || percentage + '%';
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user