1 |
- {"version":3,"sources":["webpack:///G:/item/appBase/components/wangding-pickerAddress/wangding-pickerAddress.vue?7d8f","webpack:///G:/item/appBase/components/wangding-pickerAddress/wangding-pickerAddress.vue?ef34","webpack:///G:/item/appBase/components/wangding-pickerAddress/wangding-pickerAddress.vue?bbf7","webpack:///G:/item/appBase/components/wangding-pickerAddress/wangding-pickerAddress.vue?4567","uni-app:///components/wangding-pickerAddress/wangding-pickerAddress.vue"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmI;AACnI;AAC0E;AACL;;;AAGrE;AAC2K;AAC3K,gBAAgB,oLAAU;AAC1B,EAAE,4FAAM;AACR,EAAE,iGAAM;AACR,EAAE,0GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA8oB,CAAgB,mqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACOlqB,8E;;;;;;AACA,6B,eAEA,EACA,IADA,kBACA,CACA,SACA,gBADA;AAEA,eAFA;AAGA,cAHA;;AAKA,GAPA;AAQA,SARA,qBAQA;AACA;AACA,GAVA;AAWA;AACA;AACA,cAFA,wBAEA;AACA;AAAA,OACA,iBADA,GACA;AADA,OAEA,YAFA,GADA,CAGA;AACA,KANA;AAOA;AACA,gBARA,wBAQA,CARA,EAQA;AACA;AAAA,OACA,gBADA,GACA;AADA,OAEA,iBAFA,GAEA;AAFA,OAGA,YAHA,GADA,CAIA;AACA,KAbA;;AAeA;;;AAGA,oBAlBA,8BAkBA;AACA;AACA;AACA;AACA,wBADA;;AAGA,OAJA;AAKA;AACA;AACA,wBADA;;AAGA,OAJA;AAKA;AACA;AACA,mBADA;;AAGA,OAJA;AAKA;AACA,KApCA;;AAsCA;;;AAGA,qBAzCA,6BAyCA,MAzCA,EAyCA,KAzCA,EAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KArDA;;AAuDA;;;AAGA,qBA1DA,+BA0DA;AACA;AACA;AACA;AACA;AACA,KA/DA;;AAiEA;;;AAGA,oBApEA,4BAoEA,CApEA,EAoEA;AACA;AACA,yBADA;AAEA,uBAFA;;AAIA;AACA,KA1EA,EAXA,E","file":"components/wangding-pickerAddress/wangding-pickerAddress.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./wangding-pickerAddress.vue?vue&type=template&id=6cabdd04&\"\nvar renderjs\nimport script from \"./wangding-pickerAddress.vue?vue&type=script&lang=js&\"\nexport * from \"./wangding-pickerAddress.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/wangding-pickerAddress/wangding-pickerAddress.vue\"\nexport default component.exports","export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./wangding-pickerAddress.vue?vue&type=template&id=6cabdd04&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./wangding-pickerAddress.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./wangding-pickerAddress.vue?vue&type=script&lang=js&\"","<template>\r\n\t<picker @change=\"bindPickerChange\" @columnchange=\"columnchange\" :range=\"array\" range-key=\"name\" :value=\"value\" mode=\"multiSelector\">\r\n\t\t<slot></slot>\r\n\t</picker>\r\n</template>\r\n\r\n<script>\r\n\timport AllAddress from './data.js'\r\n\tlet selectVal = ['','',''];\r\n\t\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn{\r\n\t\t\t\tvalue: [0,0,0],\r\n\t\t\t\tarray: [],\r\n\t\t\t\tindex: 0\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreated() {\r\n\t\t\tthis.initSelect()\r\n\t\t},\r\n\t\tmethods:{\r\n\t\t\t// 初始化地址选项\r\n\t\t\tinitSelect() {\r\n\t\t\t\tthis.updateSourceDate() // 更新源数据\r\n\t\t\t\t.updateAddressDate() // 更新结果数据\r\n\t\t\t\t.$forceUpdate() // 触发双向绑定\r\n\t\t\t},\r\n\t\t\t// 地址控件改变控件\r\n\t\t\tcolumnchange(d) {\r\n\t\t\t\tthis.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引\r\n\t\t\t\t.updateSourceDate() // 更新源数据\r\n\t\t\t\t.updateAddressDate() // 更新结果数据\r\n\t\t\t\t.$forceUpdate() // 触发双向绑定\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * 更新源数据\r\n\t\t\t * */\r\n\t\t\tupdateSourceDate() {\r\n\t\t\t\tthis.array = []\r\n\t\t\t\tthis.array[0] = AllAddress.map(obj => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tname: obj.name\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\tthis.array[1] = AllAddress[this.value[0]].city.map(obj => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tname: obj.name\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\tthis.array[2] = AllAddress[this.value[0]].city[this.value[1]].area.map(obj => { \r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tname: obj\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\treturn this\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * 更新索引\r\n\t\t\t * */\r\n\t\t\tupdateSelectIndex(column, value){\r\n\t\t\t\tlet arr = JSON.parse(JSON.stringify(this.value)) \r\n\t\t\t\tarr[column] = value\r\n\t\t\t\tif(column === 0 ) {\r\n\t\t\t\t\tarr[1] = 0\r\n\t\t\t\t\tarr[2] = 0\r\n\t\t\t\t}\r\n\t\t\t\tif(column === 1 ) {\r\n\t\t\t\t\tarr[2] = 0\r\n\t\t\t\t}\r\n\t\t\t\tthis.value = arr\r\n\t\t\t\treturn this\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * 更新结果数据 \r\n\t\t\t * */\r\n\t\t\tupdateAddressDate() {\r\n\t\t\t\tselectVal[0] = this.array[0][this.value[0]].name\r\n\t\t\t\tselectVal[1] = this.array[1][this.value[1]].name \r\n\t\t\t\tselectVal[2] = this.array[2][this.value[2]].name \r\n\t\t\t\treturn this\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * 点击确定\r\n\t\t\t * */\r\n\t\t\tbindPickerChange(e) {\r\n\t\t\t\tthis.$emit('change', {\r\n\t\t\t\t\tindex: this.value,\r\n\t\t\t\t\tdata: selectVal\r\n\t\t\t\t})\r\n\t\t\t\treturn this\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n</style>\r\n"],"sourceRoot":""}
|