公司小程序
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.

31 lines
10 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/pick-regions/pick-regions"],{194:
/*!*********************************************************************************!*\
!*** D:/Uni-App/HBuilderProjects/Test/components/pick-regions/pick-regions.vue ***!
\*********************************************************************************/
/*! no static exports found */function(t,r,n){"use strict";n.r(r);var e=n(/*! ./pick-regions.vue?vue&type=template&id=32290738& */195),i=n(/*! ./pick-regions.vue?vue&type=script&lang=js& */197);for(var c in i)"default"!==c&&function(t){n.d(r,t,(function(){return i[t]}))}(c);var u,a=n(/*! ../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */11),o=Object(a["default"])(i["default"],e["render"],e["staticRenderFns"],!1,null,null,null,!1,e["components"],u);o.options.__file="components/pick-regions/pick-regions.vue",r["default"]=o.exports},195:
/*!****************************************************************************************************************!*\
!*** D:/Uni-App/HBuilderProjects/Test/components/pick-regions/pick-regions.vue?vue&type=template&id=32290738& ***!
\****************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */function(t,r,n){"use strict";n.r(r);var e=n(/*! -!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./pick-regions.vue?vue&type=template&id=32290738& */196);n.d(r,"render",(function(){return e["render"]})),n.d(r,"staticRenderFns",(function(){return e["staticRenderFns"]})),n.d(r,"recyclableRender",(function(){return e["recyclableRender"]})),n.d(r,"components",(function(){return e["components"]}))},196:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/Uni-App/HBuilderProjects/Test/components/pick-regions/pick-regions.vue?vue&type=template&id=32290738& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */function(t,r,n){"use strict";var e;n.r(r),n.d(r,"render",(function(){return i})),n.d(r,"staticRenderFns",(function(){return u})),n.d(r,"recyclableRender",(function(){return c})),n.d(r,"components",(function(){return e}));var i=function(){var t=this,r=t.$createElement;t._self._c},c=!1,u=[];i._withStripped=!0},197:
/*!**********************************************************************************************************!*\
!*** D:/Uni-App/HBuilderProjects/Test/components/pick-regions/pick-regions.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************/
/*! no static exports found */function(t,r,n){"use strict";n.r(r);var e=n(/*! -!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./pick-regions.vue?vue&type=script&lang=js& */198),i=n.n(e);for(var c in e)"default"!==c&&function(t){n.d(r,t,(function(){return e[t]}))}(c);r["default"]=i.a},198:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/Uni-App/HBuilderProjects/Test/components/pick-regions/pick-regions.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(t,r,n){"use strict";function e(t,r){return o(t)||a(t,r)||c(t,r)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,r){if(t){if("string"===typeof t)return u(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,r):void 0}}function u(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function a(t,r){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],e=!0,i=!1,c=void 0;try{for(var u,a=t[Symbol.iterator]();!(e=(u=a.next()).done);e=!0)if(n.push(u.value),r&&n.length===r)break}catch(o){i=!0,c=o}finally{try{e||null==a["return"]||a["return"]()}finally{if(i)throw c}}return n}}function o(t){if(Array.isArray(t))return t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=n(/*! ./regions.json */199),s={props:{defaultRegions:{type:Array,default:function(){return[]}},defaultRegionCode:{type:String},defaultRegion:[String,Array]},data:function(){return{cityArr:l[0].childs,districtArr:l[0].childs[0].childs,multiIndex:[0,0,0],isInitMultiArray:!0}},watch:{defaultRegion:{handler:function(t,r){Array.isArray(t)?(r=r||[],t.join("")!==r.join("")&&this.handleDefaultRegion(t)):t&&6==t.length?this.handleDefaultRegion(t):console.warn("defaultRegion非有效格式")},immediate:!0}},computed:{multiArray:function(){return this.pickedArr.map((function(t){return t.map((function(t){return t.name}))}))},pickedArr:function(){return this.isInitMultiArray?[l,l[0].childs,l[0].childs[0].childs]:[l,this.cityArr,this.districtArr]}},methods:{handleColumnChange:function(t){this.isInitMultiArray=!1;var r=this,n=t.detail.column,e=t.detail.value;r.multiIndex[n]=e;try{switch(n){case 0:if(0==l[r.multiIndex[0]].childs.length){r.cityArr=r.districtArr=[l[r.multiIndex[0]]];break}r.cityArr=l[r.multiIndex[0]].childs,r.districtArr=l[r.multiIndex[0]].childs[r.multiIndex[1]].childs;break;case 1:r.districtArr=l[r.multiIndex[0]].childs[r.multiIndex[1]].childs;break;case 2:break}}catch(t){r.districtArr=l[r.multiIndex[0]].childs[0].childs}},handleValueChange:function(t){var r=e(t.detail.value,3),n=r[0],i=r[1],c=r[2],u=e(this.pickedArr,3),a=u[0],o=u[1],l=u[2],s=[a[n],o[i],l[c]];this.$emit("getRegion",s)},handleDefaultRegion:function(t){var r=!Array.isArray(t);this.isInitMultiArray=!1;for(var n=l,e=0;e<3;e++)for(var i=0;i<n.length;i++){var c=r?n[i].code==t.slice(0,2*(e+1)):n[i].name.includes(t[e]);if(c){n=n[i].childs,0==e?this.cityArr=n:1==e&&(this.districtArr=n),this.$set(this.multiIndex,e,i);break}0==e&&i==n.length-1&&(this.isInitMultiArray=!0)}}}};r.default=s}}]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/pick-regions/pick-regions.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/pick-regions/pick-regions-create-component',
{
'components/pick-regions/pick-regions-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('1')['createComponent'](__webpack_require__(194))
})
},
[['components/pick-regions/pick-regions-create-component']]
]);