换ubuntu

This commit is contained in:
asd
2019-12-23 14:13:27 +08:00
parent 2688882a3e
commit 888b4ee55c
485 changed files with 12277 additions and 12196 deletions

View File

@@ -1 +1 @@
export {};
export {};

View File

@@ -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)
});
}
}
});

View File

@@ -1,3 +1,3 @@
{
"component": true
}
{
"component": true
}

View File

@@ -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>

View File

@@ -1,5 +1,5 @@
module.exports = {
text: function(pivotText, percentage) {
return pivotText || percentage + '%';
}
};
module.exports = {
text: function(pivotText, percentage) {
return pivotText || percentage + '%';
}
};