bulade-ui 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/miniprogram_dist/bld-action-sheet/index.js +196 -0
  2. package/miniprogram_dist/bld-action-sheet/index.js.map +1 -0
  3. package/miniprogram_dist/bld-action-sheet/index.json +8 -0
  4. package/miniprogram_dist/bld-action-sheet/index.wxml +57 -0
  5. package/miniprogram_dist/bld-action-sheet/index.wxss +160 -0
  6. package/miniprogram_dist/bld-badge/index.js +156 -0
  7. package/miniprogram_dist/bld-badge/index.js.map +1 -0
  8. package/miniprogram_dist/bld-badge/index.json +4 -0
  9. package/miniprogram_dist/bld-badge/index.wxml +14 -0
  10. package/miniprogram_dist/bld-badge/index.wxss +43 -0
  11. package/miniprogram_dist/bld-button/index.wxml +0 -1
  12. package/miniprogram_dist/bld-drawer/index.js +2 -2
  13. package/miniprogram_dist/bld-drawer/index.js.map +1 -1
  14. package/miniprogram_dist/bld-drawer/index.wxss +4 -3
  15. package/miniprogram_dist/bld-empty-page/index.js +123 -0
  16. package/miniprogram_dist/bld-empty-page/index.js.map +1 -0
  17. package/miniprogram_dist/bld-empty-page/index.json +3 -0
  18. package/miniprogram_dist/bld-empty-page/index.wxml +11 -0
  19. package/miniprogram_dist/bld-empty-page/index.wxss +14 -0
  20. package/miniprogram_dist/bld-message/index.js +2 -2
  21. package/miniprogram_dist/bld-message/index.js.map +1 -1
  22. package/miniprogram_dist/bld-message/message.js +2 -2
  23. package/miniprogram_dist/bld-message/message.js.map +1 -1
  24. package/miniprogram_dist/bld-modal/index.js +223 -0
  25. package/miniprogram_dist/bld-modal/index.js.map +1 -0
  26. package/miniprogram_dist/bld-modal/index.json +6 -0
  27. package/miniprogram_dist/bld-modal/index.wxml +23 -0
  28. package/miniprogram_dist/bld-modal/index.wxss +97 -0
  29. package/miniprogram_dist/bld-modal/modal.js +147 -0
  30. package/miniprogram_dist/bld-modal/modal.js.map +1 -0
  31. package/miniprogram_dist/bld-navbar/index.js +167 -0
  32. package/miniprogram_dist/bld-navbar/index.js.map +1 -0
  33. package/miniprogram_dist/bld-navbar/index.json +6 -0
  34. package/miniprogram_dist/bld-navbar/index.wxml +8 -0
  35. package/miniprogram_dist/bld-navbar/index.wxss +31 -0
  36. package/miniprogram_dist/bld-navbar-group/index.js +243 -0
  37. package/miniprogram_dist/bld-navbar-group/index.js.map +1 -0
  38. package/miniprogram_dist/bld-navbar-group/index.json +4 -0
  39. package/miniprogram_dist/bld-navbar-group/index.wxml +37 -0
  40. package/miniprogram_dist/bld-navbar-group/index.wxss +30 -0
  41. package/miniprogram_dist/bld-pop-up/index.js +129 -0
  42. package/miniprogram_dist/bld-pop-up/index.js.map +1 -0
  43. package/miniprogram_dist/bld-pop-up/index.json +6 -0
  44. package/miniprogram_dist/bld-pop-up/index.wxml +18 -0
  45. package/miniprogram_dist/bld-pop-up/index.wxss +27 -0
  46. package/miniprogram_dist/bld-tag/index.js +134 -0
  47. package/miniprogram_dist/bld-tag/index.js.map +1 -0
  48. package/miniprogram_dist/bld-tag/index.json +3 -0
  49. package/miniprogram_dist/bld-tag/index.wxml +3 -0
  50. package/miniprogram_dist/bld-tag/index.wxss +108 -0
  51. package/miniprogram_dist/bld-toast/index.js +2 -2
  52. package/miniprogram_dist/bld-toast/index.js.map +1 -1
  53. package/miniprogram_dist/bld-toast/toast.js +2 -2
  54. package/miniprogram_dist/bld-toast/toast.js.map +1 -1
  55. package/miniprogram_dist/cell/index.js +2 -2
  56. package/miniprogram_dist/cell/index.js.map +1 -1
  57. package/miniprogram_dist/cell-group/index.js +2 -2
  58. package/miniprogram_dist/cell-group/index.js.map +1 -1
  59. package/miniprogram_dist/grid/index.js +2 -2
  60. package/miniprogram_dist/grid/index.js.map +1 -1
  61. package/miniprogram_dist/grid-item/index.js +2 -2
  62. package/miniprogram_dist/grid-item/index.js.map +1 -1
  63. package/miniprogram_dist/icon/index.js +2 -2
  64. package/miniprogram_dist/icon/index.js.map +1 -1
  65. package/miniprogram_dist/timeline/index.js +2 -2
  66. package/miniprogram_dist/timeline/index.js.map +1 -1
  67. package/miniprogram_dist/timeline-item/index.js +2 -2
  68. package/miniprogram_dist/timeline-item/index.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/bld-action-sheet/index.js +83 -0
  71. package/src/bld-action-sheet/index.json +8 -0
  72. package/src/bld-action-sheet/index.scss +180 -0
  73. package/src/bld-action-sheet/index.wxml +57 -0
  74. package/src/bld-action-sheet/index.wxss +160 -0
  75. package/src/bld-badge/index.js +53 -0
  76. package/src/bld-badge/index.json +4 -0
  77. package/src/bld-badge/index.scss +46 -0
  78. package/src/bld-badge/index.wxml +14 -0
  79. package/src/bld-badge/index.wxss +43 -0
  80. package/src/bld-button/index.wxml +0 -1
  81. package/src/bld-content-container/index.js +46 -0
  82. package/src/bld-content-container/index.json +3 -0
  83. package/src/bld-content-container/index.scss +0 -0
  84. package/src/bld-content-container/index.wxml +5 -0
  85. package/src/bld-content-container/index.wxss +0 -0
  86. package/src/bld-drawer/index.scss +8 -3
  87. package/src/bld-drawer/index.wxss +4 -3
  88. package/src/bld-empty-page/index.js +23 -0
  89. package/src/bld-empty-page/index.json +3 -0
  90. package/src/bld-empty-page/index.scss +15 -0
  91. package/src/bld-empty-page/index.wxml +11 -0
  92. package/src/bld-empty-page/index.wxss +14 -0
  93. package/src/bld-modal/index.js +123 -0
  94. package/src/bld-modal/index.json +6 -0
  95. package/src/bld-modal/index.scss +108 -0
  96. package/src/bld-modal/index.wxml +23 -0
  97. package/src/bld-modal/index.wxss +97 -0
  98. package/src/bld-modal/modal.js +38 -0
  99. package/src/bld-navbar/index.js +63 -0
  100. package/src/bld-navbar/index.json +6 -0
  101. package/src/bld-navbar/index.scss +35 -0
  102. package/src/bld-navbar/index.wxml +8 -0
  103. package/src/bld-navbar/index.wxss +31 -0
  104. package/src/bld-navbar-group/index.js +139 -0
  105. package/src/bld-navbar-group/index.json +4 -0
  106. package/src/bld-navbar-group/index.scss +33 -0
  107. package/src/bld-navbar-group/index.wxml +37 -0
  108. package/src/bld-navbar-group/index.wxss +30 -0
  109. package/src/bld-pop-up/index.js +29 -0
  110. package/src/bld-pop-up/index.json +6 -0
  111. package/src/bld-pop-up/index.scss +27 -0
  112. package/src/bld-pop-up/index.wxml +18 -0
  113. package/src/bld-pop-up/index.wxss +27 -0
  114. package/src/bld-tag/index.js +34 -0
  115. package/src/bld-tag/index.json +3 -0
  116. package/src/bld-tag/index.scss +127 -0
  117. package/src/bld-tag/index.wxml +3 -0
  118. package/src/bld-tag/index.wxss +108 -0
