bulade-ui 1.1.62 → 1.1.63
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.
|
@@ -163,7 +163,13 @@ Component({
|
|
|
163
163
|
data: {
|
|
164
164
|
style: "height:100%"
|
|
165
165
|
},
|
|
166
|
-
|
|
166
|
+
lifetimes: {
|
|
167
|
+
attached: function attached() {
|
|
168
|
+
if (!this.properties.enableAutoTrans) {
|
|
169
|
+
app.globalData.enableAutoTrans = this.properties.enableAutoTrans;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
167
173
|
observers: {
|
|
168
174
|
mode: function mode() {
|
|
169
175
|
this.setData({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-wrapper/index.js"],"names":["app","getApp","menuButtonInfo","globalData","menuButtonDistance","systemInfo","safeArea","saleAreaHeight","screenHeight","bottom","tabBarHeight","statusBarHeight","gap","top","navBarHeight","height","navToTab","navToBottom","topToTab","topToBottom","modeStyleMap","modeToStyle","mode","styles","Object","keys","map","key","join","Component","externalClasses","properties","type","String","value","enableAutoTrans","Boolean","data","style","observers","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;QAC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;AAGRC,cAAY;AACVT,UAAM;AACJU,YAAMC,MADF;AAEJC,aAAO;AAFH,KADI;AAKVC,qBAAiB;AACfH,YAAMI,OADS;AAEfF,aAAO;AAFQ;AALP,GAHJ;AAaRG,QAAM;AACJC,WAAO;AADH,GAbE
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-wrapper/index.js"],"names":["app","getApp","menuButtonInfo","globalData","menuButtonDistance","systemInfo","safeArea","saleAreaHeight","screenHeight","bottom","tabBarHeight","statusBarHeight","gap","top","navBarHeight","height","navToTab","navToBottom","topToTab","topToBottom","modeStyleMap","modeToStyle","mode","styles","Object","keys","map","key","join","Component","externalClasses","properties","type","String","value","enableAutoTrans","Boolean","data","style","lifetimes","attached","observers","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;;;;;;;;;;;AClFA,IAAMA,MAAMC,QAAZ;AACA;;AAEA,IAAMC,iBAAiBF,IAAIG,UAAJ,CAAeC,kBAAtC;AACA,IAAMC,aAAaL,IAAIG,UAAJ,CAAeE,UAAlC;AACA;AACA,IAAMC,WAAWD,WAAWC,QAA5B;AACA,IAAMC,iBAAiBF,WAAWG,YAAX,GAA0BF,S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,CAAegC,eAAf,GAAiC,KAAKJ,UAAL,CAAgBI,eAAjD;AACD;AACF;AALQ,GAhBH;AAuBRM,aAAW;AACTnB,UAAM,gBAAY;AAChB,WAAKoB,OAAL,CAAa;AACXJ,eAAOjB,YAAY,KAAKgB,IAAL,CAAUf,IAAtB;AADI,OAAb;AAGD;AALQ;AAvBH,CAAV,E","file":"bld-wrapper/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","const app = getApp();\n// const i18nBehavior = require(\"../behaviors/i18n-behavior\")\n\nconst menuButtonInfo = app.globalData.menuButtonDistance;\nconst systemInfo = app.globalData.systemInfo\n// 计算 tab bar 的高度\nconst safeArea = systemInfo.safeArea;\nconst saleAreaHeight = systemInfo.screenHeight - safeArea.bottom;\nconst tabBarHeight = 60 + saleAreaHeight;\n\n// 计算 nav bar 的高度\nconst statusBarHeight = systemInfo.statusBarHeight;\nconst gap = menuButtonInfo.top - statusBarHeight;\n\nconst navBarHeight = statusBarHeight + menuButtonInfo.height + gap * 2;\n\n// 占据 nav bar 和 tab bar 之间的空间\nconst navToTab = {\n top: `${navBarHeight}px`,\n height: `calc(100% - ${navBarHeight}px - ${tabBarHeight}px)`,\n};\n\n// 占据 nav bar 页面底部的空间\nconst navToBottom = {\n top: `${navBarHeight}px`,\n height: `calc(100% - ${navBarHeight}px)`,\n};\n\n// 从页面顶部到 tab bar 之间的空间\nconst topToTab = {\n top: \"0px\",\n height: `calc(100% - ${tabBarHeight}px)`,\n};\n\n// 占据所有空间\nconst topToBottom = {\n top: \"0px\",\n height: \"100%\",\n};\n\nconst modeStyleMap = {\n \"nav-to-tab\": navToTab,\n \"nav-to-bottom\": navToBottom,\n \"top-to-tab\": topToTab,\n \"top-to-bottom\": topToBottom,\n};\n\nfunction modeToStyle(mode) {\n const styles = modeStyleMap[mode];\n return Object.keys(styles)\n .map((key) => {\n return `${key}: ${styles[key]}`;\n })\n .join(\";\");\n}\n\nComponent({\n // behaviors: [i18nBehavior],\n externalClasses: [\"iclass\"],\n properties: {\n mode: {\n type: String,\n value: \"nav-to-bottom\",\n },\n enableAutoTrans: {\n type: Boolean,\n value: false,\n }, \n },\n data: {\n style: \"height:100%\"\n },\n lifetimes: {\n attached() {\n if(!this.properties.enableAutoTrans) {\n app.globalData.enableAutoTrans = this.properties.enableAutoTrans\n }\n }\n },\n observers: {\n mode: function () {\n this.setData({\n style: modeToStyle(this.data.mode),\n });\n },\n },\n});\n"],"sourceRoot":""}
|
package/package.json
CHANGED
package/src/bld-wrapper/index.js
CHANGED
|
@@ -65,12 +65,18 @@ Component({
|
|
|
65
65
|
enableAutoTrans: {
|
|
66
66
|
type: Boolean,
|
|
67
67
|
value: false,
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
69
|
},
|
|
70
70
|
data: {
|
|
71
71
|
style: "height:100%"
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
lifetimes: {
|
|
74
|
+
attached() {
|
|
75
|
+
if(!this.properties.enableAutoTrans) {
|
|
76
|
+
app.globalData.enableAutoTrans = this.properties.enableAutoTrans
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
74
80
|
observers: {
|
|
75
81
|
mode: function () {
|
|
76
82
|
this.setData({
|