bulade-ui 1.0.0 → 1.0.2

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 (91) hide show
  1. package/miniprogram_dist/bld-button/index.js +2 -1
  2. package/miniprogram_dist/bld-button/index.js.map +1 -0
  3. package/miniprogram_dist/bld-card/index.js +2 -1
  4. package/miniprogram_dist/bld-card/index.js.map +1 -0
  5. package/miniprogram_dist/bld-cell/index.js +2 -1
  6. package/miniprogram_dist/bld-cell/index.js.map +1 -0
  7. package/miniprogram_dist/bld-cell-field/index.js +2 -1
  8. package/miniprogram_dist/bld-cell-field/index.js.map +1 -0
  9. package/miniprogram_dist/bld-cell-group/index.js +2 -1
  10. package/miniprogram_dist/bld-cell-group/index.js.map +1 -0
  11. package/miniprogram_dist/bld-drawer/index.js +141 -0
  12. package/miniprogram_dist/bld-drawer/index.js.map +1 -0
  13. package/miniprogram_dist/bld-drawer/index.json +3 -0
  14. package/miniprogram_dist/bld-drawer/index.wxml +14 -0
  15. package/miniprogram_dist/bld-drawer/index.wxss +57 -0
  16. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.js +2 -1
  17. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.js.map +1 -0
  18. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.js +2 -1
  19. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.js.map +1 -0
  20. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.js +2 -1
  21. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.js.map +1 -0
  22. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.js +2 -1
  23. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.js.map +1 -0
  24. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.js +2 -1
  25. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.js.map +1 -0
  26. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.js +2 -1
  27. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.js.map +1 -0
  28. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.js +2 -1
  29. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.js.map +1 -0
  30. package/miniprogram_dist/bld-half-screen/index.js +2 -1
  31. package/miniprogram_dist/bld-half-screen/index.js.map +1 -0
  32. package/miniprogram_dist/bld-icon/index.js +2 -1
  33. package/miniprogram_dist/bld-icon/index.js.map +1 -0
  34. package/miniprogram_dist/bld-loading/index.js +2 -1
  35. package/miniprogram_dist/bld-loading/index.js.map +1 -0
  36. package/miniprogram_dist/bld-message/index.js +2 -1
  37. package/miniprogram_dist/bld-message/index.js.map +1 -0
  38. package/miniprogram_dist/bld-message/message.js +2 -1
  39. package/miniprogram_dist/bld-message/message.js.map +1 -0
  40. package/miniprogram_dist/bld-nav-bar/index.js +32 -4
  41. package/miniprogram_dist/bld-nav-bar/index.js.map +1 -0
  42. package/miniprogram_dist/bld-nav-bar/index.wxml +6 -1
  43. package/miniprogram_dist/bld-nav-bar/index.wxss +1 -1
  44. package/miniprogram_dist/bld-overlay/index.js +2 -1
  45. package/miniprogram_dist/bld-overlay/index.js.map +1 -0
  46. package/miniprogram_dist/bld-page/index.js +2 -1
  47. package/miniprogram_dist/bld-page/index.js.map +1 -0
  48. package/miniprogram_dist/bld-retry/index.js +2 -1
  49. package/miniprogram_dist/bld-retry/index.js.map +1 -0
  50. package/miniprogram_dist/bld-scroll-view/index.js +2 -1
  51. package/miniprogram_dist/bld-scroll-view/index.js.map +1 -0
  52. package/miniprogram_dist/bld-text/index.js +2 -1
  53. package/miniprogram_dist/bld-text/index.js.map +1 -0
  54. package/miniprogram_dist/bld-toast/index.js +2 -2
  55. package/miniprogram_dist/bld-toast/index.js.map +1 -0
  56. package/miniprogram_dist/bld-toast/toast.js +2 -1
  57. package/miniprogram_dist/bld-toast/toast.js.map +1 -0
  58. package/miniprogram_dist/bld-wrapper/index.js +2 -1
  59. package/miniprogram_dist/bld-wrapper/index.js.map +1 -0
  60. package/miniprogram_dist/button/index.js +2 -1
  61. package/miniprogram_dist/button/index.js.map +1 -0
  62. package/miniprogram_dist/cell/index.js +4 -3
  63. package/miniprogram_dist/cell/index.js.map +1 -0
  64. package/miniprogram_dist/cell-group/index.js +4 -3
  65. package/miniprogram_dist/cell-group/index.js.map +1 -0
  66. package/miniprogram_dist/grid/index.js +4 -3
  67. package/miniprogram_dist/grid/index.js.map +1 -0
  68. package/miniprogram_dist/grid-item/index.js +4 -3
  69. package/miniprogram_dist/grid-item/index.js.map +1 -0
  70. package/miniprogram_dist/icon/index.js +2 -1
  71. package/miniprogram_dist/icon/index.js.map +1 -0
  72. package/miniprogram_dist/timeline/index.js +4 -3
  73. package/miniprogram_dist/timeline/index.js.map +1 -0
  74. package/miniprogram_dist/timeline-item/index.js +4 -3
  75. package/miniprogram_dist/timeline-item/index.js.map +1 -0
  76. package/package.json +1 -1
  77. package/src/bld-drawer/index.js +41 -0
  78. package/src/bld-drawer/index.json +3 -0
  79. package/src/bld-drawer/index.scss +74 -0
  80. package/src/bld-drawer/index.wxml +14 -0
  81. package/src/bld-drawer/index.wxss +57 -0
  82. package/src/bld-nav-bar/index.js +30 -2
  83. package/src/bld-nav-bar/index.scss +2 -2
  84. package/src/bld-nav-bar/index.wxml +6 -1
  85. package/src/bld-nav-bar/index.wxss +1 -1
  86. package/src/bld-nav-bar1/index.js +90 -0
  87. package/src/bld-nav-bar1/index.json +6 -0
  88. package/src/bld-nav-bar1/index.scss +40 -0
  89. package/src/bld-nav-bar1/index.wxml +24 -0
  90. package/src/bld-nav-bar1/index.wxss +36 -0
  91. package/src/bld-toast/index.js +0 -1
