wangding-pickerAddress.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["components/wangding-pickerAddress/wangding-pickerAddress"],{
  2. /***/ 374:
  3. /*!***********************************************************************************!*\
  4. !*** D:/2022/10/hmd/components/wangding-pickerAddress/wangding-pickerAddress.vue ***!
  5. \***********************************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony import */ var _wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wangding-pickerAddress.vue?vue&type=template&id=6cabdd04& */ 375);
  11. /* harmony import */ var _wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wangding-pickerAddress.vue?vue&type=script&lang=js& */ 377);
  12. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  13. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 14);
  14. var renderjs
  15. /* normalize component */
  16. var component = Object(_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
  17. _wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  18. _wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["render"],
  19. _wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  20. false,
  21. null,
  22. null,
  23. null,
  24. false,
  25. _wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["components"],
  26. renderjs
  27. )
  28. component.options.__file = "components/wangding-pickerAddress/wangding-pickerAddress.vue"
  29. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  30. /***/ }),
  31. /***/ 375:
  32. /*!******************************************************************************************************************!*\
  33. !*** D:/2022/10/hmd/components/wangding-pickerAddress/wangding-pickerAddress.vue?vue&type=template&id=6cabdd04& ***!
  34. \******************************************************************************************************************/
  35. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  36. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37. "use strict";
  38. __webpack_require__.r(__webpack_exports__);
  39. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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!./wangding-pickerAddress.vue?vue&type=template&id=6cabdd04& */ 376);
  40. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["render"]; });
  41. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
  42. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
  43. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_template_id_6cabdd04___WEBPACK_IMPORTED_MODULE_0__["components"]; });
  44. /***/ }),
  45. /***/ 376:
  46. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  47. !*** ./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:/2022/10/hmd/components/wangding-pickerAddress/wangding-pickerAddress.vue?vue&type=template&id=6cabdd04& ***!
  48. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  49. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  50. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  51. "use strict";
  52. __webpack_require__.r(__webpack_exports__);
  53. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
  54. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
  55. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
  56. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
  57. var components
  58. var render = function() {
  59. var _vm = this
  60. var _h = _vm.$createElement
  61. var _c = _vm._self._c || _h
  62. }
  63. var recyclableRender = false
  64. var staticRenderFns = []
  65. render._withStripped = true
  66. /***/ }),
  67. /***/ 377:
  68. /*!************************************************************************************************************!*\
  69. !*** D:/2022/10/hmd/components/wangding-pickerAddress/wangding-pickerAddress.vue?vue&type=script&lang=js& ***!
  70. \************************************************************************************************************/
  71. /*! no static exports found */
  72. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  73. "use strict";
  74. __webpack_require__.r(__webpack_exports__);
  75. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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!./wangding-pickerAddress.vue?vue&type=script&lang=js& */ 378);
  76. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  77. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  78. /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_wangding_pickerAddress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  79. /***/ }),
  80. /***/ 378:
  81. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  82. !*** ./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:/2022/10/hmd/components/wangding-pickerAddress/wangding-pickerAddress.vue?vue&type=script&lang=js& ***!
  83. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  84. /*! no static exports found */
  85. /***/ (function(module, exports, __webpack_require__) {
  86. "use strict";
  87. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  88. var _data = _interopRequireDefault(__webpack_require__(/*! ./data.js */ 379));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. var selectVal = ['', '', ''];var _default = { data: function data() {return { value: [0, 0, 0],
  95. array: [],
  96. index: 0 };
  97. },
  98. created: function created() {
  99. this.initSelect();
  100. },
  101. methods: {
  102. // 初始化地址选项
  103. initSelect: function initSelect() {
  104. this.updateSourceDate() // 更新源数据
  105. .updateAddressDate() // 更新结果数据
  106. .$forceUpdate(); // 触发双向绑定
  107. },
  108. // 地址控件改变控件
  109. columnchange: function columnchange(d) {
  110. this.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引
  111. .updateSourceDate() // 更新源数据
  112. .updateAddressDate() // 更新结果数据
  113. .$forceUpdate(); // 触发双向绑定
  114. },
  115. /**
  116. * 更新源数据
  117. * */
  118. updateSourceDate: function updateSourceDate() {
  119. this.array = [];
  120. this.array[0] = _data.default.map(function (obj) {
  121. return {
  122. name: obj.name };
  123. });
  124. this.array[1] = _data.default[this.value[0]].city.map(function (obj) {
  125. return {
  126. name: obj.name };
  127. });
  128. this.array[2] = _data.default[this.value[0]].city[this.value[1]].area.map(function (obj) {
  129. return {
  130. name: obj };
  131. });
  132. return this;
  133. },
  134. /**
  135. * 更新索引
  136. * */
  137. updateSelectIndex: function updateSelectIndex(column, value) {
  138. var arr = JSON.parse(JSON.stringify(this.value));
  139. arr[column] = value;
  140. if (column === 0) {
  141. arr[1] = 0;
  142. arr[2] = 0;
  143. }
  144. if (column === 1) {
  145. arr[2] = 0;
  146. }
  147. this.value = arr;
  148. return this;
  149. },
  150. /**
  151. * 更新结果数据
  152. * */
  153. updateAddressDate: function updateAddressDate() {
  154. selectVal[0] = this.array[0][this.value[0]].name;
  155. selectVal[1] = this.array[1][this.value[1]].name;
  156. selectVal[2] = this.array[2][this.value[2]].name;
  157. return this;
  158. },
  159. /**
  160. * 点击确定
  161. * */
  162. bindPickerChange: function bindPickerChange(e) {
  163. this.$emit('change', {
  164. index: this.value,
  165. data: selectVal });
  166. return this;
  167. } } };exports.default = _default;
  168. /***/ })
  169. }]);
  170. //# sourceMappingURL=../../../.sourcemap/mp-weixin/components/wangding-pickerAddress/wangding-pickerAddress.js.map
  171. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  172. 'components/wangding-pickerAddress/wangding-pickerAddress-create-component',
  173. {
  174. 'components/wangding-pickerAddress/wangding-pickerAddress-create-component':(function(module, exports, __webpack_require__){
  175. __webpack_require__('1')['createComponent'](__webpack_require__(374))
  176. })
  177. },
  178. [['components/wangding-pickerAddress/wangding-pickerAddress-create-component']]
  179. ]);