mirror of
https://gitee.com/openharmony/developtools_ace_js2bundle
synced 2024-11-27 01:20:27 +00:00
Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: I25cb3ea67d45402dfcc6c7814e2e53ea27eb01e0
This commit is contained in:
parent
d5895d8df6
commit
e73398d464
3
LICENSE
3
LICENSE
@ -174,4 +174,5 @@
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
node_modules
|
||||
src
|
||||
test
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
@ -6,9 +21,6 @@
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.errorMap = void 0;
|
||||
exports.errorMap = new Map([
|
||||
@ -25,9 +37,6 @@ exports.errorMap = new Map([
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ASTNode = void 0;
|
||||
class ASTNode {
|
||||
@ -44,14 +53,12 @@ exports.ASTNode = ASTNode;
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.Cache = void 0;
|
||||
// There is no way pass value by reference with JS and TS, but object
|
||||
// This Cache is used to store output code temporarily
|
||||
class Cache {
|
||||
|
||||
/**
|
||||
* @description: constructor for Cache
|
||||
* @param INDENT the IDENT string you want to use, such as 4 spaces
|
||||
@ -62,6 +69,7 @@ class Cache {
|
||||
this.flag = true;
|
||||
this.INDENT = INDENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: when flag is true, there should be some indents
|
||||
* @return void
|
||||
@ -69,6 +77,7 @@ class Cache {
|
||||
indentOn() {
|
||||
this.flag = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: when flag is false, there should be no indents
|
||||
* @return void
|
||||
@ -76,6 +85,7 @@ class Cache {
|
||||
indentOff() {
|
||||
this.flag = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: increase indent
|
||||
* @return void
|
||||
@ -83,6 +93,7 @@ class Cache {
|
||||
incIndent() {
|
||||
this.indent++;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: decrease indent
|
||||
* @return void
|
||||
@ -90,6 +101,7 @@ class Cache {
|
||||
decIndent() {
|
||||
this.indent--;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: check whether indent is LT 0
|
||||
* @return boolean value representing whether indent is LT 0
|
||||
@ -97,6 +109,7 @@ class Cache {
|
||||
checkIndent() {
|
||||
return this.indent < 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: get indent
|
||||
* @return indents
|
||||
@ -113,6 +126,7 @@ class Cache {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: concat indents and HML/CSS code
|
||||
* @param strings means HML/CSS code
|
||||
@ -123,6 +137,7 @@ class Cache {
|
||||
this.value = this.value.concat(...strings);
|
||||
return String(this.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: concat indents and HML/CSS code
|
||||
* @return HML/CSS code
|
||||
@ -140,13 +155,11 @@ exports.Cache = Cache;
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.Style = exports.Tag = void 0;
|
||||
const ASTNode_1 = __webpack_require__(117);
|
||||
class Tag extends ASTNode_1.ASTNode {
|
||||
|
||||
/**
|
||||
* @description: constructor for Tag
|
||||
* @param tagName is name of component
|
||||
@ -162,6 +175,7 @@ class Tag extends ASTNode_1.ASTNode {
|
||||
}
|
||||
exports.Tag = Tag;
|
||||
class Style extends ASTNode_1.ASTNode {
|
||||
|
||||
/**
|
||||
* @description: constructor for Style
|
||||
* @param kind distinguishes id and class
|
||||
@ -183,15 +197,12 @@ exports.Style = Style;
|
||||
/***/ 573:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ASTNodeGenerator = void 0;
|
||||
const AST_1 = __webpack_require__(243);
|
||||
const Token_1 = __webpack_require__(334);
|
||||
class ASTNodeGenerator {
|
||||
|
||||
/**
|
||||
* @description: constructor for BridgeVisitor
|
||||
* @param reference is cache for Harmony FA code
|
||||
@ -199,6 +210,7 @@ class ASTNodeGenerator {
|
||||
constructor(reference) {
|
||||
this.cache = reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: visitor mode dispatcher
|
||||
* @param t Node in AST
|
||||
@ -211,6 +223,7 @@ class ASTNodeGenerator {
|
||||
this.genStyle(t);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: code generator
|
||||
* @param ref is cache for code
|
||||
@ -225,6 +238,7 @@ class ASTNodeGenerator {
|
||||
}
|
||||
return ASTNodeGenerator.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: cache for code
|
||||
* @param ref is cache for code
|
||||
@ -233,6 +247,7 @@ class ASTNodeGenerator {
|
||||
setCache(ref) {
|
||||
this.cache = ref;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: parse Tag in AST and generate code for Tag in cache
|
||||
* @param t Tag in AST
|
||||
@ -246,7 +261,8 @@ class ASTNodeGenerator {
|
||||
for (const char of value) {
|
||||
valueBK += (char === "\"" ? """ : (char === "\n" ? " " : char));
|
||||
}
|
||||
this.cache.concat(Token_1.TokenClass.SPACE, key, Token_1.TokenClass.ASSIGN, Token_1.TokenClass.LQUOTE, valueBK, Token_1.TokenClass.RQUOTE);
|
||||
this.cache.concat(Token_1.TokenClass.SPACE, key, Token_1.TokenClass.ASSIGN,
|
||||
Token_1.TokenClass.LQUOTE, valueBK, Token_1.TokenClass.RQUOTE);
|
||||
});
|
||||
if (t.content === null) {
|
||||
this.cache.concat(Token_1.TokenClass.EMPTY_TAG_END);
|
||||
@ -276,6 +292,7 @@ class ASTNodeGenerator {
|
||||
this.cache.concat(Token_1.TokenClass.END_TAG_START, t.tagName, Token_1.TokenClass.TAG_END);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: parse Style in AST and generate code for Style in cache
|
||||
* @param s Style in AST
|
||||
@ -290,7 +307,8 @@ class ASTNodeGenerator {
|
||||
this.cache.indentOn();
|
||||
this.cache.incIndent();
|
||||
s.content.forEach((value, key) => {
|
||||
this.cache.concat(key, Token_1.TokenClass.COLON, Token_1.TokenClass.SPACE, value, Token_1.TokenClass.SEMICOLON, Token_1.TokenClass.NEW_LINE);
|
||||
this.cache.concat(key, Token_1.TokenClass.COLON, Token_1.TokenClass.SPACE, value,
|
||||
Token_1.TokenClass.SEMICOLON, Token_1.TokenClass.NEW_LINE);
|
||||
});
|
||||
this.cache.decIndent();
|
||||
this.cache.concat(Token_1.TokenClass.RBRA, Token_1.TokenClass.NEW_LINE, Token_1.TokenClass.NEW_LINE);
|
||||
@ -306,9 +324,6 @@ ASTNodeGenerator.instance = undefined;
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.CSSBridge = exports.HMLBridge = void 0;
|
||||
const AST_1 = __webpack_require__(243);
|
||||
@ -317,6 +332,7 @@ class HMLBridge {
|
||||
constructor() {
|
||||
this.errors = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: generate error message
|
||||
* @param msg is error message to show up in console
|
||||
@ -325,6 +341,7 @@ class HMLBridge {
|
||||
console.error("Code generating error: " + msg);
|
||||
this.errors += 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: get error number
|
||||
* @return error number
|
||||
@ -332,6 +349,7 @@ class HMLBridge {
|
||||
getErrorCount() {
|
||||
return this.errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: visitor guidance method for contents,
|
||||
* sort out incoming type and guide to matching code generator
|
||||
@ -367,14 +385,15 @@ class CSSBridge {
|
||||
this.errors = 0;
|
||||
this.styles = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: generate error message
|
||||
* @param msg is error message to show up in console
|
||||
*/
|
||||
error(msg) {
|
||||
console.error("Code generating error: " + msg);
|
||||
this.errors += 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: get error number
|
||||
* @return error number
|
||||
@ -382,6 +401,7 @@ class CSSBridge {
|
||||
getErrorCount() {
|
||||
return this.errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: code generator for ID Style, which is CSS type in AST in IR
|
||||
* @param visualModel is a object with CSS type to be generated
|
||||
@ -401,6 +421,7 @@ class CSSBridge {
|
||||
visualChild.accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: visitor guidance method for contents,
|
||||
* sort out incoming type and guide to matching code generator
|
||||
@ -421,13 +442,11 @@ exports.CSSBridge = CSSBridge;
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.genFACSS = exports.genFAHML = void 0;
|
||||
const ASTNodeVisitor_1 = __webpack_require__(573);
|
||||
const Cache_1 = __webpack_require__(862);
|
||||
|
||||
/**
|
||||
* @description: generate HML
|
||||
* @param t is Tag in AST
|
||||
@ -439,6 +458,7 @@ function genFAHML(t) {
|
||||
return generator.cache.toString();
|
||||
}
|
||||
exports.genFAHML = genFAHML;
|
||||
|
||||
/**
|
||||
* @description: generate CSS
|
||||
* @param t is Style in AST
|
||||
@ -459,20 +479,20 @@ exports.genFACSS = genFACSS;
|
||||
/***/ 571:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.isEvent = exports.isData = exports.isUnknown = exports.isContent = exports.isAttribute = exports.isStyle = exports.styleSet = void 0;
|
||||
exports.isEvent = exports.isData = exports.isUnknown = exports.isContent =
|
||||
exports.isAttribute = exports.isStyle = exports.styleSet = void 0;
|
||||
// Unlike the property list in ComponentList, this one is only used to tell a property is a style or an attribute
|
||||
const SizeStyle = ["width", "height", "min-width", "min-height", "max-width", "max-height"];
|
||||
const FlexStyle = ["flex", "flex-grow", "flex-shrink", "flex-basis"];
|
||||
const BackgroundImageStyle = ["background", "background-image", "background-size", "background-position", "background-repeat"];
|
||||
const BackgroundImageStyle = ["background", "background-image", "background-size",
|
||||
"background-position", "background-repeat"];
|
||||
const BackgroundStyle = ["background-color", ...BackgroundImageStyle];
|
||||
const PositionStyle = ["position", "display", "top", "right", "bottom", "left"];
|
||||
const PaddingStyle = ["padding", "padding-start", "padding-end", "padding-top", "padding-right", "padding-bottom", "padding-left"];
|
||||
const MarginStyle = ["margin", "margin-start", "margin-end", "margin-top", "margin-right", "margin-bottom", "margin-left"];
|
||||
const PaddingStyle = ["padding", "padding-start", "padding-end", "padding-top",
|
||||
"padding-right", "padding-bottom", "padding-left"];
|
||||
const MarginStyle = ["margin", "margin-start", "margin-end", "margin-top", "margin-right",
|
||||
"margin-bottom", "margin-left"];
|
||||
const BorderStyle = ["border-width", "border-style", "border-color", "border-radius", "border-top-width",
|
||||
"border-top-style", "border-top-color", "border-top-left-radius", "border-right-width",
|
||||
"border-right-style", "border-right-color", "border-top-right-radius", "border-bottom-width", "border-bottom-style",
|
||||
@ -496,11 +516,12 @@ const buttonStyle = ["text-color", "allow-scale", "icon-width", "icon-height", "
|
||||
const switchStyle = ["texton-color", "textoff-color", "text-padding", "allow-scale", ...FontStyle];
|
||||
const inputStyle = ["font-size", "font-family", "font-weight", "color", "placeholder-color", "allow-scale"];
|
||||
const refreshStyle = ["progress-color"];
|
||||
const chartStyle = ["stroke-width", "radius", "start-angle", "total-angle", "center-x", "center-y", "colors", "weights"];
|
||||
const swiperStyle = ["indicator-color", "indicator-selected-color", "indicator-size", "indicator-top", "indicator-right",
|
||||
"indicator-bottom", "indicator-left"];
|
||||
const pickerStyle = ["column-height", "text-color", "allow-scale", "letter-spacing", "text-decoration", "line-height", "opacity",
|
||||
...FontStyle];
|
||||
const chartStyle = ["stroke-width", "radius", "start-angle", "total-angle", "center-x",
|
||||
"center-y", "colors", "weights"];
|
||||
const swiperStyle = ["indicator-color", "indicator-selected-color", "indicator-size", "indicator-top",
|
||||
"indicator-right", "indicator-bottom", "indicator-left"];
|
||||
const pickerStyle = ["column-height", "text-color", "allow-scale", "letter-spacing", "text-decoration",
|
||||
"line-height", "opacity", ...FontStyle];
|
||||
const sliderStyle = ["color", "selected-color", "block-color"];
|
||||
const listStyle = ["flex-direction", "columns", "item-extent", "fade-color"];
|
||||
const listItemStyle = ["column-span"];
|
||||
@ -534,8 +555,10 @@ const inputAttribute = ["type", "checked", "name", "value", "placeholder", "maxl
|
||||
const refreshAttribute = ["offset", "refreshing", "type", "lasttime", "friction"];
|
||||
const optionAttribute = ["value"];
|
||||
const chartAttribute = ["percent", "datasets", "options"];
|
||||
const swiperAttribute = ["index", "autoplay", "interval", "indicator", "digital", "indicatordisabled", "loop", "duration", "vertical"];
|
||||
const pickerAttribute = ["range", "selected", "start", "end", "lunar", "lunarSwitch", "columns", "hours", "containSecond"];
|
||||
const swiperAttribute = ["index", "autoplay", "interval", "indicator", "digital", "indicatordisabled",
|
||||
"loop", "duration", "vertical"];
|
||||
const pickerAttribute = ["range", "selected", "start", "end", "lunar", "lunarSwitch", "columns",
|
||||
"hours", "containSecond"];
|
||||
const sliderAttribute = ["min", "max", "step", "showtips", "showsteps", "mode"];
|
||||
const menuAttribute = ["target", "title"];
|
||||
const clockAttribute = ["clockconfig", "showdigit", "hourswest"];
|
||||
@ -619,9 +642,6 @@ exports.isEvent = isEvent;
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.TokenClass = void 0;
|
||||
var TokenClass;
|
||||
@ -663,9 +683,6 @@ var TokenClass;
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021:. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.Enum = exports.Characteristic = exports.Event = exports.Service = exports.Device = void 0;
|
||||
class Device {
|
||||
@ -724,20 +741,20 @@ exports.Enum = Enum;
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.formManager = void 0;
|
||||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
const Instance_1 = __webpack_require__(891);
|
||||
const FormModel_1 = __webpack_require__(945);
|
||||
exports.formManager = {
|
||||
|
||||
/**
|
||||
*
|
||||
* remove a key-value in data node
|
||||
* @param key the entry to remove
|
||||
*/
|
||||
removeData(key) {
|
||||
this.getFormModel().data.delete(key);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* add a key-value
|
||||
@ -755,7 +772,9 @@ exports.formManager = {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* update all the data
|
||||
* @param data
|
||||
*/
|
||||
@ -763,6 +782,7 @@ exports.formManager = {
|
||||
this.getFormModel().data.clear();
|
||||
this.addData(data);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* add an action in action node
|
||||
@ -778,7 +798,9 @@ exports.formManager = {
|
||||
});
|
||||
this.getFormModel().actions.set(actionName, new FormModel_1.FormAction(actionType, paramMap, abilityName));
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* update all the actions
|
||||
* @param map: the new actions to be updated
|
||||
*/
|
||||
@ -790,6 +812,7 @@ exports.formManager = {
|
||||
this.getFormModel().actions.set(key, action);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* remove an action
|
||||
@ -798,6 +821,7 @@ exports.formManager = {
|
||||
removeAction(actionName) {
|
||||
this.getFormModel().actions.delete(actionName);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* add params in an action
|
||||
@ -806,13 +830,15 @@ exports.formManager = {
|
||||
*/
|
||||
addActionParams(actionName, params) {
|
||||
var _a, _b;
|
||||
const action = (_a = this.getFormModel().actions.get(actionName)) !== null && _a !== void 0 ? _a : new FormModel_1.FormAction(actionName);
|
||||
const action = (_a = this.getFormModel().actions.get(actionName)) !== null && _a !==
|
||||
void 0 ? _a : new FormModel_1.FormAction(actionName);
|
||||
const actionParams = (_b = action.params) !== null && _b !== void 0 ? _b : new Map();
|
||||
Object.keys(params).forEach(key => {
|
||||
actionParams.set(key, params[key]);
|
||||
});
|
||||
action.params = actionParams;
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* remove params in an action
|
||||
@ -822,15 +848,20 @@ exports.formManager = {
|
||||
removeActionParam(actionName, paramKey) {
|
||||
var _a;
|
||||
const action = this.getFormModel().actions.get(actionName);
|
||||
(_a = action === null || action === void 0 ? void 0 : action.params) === null || _a === void 0 ? void 0 : _a.delete(paramKey);
|
||||
(_a = action === null || action === void 0 ? void 0 : action.params) === null || _a
|
||||
=== void 0 ? void 0 : _a.delete(paramKey);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* get the whole node
|
||||
*/
|
||||
getFormModel() {
|
||||
return Instance_1.getInstance().formData;
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* codegen formModel to json
|
||||
*/
|
||||
codegenToJson: function () {
|
||||
@ -845,13 +876,16 @@ exports.formManager = {
|
||||
});
|
||||
return JSON.stringify(retObj, null, 4);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* clear all datas and actions in model
|
||||
*/
|
||||
clear() {
|
||||
Instance_1.getInstance().formData.data.clear();
|
||||
Instance_1.getInstance().formData.actions.clear();
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* convert a map to an object
|
||||
@ -861,9 +895,12 @@ exports.formManager = {
|
||||
if (sourceMap === undefined) {
|
||||
return {};
|
||||
}
|
||||
return Array.from(sourceMap.entries()).reduce((main, [key, value]) => (Object.assign(Object.assign({}, main), { [key]: value })), {});
|
||||
return Array.from(sourceMap.entries()).reduce((main, [key, value]) =>
|
||||
(Object.assign(Object.assign({}, main), { [key]: value })), {});
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* convert an object to map
|
||||
*/
|
||||
objectToMap(sourceObj) {
|
||||
@ -882,9 +919,6 @@ exports.formManager = {
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.FormAction = exports.FormModel = void 0;
|
||||
class FormModel {
|
||||
@ -933,9 +967,8 @@ exports.isBindingEvent = isBindingEvent;
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.addPhysicalModel = exports.getPhysicalModel = exports.setInstance = exports.getInstance = void 0;
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
const PhysicalModel_1 = __webpack_require__(234);
|
||||
const VisualModel_1 = __webpack_require__(933);
|
||||
const FormModel_1 = __webpack_require__(945);
|
||||
@ -945,14 +978,18 @@ const instance = {
|
||||
harmonyConnectDevice: new PhysicalModel_1.Device(),
|
||||
formData: new FormModel_1.FormModel(),
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* instance is unique during the entire web page lifecycle
|
||||
*/
|
||||
function getInstance() {
|
||||
return instance;
|
||||
}
|
||||
exports.getInstance = getInstance;
|
||||
|
||||
/**
|
||||
*
|
||||
* replace instance
|
||||
* @param ins
|
||||
*/
|
||||
@ -964,7 +1001,9 @@ function setInstance(ins) {
|
||||
}
|
||||
}
|
||||
exports.setInstance = setInstance;
|
||||
|
||||
/**
|
||||
*
|
||||
* get a physical model by its serviceId and characteristicName
|
||||
* @param path
|
||||
*/
|
||||
@ -976,7 +1015,9 @@ function getPhysicalModel(path) {
|
||||
return service.characteristics.find(e => e.name === path.characteristicName);
|
||||
}
|
||||
exports.getPhysicalModel = getPhysicalModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* add a service, would overide if serviceId and characteristicName is same
|
||||
* @param service
|
||||
*/
|
||||
@ -1005,12 +1046,13 @@ exports.addPhysicalModel = addPhysicalModel;
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.deserialize = exports.serialize = void 0;
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
const VisualModel_1 = __webpack_require__(933);
|
||||
|
||||
|
||||
const VisualModel_1 =__webpack_require__(933);
|
||||
const Instance_1 = __webpack_require__(891);
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: convert JsonModel to Json
|
||||
* @return model in json format
|
||||
*/
|
||||
@ -1018,6 +1060,7 @@ function serialize() {
|
||||
return JSON.stringify(Instance_1.getInstance(), replacer);
|
||||
}
|
||||
exports.serialize = serialize;
|
||||
|
||||
/**
|
||||
* @description: convert Json to JsonModel
|
||||
* @return model in json format
|
||||
@ -1027,7 +1070,9 @@ function deserialize(json) {
|
||||
Instance_1.setInstance(ins);
|
||||
}
|
||||
exports.deserialize = deserialize;
|
||||
|
||||
/**
|
||||
*
|
||||
* json replacer, turn any class into string
|
||||
* @param key
|
||||
* @param value
|
||||
@ -1062,7 +1107,9 @@ function replacer(key, value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* json reviver, true magic, replace plain json to classes
|
||||
* @param key
|
||||
* @param value
|
||||
@ -1091,9 +1138,6 @@ function reviver(key, value) {
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/*
|
||||
* @Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.VisualModel = void 0;
|
||||
const CombinedModel_1 = __webpack_require__(964);
|
||||
@ -1119,7 +1163,8 @@ class VisualModel {
|
||||
this.combinedInfo = {
|
||||
id: "",
|
||||
type: "",
|
||||
selfType: obj.combinedSelfType === undefined ? CombinedModel_1.CombinedSelfType.None : obj.combinedSelfType,
|
||||
selfType: obj.combinedSelfType ===
|
||||
undefined ? CombinedModel_1.CombinedSelfType.None : obj.combinedSelfType,
|
||||
data: obj.data,
|
||||
event: obj.event,
|
||||
};
|
||||
@ -1166,9 +1211,6 @@ var __webpack_exports__ = {};
|
||||
(() => {
|
||||
var exports = __webpack_exports__;
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const errorMap_1 = __webpack_require__(784);
|
||||
const Instance_1 = __webpack_require__(891);
|
||||
@ -1177,7 +1219,9 @@ const BridgeVisitor_1 = __webpack_require__(844);
|
||||
const HmlCssCodeGenerator_1 = __webpack_require__(55);
|
||||
const FormManager_1 = __webpack_require__(207);
|
||||
const visualVersion = 12;
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: codegen hml and css according to code in visual file
|
||||
* @param source is code in visual file
|
||||
* @return object of hmlCSS, errorType and errorMessage
|
||||
@ -1231,7 +1275,9 @@ function genHmlAndCss(source) {
|
||||
}
|
||||
return retObj;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: output hml and css source code of the model
|
||||
*/
|
||||
function emitFA(rootModel) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License")
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -1073,41 +1073,46 @@ function validateEvent(eventName, val, out, pos, relativePath) {
|
||||
let paramList = content[2]
|
||||
if (paramList) {
|
||||
paramList = transContent.parseExpression(paramList, true)
|
||||
val = eval('(function (evt) {' + bind('{{' + functionName + '(' + paramList + ',evt)}}', false, true, out, pos) + '})')
|
||||
val = eval('(function (evt) {' + bind('{{' + functionName + '(' + paramList + ',evt)}}',
|
||||
false, true, out, pos) + '})')
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE || TOUCH_EVENT_REGEXP.test(name)) &&
|
||||
process.env.PLATFORM_VERSION !== PLATFORM.VERSION3) {
|
||||
if (eventName.match(START_CATCH_REGEXP)) {
|
||||
if (eventName.match(END_CAPTURE_REGEXP)) {
|
||||
out.jsonTemplate.catchCaptureEvents = out.jsonTemplate.catchCaptureEvents || {}
|
||||
out.jsonTemplate.catchCaptureEvents[name] = val
|
||||
} else {
|
||||
out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {}
|
||||
out.jsonTemplate.catchBubbleEvents[name] = val
|
||||
}
|
||||
} else if (eventName.match(END_CAPTURE_REGEXP)) {
|
||||
out.jsonTemplate.onCaptureEvents = out.jsonTemplate.onCaptureEvents || {}
|
||||
out.jsonTemplate.onCaptureEvents[name] = val
|
||||
distributeEvent(out, eventName, name, val)
|
||||
setDebugLine(out.jsonTemplate, relativePath, pos.line)
|
||||
}
|
||||
}
|
||||
|
||||
function distributeEvent(out, eventName, name, val) {
|
||||
if ((process.env.DEVICE_LEVEL === DEVICE_LEVEL.LITE || TOUCH_EVENT_REGEXP.test(name)) &&
|
||||
process.env.PLATFORM_VERSION !== PLATFORM.VERSION3) {
|
||||
if (eventName.match(START_CATCH_REGEXP)) {
|
||||
if (eventName.match(END_CAPTURE_REGEXP)) {
|
||||
out.jsonTemplate.catchCaptureEvents = out.jsonTemplate.catchCaptureEvents || {}
|
||||
out.jsonTemplate.catchCaptureEvents[name] = val
|
||||
} else {
|
||||
out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {}
|
||||
out.jsonTemplate.onBubbleEvents[name] = val
|
||||
}
|
||||
} else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && CLICK_EVENT_REGEXP.test(name) &&
|
||||
!eventName.match(END_CAPTURE_REGEXP) && process.env.PLATFORM_VERSION === PLATFORM.VERSION6) {
|
||||
if (eventName.match(START_CATCH_REGEXP)) {
|
||||
out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {}
|
||||
out.jsonTemplate.catchBubbleEvents[name] = val
|
||||
} else {
|
||||
out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {}
|
||||
out.jsonTemplate.onBubbleEvents[name] = val
|
||||
}
|
||||
} else if (eventName.match(END_CAPTURE_REGEXP)) {
|
||||
out.jsonTemplate.onCaptureEvents = out.jsonTemplate.onCaptureEvents || {}
|
||||
out.jsonTemplate.onCaptureEvents[name] = val
|
||||
} else {
|
||||
out.jsonTemplate.events = out.jsonTemplate.events || {}
|
||||
out.jsonTemplate.events[name] = val
|
||||
out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {}
|
||||
out.jsonTemplate.onBubbleEvents[name] = val
|
||||
}
|
||||
setDebugLine(out.jsonTemplate, relativePath, pos.line)
|
||||
} else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && CLICK_EVENT_REGEXP.test(name) &&
|
||||
!eventName.match(END_CAPTURE_REGEXP) && process.env.PLATFORM_VERSION === PLATFORM.VERSION6) {
|
||||
if (eventName.match(START_CATCH_REGEXP)) {
|
||||
out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {}
|
||||
out.jsonTemplate.catchBubbleEvents[name] = val
|
||||
} else {
|
||||
out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {}
|
||||
out.jsonTemplate.onBubbleEvents[name] = val
|
||||
}
|
||||
} else {
|
||||
out.jsonTemplate.events = out.jsonTemplate.events || {}
|
||||
out.jsonTemplate.events[name] = val
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onInitialize(abilityInfo) {
|
||||
console.info('DataAbility onInitialize');
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onStart(want) {
|
||||
console.info('ServiceAbility onStart');
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onCreate() {
|
||||
console.info("AceApplication onCreate");
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var router = require('@system.router')
|
||||
export default {
|
||||
data: {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
data: {
|
||||
title: 'World'
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onCreate() {
|
||||
console.info('AceApplication onCreate');
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import router from '@system.router'
|
||||
|
||||
export default {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import router from '@system.router';
|
||||
|
||||
export default {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const pluginName = 'LiteReturnExportsPlugin';
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -53,7 +53,7 @@ function transformStyle(value) {
|
||||
} else if (key === MEDIA_QUERY) {
|
||||
styleSheet['@media'] = mediaQueryFormat(style[key]);
|
||||
} else {
|
||||
// todo: Label style
|
||||
|
||||
}
|
||||
}
|
||||
if (style != null && keys.length !== 0) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
||||
*/
|
||||
@ -177,9 +192,12 @@ function codegenHmlAndCss() {
|
||||
|
||||
if (process.env.DEVICE_LEVEL === 'card') {
|
||||
output = '//card_start\n'
|
||||
output += `var card_template =` + getRequireString(this, jsonLoaders('template', undefined, true, 'template'), this.resourcePath)
|
||||
output += `var card_style =` + getRequireString(this, jsonLoaders('style', undefined, true, 'style'), this.resourcePath)
|
||||
output += `var card_json =` + getRequireString(this, jsonLoaders('json', undefined, true, 'json'), this.resourcePath)
|
||||
output += `var card_template =` + getRequireString(this,
|
||||
jsonLoaders('template', undefined, true, 'template'), this.resourcePath)
|
||||
output += `var card_style =` + getRequireString(this,
|
||||
jsonLoaders('style', undefined, true, 'style'), this.resourcePath)
|
||||
output += `var card_json =` + getRequireString(this,
|
||||
jsonLoaders('json', undefined, true, 'json'), this.resourcePath)
|
||||
output += '\n//card_end'
|
||||
} else {
|
||||
output = 'var $app_script$ = ' + getRequireString(this, getLoaderString('script', {
|
||||
@ -207,7 +225,8 @@ function codegenHmlAndCss() {
|
||||
}), this.resourcePath)
|
||||
|
||||
output += `
|
||||
$app_define$('@app-component/${getNameByPath(this.resourcePath)}', [], function($app_require$, $app_exports$, $app_module$) {
|
||||
$app_define$('@app-component/${getNameByPath(this.resourcePath)}', [],
|
||||
function($app_require$, $app_exports$, $app_module$) {
|
||||
` + `
|
||||
$app_script$($app_module$, $app_exports$, $app_require$)
|
||||
if ($app_exports$.__esModule && $app_exports$.default) {
|
||||
@ -221,7 +240,8 @@ function codegenHmlAndCss() {
|
||||
})
|
||||
`
|
||||
if (isEntry) {
|
||||
output += `$app_bootstrap$('@app-component/${getNameByPath(this.resourcePath)}'` + ',undefined' + ',undefined' + `)`
|
||||
output += `$app_bootstrap$('@app-component/
|
||||
${getNameByPath(this.resourcePath)}'` + ',undefined' + ',undefined' + `)`
|
||||
}
|
||||
}
|
||||
return output
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
props:{
|
||||
title: {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@colorBackground: #000000;
|
||||
.container {
|
||||
background-color: @colorBackground;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
data: {
|
||||
name: this.map['amy'],
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('slider', {'attrs' : {'max' : 100}} ),_c('image'),_c('div', {'attrs' : {'key' : \"day\",'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : function () {return _vm.num}}} )] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('slider', {'attrs' : {'max' : 100}} ),_c('image'),_c('div', {'attrs' : {'key' : \"day\",'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : function () {return _vm.num}}} )] ) }"}
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', {'staticClass' : [\"container\"]} , [_c('div', {'onBubbleEvents' : {'click' : _vm.test1}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test2}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test3}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test4}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test5}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test6}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test7}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test8}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test9}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test10}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test11}} ),_c('div', {'catchCaptureEvents' : {'click' : _vm.test12}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe1},'catchCaptureEvents' : {'longpress' : _vm.longpress1}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe2},'onCaptureEvents' : {'longpress' : _vm.longpress2}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe3},'onCaptureEvents' : {'longpress' : _vm.longpress3}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe4},'onCaptureEvents' : {'longpress' : _vm.longpress4}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe5},'catchBubbleEvents' : {'longpress' : _vm.longpress5}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe6,'longpress' : _vm.longpress6}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe7,'longpress' : _vm.longpress7}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe8},'onBubbleEvents' : {'longpress' : _vm.longpress8}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe9},'catchBubbleEvents' : {'longpress' : _vm.longpress9}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe10},'onBubbleEvents' : {'longpress' : _vm.longpress10}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe11},'onBubbleEvents' : {'longpress' : _vm.longpress11}} ),_c('div', {'catchCaptureEvents' : {'swipe' : _vm.swipe12},'onBubbleEvents' : {'longpress' : _vm.longpress12}} )] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', {'staticClass' : [\"container\"]} , [_c('div', {'onBubbleEvents' : {'click' : _vm.test1}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test2}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test3}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test4}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test5}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test6}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test7}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test8}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test9}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test10}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test11}} ),_c('div', {'catchCaptureEvents' : {'click' : _vm.test12}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe1},'catchCaptureEvents' : {'longpress' : _vm.longpress1}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe2},'onCaptureEvents' : {'longpress' : _vm.longpress2}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe3},'onCaptureEvents' : {'longpress' : _vm.longpress3}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe4},'onCaptureEvents' : {'longpress' : _vm.longpress4}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe5},'catchBubbleEvents' : {'longpress' : _vm.longpress5}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe6,'longpress' : _vm.longpress6}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe7,'longpress' : _vm.longpress7}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe8},'onBubbleEvents' : {'longpress' : _vm.longpress8}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe9},'catchBubbleEvents' : {'longpress' : _vm.longpress9}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe10},'onBubbleEvents' : {'longpress' : _vm.longpress10}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe11},'onBubbleEvents' : {'longpress' : _vm.longpress11}} ),_c('div', {'catchCaptureEvents' : {'swipe' : _vm.swipe12},'onBubbleEvents' : {'longpress' : _vm.longpress12}} )] ) }"}
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticClass' : [\"container\"]} ),_c('div', {'staticClass' : [\"container\",\"table\"]} )] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticClass' : [\"container\"]} ),_c('div', {'staticClass' : [\"container\",\"table\"]} )] ) }"}
|
||||
|
@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'onBubbleEvents' : {'click' : _vm.test}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,evt)}}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,_vm.time,evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('kk',_vm.value,'dd',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(_vm.value,_vm.time,'(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',_vm.value,_vm.time,evt)}}} )] ) }"}
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('text', {'attrs' : {'value' : function () {return _vm.ti||_vm.subTitle}}} ),_c('text', {'attrs' : {'value' : function () {return _vm.ti&&_vm.subTitle}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'&&_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'||_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return !_vm.flag}}} ),_c('div', {'attrs' : {'value' : function () {return !!_vm.flag}}} )] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('text', {'attrs' : {'value' : function () {return _vm.ti||_vm.subTitle}}} ),_c('text', {'attrs' : {'value' : function () {return _vm.ti&&_vm.subTitle}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'&&_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'||_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return !_vm.flag}}} ),_c('div', {'attrs' : {'value' : function () {return !!_vm.flag}}} )] ) }"}
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"render": "function (vm) { var _vm = vm || this; return _c('div') }",
|
||||
"styleSheet": {
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($item,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )}),_c('div', [_l((function () {return _vm.list}),function(personItem,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($idx,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('-') + (personItem.name) + decodeURI('--') + (personItem.age)}}} )] )}),_c('image', {'attrs' : {'src' : function () {return _vm.personItem}}} )] ),_c('div', [_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}}} )] )}),_c('swiper', {'attrs' : {'index' : function () {return _vm.personIndex},'loop' : function () {return _vm.personItem}}} )] ),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return _vm.menu}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (personItem.id) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return personItem}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (index) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}},'onBubbleEvents' : {'click' : personItem.click}} )] )}),_l((function () {return value.list}),function(index,value){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(value,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return value.info}},'onBubbleEvents' : {'click' : value.click}} )] )})] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($item,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )}),_c('div', [_l((function () {return _vm.list}),function(personItem,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($idx,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('-') + (personItem.name) + decodeURI('--') + (personItem.age)}}} )] )}),_c('image', {'attrs' : {'src' : function () {return _vm.personItem}}} )] ),_c('div', [_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}}} )] )}),_c('swiper', {'attrs' : {'index' : function () {return _vm.personIndex},'loop' : function () {return _vm.personItem}}} )] ),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return _vm.menu}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (personItem.id) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return personItem}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (index) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}},'onBubbleEvents' : {'click' : personItem.click}} )] )}),_l((function () {return value.list}),function(index,value){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(value,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return value.info}},'onBubbleEvents' : {'click' : value.click}} )] )})] ) }"}
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_c('div', {'staticClass' : [\"item-content\"]} , [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_i((function () {return _vm.conditionVar===2&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.elif}}} )}),_i((function () {return !(_vm.conditionVar===2)&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.else}}} )})] ),_i((function () {return _vm.showTest}),function(){return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_i((function () {return _vm.showTest}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', [_i((function () {return personIndex==1}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return personItem.name}}} )] )})] )})] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_c('div', {'staticClass' : [\"item-content\"]} , [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_i((function () {return _vm.conditionVar===2&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.elif}}} )}),_i((function () {return !(_vm.conditionVar===2)&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.else}}} )})] ),_i((function () {return _vm.showTest}),function(){return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_i((function () {return _vm.showTest}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', [_i((function () {return personIndex==1}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return personItem.name}}} )] )})] )})] ) }"}
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"goHome": "function goHome() {\n _system[\"default\"].replace({\n uri: \"pages/index/index\"\n });\n }",
|
||||
"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('image')] ) }"
|
||||
|
@ -1 +1,16 @@
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticStyle' : {'width' : 10}, } ),_c('div', {'dynamicStyle' :{'height' : function () {return _vm.num}}} ),_c('text', {'staticStyle' : {'color' : 13047173}, } ),_c('div', {'staticStyle' : {'color' : 14745599}, } ),_c('div', {'staticStyle' : {'animationDelay' : \"900ms\"}, } ),_c('div', {'staticStyle' : {'animationDuration' : \"200ms\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : \"infinite\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : 1000}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/xmad.jpg)\"}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/map.jpg)\"}, } )] ) }"}
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticStyle' : {'width' : 10}, } ),_c('div', {'dynamicStyle' :{'height' : function () {return _vm.num}}} ),_c('text', {'staticStyle' : {'color' : 13047173}, } ),_c('div', {'staticStyle' : {'color' : 14745599}, } ),_c('div', {'staticStyle' : {'animationDelay' : \"900ms\"}, } ),_c('div', {'staticStyle' : {'animationDuration' : \"200ms\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : \"infinite\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : 1000}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/xmad.jpg)\"}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/map.jpg)\"}, } )] ) }"}
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"data": {
|
||||
"musics": [
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"change": "function change() {\n _system[\"default\"].replace({\n uri: 'pages/music/music'\n });\n }",
|
||||
"data": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onCreate() {
|
||||
console.info("AceApplication onCreate");
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Test import syntax */
|
||||
import router from "@system.router";
|
||||
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
data: {
|
||||
musics: [
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import router from '@system.router';
|
||||
export default {
|
||||
data: {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/class": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/commonAttr": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/event": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/expression": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/exteriorStyle": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/forDirective": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/ifDirective": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/importCSS": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/importJS": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/inlineStyle": {
|
||||
"_descriptor": {},
|
||||
@ -253,7 +268,7 @@
|
||||
"value": "style_test23"
|
||||
},
|
||||
"style": {
|
||||
"backgroundImage": "https://huawei.com/logo.jpg"
|
||||
"backgroundImage": "https://img2.baidu.com/it/u=2000577849,825990840&fm=26&fmt=auto"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/mediaQuery": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/privateAttr": {
|
||||
"_descriptor": {},
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"@app-component/uncommonAttr": {
|
||||
"_descriptor": {},
|
||||
|
@ -36,9 +36,10 @@ function getActualString(componentName) {
|
||||
}
|
||||
|
||||
function getExpectJSON(componentName) {
|
||||
const matchHashComment = /\/\*(.|\n)+\*\//;
|
||||
const filepath = path.join(__dirname, 'expected', `${componentName}.js`);
|
||||
const expectedContent = fs.readFileSync(filepath, 'utf-8');
|
||||
const expectedObj = JSON.parse(expectedContent.toString());
|
||||
const expectedObj = JSON.parse(expectedContent.toString().replace(matchHashComment, ''));
|
||||
return expectedObj;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
onCreate() {
|
||||
console.info("AceApplication onCreate");
|
||||
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Test import syntax */
|
||||
import router from "@system.router";
|
||||
|
||||
|
@ -66,5 +66,5 @@
|
||||
<div style="display:{{isFullWindow?'flex':'none'}}">style_test22</div>
|
||||
|
||||
<!-- URL_VALIDATOR_test_2 -->
|
||||
<div style="background-image: url('https://huawei.com/logo.jpg');">style_test23</div>
|
||||
<div style="background-image: url('https://img2.baidu.com/it/u=2000577849,825990840&fm=26&fmt=auto');">style_test23</div>
|
||||
</div>
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -136,7 +136,8 @@ module.exports = (env) => {
|
||||
setConfigs(env)
|
||||
deleteFolderRecursive(process.env.buildPath);
|
||||
webpackConfig.cache.cacheDirectory = path.resolve(process.env.cachePath, '.lite_cache');
|
||||
webpackConfig.entry = loadEntryObj(process.env.projectPath, process.env.DEVICE_LEVEL, process.env.abilityType, process.env.aceManifestPath)
|
||||
webpackConfig.entry = loadEntryObj(process.env.projectPath, process.env.DEVICE_LEVEL,
|
||||
process.env.abilityType, process.env.aceManifestPath)
|
||||
webpackConfig.output.path = path.resolve(__dirname, process.env.buildPath)
|
||||
webpackConfig.plugins = [
|
||||
new ResourcePlugin(process.env.projectPath, process.env.buildPath, process.env.aceManifestPath),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -158,7 +158,8 @@ function setConfigs(env) {
|
||||
process.env.logLevel = env.logLevel || '1'
|
||||
process.env.isPreview = env.isPreview || false
|
||||
process.env.projectPath = env.aceModuleRoot || process.env.aceModuleRoot || process.cwd();
|
||||
process.env.buildPath = env.aceModuleBuild || process.env.aceModuleBuild || path.resolve(process.env.projectPath, 'build');
|
||||
process.env.buildPath = env.aceModuleBuild || process.env.aceModuleBuild ||
|
||||
path.resolve(process.env.projectPath, 'build');
|
||||
process.env.cachePath = env.cachePath || process.env.cachePath || path.resolve(__dirname, 'node_modules/.cache');
|
||||
process.env.aceManifestPath = process.env.aceManifestPath || path.resolve(process.env.projectPath, 'manifest.json');
|
||||
process.env.abilityType = process.env.abilityType || 'page'
|
||||
@ -189,7 +190,8 @@ module.exports = (env) => {
|
||||
loader: path.resolve(__dirname, './index.js')
|
||||
}]
|
||||
})
|
||||
config.entry = loadEntryObj(process.env.projectPath, process.env.DEVICE_LEVEL, process.env.abilityType, process.env.aceManifestPath)
|
||||
config.entry = loadEntryObj(process.env.projectPath, process.env.DEVICE_LEVEL,
|
||||
process.env.abilityType, process.env.aceManifestPath)
|
||||
config.output.path = path.resolve(__dirname, process.env.buildPath)
|
||||
config.plugins = [
|
||||
new ResourcePlugin(process.env.projectPath, process.env.buildPath, process.env.aceManifestPath),
|
||||
@ -223,7 +225,8 @@ module.exports = (env) => {
|
||||
if (env.isPreview !== "true") {
|
||||
config.plugins.push(new ModuleCollectionPlugin())
|
||||
if (env.compilerType && env.compilerType === 'ark') {
|
||||
config.plugins.push(new GenAbcPlugin(process.env.buildPath, path.join(__dirname, 'bin'), env.buildMode === 'debug'))
|
||||
config.plugins.push(new GenAbcPlugin(process.env.buildPath, path.join(__dirname, 'bin'),
|
||||
env.buildMode === 'debug'))
|
||||
} else {
|
||||
if (env.deviceType) {
|
||||
let deviceArr = env.deviceType.split(/,/)
|
||||
|
Loading…
Reference in New Issue
Block a user