You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
746 B
33 lines
746 B
4 years ago
|
import { VantComponent } from '../common/component';
|
||
|
import { addUnit } from '../common/utils';
|
||
|
VantComponent({
|
||
|
props: {
|
||
|
color: String,
|
||
|
vertical: Boolean,
|
||
|
type: {
|
||
|
type: String,
|
||
|
value: 'circular'
|
||
|
},
|
||
|
size: {
|
||
|
type: String,
|
||
|
observer: 'setSizeWithUnit'
|
||
|
},
|
||
|
textSize: {
|
||
|
type: String,
|
||
|
observer: 'setTextSizeWithUnit'
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
setSizeWithUnit(size) {
|
||
|
this.setData({
|
||
|
sizeWithUnit: addUnit(size)
|
||
|
});
|
||
|
},
|
||
|
setTextSizeWithUnit(size) {
|
||
|
this.set({
|
||
|
textSizeWithUnit: addUnit(size)
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
});
|