UNPKG

@aiot-toolkit/velasim

Version:

vela for sim

788 lines (758 loc) 23.6 kB
export default function(global, globalThis, window, $app_exports$){ globalThis = undefined; global = typeof window === "undefined" ? global.__proto__ : window ; var createPageHandler = function() { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/zhoubingqing/workspace/vela/vela-demo-quality&cacheDirectory&plugins[]=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./node_modules/@aiot-toolkit/packager/lib/loaders/inject-suite-loader.js?hookName=onReady!./src/widgets/div/size/index.ux?uxType=page": /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/zhoubingqing/workspace/vela/vela-demo-quality&cacheDirectory&plugins[]=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./node_modules/@aiot-toolkit/packager/lib/loaders/inject-suite-loader.js?hookName=onReady!./src/widgets/div/size/index.ux?uxType=page ***! \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = function __scriptModule__ (module, exports, $app_require$){"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _default = { private: { a: 'flex-wrap:wrap', list: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'], divId: '', boundingClient1: {}, boundingClient2: { width: '', height: '', left: '', right: '', top: '', bottom: '' }, boundingClientRectStatus: false, boundingClientStatus: false }, onInit() {}, getBoundingClientRect(divId) { const that = this; this.$element(divId).getBoundingClientRect({ success(res) { if (divId == 'boundingClientRect') { that.boundingClientRectStatus = true; that.boundingClient1 = res; } else if (divId == 'boundingClient') { that.boundingClientStatus = true; that.boundingClient2 = res; } }, fail(reason) { prompt.showToast({ message: `获取失败,reason = ${reason}` }); }, complete() { console.info('complete'); } }); }, onReady() { this.$options = this._options || this.$options; if (this.$options._descriptor) { this.$options._descriptor['back'] = { access: 'public' }; } __webpack_require__.g.CASE_TEST_START = __webpack_require__.g.CASE_TEST_START || 1000; __webpack_require__.g.CASE_TEST_TIMEOUT = __webpack_require__.g.CASE_TEST_TIMEOUT || 2000; setTimeout(() => { if (this.back !== 'false') { console.info('没有关联测试用例,直接返回到之前的页面'); } }, __webpack_require__.g.CASE_TEST_START); } }; exports.default = _default; const moduleOwn = exports.default || module.exports; const accessors = ['public', 'protected', 'private']; if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc]; })) { throw new Error('页面VM对象中的属性data不可与"' + accessors.join(',') + '"同时存在,请使用private替换data名称'); } else if (!moduleOwn.data) { moduleOwn.data = {}; moduleOwn._descriptor = {}; accessors.forEach(function (acc) { const accType = typeof moduleOwn[acc]; if (accType === 'object') { moduleOwn.data = Object.assign(moduleOwn.data, moduleOwn[acc]); for (const name in moduleOwn[acc]) { moduleOwn._descriptor[name] = { access: acc }; } } else if (accType === 'function') { console.warn('页面VM对象中的属性' + acc + '的值不能是函数,请使用对象'); } }); }} /***/ }), /***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=style!./src/widgets/div/size/index.ux?uxType=page": /*!******************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=style!./src/widgets/div/size/index.ux?uxType=page ***! \******************************************************************************************************************************************************************************************************************************/ /***/ ((module) => { module.exports = [ [ [ [ 0, "hap-page" ] ], { "flexDirection": "column", "flex": 1, "backgroundColor": "#fbf9fe" } ], [ [ [ 0, "hap-comp" ] ], { "flexDirection": "column", "flex": 1, "backgroundColor": "#fbf9fe" } ], [ [ [ 0, "hap-row" ] ], { "flexDirection": "column", "borderTopWidth": "1px", "borderTopColor": "rgb(187,187,187)" } ], [ [ [ 0, "hap-row-inline" ] ], { "borderTopWidth": "1px", "borderTopColor": "rgb(187,187,187)" } ], [ [ [ 0, "hap-row-desc" ] ], { "color": "#3d3d3f", "paddingTop": "10px", "paddingRight": "0px", "paddingBottom": "10px", "paddingLeft": "20px", "backgroundColor": "#f1ebeb" } ], [ [ [ 0, "hap-row-desc-inline" ] ], { "color": "#3d3d3f", "paddingTop": "10px", "paddingRight": "0px", "paddingBottom": "10px", "paddingLeft": "20px", "backgroundColor": "#f1ebeb", "width": "300px" } ], [ [ [ 0, "hap-row-container" ] ], { "marginTop": "50px", "marginRight": "60px", "marginBottom": "50px", "marginLeft": "60px", "flexDirection": "column" } ], [ [ [ 0, "hap-row-content" ] ], { "flexDirection": "column", "backgroundColor": "#ffffff", "paddingTop": "30px", "paddingRight": "30px", "paddingBottom": "30px", "paddingLeft": "30px", "marginBottom": "50px" } ], [ [ [ 0, "btn-l" ] ], { "height": "80px", "textAlign": "center", "marginTop": "50px", "marginRight": "0px", "marginBottom": "50px", "marginLeft": "0px", "color": "#ffffff", "fontSize": "30px", "backgroundColor": "#0faeff" } ], [ [ [ 0, "btn-m" ] ], { "height": "80px", "textAlign": "center", "borderRadius": "5px", "marginTop": "50px", "marginRight": "30px", "marginBottom": "50px", "marginLeft": "30px", "color": "#ffffff", "fontSize": "30px", "backgroundColor": "#0faeff" } ], [ [ [ 0, "btn-s" ] ], { "height": "80px", "textAlign": "center", "borderRadius": "5px", "marginTop": "50px", "marginRight": "100px", "marginBottom": "50px", "marginLeft": "100px", "color": "#ffffff", "fontSize": "30px", "backgroundColor": "#0faeff" } ], [ [ [ 0, "hap-row-content" ], [ 0, "btn-s" ] ], { "height": "80px", "textAlign": "center", "borderRadius": "5px", "marginTop": "50px", "marginRight": "100px", "marginBottom": "50px", "marginLeft": "100px", "color": "#ffffff", "fontSize": "30px", "backgroundColor": "#0faeff" } ], [ [ [ 0, "flex-dir-col" ] ], { "flexDirection": "column" } ], [ [ [ 0, "flex-dir-row" ] ], { "flexDirection": "row" } ], [ [ [ 0, "hap-m-r-20" ] ], { "marginRight": "20px" } ], [ [ [ 0, "bg-red" ] ], { "backgroundColor": "#f76160" } ], [ [ [ 1, "boundingClientRect" ] ], { "width": "200px", "height": "200px", "borderTopWidth": "1px", "borderRightWidth": "1px", "borderBottomWidth": "1px", "borderLeftWidth": "1px", "borderStyle": "solid", "borderTopColor": "#f76160", "borderRightColor": "#f76160", "borderBottomColor": "#f76160", "borderLeftColor": "#f76160", "left": "-500px" } ], [ [ [ 1, "boundingClient" ] ], { "width": "600px", "height": "100px", "borderTopWidth": "1px", "borderRightWidth": "1px", "borderBottomWidth": "1px", "borderLeftWidth": "1px", "borderStyle": "solid", "borderTopColor": "#f76160", "borderRightColor": "#f76160", "borderBottomColor": "#f76160", "borderLeftColor": "#f76160", "left": "10px" } ] ] /***/ }), /***/ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/widgets/div/size/index.ux?uxType=page&": /*!******************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/widgets/div/size/index.ux?uxType=page& ***! \******************************************************************************************************************************************************************************************************************/ /***/ ((module) => { module.exports = function (vm) { const _vm_ = vm || this return aiot.__ce__("div", { "classList": [ "hap-page" ] }, [ aiot.__ce__("div", { "id": "uiSize1", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "自适应" }), aiot.__ce__("div", { "classList": [ "bg-red" ] }, [ aiot.__ce__("text", { "style": { "lineHeight": "40px", "backgroundColor": "#0000FF" }, "value": "文本" }) ]) ]), aiot.__ce__("div", { "id": "uiSize2", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "padding:50px;" }), aiot.__ce__("div", { "classList": [ "bg-red" ], "style": { "paddingTop": "50px", "paddingRight": "50px", "paddingBottom": "50px", "paddingLeft": "50px" } }, [ aiot.__ce__("text", { "value": "文本" }) ]) ]), aiot.__ce__("div", { "id": "uiSize3", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "padding:50px;margin:50px;" }), aiot.__ce__("div", { "classList": [ "bg-red" ], "style": { "paddingTop": "50px", "paddingRight": "50px", "paddingBottom": "50px", "paddingLeft": "50px", "marginTop": "50px", "marginRight": "50px", "marginBottom": "50px", "marginLeft": "50px" } }, [ aiot.__ce__("text", { "value": "文本" }) ]) ]), aiot.__ce__("div", { "id": "uiSize4", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "padding:50px;margin:50px;border:5px #FF0000;" }), aiot.__ce__("div", { "classList": [ "bg-red" ], "style": { "paddingTop": "50px", "paddingRight": "50px", "paddingBottom": "50px", "paddingLeft": "50px", "marginTop": "50px", "marginRight": "50px", "marginBottom": "50px", "marginLeft": "50px", "borderTopWidth": "5px", "borderRightWidth": "5px", "borderBottomWidth": "5px", "borderLeftWidth": "5px", "borderTopColor": "#FF0000", "borderRightColor": "#FF0000", "borderBottomColor": "#FF0000", "borderLeftColor": "#FF0000" } }, [ aiot.__ce__("text", { "value": "文本" }) ]) ]), aiot.__ce__("div", { "id": "uiSize5", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "padding:50px;margin:50px;width:200px;height:200px;" }), aiot.__ce__("div", { "classList": [ "bg-red" ], "style": { "paddingTop": "50px", "paddingRight": "50px", "paddingBottom": "50px", "paddingLeft": "50px", "marginTop": "50px", "marginRight": "50px", "marginBottom": "50px", "marginLeft": "50px", "width": "200px", "height": "200px" } }, [ aiot.__ce__("text", { "value": "长文本测试;长文本测试;长文本测试;长文本测试." }) ]) ]), aiot.__ce__("div", { "id": "uiSize6", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "padding:50px;margin:50px;width:200px;height:200px;border-width:10px;" }), aiot.__ce__("div", { "classList": [ "bg-red" ], "style": { "paddingTop": "50px", "paddingRight": "50px", "paddingBottom": "50px", "paddingLeft": "50px", "marginTop": "50px", "marginRight": "50px", "marginBottom": "50px", "marginLeft": "50px", "width": "200px", "height": "200px", "borderTopWidth": "10px", "borderRightWidth": "10px", "borderBottomWidth": "10px", "borderLeftWidth": "10px" } }, [ aiot.__ce__("text", { "value": "长文本测试;长文本测试;长文本测试;长文本测试." }) ]) ]), aiot.__ce__("div", { "id": "uiSize7", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "组件脱离标准流,获取top/bottom/left/right可以获取到负数" }), aiot.__ce__("div", { "id": "boundingClientRect" }), aiot.__ce__("text", { "value": "预期结果:left:-500" }), aiot.__ce__("text", { "show": function () {return _vm_.boundingClientRectStatus}, "value": function () {return '' + '实际结果:' + (_vm_.boundingClient1.left)} }), aiot.__ce__("input", { "type": "button", "value": "获取元素宽高", "classList": [ "btn-s" ], "events": { "click": function (evt) { return _vm_.getBoundingClientRect('boundingClientRect',evt)} } }) ]), aiot.__ce__("div", { "id": "uiSize8", "classList": [ "hap-row" ] }, [ aiot.__ce__("text", { "classList": [ "hap-row-desc" ], "value": "增加获取当前组件的布局位置的方法" }), aiot.__ce__("div", { "id": "boundingClient" }), aiot.__ce__("text", { "value": "预期结果:width: 600px;height: 100px;left: 10px;" }), aiot.__ce__("text", { "value": "实际结果:" }), aiot.__ce__("div", { "show": function () {return _vm_.boundingClientStatus}, "style": { "flexDirection": "column" } }, [ aiot.__ce__("text", { "value": function () {return '' + 'width: ' + (_vm_.boundingClient2.width)} }), aiot.__ce__("text", { "value": function () {return '' + 'height: ' + (_vm_.boundingClient2.height)} }), aiot.__ce__("text", { "value": function () {return '' + 'left: ' + (_vm_.boundingClient2.left)} }), aiot.__ce__("text", { "value": function () {return '' + 'right: ' + (_vm_.boundingClient2.right)} }), aiot.__ce__("text", { "value": function () {return '' + 'top: ' + (_vm_.boundingClient2.top)} }), aiot.__ce__("text", { "value": function () {return '' + 'bottom: ' + (_vm_.boundingClient2.bottom)} }) ]), aiot.__ce__("input", { "type": "button", "value": "获取元素bounding", "classList": [ "btn-s" ], "events": { "click": function (evt) { return _vm_.getBoundingClientRect('boundingClient',evt)} } }) ]) ]) } /***/ }), /***/ "./src/widgets/div/size/index.ux?uxType=page": /*!***************************************************!*\ !*** ./src/widgets/div/size/index.ux?uxType=page ***! \***************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var $app_style$ = __webpack_require__(/*! !../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=style!./index.ux?uxType=page */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/style-loader.js?index=0&type=style!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=style!./src/widgets/div/size/index.ux?uxType=page") var $app_script$ = __webpack_require__(/*! !../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!../../../../node_modules/babel-loader/lib/index.js?cwd=/home/zhoubingqing/workspace/vela/vela-demo-quality&cacheDirectory&plugins[]=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/packager/babel.config.js!../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!../../../../node_modules/@aiot-toolkit/packager/lib/loaders/inject-suite-loader.js?hookName=onReady!./index.ux?uxType=page */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/script-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/module-loader.js!./node_modules/babel-loader/lib/index.js?cwd=/home/zhoubingqing/workspace/vela/vela-demo-quality&cacheDirectory&plugins[]=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/babel-plugin-jsx.js&comments=false&configFile=/home/zhoubingqing/workspace/vela/vela-demo-quality/node_modules/@aiot-toolkit/packager/babel.config.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/access-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=script!./node_modules/@aiot-toolkit/packager/lib/loaders/inject-suite-loader.js?hookName=onReady!./src/widgets/div/size/index.ux?uxType=page") var $app_template$ = __webpack_require__(/*! !../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!../../../../node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./index.ux?uxType=page& */ "./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/template-loader.js!./node_modules/@aiot-toolkit/dsl-xvm/lib/loaders/fragment-loader.js?index=0&type=template!./src/widgets/div/size/index.ux?uxType=page&") $app_script$({}, $app_exports$, $app_require$); $app_exports$.default.template = $app_template$; $app_exports$.default.style = $app_style$; module.exports = $app_exports$.default; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(__webpack_module_cache__[moduleId]) { /******/ return __webpack_module_cache__[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __webpack_require__("./src/widgets/div/size/index.ux?uxType=page"); /******/ /******/ })() ; }; return createPageHandler(); };