u-button.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["uview-ui/components/u-button/u-button"],{
  2. /***/ 338:
  3. /*!*********************************************************************************!*\
  4. !*** D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-button/u-button.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_button_vue_vue_type_template_id_6e15e680_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./u-button.vue?vue&type=template&id=6e15e680&scoped=true& */ 339);
  11. /* harmony import */ var _u_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./u-button.vue?vue&type=script&lang=js& */ 341);
  12. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _u_button_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_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  13. /* harmony import */ var _u_button_vue_vue_type_style_index_0_id_6e15e680_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./u-button.vue?vue&type=style&index=0&id=6e15e680&scoped=true&lang=scss& */ 343);
  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_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  19. _u_button_vue_vue_type_template_id_6e15e680_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  20. _u_button_vue_vue_type_template_id_6e15e680_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  21. false,
  22. null,
  23. "6e15e680",
  24. null,
  25. false,
  26. _u_button_vue_vue_type_template_id_6e15e680_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  27. renderjs
  28. )
  29. component.options.__file = "uview-ui/components/u-button/u-button.vue"
  30. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  31. /***/ }),
  32. /***/ 339:
  33. /*!****************************************************************************************************************************!*\
  34. !*** D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-button/u-button.vue?vue&type=template&id=6e15e680&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_button_vue_vue_type_template_id_6e15e680_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-button.vue?vue&type=template&id=6e15e680&scoped=true& */ 340);
  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_button_vue_vue_type_template_id_6e15e680_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_button_vue_vue_type_template_id_6e15e680_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_button_vue_vue_type_template_id_6e15e680_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_button_vue_vue_type_template_id_6e15e680_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
  45. /***/ }),
  46. /***/ 340:
  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-coach/uview-ui/components/u-button/u-button.vue?vue&type=template&id=6e15e680&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. var render = function() {
  60. var _vm = this
  61. var _h = _vm.$createElement
  62. var _c = _vm._self._c || _h
  63. var s0 = _vm.__get_style([
  64. _vm.customStyle,
  65. {
  66. overflow: _vm.ripple ? "hidden" : "visible"
  67. }
  68. ])
  69. var m0 = Number(_vm.hoverStartTime)
  70. var m1 = Number(_vm.hoverStayTime)
  71. _vm.$mp.data = Object.assign(
  72. {},
  73. {
  74. $root: {
  75. s0: s0,
  76. m0: m0,
  77. m1: m1
  78. }
  79. }
  80. )
  81. }
  82. var recyclableRender = false
  83. var staticRenderFns = []
  84. render._withStripped = true
  85. /***/ }),
  86. /***/ 341:
  87. /*!**********************************************************************************************************!*\
  88. !*** D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-button/u-button.vue?vue&type=script&lang=js& ***!
  89. \**********************************************************************************************************/
  90. /*! no static exports found */
  91. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92. "use strict";
  93. __webpack_require__.r(__webpack_exports__);
  94. /* 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_button_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-button.vue?vue&type=script&lang=js& */ 342);
  95. /* 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_button_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_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  96. /* 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_button_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_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97. /* 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_button_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  98. /***/ }),
  99. /***/ 342:
  100. /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  101. !*** ./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-coach/uview-ui/components/u-button/u-button.vue?vue&type=script&lang=js& ***!
  102. \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  103. /*! no static exports found */
  104. /***/ (function(module, exports, __webpack_require__) {
  105. "use strict";
  106. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  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. * button 按钮
  163. * @description Button 按钮
  164. * @tutorial https://www.uviewui.com/components/button.html
  165. * @property {String} size 按钮的大小
  166. * @property {Boolean} ripple 是否开启点击水波纹效果
  167. * @property {String} ripple-bg-color 水波纹的背景色,ripple为true时有效
  168. * @property {String} type 按钮的样式类型
  169. * @property {Boolean} plain 按钮是否镂空,背景色透明
  170. * @property {Boolean} disabled 是否禁用
  171. * @property {Boolean} hair-line 是否显示按钮的细边框(默认true)
  172. * @property {Boolean} shape 按钮外观形状,见文档说明
  173. * @property {Boolean} loading 按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈)
  174. * @property {String} form-type 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  175. * @property {String} open-type 开放能力
  176. * @property {String} data-name 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  177. * @property {String} hover-class 指定按钮按下去的样式类。当 hover-class="none" 时,没有点击态效果(App-nvue 平台暂不支持)
  178. * @property {Number} hover-start-time 按住后多久出现点击态,单位毫秒
  179. * @property {Number} hover-stay-time 手指松开后点击态保留时间,单位毫秒
  180. * @property {Object} custom-style 对按钮的自定义样式,对象形式,见文档说明
  181. * @event {Function} click 按钮点击
  182. * @event {Function} getphonenumber open-type="getPhoneNumber"时有效
  183. * @event {Function} getuserinfo 用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
  184. * @event {Function} error 当使用开放能力时,发生错误的回调
  185. * @event {Function} opensetting 在打开授权设置页并关闭后回调
  186. * @event {Function} launchapp 打开 APP 成功的回调
  187. * @example <u-button>月落</u-button>
  188. */var _default2 =
  189. {
  190. name: 'u-button',
  191. props: {
  192. // 是否细边框
  193. hairLine: {
  194. type: Boolean,
  195. default: true },
  196. // 按钮的预置样式,default,primary,error,warning,success
  197. type: {
  198. type: String,
  199. default: 'default' },
  200. // 按钮尺寸,default,medium,mini
  201. size: {
  202. type: String,
  203. default: 'default' },
  204. // 按钮形状,circle(两边为半圆),square(带圆角)
  205. shape: {
  206. type: String,
  207. default: 'square' },
  208. // 按钮是否镂空
  209. plain: {
  210. type: Boolean,
  211. default: false },
  212. // 是否禁止状态
  213. disabled: {
  214. type: Boolean,
  215. default: false },
  216. // 是否加载中
  217. loading: {
  218. type: Boolean,
  219. default: false },
  220. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  221. // https://uniapp.dcloud.io/component/button
  222. openType: {
  223. type: String,
  224. default: '' },
  225. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  226. // 取值为submit(提交表单),reset(重置表单)
  227. formType: {
  228. type: String,
  229. default: '' },
  230. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  231. // 只微信小程序、QQ小程序有效
  232. appParameter: {
  233. type: String,
  234. default: '' },
  235. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  236. hoverStopPropagation: {
  237. type: Boolean,
  238. default: false },
  239. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  240. lang: {
  241. type: String,
  242. default: 'en' },
  243. // 会话来源,open-type="contact"时有效。只微信小程序有效
  244. sessionFrom: {
  245. type: String,
  246. default: '' },
  247. // 会话内消息卡片标题,open-type="contact"时有效
  248. // 默认当前标题,只微信小程序有效
  249. sendMessageTitle: {
  250. type: String,
  251. default: '' },
  252. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  253. // 默认当前分享路径,只微信小程序有效
  254. sendMessagePath: {
  255. type: String,
  256. default: '' },
  257. // 会话内消息卡片图片,open-type="contact"时有效
  258. // 默认当前页面截图,只微信小程序有效
  259. sendMessageImg: {
  260. type: String,
  261. default: '' },
  262. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  263. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  264. showMessageCard: {
  265. type: Boolean,
  266. default: false },
  267. // 手指按(触摸)按钮时按钮时的背景颜色
  268. hoverBgColor: {
  269. type: String,
  270. default: '' },
  271. // 水波纹的背景颜色
  272. rippleBgColor: {
  273. type: String,
  274. default: '' },
  275. // 是否开启水波纹效果
  276. ripple: {
  277. type: Boolean,
  278. default: false },
  279. // 按下的类名
  280. hoverClass: {
  281. type: String,
  282. default: '' },
  283. // 自定义样式,对象形式
  284. customStyle: {
  285. type: Object,
  286. default: function _default() {
  287. return {};
  288. } },
  289. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  290. dataName: {
  291. type: String,
  292. default: '' },
  293. // 节流,一定时间内只能触发一次
  294. throttleTime: {
  295. type: [String, Number],
  296. default: 1000 },
  297. // 按住后多久出现点击态,单位毫秒
  298. hoverStartTime: {
  299. type: [String, Number],
  300. default: 20 },
  301. // 手指松开后点击态保留时间,单位毫秒
  302. hoverStayTime: {
  303. type: [String, Number],
  304. default: 150 } },
  305. computed: {
  306. // 当没有传bgColor变量时,按钮按下去的颜色类名
  307. getHoverClass: function getHoverClass() {
  308. // 如果开启水波纹效果,则不启用hover-class效果
  309. if (this.loading || this.disabled || this.ripple || this.hoverClass) return '';
  310. var hoverClass = '';
  311. hoverClass = this.plain ? 'u-' + this.type + '-plain-hover' : 'u-' + this.type + '-hover';
  312. return hoverClass;
  313. },
  314. // 在'primary', 'success', 'error', 'warning'类型下,不显示边框,否则会造成四角有毛刺现象
  315. showHairLineBorder: function showHairLineBorder() {
  316. if (['primary', 'success', 'error', 'warning'].indexOf(this.type) >= 0 && !this.plain) {
  317. return '';
  318. } else {
  319. return 'u-hairline-border';
  320. }
  321. } },
  322. data: function data() {
  323. return {
  324. rippleTop: 0, // 水波纹的起点Y坐标到按钮上边界的距离
  325. rippleLeft: 0, // 水波纹起点X坐标到按钮左边界的距离
  326. fields: {}, // 波纹按钮节点信息
  327. waveActive: false // 激活水波纹
  328. };
  329. },
  330. methods: {
  331. // 按钮点击
  332. click: function click(e) {var _this = this;
  333. // 进行节流控制,每this.throttle毫秒内,只在开始处执行
  334. this.$u.throttle(function () {
  335. // 如果按钮时disabled和loading状态,不触发水波纹效果
  336. if (_this.loading === true || _this.disabled === true) return;
  337. // 是否开启水波纹效果
  338. if (_this.ripple) {
  339. // 每次点击时,移除上一次的类,再次添加,才能触发动画效果
  340. _this.waveActive = false;
  341. _this.$nextTick(function () {
  342. this.getWaveQuery(e);
  343. });
  344. }
  345. _this.$emit('click', e);
  346. }, this.throttleTime);
  347. },
  348. // 查询按钮的节点信息
  349. getWaveQuery: function getWaveQuery(e) {var _this2 = this;
  350. this.getElQuery().then(function (res) {
  351. // 查询返回的是一个数组节点
  352. var data = res[0];
  353. // 查询不到节点信息,不操作
  354. if (!data.width || !data.width) return;
  355. // 水波纹的最终形态是一个正方形(通过border-radius让其变为一个圆形),这里要保证正方形的边长等于按钮的最长边
  356. // 最终的方形(变换后的圆形)才能覆盖整个按钮
  357. data.targetWidth = data.height > data.width ? data.height : data.width;
  358. if (!data.targetWidth) return;
  359. _this2.fields = data;
  360. var touchesX = '',
  361. touchesY = '';
  362. touchesX = e.touches[0].clientX;
  363. touchesY = e.touches[0].clientY;
  364. // 获取触摸点相对于按钮上边和左边的x和y坐标,原理是通过屏幕的触摸点(touchesY),减去按钮的上边界data.top
  365. // 但是由于`transform-origin`默认是center,所以这里再减去半径才是水波纹view应该的位置
  366. // 总的来说,就是把水波纹的矩形(变换后的圆形)的中心点,移动到我们的触摸点位置
  367. _this2.rippleTop = touchesY - data.top - data.targetWidth / 2;
  368. _this2.rippleLeft = touchesX - data.left - data.targetWidth / 2;
  369. _this2.$nextTick(function () {
  370. _this2.waveActive = true;
  371. });
  372. });
  373. },
  374. // 获取节点信息
  375. getElQuery: function getElQuery() {var _this3 = this;
  376. return new Promise(function (resolve) {
  377. var queryInfo = '';
  378. // 获取元素节点信息,请查看uniapp相关文档
  379. // https://uniapp.dcloud.io/api/ui/nodes-info?id=nodesrefboundingclientrect
  380. queryInfo = uni.createSelectorQuery().in(_this3);
  381. queryInfo.select('.u-btn').boundingClientRect();
  382. queryInfo.exec(function (data) {
  383. resolve(data);
  384. });
  385. });
  386. },
  387. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  388. getphonenumber: function getphonenumber(res) {
  389. this.$emit('getphonenumber', res);
  390. },
  391. getuserinfo: function getuserinfo(res) {
  392. this.$emit('getuserinfo', res);
  393. },
  394. error: function error(res) {
  395. this.$emit('error', res);
  396. },
  397. opensetting: function opensetting(res) {
  398. this.$emit('opensetting', res);
  399. },
  400. launchapp: function launchapp(res) {
  401. this.$emit('launchapp', res);
  402. } } };exports.default = _default2;
  403. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  404. /***/ }),
  405. /***/ 343:
  406. /*!*******************************************************************************************************************************************!*\
  407. !*** D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-button/u-button.vue?vue&type=style&index=0&id=6e15e680&scoped=true&lang=scss& ***!
  408. \*******************************************************************************************************************************************/
  409. /*! no static exports found */
  410. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  411. "use strict";
  412. __webpack_require__.r(__webpack_exports__);
  413. /* 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_button_vue_vue_type_style_index_0_id_6e15e680_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-button.vue?vue&type=style&index=0&id=6e15e680&scoped=true&lang=scss& */ 344);
  414. /* 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_button_vue_vue_type_style_index_0_id_6e15e680_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_button_vue_vue_type_style_index_0_id_6e15e680_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
  415. /* 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_button_vue_vue_type_style_index_0_id_6e15e680_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_button_vue_vue_type_style_index_0_id_6e15e680_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  416. /* 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_button_vue_vue_type_style_index_0_id_6e15e680_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
  417. /***/ }),
  418. /***/ 344:
  419. /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  420. !*** ./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-coach/uview-ui/components/u-button/u-button.vue?vue&type=style&index=0&id=6e15e680&scoped=true&lang=scss& ***!
  421. \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  422. /*! no static exports found */
  423. /***/ (function(module, exports, __webpack_require__) {
  424. // extracted by mini-css-extract-plugin
  425. if(false) { var cssReload; }
  426. /***/ })
  427. }]);
  428. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-button/u-button.js.map
  429. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  430. 'uview-ui/components/u-button/u-button-create-component',
  431. {
  432. 'uview-ui/components/u-button/u-button-create-component':(function(module, exports, __webpack_require__){
  433. __webpack_require__('1')['createComponent'](__webpack_require__(338))
  434. })
  435. },
  436. [['uview-ui/components/u-button/u-button-create-component']]
  437. ]);