@@ -138,4 +138,5 @@ Component({
138
138
 
139
139
  /***/ })
140
140
 
141
- /******/ });
141
+ /******/ });
142
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/icon/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","name","type","String","observer","val","setData","isImage","indexOf","size","Number","optionalTypes","value","fsize","parseInt","color","customStyle","data"],"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,UAAM;AACJC,YAAMC,MADF;AAEJC,cAFI,oBAEKC,GAFL,EAEU;AACZ,aAAKC,OAAL,CAAa;AACXC,mBAASF,IAAIG,OAAJ,CAAY,GAAZ,IAAmB,CAAC;AADlB,SAAb;AAGD;AANG,KADI;;AAUVC,UAAM;AACJP,YAAMQ,MADF;AAEJC,qBAAe,CAACD,MAAD,EAASP,MAAT,CAFX;AAGJS,aAAO,EAHH;AAIJR,cAJI,oBAIKC,GAJL,EAIU;AACZ,aAAKC,OAAL,CAAa;AACXO,iBAAOC,SAAST,GAAT;AADI,SAAb;AAGD;AARG,KAVI;AAoBVU,WAAO;AACLb,YAAMC,MADD;AAELS,aAAO;AAFF,KApBG;AAwBVI,iBAAa;AACXd,YAAMC,MADK;AAEXS,aAAO;AAFI;AAxBH,GAPJ;;AAqCRK,QAAM;AACJV,aAAS,KADL;AAEJM,WAAO;AAFH;AArCE,CAAV,E","file":"icon/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 = 25);\n","Component({\n externalClasses: ['custom-class'],\n\n options: {\n addGlobalClass: true,\n },\n\n properties: {\n name: {\n type: String,\n observer(val) {\n this.setData({\n isImage: val.indexOf('/') > -1\n })\n }\n },\n \n size: {\n type: Number,\n optionalTypes: [Number, String],\n value: 36,\n observer(val) {\n this.setData({\n fsize: parseInt(val)\n }) \n }\n },\n color: {\n type: String,\n value: ''\n },\n customStyle: {\n type: String,\n value: ''\n }\n },\n \n data: {\n isImage: false,\n fsize: 36\n }\n})"],"sourceRoot":""}
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 32);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 33);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 32:
90
+ /***/ 33:
91
91
  /***/ (function(module, exports, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -145,4 +145,5 @@ Component({
145
145
 
146
146
  /***/ })
147
147
 
148
- /******/ });
148
+ /******/ });
149
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/timeline/index.js"],"names":["Component","options","addGlobalClass","relations","type","linked","_updateChildren","linkChanged","_updateDataChange","unlinked","methods","timer","clearTimeout","setTimeout","children","getRelationNodes","len","length","lastIndex","forEach","child","index","setData","isLast"],"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;;AAERC,WAAS;AACPC,oBAAgB;AADT,GAFD;;AAMRC,aAAW;AACT,8BAA0B;AACxBC,YAAM,YADkB;;AAGxBC,YAHwB,oBAGf;AACP,aAAKC,eAAL;AACD,OALuB;AAOxBC,iBAPwB,yBAOV;AACZ,aAAKC,iBAAL;AACD,OATuB;AAWxBC,cAXwB,sBAWb;AACT,aAAKH,eAAL;AACD;AAbuB;AADjB,GANH;;AAwBRI,WAAS;AACPJ,mBADO,6BACW;AAAA;;AAEhB;AACA,UAAI,KAAKK,KAAT,EAAgB;AACdC,qBAAa,KAAKD,KAAlB;AACA,aAAKA,KAAL,GAAa,IAAb;AACD;;AAED,WAAKA,KAAL,GAAaE,WAAW,YAAM;AAC5B,YAAIC,WAAW,MAAKC,gBAAL,CAAsB,wBAAtB,CAAf;AACA,YAAMC,MAAMF,SAASG,MAArB;;AAEA,YAAID,MAAM,CAAV,EAAa;AACX,cAAIE,YAAYF,MAAM,CAAtB;;AAEAF,mBAASK,OAAT,CAAiB,UAACC,KAAD,EAAQC,KAAR,EAAkB;AACjCD,kBAAME,OAAN,CAAc;AACZC,sBAAQF,UAAUH;AADN,aAAd;AAGD,WAJD;AAKD;AACF,OAbY,EAaV,EAbU,CAAb;AAcD;AAvBM;AAxBD,CAAV,E","file":"timeline/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 = 33);\n","Component({\n\n options: {\n addGlobalClass: true,\n },\n\n relations: {\n '../timeline-item/index': {\n type: 'descendant',\n\n linked() {\n this._updateChildren()\n },\n\n linkChanged() {\n this._updateDataChange();\n },\n\n unlinked() {\n this._updateChildren()\n }\n }\n },\n\n methods: {\n _updateChildren() {\n\n // 防抖减少重复触发\n if (this.timer) {\n clearTimeout(this.timer)\n this.timer = null\n }\n\n this.timer = setTimeout(() => {\n let children = this.getRelationNodes('../timeline-item/index')\n const len = children.length\n\n if (len > 0) {\n let lastIndex = len - 1\n\n children.forEach((child, index) => {\n child.setData({\n isLast: index === lastIndex\n })\n })\n }\n }, 60)\n }\n }\n})"],"sourceRoot":""}
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 33);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 34);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 33:
90
+ /***/ 34:
91
91
  /***/ (function(module, exports, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -124,4 +124,5 @@ Component({
124
124
 
125
125
  /***/ })
126
126
 
127
- /******/ });
127
+ /******/ });
128
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/timeline-item/index.js"],"names":["Component","options","addGlobalClass","relations","type","properties","icon","String","text","color","data","isLast"],"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;;AAERC,WAAS;AACPC,oBAAgB;AADT,GAFD;;AAMRC,aAAW;AACT,yBAAqB;AACnBC,YAAM;AADa;AADZ,GANH;;AAYRC,cAAY;AACVC,UAAM;AACJF,YAAMG;AADF,KADI;AAIVC,UAAM;AACJJ,YAAMG;AADF,KAJI;AAOVE,WAAO;AACLL,YAAMG;AADD;AAPG,GAZJ;;AAwBRG,QAAM;AACJC,YAAQ;AADJ;AAxBE,CAAV,E","file":"timeline-item/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 = 34);\n","Component({\n \n options: {\n addGlobalClass: true,\n },\n\n relations: {\n '../timeline/index': {\n type: 'ancestor'\n }\n },\n\n properties: {\n icon: {\n type: String\n },\n text: {\n type: String,\n },\n color: {\n type: String\n }\n },\n\n data: {\n isLast: false\n }\n})"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulade-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "轻量、可靠的小程序 UI 组件库",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {
@@ -0,0 +1,41 @@
1
+ Component({
2
+ externalClasses: ['custom-class'],
3
+
4
+ options: {
5
+ addGlobalClass: true,
6
+ },
7
+
8
+ properties: {
9
+ visible: {
10
+ type: Boolean,
11
+ value: false
12
+ },
13
+
14
+ zIndex: {
15
+ type: Number,
16
+ value: 9
17
+ },
18
+
19
+ mask: {
20
+ type: Boolean,
21
+ value: true
22
+ },
23
+
24
+ maskClosable: {
25
+ type: Boolean,
26
+ value: true
27
+ },
28
+
29
+ position: {
30
+ type: String,
31
+ value: 'bottom' // left right top bottom
32
+ }
33
+ },
34
+
35
+ methods: {
36
+ handleMaskClick() {
37
+ if (!this.data.maskClosable) return
38
+ this.triggerEvent('close')
39
+ }
40
+ }
41
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "component": true
3
+ }
@@ -0,0 +1,74 @@
1
+ .m-drawer {
2
+ visibility: hidden;
3
+
4
+ &.m-drawer--show {
5
+ visibility: visible;
6
+
7
+ .m-drawer__mask {
8
+ display: block;
9
+ opacity: 1;
10
+ }
11
+
12
+ .m-drawer__content {
13
+ opacity: 1;
14
+ transform: translate3d(0, 0, 0) !important;
15
+ }
16
+ }
17
+
18
+ .m-drawer__mask {
19
+ opacity: 0;
20
+ z-index: 9;
21
+ position: fixed;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ background-color: var(--color-mask, rgba(0, 0, 0, 0.55));
27
+ transition: opacity .25s ease-in-out, visibility .25s ease-in-out;
28
+ }
29
+
30
+ .m-drawer__content {
31
+ opacity: 0;
32
+ z-index: 10;
33
+ position: fixed;
34
+ transform-origin: center;
35
+ background-color: #fff;
36
+ transition: transform .25s ease-in-out, opacity .25s ease-in-out, visibility .25s ease-in-out;
37
+ }
38
+
39
+ &.m-drawer--left {
40
+ .m-drawer__content {
41
+ top: 0;
42
+ left: 0;
43
+ transform: translate3d(-100%, 0, 0);
44
+ }
45
+ }
46
+
47
+ &.m-drawer--right {
48
+ .m-drawer__content {
49
+ right: 0;
50
+ top: 0;
51
+ transform: translate3d(100%, 0, 0);
52
+ }
53
+ }
54
+
55
+ &.m-drawer--top {
56
+ .m-drawer__content {
57
+ left: 0;
58
+ top: 0;
59
+ width: 100%;
60
+ transform: translate3d(0, -100%, 0);
61
+ }
62
+ }
63
+
64
+ &.m-drawer--bottom {
65
+ .m-drawer__content {
66
+ left: 0;
67
+ bottom: 0;
68
+ width: 100%;
69
+ transform: translate3d(0, 100%, 0);
70
+ padding-bottom: constant(safe-area-inset-bottom);
71
+ padding-bottom: env(safe-area-inset-bottom);
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,14 @@
1
+ <view class="custom-class m-drawer {{ visible ? 'm-drawer--show' : '' }} {{ 'm-drawer--' + position }}">
2
+ <view
3
+ wx:if="{{ mask }}"
4
+ class="m-drawer__mask"
5
+ style="z-index: {{zIndex}}"
6
+ bindtap="handleMaskClick"
7
+ ></view>
8
+ <view
9
+ class="m-drawer__content"
10
+ style="z-index: {{zIndex}}"
11
+ >
12
+ <slot />
13
+ </view>
14
+ </view>
@@ -0,0 +1,57 @@
1
+ .m-drawer {
2
+ visibility: hidden;
3
+ }
4
+ .m-drawer.m-drawer--show {
5
+ visibility: visible;
6
+ }
7
+ .m-drawer.m-drawer--show .m-drawer__mask {
8
+ display: block;
9
+ opacity: 1;
10
+ }
11
+ .m-drawer.m-drawer--show .m-drawer__content {
12
+ opacity: 1;
13
+ transform: translate3d(0, 0, 0) !important;
14
+ }
15
+ .m-drawer .m-drawer__mask {
16
+ opacity: 0;
17
+ z-index: 9;
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ background-color: var(--color-mask, rgba(0, 0, 0, 0.55));
24
+ transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
25
+ }
26
+ .m-drawer .m-drawer__content {
27
+ opacity: 0;
28
+ z-index: 10;
29
+ position: fixed;
30
+ transform-origin: center;
31
+ background-color: #fff;
32
+ transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
33
+ }
34
+ .m-drawer.m-drawer--left .m-drawer__content {
35
+ top: 0;
36
+ left: 0;
37
+ transform: translate3d(-100%, 0, 0);
38
+ }
39
+ .m-drawer.m-drawer--right .m-drawer__content {
40
+ right: 0;
41
+ top: 0;
42
+ transform: translate3d(100%, 0, 0);
43
+ }
44
+ .m-drawer.m-drawer--top .m-drawer__content {
45
+ left: 0;
46
+ top: 0;
47
+ width: 100%;
48
+ transform: translate3d(0, -100%, 0);
49
+ }
50
+ .m-drawer.m-drawer--bottom .m-drawer__content {
51
+ left: 0;
52
+ bottom: 0;
53
+ width: 100%;
54
+ transform: translate3d(0, 100%, 0);
55
+ padding-bottom: constant(safe-area-inset-bottom);
56
+ padding-bottom: env(safe-area-inset-bottom);
57
+ }
@@ -3,7 +3,6 @@ const app = getApp();
3
3
  const deviceInfo = app.globalData.deviceInfo;
4
4
  const systemInfo = app.globalData.systemInfo;
5
5
  const menuButtonInfo = app.globalData.menuButtonDistance;
6
-
7
6
  const screenWidth = systemInfo.screenWidth;
8
7
 
9
8
  const statusBarHeight = systemInfo.statusBarHeight;
@@ -41,9 +40,14 @@ Component({
41
40
  type: Boolean,
42
41
  value: false,
43
42
  },
43
+ textAlign: {
44
+ type: String,
45
+ value: "left",
46
+ },
44
47
  },
45
48
  data: {
46
49
  style: _baseStyle.join(";"),
50
+ titleStyle: "",
47
51
  },
48
52
  lifetimes: {
49
53
  ready() {
@@ -67,11 +71,35 @@ Component({
67
71
  });
68
72
  }
69
73
  },
74
+
75
+ goBack: function (goBack) {
76
+ if (this.data.textAlign == "left") {
77
+ this.setData({
78
+ titleStyle: `justify-content: flex-start; padding-left: ${(12 - padding) * 2}rpx;`,
79
+ });
80
+ return;
81
+ }
82
+
83
+ if (goBack) {
84
+ this.createSelectorQuery()
85
+ .select(".operations")
86
+ .boundingClientRect((res) => {
87
+ this.setData({
88
+ titleStyle: `padding-left: ${(menuButtonInfo.width - padding - res.height) * 2}rpx`,
89
+ });
90
+ })
91
+ .exec();
92
+ } else {
93
+ this.setData({
94
+ titleStyle: `padding-left: ${(menuButtonInfo.width - padding) * 2}rpx`,
95
+ });
96
+ }
97
+ },
70
98
  },
71
99
  methods: {
72
100
  navigateHome() {
73
101
  wx.switchTab({
74
- url: "/pages/main/index",
102
+ url: "/pages/home/index",
75
103
  });
76
104
  },
77
105
 
@@ -13,7 +13,7 @@
13
13
  .title {
14
14
  flex: 1;
15
15
  display: flex;
16
- justify-content: flex-start;
16
+ justify-content: center;
17
17
  align-items: center;
18
18
  }
19
19
 
@@ -37,4 +37,4 @@
37
37
  margin-left: 12rpx;
38
38
  }
39
39
  }
40
- }
40
+ }
@@ -11,7 +11,12 @@
11
11
  <bld-icon name="backward" />
