u-popup.js 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["uview-ui/components/u-popup/u-popup"],{
  2. /***/ 423:
  3. /*!******************************************************************************!*\
  4. !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.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 _u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./u-popup.vue?vue&type=template&id=17becaea&scoped=true& */ 424);
  11. /* harmony import */ var _u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./u-popup.vue?vue&type=script&lang=js& */ 426);
  12. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _u_popup_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 _u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  13. /* harmony import */ var _u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss& */ 428);
  14. /* 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_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);
  15. var renderjs
  16. /* normalize component */
  17. 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_3__["default"])(
  18. _u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  19. _u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  20. _u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  21. false,
  22. null,
  23. "17becaea",
  24. null,
  25. false,
  26. _u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  27. renderjs
  28. )
  29. component.options.__file = "uview-ui/components/u-popup/u-popup.vue"
  30. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  31. /***/ }),
  32. /***/ 424:
  33. /*!*************************************************************************************************************************!*\
  34. !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=template&id=17becaea&scoped=true& ***!
  35. \*************************************************************************************************************************/
  36. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  37. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  38. "use strict";
  39. __webpack_require__.r(__webpack_exports__);
  40. /* 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_u_popup_vue_vue_type_template_id_17becaea_scoped_true___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!./u-popup.vue?vue&type=template&id=17becaea&scoped=true& */ 425);
  41. /* 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_u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
  42. /* 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_u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
  43. /* 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_u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
  44. /* 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_u_popup_vue_vue_type_template_id_17becaea_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
  45. /***/ }),
  46. /***/ 425:
  47. /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  48. !*** ./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:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=template&id=17becaea&scoped=true& ***!
  49. \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  50. /*! exports provided: render, staticRenderFns, recyclableRender, components */
  51. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52. "use strict";
  53. __webpack_require__.r(__webpack_exports__);
  54. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
  55. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
  56. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
  57. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
  58. var components
  59. try {
  60. components = {
  61. uMask: function() {
  62. return __webpack_require__.e(/*! import() | uview-ui/components/u-mask/u-mask */ "uview-ui/components/u-mask/u-mask").then(__webpack_require__.bind(null, /*! @/uview-ui/components/u-mask/u-mask.vue */ 430))
  63. },
  64. uIcon: function() {
  65. return __webpack_require__.e(/*! import() | uview-ui/components/u-icon/u-icon */ "uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/uview-ui/components/u-icon/u-icon.vue */ 259))
  66. }
  67. }
  68. } catch (e) {
  69. if (
  70. e.message.indexOf("Cannot find module") !== -1 &&
  71. e.message.indexOf(".vue") !== -1
  72. ) {
  73. console.error(e.message)
  74. console.error("1. 排查组件名称拼写是否正确")
  75. console.error(
  76. "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
  77. )
  78. console.error(
  79. "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
  80. )
  81. } else {
  82. throw e
  83. }
  84. }
  85. var render = function() {
  86. var _vm = this
  87. var _h = _vm.$createElement
  88. var _c = _vm._self._c || _h
  89. var s0 = _vm.visibleSync
  90. ? _vm.__get_style([
  91. _vm.customStyle,
  92. {
  93. zIndex: _vm.uZindex - 1
  94. }
  95. ])
  96. : null
  97. var s1 = _vm.visibleSync ? _vm.__get_style([_vm.style]) : null
  98. var s2 =
  99. _vm.visibleSync && _vm.mode == "center"
  100. ? _vm.__get_style([_vm.centerStyle])
  101. : null
  102. _vm.$mp.data = Object.assign(
  103. {},
  104. {
  105. $root: {
  106. s0: s0,
  107. s1: s1,
  108. s2: s2
  109. }
  110. }
  111. )
  112. }
  113. var recyclableRender = false
  114. var staticRenderFns = []
  115. render._withStripped = true
  116. /***/ }),
  117. /***/ 426:
  118. /*!*******************************************************************************************************!*\
  119. !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=script&lang=js& ***!
  120. \*******************************************************************************************************/
  121. /*! no static exports found */
  122. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  123. "use strict";
  124. __webpack_require__.r(__webpack_exports__);
  125. /* 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_u_popup_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!./u-popup.vue?vue&type=script&lang=js& */ 427);
  126. /* 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_u_popup_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_u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  127. /* 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_u_popup_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_u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  128. /* 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_u_popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  129. /***/ }),
  130. /***/ 427:
  131. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  132. !*** ./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:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=script&lang=js& ***!
  133. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  134. /*! no static exports found */
  135. /***/ (function(module, exports, __webpack_require__) {
  136. "use strict";
  137. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. //
  154. //
  155. //
  156. //
  157. //
  158. //
  159. //
  160. //
  161. //
  162. //
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. //
  179. //
  180. //
  181. //
  182. //
  183. //
  184. /**
  185. * popup 弹窗
  186. * @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
  187. * @tutorial https://www.uviewui.com/components/popup.html
  188. * @property {String} mode 弹出方向(默认left)
  189. * @property {Boolean} mask 是否显示遮罩(默认true)
  190. * @property {Stringr | Number} length mode=left | 见官网说明(默认auto)
  191. * @property {Boolean} zoom 是否开启缩放动画,只在mode为center时有效(默认true)
  192. * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
  193. * @property {Boolean} mask-close-able 点击遮罩是否可以关闭弹出层(默认true)
  194. * @property {Object} custom-style 用户自定义样式
  195. * @property {Stringr | Number} negative-top 中部弹出时,往上偏移的值
  196. * @property {Numberr | String} border-radius 弹窗圆角值(默认0)
  197. * @property {Numberr | String} z-index 弹出内容的z-index值(默认1075)
  198. * @property {Boolean} closeable 是否显示关闭图标(默认false)
  199. * @property {String} close-icon 关闭图标的名称,只能uView的内置图标
  200. * @property {String} close-icon-pos 自定义关闭图标位置(默认top-right)
  201. * @property {String} close-icon-color 关闭图标的颜色(默认#909399)
  202. * @property {Number | String} close-icon-size 关闭图标的大小,单位rpx(默认30)
  203. * @event {Function} open 弹出层打开
  204. * @event {Function} close 弹出层收起
  205. * @example <u-popup v-model="show"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>
  206. */var _default2 =
  207. {
  208. name: 'u-popup',
  209. props: {
  210. /**
  211. * 显示状态
  212. */
  213. show: {
  214. type: Boolean,
  215. default: false },
  216. /**
  217. * 弹出方向,left|right|top|bottom|center
  218. */
  219. mode: {
  220. type: String,
  221. default: 'left' },
  222. /**
  223. * 是否显示遮罩
  224. */
  225. mask: {
  226. type: Boolean,
  227. default: true },
  228. // 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto"
  229. // 或者百分比"50%",表示由内容撑开高度或者宽度
  230. length: {
  231. type: [Number, String],
  232. default: 'auto' },
  233. // 是否开启缩放动画,只在mode=center时有效
  234. zoom: {
  235. type: Boolean,
  236. default: true },
  237. // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
  238. safeAreaInsetBottom: {
  239. type: Boolean,
  240. default: false },
  241. // 是否可以通过点击遮罩进行关闭
  242. maskCloseAble: {
  243. type: Boolean,
  244. default: true },
  245. // 用户自定义样式
  246. customStyle: {
  247. type: Object,
  248. default: function _default() {
  249. return {};
  250. } },
  251. value: {
  252. type: Boolean,
  253. default: false },
  254. // 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件
  255. // 对v-model双向绑定多层调用造成报错不能修改props值的问题
  256. popup: {
  257. type: Boolean,
  258. default: true },
  259. // 显示显示弹窗的圆角,单位rpx
  260. borderRadius: {
  261. type: [Number, String],
  262. default: 0 },
  263. zIndex: {
  264. type: [Number, String],
  265. default: '' },
  266. // 是否显示关闭图标
  267. closeable: {
  268. type: Boolean,
  269. default: false },
  270. // 关闭图标的名称,只能uView的内置图标
  271. closeIcon: {
  272. type: String,
  273. default: 'close' },
  274. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  275. closeIconPos: {
  276. type: String,
  277. default: 'top-right' },
  278. // 关闭图标的颜色
  279. closeIconColor: {
  280. type: String,
  281. default: '#909399' },
  282. // 关闭图标的大小,单位rpx
  283. closeIconSize: {
  284. type: [String, Number],
  285. default: '30' },
  286. // 宽度,只对左,右,中部弹出时起作用,单位rpx,或者"auto"
  287. // 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数
  288. width: {
  289. type: String,
  290. default: '' },
  291. // 高度,只对上,下,中部弹出时起作用,单位rpx,或者"auto"
  292. // 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数
  293. height: {
  294. type: String,
  295. default: '' },
  296. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况,仅在mode=center时有效
  297. negativeTop: {
  298. type: [String, Number],
  299. default: 0 },
  300. // 遮罩的样式,一般用于修改遮罩的透明度
  301. maskCustomStyle: {
  302. type: Object,
  303. default: function _default() {
  304. return {};
  305. } },
  306. // 遮罩打开或收起的动画过渡时间,单位ms
  307. duration: {
  308. type: [String, Number],
  309. default: 250 } },
  310. data: function data() {
  311. return {
  312. visibleSync: false,
  313. showDrawer: false,
  314. timer: null,
  315. closeFromInner: false // value的值改变,是发生在内部还是外部
  316. };
  317. },
  318. computed: {
  319. // 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)
  320. style: function style() {
  321. var style = {};
  322. // 如果是左边或者上边弹出时,需要给translate设置为负值,用于隐藏
  323. if (this.mode == 'left' || this.mode == 'right') {
  324. style = {
  325. width: this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length),
  326. height: '100%',
  327. transform: "translate3D(".concat(this.mode == 'left' ? '-100%' : '100%', ",0px,0px)") };
  328. } else if (this.mode == 'top' || this.mode == 'bottom') {
  329. style = {
  330. width: '100%',
  331. height: this.height ? this.getUnitValue(this.height) : this.getUnitValue(this.length),
  332. transform: "translate3D(0px,".concat(this.mode == 'top' ? '-100%' : '100%', ",0px)") };
  333. }
  334. style.zIndex = this.uZindex;
  335. // 如果用户设置了borderRadius值,添加弹窗的圆角
  336. if (this.borderRadius) {
  337. switch (this.mode) {
  338. case 'left':
  339. style.borderRadius = "0 ".concat(this.borderRadius, "rpx ").concat(this.borderRadius, "rpx 0");
  340. break;
  341. case 'top':
  342. style.borderRadius = "0 0 ".concat(this.borderRadius, "rpx ").concat(this.borderRadius, "rpx");
  343. break;
  344. case 'right':
  345. style.borderRadius = "".concat(this.borderRadius, "rpx 0 0 ").concat(this.borderRadius, "rpx");
  346. break;
  347. case 'bottom':
  348. style.borderRadius = "".concat(this.borderRadius, "rpx ").concat(this.borderRadius, "rpx 0 0");
  349. break;
  350. default:}
  351. // 不加可能圆角无效
  352. style.overflow = 'hidden';
  353. }
  354. if (this.duration) style.transition = "all ".concat(this.duration / 1000, "s linear");
  355. return style;
  356. },
  357. // 中部弹窗的特有样式
  358. centerStyle: function centerStyle() {
  359. var style = {};
  360. style.width = this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length);
  361. // 中部弹出的模式,如果没有设置高度,就用auto值,由内容撑开高度
  362. style.height = this.height ? this.getUnitValue(this.height) : 'auto';
  363. style.zIndex = this.uZindex;
  364. style.marginTop = "-".concat(this.$u.addUnit(this.negativeTop));
  365. if (this.borderRadius) {
  366. style.borderRadius = "".concat(this.borderRadius, "rpx");
  367. // 不加可能圆角无效
  368. style.overflow = 'hidden';
  369. }
  370. return style;
  371. },
  372. // 计算整理后的z-index值
  373. uZindex: function uZindex() {
  374. return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
  375. } },
  376. watch: {
  377. value: function value(val) {
  378. if (val) {
  379. this.open();
  380. } else if (!this.closeFromInner) {
  381. this.close();
  382. }
  383. this.closeFromInner = false;
  384. } },
  385. mounted: function mounted() {
  386. // 组件渲染完成时,检查value是否为true,如果是,弹出popup
  387. this.value && this.open();
  388. },
  389. methods: {
  390. // 判断传入的值,是否带有单位,如果没有,就默认用rpx单位
  391. getUnitValue: function getUnitValue(val) {
  392. if (/(%|px|rpx|auto)$/.test(val)) return val;else
  393. return val + 'rpx';
  394. },
  395. // 遮罩被点击
  396. maskClick: function maskClick() {
  397. this.close();
  398. },
  399. close: function close() {
  400. // 标记关闭是内部发生的,否则修改了value值,导致watch中对value检测,导致再执行一遍close
  401. // 造成@close事件触发两次
  402. this.closeFromInner = true;
  403. this.change('showDrawer', 'visibleSync', false);
  404. },
  405. // 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗
  406. // 让其只在mode=center时起作用
  407. modeCenterClose: function modeCenterClose(mode) {
  408. if (mode != 'center' || !this.maskCloseAble) return;
  409. this.close();
  410. },
  411. open: function open() {
  412. this.change('visibleSync', 'showDrawer', true);
  413. },
  414. // 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件
  415. // 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用
  416. change: function change(param1, param2, status) {var _this = this;
  417. // 如果this.popup为false,意味着为picker,actionsheet等组件调用了popup组件
  418. if (this.popup == true) {
  419. this.$emit('input', status);
  420. }
  421. this[param1] = status;
  422. if (status) {
  423. this.timer = setTimeout(function () {
  424. _this[param2] = status;
  425. _this.$emit(status ? 'open' : 'close');
  426. }, 50);
  427. } else {
  428. this.timer = setTimeout(function () {
  429. _this[param2] = status;
  430. _this.$emit(status ? 'open' : 'close');
  431. }, this.duration);
  432. }
  433. } } };exports.default = _default2;
  434. /***/ }),
  435. /***/ 428:
  436. /*!****************************************************************************************************************************************!*\
  437. !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss& ***!
  438. \****************************************************************************************************************************************/
  439. /*! no static exports found */
  440. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  441. "use strict";
  442. __webpack_require__.r(__webpack_exports__);
  443. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss& */ 429);
  444. /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
  445. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___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_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  446. /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_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_u_popup_vue_vue_type_style_index_0_id_17becaea_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
  447. /***/ }),
  448. /***/ 429:
  449. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  450. !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./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:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-popup/u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss& ***!
  451. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  452. /*! no static exports found */
  453. /***/ (function(module, exports, __webpack_require__) {
  454. // extracted by mini-css-extract-plugin
  455. if(false) { var cssReload; }
  456. /***/ })
  457. }]);
  458. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-popup/u-popup.js.map
  459. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  460. 'uview-ui/components/u-popup/u-popup-create-component',
  461. {
  462. 'uview-ui/components/u-popup/u-popup-create-component':(function(module, exports, __webpack_require__){
  463. __webpack_require__('1')['createComponent'](__webpack_require__(423))
  464. })
  465. },
  466. [['uview-ui/components/u-popup/u-popup-create-component']]
  467. ]);