WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-04-08 f969b32736ab60b141d076f7aeaafdbd9dc1c546
forms/chinaArea/CChinaArea.vue
@@ -35,7 +35,7 @@
import ChinaLocations from './ChinaLocations';
import './cChinaArea.scss';
const { locationTree, getRegionNames } = ChinaLocations;
const { onReady, getLocationTree, getRegionNames } = ChinaLocations;
export default {
    name: 'CChinaArea',
@@ -79,6 +79,7 @@
                    return;
                }
            }
            const locationTree = getLocationTree();
            const curVal = this.itemRes.formData[this.itemRes.name];
            const range = [
                locationTree,
@@ -123,6 +124,7 @@
            this.current = current;
        },
        updateColumns(roll) {
            const locationTree = getLocationTree();
            // 第一列滚动
            if (roll.column === 0) {
                const cities = locationTree[roll.value].children;
@@ -141,6 +143,7 @@
            }
        },
        handleChange(detail) {
            const locationTree = getLocationTree();
            const codes = [];
            const provice = locationTree[detail[0]];
            codes[0] = provice.value;
@@ -153,7 +156,9 @@
    },
    mounted() {
        if (process.env.TARO_ENV === 'weapp') {
            this.handleOpen();
            onReady(() => {
                this.handleOpen();
            });
        }
    },
};