123456789101112131415161718192021222324252627282930313233343536373839404142 |
- export default {
- data() {
- return {
- sliderRect: {},
- info: {
- width: null,
- left: null,
- step: this.step,
- disabled: this.disabled,
- min: this.min,
- max: this.max,
- value: this.value
- }
- }
- },
- mounted() {
- this.init()
- },
- methods: {
- init() {
- this.getSliderRect()
- },
-
- getSliderRect() {
-
- uni.$u.sleep().then(() => {
- this.$uGetRect('.u-slider').then((rect) => {
- this.info.width = rect.width
- this.info.left = rect.left
- })
- })
- },
-
- updateValue(value) {
- this.$emit('input', value)
- },
-
- emitEvent(e) {
- this.$emit(e.event, e.value ? e.value : this.value)
- }
- }
- }
|