You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
10 KiB
1 lines
10 KiB
{"version":3,"sources":["webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/region-picker/region-picker.vue?befa","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/region-picker/region-picker.vue?c183","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/region-picker/region-picker.vue?daae","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/region-picker/region-picker.vue?e39b","uni-app:///components/region-picker/region-picker.vue"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4I;AAC5I;AACiE;AACL;;;AAG5D;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,mFAAM;AACR,EAAE,0GAAM;AACR,EAAE,mHAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,8GAAU;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;AAA20B,CAAgB,2yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;ACQ/1B,+F;;;;;;;eACA,EACA,oBADA,EAEA,SACA,4DADA,EAEA,2CAFA,EAGA;AACA,6CAJA,EAKA,wCALA,EAFA;;AASA,MATA,kBASA;AACA;AACA,mBADA;AAEA,yBAFA;AAGA,eAHA;AAIA,oBAJA;;AAMA,GAhBA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA,KALA,MAKA;AACA;AACA,0BADA;AAEA;AACA;AACA;AACA;AACA;AACA,SAPA;;AASA,KAVA,MAUA;AACA;AACA,uCADA;AAEA;AACA;AACA;AACA,GAvCA;AAwCA;AACA;AACA;AACA;AACA;AACA;AACA,KANA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAhBA,EAxCA;;AA0DA;AACA,gBADA,0BACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aANA;AAOA,WARA;AASA,SAVA;AAWA;AACA,OAbA,MAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAJA;AAKA;AACA,aATA;AAUA;AACA,SAdA;AAeA;AACA,OAjBA,MAiBA;AACA;AACA;AACA,KA3CA;AA4CA,aA5CA,uBA4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAFA;AAGA;AACA,WAPA;AAQA;AACA,OAZA;AAaA;AACA,KA5DA;AA6DA,iBA7DA,yBA6DA,CA7DA,EA6DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA3EA;AA4EA,qBA5EA,6BA4EA,CA5EA,EA4EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAvFA;AAwFA,iBAxFA,yBAwFA,CAxFA,EAwFA;AACA;AACA,KA1FA,EA1DA,E","file":"components/region-picker/region-picker.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./region-picker.vue?vue&type=template&id=d612b0d8&name=regionPicker&\"\nvar renderjs\nimport script from \"./region-picker.vue?vue&type=script&lang=js&\"\nexport * from \"./region-picker.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/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/region-picker/region-picker.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./region-picker.vue?vue&type=template&id=d612b0d8&name=regionPicker&\"","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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./region-picker.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./region-picker.vue?vue&type=script&lang=js&\"","<template name=\"regionPicker\">\n\t<view>\n\t <picker mode=\"multiSelector\" :range=\"range\" :value=\"dataValue\" :disabled=\"dataDisabled\" @change=\"region_change\" @columnchange=\"region_change_col\" @cancel=\"region_cancel\">\n\t\t\t<slot></slot>\n\t\t</picker>\n\t</view>\n</template>\n<script>\nimport zones_data from './region-picker.js';\nexport default {\n\tname: \"regionPicker\",\n\tprops: {\n\t\tvalue:{ type: [Array,String,Number], default: [0,0,0] },\n\t\tdisabled:{ type: Boolean, default: false },\n\t\t//like https://api.591tuangou.com/cache/region-picker.php\n\t\tjsonPath:{ type:String, default: null },\n\t\tjsonData:{ type:Array, default: null },\n\t},\n\tdata(){\n\t\treturn {\n\t\t\tdataValue:[],\n\t\t\tdataDisabled:false,\n\t\t\trange:[],\n\t\t\tzones_tree:[],\n\t\t}\n\t},\n\tmounted:function(e){\n\t\tif(this.jsonData){\n\t\t\tthis.zones_tree=this.jsonData;\n\t\t\tthis.dataDisabled=this.disabled;\n\t\t\tthis.value_format();\n\t\t\tthis.range_set();\n\t\t}else if(this.jsonPath){\n\t\t\tuni.request({\n\t\t\t\turl:this.jsonPath,\n\t\t\t\tsuccess:res=>{\n\t\t\t\t\tthis.zones_tree=res.data;\n\t\t\t\t\tthis.dataDisabled=this.disabled;\n\t\t\t\t\tthis.value_format();\n\t\t\t\t\tthis.range_set();\n\t\t\t\t}\n\t\t\t})\n\t\t}else{\n\t\t\tthis.zones_tree=zones_data.zones_tree,\n\t\t\tthis.dataDisabled=this.disabled;\n\t\t\tthis.value_format();\n\t\t\tthis.range_set();\n\t\t}\n\t},\n\twatch:{\n\t\tjsonData:function (nv,ov){\n\t\t\tthis.zones_tree=nv;\n\t\t\tthis.dataDisabled=this.disabled;\n\t\t\tthis.value_format();\n\t\t\tthis.range_set();\n\t\t},\n\t\tvalue:function (nv,ov){\n\t\t\tif(JSON.stringify(nv)!=JSON.stringify(ov)){\n\t\t\t\tif(typeof(nv)!='object' && typeof(ov)=='object' && ov[2]+''!=nv+''){\n\t\t\t\t\tthis.value=nv;\n\t\t\t\t\tthis.value_format();\n\t\t\t\t\tthis.range_set();\n\t\t\t\t\tthis.region_change({detail:{value:this.dataValue}})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tmethods: {\n\t\tvalue_format(){\n\t\t\tvar value=this.value;\n\t\t\tif(typeof(value)=='number'){\n\t\t\t\tvalue=value+'';\n\t\t\t}\n\t\t\tif(typeof(value)=='string' && value.indexOf(',')>0){\n\t\t\t\tvalue=value.split(',');\n\t\t\t}\n\t\t\tvar sk=0,ck=0,zk=0;\n\t\t\tif(typeof(value)=='string'){\n\t\t\t\tthis.zones_tree.forEach((sv,si)=>{\n\t\t\t\t\tsv.children.forEach((cv,ci)=>{\n\t\t\t\t\t\tcv.children.forEach((zv,zi)=>{\n\t\t\t\t\t\t\tif(zv.code==value){\n\t\t\t\t\t\t\t\tsk=si;\n\t\t\t\t\t\t\t\tck=ci;\n\t\t\t\t\t\t\t\tzk=zi;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\tthis.dataValue=[sk,ck,zk];\n\t\t\t}else if(typeof(value[0])=='string' || value[0]>999){\n\t\t\t\tthis.zones_tree.forEach((sv,si)=>{\n\t\t\t\t\tif(sv.code==value[0]){\n\t\t\t\t\t\tsk=si;\n\t\t\t\t\t\tsv.children.forEach((cv,ci)=>{\n\t\t\t\t\t\t\tif(cv.code==value[1]){\n\t\t\t\t\t\t\t\tck=ci;\n\t\t\t\t\t\t\t\tcv.children.forEach((zv,zi)=>{\n\t\t\t\t\t\t\t\t\tif(zv.code==value[2]){\n\t\t\t\t\t\t\t\t\t\tzk=zi;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.dataValue=[sk,ck,zk];\n\t\t\t}else{\n\t\t\t\tthis.dataValue=value;\n\t\t\t}\n\t\t},\n\t\trange_set() {\n\t\t\tvar zones_ary=[[],[],[]];\n\t\t\tthis.zones_tree.forEach((sv,si)=>{\n\t\t\t\tzones_ary[0].push(sv.name);\n\t\t\t\tif(si==this.dataValue[0]){\n\t\t\t\t\tsv.children.forEach((cv,ci)=>{\n\t\t\t\t\t\tzones_ary[1].push(cv.name);\n\t\t\t\t\t\tif(ci==this.dataValue[1]){\n\t\t\t\t\t\t\tcv.children.forEach((zv,zi)=>{\n\t\t\t\t\t\t\t\tzones_ary[2].push(zv.name);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.range=zones_ary;\n\t\t},\n\t\tregion_change(e){\n\t\t\tvar v=e.detail.value;\n\t\t\tvar value=[],code=[]\n\t\t\tvar sv=this.zones_tree[v[0]]\n\t\t\tvalue.push(sv.name)\n\t\t\tcode.push(sv.code)\n\t\t\tvar cv=sv.children[v[1]];\n\t\t\tvalue.push(cv.name)\n\t\t\tcode.push(cv.code)\n\t\t\tvar zv=cv.children[v[2]];\n\t\t\tvalue.push(zv.name)\n\t\t\tcode.push(zv.code)\n\t\t\te.detail={code:code,value:value,data:zv}\n\t\t\tthis.$emit('change',e)\n\t\t},\n\t\tregion_change_col(e){\n\t\t\tif (e.detail.column === 0) { \n\t\t\t\tthis.dataValue[1] = 0; \n\t\t\t\tthis.dataValue[2] = 0; \n\t\t\t} \n\t\t\tif (e.detail.column === 1) { \n\t\t\t\tthis.dataValue[2] = 0; \n\t\t\t} \n\t\t\tthis.dataValue[e.detail.column]=e.detail.value\n\t\t\tthis.range_set();\n\t\t\tthis.$emit('columnchange',e)\n\t\t},\n\t\tregion_cancel(e){\n\t\t\tthis.$emit('cancel',e)\n\t\t},\n\t}\n}\n</script>\n<style>\n</style>"],"sourceRoot":""} |