@@ -0,0 +1,196 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 32);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 32:
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ "use strict";
94
+
95
+
96
+ Component({
97
+ externalClasses: ['custom-class', 'custom-mask-class', 'custom-header-class'],
98
+
99
+ options: {
100
+ addGlobalClass: true,
101
+ multipleSlots: true
102
+ },
103
+
104
+ properties: {
105
+ visible: {
106
+ type: Boolean,
107
+ value: false
108
+ },
109
+ zIndex: {
110
+ type: Number,
111
+ value: 9
112
+ },
113
+ maskClosable: {
114
+ type: Boolean,
115
+ value: true
116
+ },
117
+ showCancel: {
118
+ type: Boolean,
119
+ value: false
120
+ },
121
+ cancelText: {
122
+ type: String,
123
+ value: '取消'
124
+ },
125
+ actions: {
126
+ type: Array,
127
+ value: []
128
+ }
129
+ },
130
+
131
+ methods: {
132
+ // 点击遮罩
133
+ handleMaskClick: function handleMaskClick() {
134
+ if (!this.data.maskClosable) return;
135
+ this.handleCancelClick();
136
+ },
137
+
138
+
139
+ // 点击事件
140
+ handleItemClick: function handleItemClick(_ref) {
141
+ var _ref$currentTarget = _ref.currentTarget,
142
+ currentTarget = _ref$currentTarget === undefined ? {} : _ref$currentTarget;
143
+
144
+ var dataset = currentTarget.dataset || {};
145
+ var index = dataset.index;
146
+
147
+
148
+ var item = this.data.actions[index];
149
+
150
+ if (item.loading || item.disabled) return;
151
+
152
+ this.triggerEvent('click', {
153
+ index: index
154
+ });
155
+ },
156
+
157
+
158
+ // 取消
159
+ handleCancelClick: function handleCancelClick() {
160
+ this.triggerEvent('cancel');
161
+ },
162
+ getuserinfo: function getuserinfo() {
163
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
164
+ _ref2$detail = _ref2.detail,
165
+ detail = _ref2$detail === undefined ? {} : _ref2$detail;
166
+
167
+ this.triggerEvent('getuserinfo', detail);
168
+ },
169
+ contact: function contact() {
170
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
171
+ _ref3$detail = _ref3.detail,
172
+ detail = _ref3$detail === undefined ? {} : _ref3$detail;
173
+
174
+ this.triggerEvent('contact', detail);
175
+ },
176
+ getphonenumber: function getphonenumber() {
177
+ var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
178
+ _ref4$detail = _ref4.detail,
179
+ detail = _ref4$detail === undefined ? {} : _ref4$detail;
180
+
181
+ this.triggerEvent('getphonenumber', detail);
182
+ },
183
+ error: function error() {
184
+ var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
185
+ _ref5$detail = _ref5.detail,
186
+ detail = _ref5$detail === undefined ? {} : _ref5$detail;
187
+
188
+ this.triggerEvent('error', detail);
189
+ }
190
+ }
191
+ });
192
+
193
+ /***/ })
194
+
195
+ /******/ });
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-action-sheet/index.js"],"names":["Component","externalClasses","options","addGlobalClass","multipleSlots","properties","visible","type","Boolean","value","zIndex","Number","maskClosable","showCancel","cancelText","String","actions","Array","methods","handleMaskClick","data","handleCancelClick","handleItemClick","currentTarget","dataset","index","item","loading","disabled","triggerEvent","getuserinfo","detail","contact","getphonenumber","error"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,EAAiB,mBAAjB,EAAsC,qBAAtC,CADT;;AAGRC,WAAS;AACPC,oBAAgB,IADT;AAEPC,mBAAe;AAFR,GAHD;;AAQRC,cAAY;AACVC,aAAS;AACPC,YAAMC,OADC;AAEPC,aAAO;AAFA,KADC;AAKVC,YAAQ;AACNH,YAAMI,MADA;AAENF,aAAO;AAFD,KALE;AASVG,kBAAc;AACZL,YAAMC,OADM;AAEZC,aAAO;AAFK,KATJ;AAaVI,gBAAY;AACVN,YAAMC,OADI;AAEVC,aAAO;AAFG,KAbF;AAiBVK,gBAAY;AACVP,YAAMQ,MADI;AAEVN,aAAO;AAFG,KAjBF;AAqBVO,aAAS;AACPT,YAAMU,KADC;AAEPR,aAAO;AAFA;AArBC,GARJ;;AAmCRS,WAAS;AACP;AACAC,mBAFO,6BAEW;AAChB,UAAI,CAAC,KAAKC,IAAL,CAAUR,YAAf,EAA6B;AAC7B,WAAKS,iBAAL;AACD,KALM;;;AAOP;AACAC,mBARO,iCAQiC;AAAA,oCAAtBC,aAAsB;AAAA,UAAtBA,aAAsB,sCAAN,EAAM;;AACtC,UAAMC,UAAUD,cAAcC,OAAd,IAAyB,EAAzC;AADsC,UAE9BC,KAF8B,GAEpBD,OAFoB,CAE9BC,KAF8B;;;AAItC,UAAMC,OAAO,KAAKN,IAAL,CAAUJ,OAAV,CAAkBS,KAAlB,CAAb;;AAEA,UAAIC,KAAKC,OAAL,IAAgBD,KAAKE,QAAzB,EAAmC;;AAEnC,WAAKC,YAAL,CAAkB,OAAlB,EAA2B;AACzBJ;AADyB,OAA3B;AAGD,KAnBM;;;AAqBP;AACAJ,qBAtBO,+BAsBa;AAClB,WAAKQ,YAAL,CAAkB,QAAlB;AACD,KAxBM;AA0BPC,eA1BO,yBA4BC;AAAA,sFAAJ,EAAI;AAAA,+BADNC,MACM;AAAA,UADNA,MACM,gCADG,EACH;;AACN,WAAKF,YAAL,CAAkB,aAAlB,EAAiCE,MAAjC;AACD,KA9BM;AA+BPC,WA/BO,qBAiCC;AAAA,sFAAJ,EAAI;AAAA,+BADND,MACM;AAAA,UADNA,MACM,gCADG,EACH;;AACN,WAAKF,YAAL,CAAkB,SAAlB,EAA6BE,MAA7B;AACD,KAnCM;AAoCPE,kBApCO,4BAsCC;AAAA,sFAAJ,EAAI;AAAA,+BADNF,MACM;AAAA,UADNA,MACM,gCADG,EACH;;AACN,WAAKF,YAAL,CAAkB,gBAAlB,EAAoCE,MAApC;AACD,KAxCM;AAyCPG,SAzCO,mBA2CC;AAAA,sFAAJ,EAAI;AAAA,+BADNH,MACM;AAAA,UADNA,MACM,gCADG,EACH;;AACN,WAAKF,YAAL,CAAkB,OAAlB,EAA2BE,MAA3B;AACD;AA7CM;AAnCD,CAAV,E","file":"bld-action-sheet/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n","Component({\n externalClasses: ['custom-class', 'custom-mask-class', 'custom-header-class'],\n\n options: {\n addGlobalClass: true,\n multipleSlots: true\n },\n\n properties: {\n visible: {\n type: Boolean,\n value: false\n },\n zIndex: {\n type: Number,\n value: 9\n },\n maskClosable: {\n type: Boolean,\n value: true\n },\n showCancel: {\n type: Boolean,\n value: false\n },\n cancelText: {\n type: String,\n value: '取消'\n },\n actions: {\n type: Array,\n value: []\n }\n },\n\n methods: {\n // 点击遮罩\n handleMaskClick() {\n if (!this.data.maskClosable) return\n this.handleCancelClick()\n },\n\n // 点击事件\n handleItemClick({ currentTarget = {} }) {\n const dataset = currentTarget.dataset || {}\n const { index } = dataset\n\n const item = this.data.actions[index]\n\n if (item.loading || item.disabled) return\n\n this.triggerEvent('click', {\n index\n })\n },\n\n // 取消\n handleCancelClick() {\n this.triggerEvent('cancel')\n },\n\n getuserinfo({\n detail = {}\n } = {}) {\n this.triggerEvent('getuserinfo', detail)\n },\n contact({\n detail = {}\n } = {}) {\n this.triggerEvent('contact', detail)\n },\n getphonenumber({\n detail = {}\n } = {}) {\n this.triggerEvent('getphonenumber', detail)\n },\n error({\n detail = {}\n } = {}) {\n this.triggerEvent('error', detail)\n }\n }\n})"],"sourceRoot":""}
@@ -0,0 +1,8 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents":
4
+ {
5
+ "m-button": "../button/index",
6
+ "m-icon": "../icon/index"
7
+ }
8
+ }
@@ -0,0 +1,57 @@
1
+ <view
2
+ class="custom-mask-class m-mask {{ visible ? '' : 'is-hidden' }}"
3
+ style="{{ 'z-index: ' + zIndex }}"
4
+ bindtap="handleMaskClick"
5
+ ></view>
6
+
7
+ <view
8
+ class="custom-class m-sheet {{ visible ? '' : 'is-hidden' }}"
9
+ style="{{ 'z-index: ' + zIndex }}"
10
+ >
11
+ <view class="m-sheet__header custom-class__header">
12
+ <slot name="header" />
13
+ </view>
14
+
15
+ <view class="m-sheet__content">
16
+
17
+ <view class="m-sheet__item" wx:for="{{ actions }}" wx:key="name">
18
+
19
+ <button
20
+ class="m-button {{ item.loading ? 'is-loading' : '' }} {{ item.disabled ? 'is-disabled' : ''}}"
21
+ hover-class="{{ !item.loading && !item.disabled ? 'is-hover' : '' }}"
22
+ bindtap="handleItemClick"
23
+ data-index="{{ index }}"
24
+ open-type="{{ item.openType }}"
25
+ send-message-title="{{ sendMessageTitle }}"
26
+ send-message-path="{{ sendMessagePath }}"
27
+ send-message-img="{{ sendMessageImg }}"
28
+ show-message-card="{{ showMessageCard }}"
29
+ bindcontact="contact"
30
+ bindgetuserinfo="getuserinfo"
31
+ bindgetphonenumber="getphonenumber"
32
+ binderror="error"
33
+ plain="true"
34
+ style="{{ item.color ? 'color:' + item.color : '' }}"
35
+ >
36
+ <view wx:if="{{ item.loading }}" class="m-button__loading"></view>
37
+ <view wx:else class="m-sheet__text">
38
+ <m-icon
39
+ wx:if="{{ item.icon }}"
40
+ name="{{ item.icon }}"
41
+ color="{{ item.color }}"
42
+ size="36"
43
+ class="m-sheet__btn-icon"
44
+ />
45
+ {{ item.name }}
46
+ </view>
47
+
48
+ </button>
49
+
50
+ </view>
51
+
52
+ </view>
53
+
54
+ <view class="m-sheet__cancel" wx:if="{{ showCancel }}">
55
+ <m-button m-class="m-sheet__button" size="large" type="ghost" full bind:click="handleCancelClick">{{ cancelText }}</m-button>
56
+ </view>
57
+ </view>
@@ -0,0 +1,160 @@
1
+ .m-mask {
2
+ z-index: 1998;
3
+ position: fixed;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ opacity: 1;
9
+ visibility: visible;
10
+ background: var(--color-mask, rgba(0, 0, 0, 0.55));
11
+ transition: all 0.25s ease-in-out;
12
+ }
13
+ .m-mask.is-hidden {
14
+ opacity: 0;
15
+ visibility: hidden;
16
+ }
17
+
18
+ .m-sheet {
19
+ z-index: 1999;
20
+ position: fixed;
21
+ width: 100%;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ visibility: visible;
26
+ background: #fff;
27
+ transform: translate3d(0, 0, 0);
28
+ transform-origin: center;
29
+ transition: all 0.25s ease-in-out;
30
+ box-sizing: border-box;
31
+ padding-bottom: constant(safe-area-inset-bottom);
32
+ padding-bottom: env(safe-area-inset-bottom);
33
+ }
34
+ .m-sheet.is-hidden {
35
+ transform: translate3d(0, 100%, 0);
36
+ visibility: hidden;
37
+ }
38
+ .m-sheet .m-sheet__header {
39
+ background: #fff;
40
+ text-align: center;
41
+ position: relative;
42
+ font-size: 24rpx;
43
+ color: #80848f;
44
+ }
45
+ .m-sheet .m-sheet__header::after {
46
+ content: "";
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ width: 200%;
51
+ height: 200%;
52
+ transform: scale(0.5);
53
+ transform-origin: 0 0;
54
+ pointer-events: none;
55
+ box-sizing: border-box;
56
+ border: 0 solid var(--color-border, #dcdee2);
57
+ border-bottom-width: 1px;
58
+ }
59
+ .m-sheet .m-sheet__item {
60
+ position: relative;
61
+ }
62
+ .m-sheet .m-sheet__item::after {
63
+ content: "";
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ width: 200%;
68
+ height: 200%;
69
+ transform: scale(0.5);
70
+ transform-origin: 0 0;
71
+ pointer-events: none;
72
+ box-sizing: border-box;
73
+ border: 0 solid var(--color-border, #dcdee2);
74
+ border-bottom-width: 1px;
75
+ }
76
+ .m-sheet .m-sheet__item:nth-last-child(1)::after {
77
+ display: none;
78
+ }
79
+ .m-sheet .m-sheet__cancel {
80
+ border-top: 24rpx solid #e3e3e3;
81
+ }
82
+ .m-sheet .m-sheet__loading {
83
+ display: inline-block;
84
+ vertical-align: middle;
85
+ margin-right: 20rpx;
86
+ width: 24rpx;
87
+ height: 24rpx;
88
+ background: 0 0;
89
+ border-radius: 50%;
90
+ border: 4rpx solid #e5e5e5;
91
+ border-left-color: #666;
92
+ animation: btn-spin 0.6s linear infinite;
93
+ }
94
+ .m-sheet .m-sheet__text {
95
+ display: inline-block;
96
+ vertical-align: middle;
97
+ }
98
+ .m-sheet .m-sheet__btn-icon {
99
+ margin-right: 8rpx;
100
+ }
101
+ @keyframes btn-spin {
102
+ 0% {
103
+ transform: rotate(0);
104
+ }
105
+ 100% {
106
+ transform: rotate(360deg);
107
+ }
108
+ }
109
+ .m-sheet .m-button {
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ position: relative;
114
+ white-space: nowrap;
115
+ letter-spacing: 4rpx;
116
+ height: 96rpx;
117
+ font-size: 32rpx;
118
+ border: 0 !important;
119
+ border-radius: 0;
120
+ color: #495060;
121
+ overflow: visible;
122
+ background-color: #fff;
123
+ box-sizing: border-box;
124
+ transition: opacity 0.16s, background-color 0.16s;
125
+ }
126
+ .m-sheet .m-button.is-hover {
127
+ background-color: #f9f9f9;
128
+ }
129
+ .m-sheet .m-button.is-disabled {
130
+ color: #c8c9cc;
131
+ }
132
+ .m-sheet .m-button::after {
133
+ border: none;
134
+ content: " ";
135
+ height: 1px;
136
+ position: absolute;
137
+ bottom: 0;
138
+ left: 0;
139
+ transform: scaleY(0.5);
140
+ transform-origin: 0 0;
141
+ box-sizing: border-box;
142
+ }
143
+ .m-sheet .m-button .m-sheet__btn-icon {
144
+ display: inline-block;
145
+ font-size: 28rpx;
146
+ width: 24rpx;
147
+ height: 24rpx;
148
+ }
149
+ .m-sheet .m-button .m-button__loading {
150
+ display: inline-block;
151
+ vertical-align: middle;
152
+ width: 32rpx;
153
+ height: 32rpx;
154
+ background-color: 0 0;
155
+ border-radius: 50%;
156
+ border: 4rpx solid currentColor;
157
+ border-left-color: transparent;
158
+ animation: btn-spinner 0.8s linear;
159
+ animation-iteration-count: infinite;
160
+ }
@@ -0,0 +1,156 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 36);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 36:
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ "use strict";
94
+
95
+
96
+ Component({
97
+ externalClasses: ['custom-class'],
98
+
99
+ options: {
100
+ addGlobalClass: true
101
+ },
102
+
103
+ properties: {
104
+ value: {
105
+ type: Number,
106
+ optionalTypes: [Number, String],
107
+ value: '',
108
+ observer: '_valueObserver'
109
+ },
110
+ max: {
111
+ type: Number,
112
+ value: 99
113
+ },
114
+ bgcolor: {
115
+ type: String,
116
+ value: ''
117
+ },
118
+ isDot: {
119
+ type: Boolean,
120
+ value: false
121
+ },
122
+ static: {
123
+ type: Boolean,
124
+ value: false
125
+ }
126
+ },
127
+
128
+ data: {
129
+ _value: 0
130
+ },
131
+
132
+ methods: {
133
+ _valueObserver: function _valueObserver() {
134
+ var _data = this.data,
135
+ value = _data.value,
136
+ max = _data.max;
137
+
138
+
139
+ var _value = '';
140
+ if (!isNaN(value)) {
141
+ _value = parseInt(value) > parseInt(max) ? max + '+' : value;
142
+ } else {
143
+ _value = value;
144
+ }
145
+
146
+ this.setData({
147
+ _value: _value
148
+ });
149
+ }
150
+ }
151
+ });
152
+
153
+ /***/ })
154
+
155
+ /******/ });
156
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-badge/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","value","type","Number","optionalTypes","String","observer","max","bgcolor","isDot","Boolean","static","data","_value","methods","_valueObserver","isNaN","parseInt","setData"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,CADT;;AAGRC,WAAS;AACPC,oBAAgB;AADT,GAHD;;AAORC,cAAY;AACVC,WAAO;AACLC,YAAMC,MADD;AAELC,qBAAe,CAACD,MAAD,EAASE,MAAT,CAFV;AAGLJ,aAAO,EAHF;AAILK,gBAAU;AAJL,KADG;AAOVC,SAAK;AACHL,YAAMC,MADH;AAEHF,aAAO;AAFJ,KAPK;AAWVO,aAAS;AACPN,YAAMG,MADC;AAEPJ,aAAO;AAFA,KAXC;AAeVQ,WAAO;AACLP,YAAMQ,OADD;AAELT,aAAO;AAFF,KAfG;AAmBVU,YAAQ;AACNT,YAAMQ,OADA;AAENT,aAAO;AAFD;AAnBE,GAPJ;;AAgCRW,QAAM;AACJC,YAAQ;AADJ,GAhCE;;AAoCRC,WAAS;AACPC,kBADO,4BACU;AAAA,kBACQ,KAAKH,IADb;AAAA,UACPX,KADO,SACPA,KADO;AAAA,UACAM,GADA,SACAA,GADA;;;AAGf,UAAIM,SAAS,EAAb;AACA,UAAI,CAACG,MAAMf,KAAN,CAAL,EAAmB;AACjBY,iBAASI,SAAShB,KAAT,IAAkBgB,SAASV,GAAT,CAAlB,GAAqCA,GAArC,SAA8CN,KAAvD;AACD,OAFD,MAEO;AACLY,iBAASZ,KAAT;AACD;;AAED,WAAKiB,OAAL,CAAa;AACXL;AADW,OAAb;AAGD;AAdM;AApCD,CAAV,E","file":"bld-badge/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","Component({\n externalClasses: ['custom-class'],\n\n options: {\n addGlobalClass: true,\n },\n\n properties: {\n value: {\n type: Number,\n optionalTypes: [Number, String],\n value: '',\n observer: '_valueObserver'\n },\n max: {\n type: Number,\n value: 99\n },\n bgcolor: {\n type: String,\n value: ''\n },\n isDot: {\n type: Boolean,\n value: false\n },\n static: {\n type: Boolean,\n value: false\n }\n },\n\n data: {\n _value: 0\n },\n\n methods: {\n _valueObserver() {\n const { value, max } = this.data\n\n let _value = ''\n if (!isNaN(value)) {\n _value = parseInt(value) > parseInt(max) ? `${max}+` : value\n } else {\n _value = value\n }\n\n this.setData({\n _value\n })\n }\n }\n})\n"],"sourceRoot":""}
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -0,0 +1,14 @@
1
+ <view class="m-badge custom-class">
2
+ <slot />
3
+ <view
4
+ wx:if="{{ isDot }}"
5
+ class="m-badge-dot"
6
+ style="{{ bgcolor ? 'background-color: ' + bgcolor : '' }}"
7
+ ></view>
8
+
9
+ <view
10
+ wx:elif="{{ value }}"
11
+ class="m-badge-count {{ static ? 'm-badge-count__static':'' }}"
12
+ style="{{ bgcolor ? 'background-color: ' + bgcolor : '' }}"
13
+ >{{ _value }}</view>
14
+ </view>
@@ -0,0 +1,43 @@
1
+ .m-badge {
2
+ position: relative;
3
+ display: inline-block;
4
+ line-height: 1;
5
+ }
6
+ .m-badge .m-badge-dot {
7
+ z-index: 1;
8
+ position: absolute;
9
+ top: 0;
10
+ right: 0;
11
+ height: 18rpx;
12
+ width: 18rpx;
13
+ transform: translate(50%, -50%);
14
+ transform-origin: 0;
15
+ border-radius: 50%;
16
+ background-color: var(--color-danger, #F56C6C);
17
+ box-shadow: 0 0 0 1px #fff;
18
+ }
19
+ .m-badge .m-badge-count {
20
+ z-index: 1;
21
+ position: absolute;
22
+ top: 0;
23
+ right: 0;
24
+ padding: 0 6rpx;
25
+ min-width: 20rpx;
26
+ height: 28rpx;
27
+ line-height: 28rpx;
28
+ color: #fff;
29
+ font-size: 24rpx;
30
+ border-radius: 40rpx;
31
+ border: 1px solid transparent;
32
+ text-align: center;
33
+ white-space: nowrap;
34
+ transform: translate(80%, -50%);
35
+ background-color: var(--color-danger, #F56C6C);
36
+ box-shadow: 0 0 0 4rpx #fff;
37
+ box-sizing: content-box;
38
+ }
39
+ .m-badge .m-badge-count.m-badge-count__static {
40
+ display: inline-block;
41
+ position: static;
42
+ transform: translateX(0);
43
+ }
@@ -1,4 +1,3 @@
1
1
  <view class="button {{ type }} {{ size }} iclass">
2
2
  <slot />
3
- <bld-icon name="loading" />
4
3
  </view>