12
12
  </view>
13
13
  </view>
14
- <view class="title"> <slot wx:if="{{ showTitle }}" /> </view>
14
+ <view
15
+ class="title"
16
+ style="{{ titleStyle }}"
17
+ >
18
+ <slot wx:if="{{ showTitle }}" />
19
+ </view>
15
20
  <view class="operations right">
16
21
  <button
17
22
  wx:if="{{ showShare }}"
@@ -13,7 +13,7 @@
13
13
  .title {
14
14
  flex: 1;
15
15
  display: flex;
16
- justify-content: flex-start;
16
+ justify-content: center;
17
17
  align-items: center;
18
18
  }
19
19
 
@@ -0,0 +1,90 @@
1
+ const app = getApp();
2
+
3
+ const deviceInfo = app.globalData.deviceInfo;
4
+ const systemInfo = app.globalData.systemInfo;
5
+ const menuButtonInfo = app.globalData.menuButtonDistance;
6
+
7
+ const screenWidth = systemInfo.screenWidth;
8
+
9
+ const statusBarHeight = systemInfo.statusBarHeight;
10
+ const gap = menuButtonInfo.top - statusBarHeight;
11
+ const padding = screenWidth - menuButtonInfo.right;
12
+
13
+ const _baseStyle = [
14
+ `padding-top: ${menuButtonInfo.top}px`,
15
+ `padding-bottom: ${gap}px`,
16
+ `line-height: ${menuButtonInfo.height}px`,
17
+ `height: ${menuButtonInfo.height}px`,
18
+ `padding-left: ${padding}px`,
19
+ `padding-right: ${padding * 2 + menuButtonInfo.width}px`,
20
+ `width: calc(100% - ${3 * padding + menuButtonInfo.width}px)`,
21
+ ];
22
+
23
+ Component({
24
+ externalClasses: ["iclass"],
25
+ options: {
26
+ multipleSlots: true, // 在组件定义时的选项中启用多slot支持
27
+ },
28
+ properties: {
29
+ bgColor: {
30
+ type: String,
31
+ },
32
+ goBack: {
33
+ type: Boolean,
34
+ value: false,
35
+ },
36
+ showTitle: {
37
+ type: Boolean,
38
+ value: true,
39
+ },
40
+ showShare: {
41
+ type: Boolean,
42
+ value: false,
43
+ },
44
+ },
45
+ data: {
46
+ style: _baseStyle.join(";"),
47
+ },
48
+ lifetimes: {
49
+ ready() {
50
+ const totalHeight = menuButtonInfo.top + menuButtonInfo.height + gap;
51
+
52
+ this.triggerEvent("height-change", totalHeight);
53
+ },
54
+ },
55
+ observers: {
56
+ bgColor: function (bgColor) {
57
+ if (bgColor) {
58
+ const _style = [..._baseStyle];
59
+
60
+ _style.push(`background-color: ${bgColor}`);
61
+ this.setData({
62
+ style: _style.join(";"),
63
+ });
64
+ } else {
65
+ this.setData({
66
+ style: _baseStyle.join(";"),
67
+ });
68
+ }
69
+ },
70
+ },
71
+ methods: {
72
+ navigateHome() {
73
+ wx.switchTab({
74
+ url: "/pages/main/index",
75
+ });
76
+ },
77
+
78
+ navigateBack() {
79
+ const pages = getCurrentPages();
80
+
81
+ if (pages.length > 1) {
82
+ wx.navigateBack();
83
+
84
+ return;
85
+ }
86
+
87
+ this.navigateHome();
88
+ },
89
+ },
90
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "bld-icon": "../bld-icon/index"
5
+ }
6
+ }
@@ -0,0 +1,40 @@
1
+ .nav-bar {
2
+ font-size: var(--font-size-lg);
3
+ font-weight: 500;
4
+ display: flex;
5
+ justify-content: flex-start;
6
+ align-items: center;
7
+ position: fixed;
8
+ left: 0;
9
+ top: 0;
10
+ z-index: 1000;
11
+ }
12
+
13
+ .title {
14
+ flex: 1;
15
+ display: flex;
16
+ justify-content: flex-start;
17
+ align-items: center;
18
+ }
19
+
20
+ .operation {
21
+ background: rgba(255, 255, 255, 0.6);
22
+ border: 1rpx solid rgba(0, 0, 0, 0.1);
23
+ border-radius: 32rpx;
24
+ width: 60rpx;
25
+ height: 60rpx;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ margin-right: 12rpx;
30
+ padding: 0;
31
+ }
32
+
33
+ .operations {
34
+ &.right {
35
+ .operation {
36
+ margin-right: 0;
37
+ margin-left: 12rpx;
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,24 @@
1
+ <view
2
+ class="iclass nav-bar"
3
+ style="{{ style }}"
4
+ >
5
+ <view class="operations">
6
+ <view
7
+ wx:if="{{ goBack }}"
8
+ class="operation"
9
+ bind:tap="navigateBack"
10
+ >
11
+ <bld-icon name="backward" />
12
+ </view>
13
+ </view>
14
+ <view class="title"> <slot wx:if="{{ showTitle }}" /> </view>
15
+ <view class="operations right">
16
+ <button
17
+ wx:if="{{ showShare }}"
18
+ class="operation"
19
+ open-type="share"
20
+ >
21
+ <bld-icon name="share" />
22
+ </button>
23
+ </view>
24
+ </view>
@@ -0,0 +1,36 @@
1
+ .nav-bar {
2
+ font-size: var(--font-size-lg);
3
+ font-weight: 500;
4
+ display: flex;
5
+ justify-content: flex-start;
6
+ align-items: center;
7
+ position: fixed;
8
+ left: 0;
9
+ top: 0;
10
+ z-index: 1000;
11
+ }
12
+
13
+ .title {
14
+ flex: 1;
15
+ display: flex;
16
+ justify-content: flex-start;
17
+ align-items: center;
18
+ }
19
+
20
+ .operation {
21
+ background: rgba(255, 255, 255, 0.6);
22
+ border: 1rpx solid rgba(0, 0, 0, 0.1);
23
+ border-radius: 32rpx;
24
+ width: 60rpx;
25
+ height: 60rpx;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ margin-right: 12rpx;
30
+ padding: 0;
31
+ }
32
+
33
+ .operations.right .operation {
34
+ margin-right: 0;
35
+ margin-left: 12rpx;
36
+ }
@@ -64,7 +64,6 @@ Component({
64
64
  },
65
65
 
66
66
  open(options) {
67
- debugger
68
67
  const {
69
68
  type = '',
70
69
  icon = '',