@aiot-toolkit/velasim
Version:
vela for sim
917 lines (873 loc) • 27.2 kB
JavaScript
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/text/origin/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/text/origin/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 _index = _interopRequireDefault2(__webpack_require__(/*! ./test/widgets/text/origin/index.js */ "./test/widgets/text/origin/index.js"));
function _interopRequireDefault2(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = {
private: {
evtClicked: false,
fontWeightData: ['100', '700', '900', 'lighter', 'bolder', '-100', '1000', '855.5', '¥¥', '汉字']
},
onClickTest() {
console.info(`onClickTest: ${JSON.stringify(arguments)}`);
this.evtClicked = true;
},
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;
__webpack_require__.g.mocha = new Mocha({
reporter: 'json',
timeout: __webpack_require__.g.CASE_TEST_TIMEOUT
});
mocha.ui('bdd');
mocha.suite.emit('pre-require', __webpack_require__.g, null, mocha);
setTimeout(() => {
typeof _index.default === 'function' && (0, _index.default)(this);
const mochaRunner = mocha.run(() => {
if (mochaRunner) {
mochaRunner.testResults.stats.title = mocha.suite.suites && mocha.suite.suites[0] && mocha.suite.suites[0].title;
console.info('testResults: ', JSON.stringify(mochaRunner.testResults));
pushData('pageTestList', mochaRunner.testResults);
const stats = mochaRunner.testResults.stats;
}
if (this.back !== 'false') {
console.info('拥有关联测试用例,测试完毕,返回到之前的页面');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var _system = _interopRequireDefault($app_require$('@app-module/system.router'));
_system.default.back();
}
});
}, __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/text/origin/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/text/origin/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,
"icon-font-span"
]
],
{
"fontFamily": "iconfont",
"fontSize": "40px",
"color": "#ff0000"
}
]
]
/***/ }),
/***/ "./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/text/origin/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/text/origin/index.ux?uxType=page& ***!
\*********************************************************************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = function (vm) {
const _vm_ = vm || this
return aiot.__ce__("div", {
"classList": [
"hap-page"
]
}, [
aiot.__ce__("div", {
"id": "uiParent1",
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"value": "文本的默认表现"
})
]),
aiot.__ce__("div", {
"id": "uiParent2",
"classList": [
"hap-row"
],
"events": {
"click": function (evt) {_vm_.onClickTest(evt)}
}
}, [
aiot.__ce__("text", {
"value": "事件触发"
})
]),
aiot.__ce__("div", {
"id": "uiParent3",
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"lines": 2,
"fontSize": "35px",
"textOverflow": "ellipsis"
},
"value": "lines: 2; font-size: 35px; text-overflow:\n ellipsis;测试:文本超过两行时,超出的文本显示省略号。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"fontStyle": "italic"
},
"value": "font-style: italic; 测试:文本斜体。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"fontStyle": "italic",
"fontWeight": "bold"
},
"value": "font-style: italic; font-weight: bold;\n 测试:文本斜体,加粗。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"fontStyle": "italic",
"fontWeight": "bold",
"textDecoration": "underline"
},
"value": "font-style: italic;\n font-weight:\n bold; 测试:文本斜体,加粗,下划线。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"fontStyle": "italic",
"fontWeight": "bold",
"textDecoration": "line-through"
},
"value": "font-style: italic;\n font-weight: bold; 测试:文本斜体,加粗,删除线。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"flexGrow": 1
},
"value": "测试:文本靠左。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"flexGrow": 1,
"textAlign": "center"
},
"value": "text-align: center; 测试:文本居中。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"flexGrow": 1,
"textAlign": "right"
},
"value": "text-align: right; 测试:文本靠右。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"classList": [
"color-3"
],
"value": "测试:文本默认行高。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"lineHeight": "100px",
"backgroundColor": "#0faeff"
},
"classList": [
"color-3"
],
"value": "line-height: 100px;\n 测试:文本设置行高。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"lineHeight": "100px",
"height": "100px",
"backgroundColor": "#0faeff"
},
"value": "测试:文本垂直居中。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"color": "#0faeff"
},
"value": "color: #0faeff; 测试:文本设置颜色。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"paddingTop": "30px",
"paddingRight": "30px",
"paddingBottom": "30px",
"paddingLeft": "30px"
},
"classList": [
"color-3"
],
"value": "padding: 30px; 测试:文本设置padding,观察文本的表现。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"height": "220px",
"lineHeight": "100px",
"paddingTop": "50px",
"paddingRight": "50px",
"paddingBottom": "50px",
"paddingLeft": "50px"
},
"classList": [
"color-3"
],
"value": "height: 220px; line-height:\n 100px; padding: 50px; 测试:文本被自身截断。测试:文本被自身截断。测试:文本被自身截断。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"height": "220px",
"lineHeight": "100px",
"paddingTop": "50px",
"paddingRight": "50px",
"paddingBottom": "50px",
"paddingLeft": "50px",
"textAlign": "center"
},
"classList": [
"color-3"
],
"value": "height:\n 220px; line-height: 100px; padding: 50px; text-align: center; 测试:文本被自身截断。测试:文本被自身截断。"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"classList": [
"font"
],
"value": "测试自定义字体 test custom font"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"classList": [
"icon-font-span"
],
"value": ""
}),
aiot.__ce__("span", {})
])
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("a", {
"href": "https://www.quickapp.cn/",
"classList": [
"font"
],
"value": "测试a标签自定义字体quickapp"
})
]),
aiot.__ce__("div", {
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"textIndent": "50px"
},
"value": "text-indent:50px;Lorem ipsum dolor sit"
}),
aiot.__ce__("text", {
"style": {
"textIndent": "10%"
},
"value": "text-indent:10%;Lorem ipsum dolor sit"
}),
aiot.__ce__("text", {
"style": {
"textIndent": "2cm"
},
"value": "text-indent:2cm;Lorem ipsum dolor sit"
}),
aiot.__ce__("text", {
"style": {
"textIndent": "2em"
},
"value": "text-indent:2em;Lorem ipsum dolor sit"
})
]),
aiot.__ce__("div", {
"id": "uiParent5",
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"value": "子span"
})
])
]),
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"value": "子span"
})
])
]),
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"value": "子span"
})
]),
aiot.__ce__("span", {})
]),
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"value": "子span"
}),
aiot.__ce__("span", {})
])
]),
aiot.__ce__("text", {}, [
aiot.__ce__("span", {
"style": {
"color": "#FF0000",
"fontWeight": "bold"
}
}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"id": "uiSpan1",
"value": "子span"
})
])
]),
aiot.__ce__("text", {}, [
aiot.__ce__("span", {}, [
aiot.__ce__("span", {}),
aiot.__ce__("span", {
"style": {
"color": "#0000FF",
"fontWeight": "bold"
},
"value": "子span(设置了样式)"
})
])
])
]),
aiot.__cf__({
exp: function () {return _vm_.fontWeightData}
},
function ($idx, $item) {
return aiot.__ce__("div", {
"id": "uiParent4",
"classList": [
"hap-row"
]
}, [
aiot.__ce__("text", {
"style": {
"fontWeight": function () {return $item}
},
"value": function () {return '' + 'font-weight: ' + ($item) + ';'}
})
])})
])
}
/***/ }),
/***/ "./src/widgets/text/origin/index.ux?uxType=page":
/*!******************************************************!*\
!*** ./src/widgets/text/origin/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/text/origin/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/text/origin/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/text/origin/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;
/***/ }),
/***/ "./test/widgets/text/origin/index.js":
/*!*******************************************!*\
!*** ./test/widgets/text/origin/index.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = _default;
/**
* 测试脚本
* @desc
* @see {@link http://chaijs.com/api/bdd/} chai断言
* @param vm 页面对应的ViewModel
* @desc 断言函数调用时必须传递第三个参数,说明断言业务意义
*/
function _default(vm) {
describe('组件text', function () {
it('默认:大小,颜色,行内对齐', function () {
const uiNode = normalize(nodeStyle(vm.$element('uiParent1').childNodes[0])); // 字体大小:16
assert.strictEqual(uiNode.fontSizeStd, 16, 'fontSize正确'); // 字体加粗
assert.strictEqual(uiNode.fontWeight, 'normal', 'fontWeight正确'); // 字体风格
assert.strictEqual(uiNode.fontStyle, 'normal', 'fontStyle正确'); // 行内对齐
assert.include(['start', 'left'], uiNode.textAlign, 'textAlign正确'); // textDecoration: "none solid rgb(0, 0, 0)"
assert.include(uiNode.textDecoration, 'none', 'textDecoration正确');
});
it('事件:手动触发点击事件并响应', async function (done) {
this.timeout(4 * 1000);
setTimeout(done, 500);
await vm.$emitElement('click', {
targetId: 'uiParent2'
}, 'uiParent2');
await waitForOK(1 * 1000);
assert.strictEqual(vm.evtClicked, true, '手动触发点击事件并响应');
});
it('组件:设置的属性,样式在VDOM生效', function () {
const elNode = vm.$element('uiParent3').childNodes[0];
const uiNode = nodeStyle(elNode);
assert.strictEqual(uiNode.lines, 2);
assert.include(uiNode.fontSize, '35px');
assert.strictEqual(uiNode.textOverflow, 'ellipsis');
});
it('子组件:span', function () {
const elNode1 = vm.$element('uiParent5').childNodes[4];
const uiNode1 = nodeStyle(elNode1.childNodes[0]);
const elNode2 = vm.$element('uiSpan1');
const uiNode2 = nodeStyle(elNode2);
assert.strictEqual(uiNode1.fontWeight, 'bold', 'fontWeight正确');
assert.strictEqual(uiNode1.color, uiNode2.color, '子组件样式正确');
});
});
}
/***/ })
/******/ });
/************************************************************************/
/******/ // 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/text/origin/index.ux?uxType=page");
/******/
/******/ })()
;
};
return createPageHandler();
};