| | |
| | | import ChinaLocations from './ChinaLocations'; |
| | | import './cChinaArea.scss'; |
| | | |
| | | const { locationTree, getRegionNames } = ChinaLocations; |
| | | const { onReady, getLocationTree, getRegionNames } = ChinaLocations; |
| | | |
| | | export default { |
| | | name: 'CChinaArea', |
| | |
| | | return; |
| | | } |
| | | } |
| | | const locationTree = getLocationTree(); |
| | | const curVal = this.itemRes.formData[this.itemRes.name]; |
| | | const range = [ |
| | | locationTree, |
| | |
| | | this.current = current; |
| | | }, |
| | | updateColumns(roll) { |
| | | const locationTree = getLocationTree(); |
| | | // 第一列滚动 |
| | | if (roll.column === 0) { |
| | | const cities = locationTree[roll.value].children; |
| | |
| | | } |
| | | }, |
| | | handleChange(detail) { |
| | | const locationTree = getLocationTree(); |
| | | const codes = []; |
| | | const provice = locationTree[detail[0]]; |
| | | codes[0] = provice.value; |
| | |
| | | }, |
| | | mounted() { |
| | | if (process.env.TARO_ENV === 'weapp') { |
| | | this.handleOpen(); |
| | | onReady(() => { |
| | | this.handleOpen(); |
| | | }); |
| | | } |
| | | }, |
| | | }; |