bulade-ui 1.1.34 → 1.1.36

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.
@@ -107,7 +107,7 @@ var GestureState = {
107
107
  };
108
108
 
109
109
  Component({
110
- externalClasses: ["referenceClass", "containerClass", "headerClass", "headerTittleClass", "contentClass", "markClass"],
110
+ externalClasses: ["referenceClass", "containerClass", "headerClass", "headerTittleClass", "contentClass", "markClass", "footerClass"],
111
111
  properties: {
112
112
  showHalfScreen: {
113
113
  type: Boolean,
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-half-screen/index.js"],"names":["wx","worklet","shared","timing","GestureState","POSSIBLE","BEGIN","ACTIVE","END","CANCELLED","Component","externalClasses","properties","showHalfScreen","type","Boolean","value","mark","maskClosable","containerHeight","String","showClose","canClose","options","multipleSlots","data","showMark","observers","newShow","openComment","closeComment","canCloseSelect","lifetimes","created","transY","scrollTop","startPan","commentHeight","setData","ready","query","createSelectorQuery","select","boundingClientRect","exec","res","height","applyAnimatedStyle","transform","methods","scrollToLower","triggerEvent","scrollTouUpPer","onTapOpenComment","changeMask","duration","runOnJS","bind","onTapCloseComment","closeByMark","shouldPanResponse","shouldScrollViewResponse","pointerEvent","deltaY","result","handlePan","gestureEvent","state","curPosition","destination","Math","max","velocityY","adjustDecelerationVelocity","velocity","handleScroll","evt","detail"],"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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I,CAAC,KAAKnC,cAAV,EAA0B;AAC1B,UAAImC,aAAaC,KAAb,KAAuB/D,aAAaG,MAAxC,EAAgD;AAC9C,YAAM6D,cAAc,KAAKlC,MAAL,CAAYlB,KAAhC;AACA,YAAMqD,cAAcC,KAAKC,GAAL,CAAS,CAAT,EAAYH,cAAcF,aAAaH,MAAvC,CAApB;AACA,YAAIK,gBAAgBC,WAApB,EAAiC;AACjC,aAAKnC,MAAL,CAAYlB,KAAZ,GAAoBqD,WAApB;AACD;;AAED,UAAIH,aAAaC,KAAb,KAAuB/D,aAAaI,GAApC,IAA2C0D,aAAaC,KAAb,KAAuB/D,aAAaK,SAAnF,EAA8F;AAC5F,YAAIyD,aAAaM,SAAb,GAAyB,GAAzB,IAAgC,KAAKtC,MAAL,CAAYlB,KAAZ,GAAoB,EAAxD,EAA4D;AAC1D,eAAKc,YAAL;AACD,SAFD,MAEO,IAAI,KAAKI,MAAL,CAAYlB,KAAZ,GAAoB,KAAKqB,aAAL,CAAmBrB,KAAnB,GAA2B,CAAnD,EAAsD;AAC3D,eAAKc,YAAL;AACD,SAFM,MAEA;AACL,eAAKD,WAAL,CAAiB,GAAjB;AACD;AACF;AACF,KA1EM;AA2EP4C,8BA3EO,sCA2EoBC,QA3EpB,EA2E8B;AACnC;;AACA,UAAMvC,YAAY,KAAKA,SAAL,CAAenB,KAAjC;AACA,aAAOmB,aAAa,CAAb,GAAiB,CAAjB,GAAqBuC,QAA5B;AACD,KA/EM;AAgFPC,gBAhFO,wBAgFMC,GAhFN,EAgFW;AAChB;;AACA,WAAKzC,SAAL,CAAenB,KAAf,GAAuB4D,IAAIC,MAAJ,CAAW1C,SAAlC;AACD;AAnFM;AAvED,CAAV,E","file":"bld-half-screen\\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 = 12);\n","const { shared, timing } = wx.worklet\r\n\r\nconst GestureState = {\r\n POSSIBLE: 0, // 0 此时手势未识别,如 panDown等\r\n BEGIN: 1, // 1 手势已识别\r\n ACTIVE: 2, // 2 连续手势活跃状态\r\n END: 3, // 3 手势终止\r\n CANCELLED: 4 // 4 手势取消,\r\n}\r\n\r\nComponent({\r\n externalClasses: [\"referenceClass\", \"containerClass\", \"headerClass\", \"headerTittleClass\", \"contentClass\", \"markClass\"],\r\n properties: {\r\n showHalfScreen: {\r\n type: Boolean,\r\n value: false\r\n },\r\n mark: {\r\n type: Boolean,\r\n value: false\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n value: true\r\n },\r\n containerHeight: {\r\n type: String,\r\n value: \"50vh\"\r\n },\r\n showClose: {\r\n type: Boolean,\r\n value: true\r\n },\r\n canClose: {\r\n type: Boolean,\r\n value: true\r\n }\r\n },\r\n options: {\r\n multipleSlots: true // 在组件定义时的选项中启用多slot支持\r\n },\r\n data: {\r\n showMark: false\r\n },\r\n observers: {\r\n showHalfScreen: function(newShow) {\r\n if (newShow) {\r\n this.openComment(300)\r\n } else {\r\n this.closeComment()\r\n }\r\n },\r\n canClose: function() {\r\n this.canCloseSelect = this.properties.canClose\r\n }\r\n },\r\n lifetimes: {\r\n created() {\r\n this.transY = shared(1000)\r\n this.scrollTop = shared(0)\r\n this.startPan = shared(true)\r\n this.commentHeight = shared(1000)\r\n this.canCloseSelect = this.properties.canClose\r\n this.setData({\r\n showMark: this.properties.mark\r\n })\r\n },\r\n ready() {\r\n const query = this.createSelectorQuery()\r\n // ready 生命周期里才能获取到首屏的布局信息\r\n query.select(\".comment-container\").boundingClientRect()\r\n query.exec((res) => {\r\n this.transY.value = this.commentHeight.value = res[0].height\r\n })\r\n // 通过 transY 一个 SharedValue 控制半屏的位置\r\n this.applyAnimatedStyle(\".comment-container\", () => {\r\n \"worklet\"\r\n return { transform: `translateY(${this.transY.value}px)` }\r\n })\r\n }\r\n },\r\n methods: {\r\n scrollToLower() {\r\n this.triggerEvent(\"scrollToLower\")\r\n\r\n },\r\n scrollTouUpPer() {\r\n this.triggerEvent(\"scrollTouUpPer\")\r\n\r\n },\r\n onTapOpenComment() {\r\n this.openComment(300)\r\n },\r\n changeMask(mark) {\r\n if (this.properties.mark) {\r\n this.setData({\r\n showMark: mark\r\n })\r\n } else {\r\n this.triggerEvent(\"closeHalfScreen\")\r\n }\r\n },\r\n openComment(duration) {\r\n \"worklet\"\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(true)\r\n this.transY.value = timing(0, { duration })\r\n },\r\n onTapCloseComment() {\r\n this.closeComment()\r\n },\r\n closeByMark() {\r\n if (this.properties.maskClosable) {\r\n this.closeComment()\r\n }\r\n },\r\n closeComment() {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(false)\r\n this.transY.value = timing(this.commentHeight.value, { duration: 500 })\r\n },\r\n shouldPanResponse() {\r\n \"worklet\"\r\n return this.startPan.value\r\n },\r\n shouldScrollViewResponse(pointerEvent) {\r\n \"worklet\"\r\n // transY > 0 说明 pan 手势在移动半屏,此时滚动不应生效\r\n if (this.transY.value > 0) return false\r\n const scrollTop = this.scrollTop.value\r\n const { deltaY } = pointerEvent\r\n // deltaY > 0 是往上滚动,scrollTop <= 0 是滚动到顶部边界,此时 pan 开始生效,滚动不生效\r\n const result = scrollTop <= 0 && deltaY > 0\r\n this.startPan.value = result\r\n return !result\r\n },\r\n handlePan(gestureEvent) {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n if (gestureEvent.state === GestureState.ACTIVE) {\r\n const curPosition = this.transY.value\r\n const destination = Math.max(0, curPosition + gestureEvent.deltaY)\r\n if (curPosition === destination) return\r\n this.transY.value = destination\r\n }\r\n\r\n if (gestureEvent.state === GestureState.END || gestureEvent.state === GestureState.CANCELLED) {\r\n if (gestureEvent.velocityY > 500 && this.transY.value > 50) {\r\n this.closeComment()\r\n } else if (this.transY.value > this.commentHeight.value / 2) {\r\n this.closeComment()\r\n } else {\r\n this.openComment(100)\r\n }\r\n }\r\n },\r\n adjustDecelerationVelocity(velocity) {\r\n \"worklet\"\r\n const scrollTop = this.scrollTop.value\r\n return scrollTop <= 0 ? 0 : velocity\r\n },\r\n handleScroll(evt) {\r\n \"worklet\"\r\n this.scrollTop.value = evt.detail.scrollTop\r\n }\r\n }\r\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-half-screen/index.js"],"names":["wx","worklet","shared","timing","GestureState","POSSIBLE","BEGIN","ACTIVE","END","CANCELLED","Component","externalClasses","properties","showHalfScreen","type","Boolean","value","mark","maskClosable","containerHeight","String","showClose","canClose","options","multipleSlots","data","showMark","observers","newShow","openComment","closeComment","canCloseSelect","lifetimes","created","transY","scrollTop","startPan","commentHeight","setData","ready","query","createSelectorQuery","select","boundingClientRect","exec","res","height","applyAnimatedStyle","transform","methods","scrollToLower","triggerEvent","scrollTouUpPer","onTapOpenComment","changeMask","duration","runOnJS","bind","onTapCloseComment","closeByMark","shouldPanResponse","shouldScrollViewResponse","pointerEvent","deltaY","result","handlePan","gestureEvent","state","curPosition","destination","Math","max","velocityY","adjustDecelerationVelocity","velocity","handleScroll","evt","detail"],"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;QAC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\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 = 12);\n","const { shared, timing } = wx.worklet\r\n\r\nconst GestureState = {\r\n POSSIBLE: 0, // 0 此时手势未识别,如 panDown等\r\n BEGIN: 1, // 1 手势已识别\r\n ACTIVE: 2, // 2 连续手势活跃状态\r\n END: 3, // 3 手势终止\r\n CANCELLED: 4 // 4 手势取消,\r\n}\r\n\r\nComponent({\r\n externalClasses: [\"referenceClass\", \"containerClass\", \"headerClass\", \"headerTittleClass\", \"contentClass\", \"markClass\",\"footerClass\"],\r\n properties: {\r\n showHalfScreen: {\r\n type: Boolean,\r\n value: false\r\n },\r\n mark: {\r\n type: Boolean,\r\n value: false\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n value: true\r\n },\r\n containerHeight: {\r\n type: String,\r\n value: \"50vh\"\r\n },\r\n showClose: {\r\n type: Boolean,\r\n value: true\r\n },\r\n canClose: {\r\n type: Boolean,\r\n value: true\r\n }\r\n },\r\n options: {\r\n multipleSlots: true // 在组件定义时的选项中启用多slot支持\r\n },\r\n data: {\r\n showMark: false\r\n },\r\n observers: {\r\n showHalfScreen: function(newShow) {\r\n if (newShow) {\r\n this.openComment(300)\r\n } else {\r\n this.closeComment()\r\n }\r\n },\r\n canClose: function() {\r\n this.canCloseSelect = this.properties.canClose\r\n }\r\n },\r\n lifetimes: {\r\n created() {\r\n this.transY = shared(1000)\r\n this.scrollTop = shared(0)\r\n this.startPan = shared(true)\r\n this.commentHeight = shared(1000)\r\n this.canCloseSelect = this.properties.canClose\r\n this.setData({\r\n showMark: this.properties.mark\r\n })\r\n },\r\n ready() {\r\n const query = this.createSelectorQuery()\r\n // ready 生命周期里才能获取到首屏的布局信息\r\n query.select(\".comment-container\").boundingClientRect()\r\n query.exec((res) => {\r\n this.transY.value = this.commentHeight.value = res[0].height\r\n })\r\n // 通过 transY 一个 SharedValue 控制半屏的位置\r\n this.applyAnimatedStyle(\".comment-container\", () => {\r\n \"worklet\"\r\n return { transform: `translateY(${this.transY.value}px)` }\r\n })\r\n }\r\n },\r\n methods: {\r\n scrollToLower() {\r\n this.triggerEvent(\"scrollToLower\")\r\n\r\n },\r\n scrollTouUpPer() {\r\n this.triggerEvent(\"scrollTouUpPer\")\r\n\r\n },\r\n onTapOpenComment() {\r\n this.openComment(300)\r\n },\r\n changeMask(mark) {\r\n if (this.properties.mark) {\r\n this.setData({\r\n showMark: mark\r\n })\r\n } else {\r\n this.triggerEvent(\"closeHalfScreen\")\r\n }\r\n },\r\n openComment(duration) {\r\n \"worklet\"\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(true)\r\n this.transY.value = timing(0, { duration })\r\n },\r\n onTapCloseComment() {\r\n this.closeComment()\r\n },\r\n closeByMark() {\r\n if (this.properties.maskClosable) {\r\n this.closeComment()\r\n }\r\n },\r\n closeComment() {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(false)\r\n this.transY.value = timing(this.commentHeight.value, { duration: 500 })\r\n },\r\n shouldPanResponse() {\r\n \"worklet\"\r\n return this.startPan.value\r\n },\r\n shouldScrollViewResponse(pointerEvent) {\r\n \"worklet\"\r\n // transY > 0 说明 pan 手势在移动半屏,此时滚动不应生效\r\n if (this.transY.value > 0) return false\r\n const scrollTop = this.scrollTop.value\r\n const { deltaY } = pointerEvent\r\n // deltaY > 0 是往上滚动,scrollTop <= 0 是滚动到顶部边界,此时 pan 开始生效,滚动不生效\r\n const result = scrollTop <= 0 && deltaY > 0\r\n this.startPan.value = result\r\n return !result\r\n },\r\n handlePan(gestureEvent) {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n if (gestureEvent.state === GestureState.ACTIVE) {\r\n const curPosition = this.transY.value\r\n const destination = Math.max(0, curPosition + gestureEvent.deltaY)\r\n if (curPosition === destination) return\r\n this.transY.value = destination\r\n }\r\n\r\n if (gestureEvent.state === GestureState.END || gestureEvent.state === GestureState.CANCELLED) {\r\n if (gestureEvent.velocityY > 500 && this.transY.value > 50) {\r\n this.closeComment()\r\n } else if (this.transY.value > this.commentHeight.value / 2) {\r\n this.closeComment()\r\n } else {\r\n this.openComment(100)\r\n }\r\n }\r\n },\r\n adjustDecelerationVelocity(velocity) {\r\n \"worklet\"\r\n const scrollTop = this.scrollTop.value\r\n return scrollTop <= 0 ? 0 : velocity\r\n },\r\n handleScroll(evt) {\r\n \"worklet\"\r\n this.scrollTop.value = evt.detail.scrollTop\r\n }\r\n }\r\n})"],"sourceRoot":""}
@@ -28,7 +28,7 @@
28
28
  </scroll-view>
29
29
  </vertical-drag-gesture-handler>
30
30
  </pan-gesture-handler>
31
- <view class="safe-area-inset-bottom">
31
+ <view class="safe-area-inset-bottom footerClass">
32
32
  <slot name="footer"></slot>
33
33
  </view>
34
34
 
@@ -94,7 +94,7 @@ module.exports =
94
94
 
95
95
 
96
96
  Component({
97
- externalClasses: ["iclass"],
97
+ externalClasses: ["iclass", "richTextClass"],
98
98
  properties: {
99
99
  html: {
100
100
  type: String,
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-html/index.js"],"names":["Component","externalClasses","properties","html","type","String","value","loseStyle","Boolean","data","content","tagStyle","p","img","containerStyle","observers","replaceAll","setData","newValue"],"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,QAAD,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH,KADI;AAKVC,eAAU;AACRH,YAAMI,OADE;AAERF,aAAM;AAFE;AALA,GAFJ;AAYRG,QAAM;AACJC,aAAS,QADL;AAEJC,cAAU;AACRC,SAAG,qBADK;AAERC,WAAK;AAFG,KAFN;AAMJC,oBAAgB;AANZ,GAZE;AAoBRC,aAAW;AACTZ,QADS,kBACF;AACL,UAAIO,UAAU,KAAKD,IAAL,CAAUN,IAAxB;;AAEA;AACA;AACA;AACAO,gBAAUA,QAAQM,UAAR,CAAmB,QAAnB,EAA6B,2BAA7B,CAAV;;AAEA,WAAKC,OAAL,CAAa;AACXP;AADW,OAAb;AAGD,KAZQ;;AAaTH,eAAW,mBAASW,QAAT,EAAmB;AAC5B,UAAIA,QAAJ,EAAc;AACZ,aAAKD,OAAL,CAAa;AACXN,oBAAS;AADE,SAAb;AAGD;AACF;AAnBQ;AApBH,CAAV,E","file":"bld-html\\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({\r\n externalClasses: [\"iclass\"],\r\n properties: {\r\n html: {\r\n type: String,\r\n value: \"加载中...\",\r\n },\r\n loseStyle:{\r\n type: Boolean,\r\n value:false\r\n }\r\n },\r\n data: {\r\n content: \"加载中...\",\r\n tagStyle: {\r\n p: \"margin-bottom: 14px\",\r\n img: \"margin-bottom: 14px\"\r\n },\r\n containerStyle: \"padding: 0;\",\r\n },\r\n observers: {\r\n html() {\r\n let content = this.data.html;\r\n\r\n // content = content.replace(/style=\"(.*?)\"/gm, \"\");\r\n // content = content.replace(/class=\"(.*?)\"/gm, \"\");\r\n // content = content.replaceAll(\"<p><br></p>\", \"\");\r\n content = content.replaceAll(/\\<img/g, \"<img style='width: 100%;'\");\r\n\r\n this.setData({\r\n content,\r\n });\r\n },\r\n loseStyle: function(newValue) {\r\n if (newValue) {\r\n this.setData({\r\n tagStyle:{}\r\n })\r\n } \r\n },\r\n },\r\n});\r\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-html/index.js"],"names":["Component","externalClasses","properties","html","type","String","value","loseStyle","Boolean","data","content","tagStyle","p","img","containerStyle","observers","replaceAll","setData","newValue"],"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,QAAD,EAAU,eAAV,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH,KADI;AAKVC,eAAU;AACRH,YAAMI,OADE;AAERF,aAAM;AAFE;AALA,GAFJ;AAYRG,QAAM;AACJC,aAAS,QADL;AAEJC,cAAU;AACRC,SAAG,qBADK;AAERC,WAAK;AAFG,KAFN;AAMJC,oBAAgB;AANZ,GAZE;AAoBRC,aAAW;AACTZ,QADS,kBACF;AACL,UAAIO,UAAU,KAAKD,IAAL,CAAUN,IAAxB;;AAEA;AACA;AACA;AACAO,gBAAUA,QAAQM,UAAR,CAAmB,QAAnB,EAA6B,2BAA7B,CAAV;;AAEA,WAAKC,OAAL,CAAa;AACXP;AADW,OAAb;AAGD,KAZQ;;AAaTH,eAAW,mBAASW,QAAT,EAAmB;AAC5B,UAAIA,QAAJ,EAAc;AACZ,aAAKD,OAAL,CAAa;AACXN,oBAAS;AADE,SAAb;AAGD;AACF;AAnBQ;AApBH,CAAV,E","file":"bld-html\\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({\r\n externalClasses: [\"iclass\",\"richTextClass\"],\r\n properties: {\r\n html: {\r\n type: String,\r\n value: \"加载中...\",\r\n },\r\n loseStyle:{\r\n type: Boolean,\r\n value:false\r\n }\r\n },\r\n data: {\r\n content: \"加载中...\",\r\n tagStyle: {\r\n p: \"margin-bottom: 14px\",\r\n img: \"margin-bottom: 14px\"\r\n },\r\n containerStyle: \"padding: 0;\",\r\n },\r\n observers: {\r\n html() {\r\n let content = this.data.html;\r\n\r\n // content = content.replace(/style=\"(.*?)\"/gm, \"\");\r\n // content = content.replace(/class=\"(.*?)\"/gm, \"\");\r\n // content = content.replaceAll(\"<p><br></p>\", \"\");\r\n content = content.replaceAll(/\\<img/g, \"<img style='width: 100%;'\");\r\n\r\n this.setData({\r\n content,\r\n });\r\n },\r\n loseStyle: function(newValue) {\r\n if (newValue) {\r\n this.setData({\r\n tagStyle:{}\r\n })\r\n } \r\n },\r\n },\r\n});\r\n"],"sourceRoot":""}
@@ -5,5 +5,5 @@
5
5
  tag-style="{{ tagStyle }}"
6
6
  container-style="{{ containerStyle }}"
7
7
  /> -->
8
- <rich-text nodes="{{content}}" bindtap="tap" mode="web-static"></rich-text>
8
+ <rich-text nodes="{{content}}" bindtap="tap" mode="web-static" class="richTextClass"></rich-text>
9
9
  </view>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulade-ui",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "description": "轻量、可靠的小程序 UI 组件库",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ const GestureState = {
9
9
  }
10
10
 
11
11
  Component({
12
- externalClasses: ["referenceClass", "containerClass", "headerClass", "headerTittleClass", "contentClass", "markClass"],
12
+ externalClasses: ["referenceClass", "containerClass", "headerClass", "headerTittleClass", "contentClass", "markClass","footerClass"],
13
13
  properties: {
14
14
  showHalfScreen: {
15
15
  type: Boolean,
@@ -28,7 +28,7 @@
28
28
  </scroll-view>
29
29
  </vertical-drag-gesture-handler>
30
30
  </pan-gesture-handler>
31
- <view class="safe-area-inset-bottom">
31
+ <view class="safe-area-inset-bottom footerClass">
32
32
  <slot name="footer"></slot>
33
33
  </view>
34
34
 
@@ -1,5 +1,5 @@
1
1
  Component({
2
- externalClasses: ["iclass"],
2
+ externalClasses: ["iclass","richTextClass"],
3
3
  properties: {
4
4
  html: {
5
5
  type: String,
@@ -5,5 +5,5 @@
5
5
  tag-style="{{ tagStyle }}"
6
6
  container-style="{{ containerStyle }}"
7
7
  /> -->
8
- <rich-text nodes="{{content}}" bindtap="tap" mode="web-static"></rich-text>
8
+ <rich-text nodes="{{content}}" bindtap="tap" mode="web-static" class="richTextClass"></rich-text>
9
9
  </view>