WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2022-01-07 19fdb56f6e2d088b63d5e807974cff77de34799d
forms/numberStep/CNumberStep.vue
@@ -51,7 +51,7 @@
        // 取值范围
        range: {
            type: Array,
            default: [0, 100],
            default: () => [0, 100],
        },
        // 步长
        step: {
@@ -77,14 +77,15 @@
        handleChange(val) {
            // 奇偶修正模式
            if (this.correct) {
                const lastValue = this.itemRes.formData[this.itemRes.name];
                const lastValue =
                    this.itemRes.formData[this.itemRes.name] || this.range[0];
                let nextValue = val;
                if (
                    (this.correct === 'odd' && nextValue % 2 === 0) ||
                    (this.correct === 'even' && nextValue % 2 === 1)
                ) {
                    // 增加
                    if (lastValue < nextValue) {
                    if (lastValue <= nextValue) {
                        nextValue++;
                    }
                    // 减小
@@ -106,7 +107,7 @@
    mounted() {
        if (process.env.TARO_ENV === 'h5') {
            $(this.$refs.input.$el)
                .find('.at-input__input')
                .find('.at-input__container')
                .prepend(this.$refs.number.$el);
        } else if (process.env.TARO_ENV === 'weapp') {
            $(this.$refs.input.$el)