From fedd939b87c159f76100b4bd44b23105d19d6551 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 23 Dec 2021 11:29:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=9D=99=E6=80=81=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deps/weex-styler/index.js | 64 ++++++++++++++++++---------- deps/weex-styler/lib/validator.js | 70 +++++++++++++++++++++---------- src/json.js | 9 ++-- src/loader.js | 2 - src/script.js | 9 ++-- 5 files changed, 100 insertions(+), 54 deletions(-) diff --git a/deps/weex-styler/index.js b/deps/weex-styler/index.js index 4078b27..c299d22 100644 --- a/deps/weex-styler/index.js +++ b/deps/weex-styler/index.js @@ -40,20 +40,25 @@ function expand (subResult, camelCasedName, ruleResult) { }) } else if (camelCasedName === 'margin' || camelCasedName === 'padding') { - const spliceName = [camelCasedName + 'Top', camelCasedName + 'Right', camelCasedName + 'Bottom', camelCasedName + 'Left'] + const spliceName = [camelCasedName + 'Top', camelCasedName + 'Right', + camelCasedName + 'Bottom', camelCasedName + 'Left'] util.splitAttr(ruleResult, subResult.value, spliceName) } else if (camelCasedName === 'borderWidth') { - util.splitAttr(ruleResult, subResult.value, ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth']) + util.splitAttr(ruleResult, subResult.value, ['borderTopWidth', 'borderRightWidth', + 'borderBottomWidth', 'borderLeftWidth']) } else if (camelCasedName === 'borderColor') { - util.splitAttr(ruleResult, subResult.value, ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor']) + util.splitAttr(ruleResult, subResult.value, ['borderTopColor', 'borderRightColor', + 'borderBottomColor', 'borderLeftColor']) } else if (camelCasedName === 'borderStyle') { - util.splitAttr(ruleResult, subResult.value, ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle']) + util.splitAttr(ruleResult, subResult.value, ['borderTopStyle', 'borderRightStyle', + 'borderBottomStyle', 'borderLeftStyle']) } else if (camelCasedName === 'borderRadius') { - util.splitAttr(ruleResult, subResult.value, ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius']) + util.splitAttr(ruleResult, subResult.value, ['borderBottomLeftRadius', 'borderBottomRightRadius', + 'borderTopLeftRadius', 'borderTopRightRadius']) } else if (camelCasedName === 'gridGap') { util.splitAttr(ruleResult, subResult.value, ['gridRowsGap', 'gridColumnsGap']) @@ -96,7 +101,8 @@ function flexExpand(rule, ruleLog) { ruleLog.push({ line: declaration.position.start.line, column: declaration.position.start.column, - reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + '` attribute is incorrect.' + reason: 'ERROR: Value `' + declaration.value + '` of the `' + + declaration.property + '` attribute is incorrect.' }) } } @@ -122,51 +128,62 @@ function getUnit(value) { function checkFlexOne(rule, ruleLog, declaration, values, i) { const array = ['none', 'auto', 'initial'] if (array.includes(values[0])) { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex', value: values[0], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex', + value: values[0], position: declaration.position}) } else if (getUnit(values[0]) === 'px') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', value: values[0], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', + value: values[0], position: declaration.position}) } else if (getUnit(values[0]) === 'none') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', value: values[0], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', + value: values[0], position: declaration.position}) } else { ruleLog.push({ line: declaration.position.start.line, column: declaration.position.start.column, - reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + '` attribute is incorrect.' + - 'It must be a number, a number with unit `' + 'px`' + ', none, auto, or initial.' + reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + + '` attribute is incorrect.' + 'It must be a number, a number with unit `' + 'px`' + + ', none, auto, or initial.' }) } } function checkFlexTwo(rule, ruleLog, declaration, values, i) { if (getUnit(values[0]) === 'none') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', value: values[0], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', + value: values[0], position: declaration.position}) if (getUnit(values[1]) === 'px') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', value: values[1], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', + value: values[1], position: declaration.position}) } else if (getUnit(values[1]) === 'none') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-shrink', value: values[1], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-shrink', + value: values[1], position: declaration.position}) } else { ruleLog.push({ line: declaration.position.start.line, column: declaration.position.start.column, - reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + '` attribute is incorrect. Value `' + - values[1] + '` must be a number or a number with unit `' + 'px`.' + reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + + '` attribute is incorrect. Value `' + values[1] + + '` must be a number or a number with unit `' + 'px`.' }) } } else { ruleLog.push({ line: declaration.position.start.line, column: declaration.position.start.column, - reason: 'ERROR: Value `' + declaration.value + '` of the `' + declaration.property + '` attribute is incorrect. Value `' + - values[0] + '` must be a number.' + reason: 'ERROR: Value `' + declaration.value + '` of the `' + + declaration.property + '` attribute is incorrect. Value `' + values[0] + '` must be a number.' }) } } function checkFlexThree(rule, ruleLog, declaration, values, i) { if (getUnit(values[0]) === 'none' && getUnit(values[1]) === 'none' && getUnit(values[2]) === 'px') { - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', value: values[0], position: declaration.position}) - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-shrink', value: values[1], position: declaration.position}) - rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', value: values[2], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-grow', + value: values[0], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-shrink', + value: values[1], position: declaration.position}) + rule.declarations.splice(i, 0, {type: 'declaration', property: 'flex-basis', + value: values[2], position: declaration.position}) } else { ruleLog.push({ line: declaration.position.start.line, @@ -255,7 +272,8 @@ function parse(code, done, resourcePath) { } else { rule.selectors.forEach(function (selector) { const flag = card ? selector.match(CARD_SELECTOR) : - selector.match(SELECTOR_MATCHER) || selector.match(DESCENDANT_SELECTOR_MATCHER) || selector.match(ALL_SELECTOR_MATCHER) + selector.match(SELECTOR_MATCHER) || selector.match(DESCENDANT_SELECTOR_MATCHER) || + selector.match(ALL_SELECTOR_MATCHER) if (flag) { var className = selector @@ -308,7 +326,7 @@ function parse(code, done, resourcePath) { } var name = util.hyphenedToCamelCase(declaration.property) var value = declaration.value - if (name === 'fontFamily' && '\"\''.indexOf(value[0]) > -1) { // FIXME: delete leading and trailing quotes + if (name === 'fontFamily' && '\"\''.indexOf(value[0]) > -1) { value = value.slice(1, value.length - 1) } ruleResult[name] = value diff --git a/deps/weex-styler/lib/validator.js b/deps/weex-styler/lib/validator.js index cd8f445..212f282 100644 --- a/deps/weex-styler/lib/validator.js +++ b/deps/weex-styler/lib/validator.js @@ -1457,14 +1457,16 @@ var ARRAY_COLOR_STOP_VALIDATOR = function ARRAY_COLOR_STOP_VALIDATOR(v) { value: length < 2 ? JSON.stringify(resultValues) : null, reason: reasonMaps.length > 0 ? function (k, v) { - return logTypes[length] + ': Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect. \n ' + reasonMaps.join('\n ') + return logTypes[length] + ': Value `' + v + '` of the `' + + util.camelCaseToHyphened(k) + '` attribute is incorrect. \n ' + reasonMaps.join('\n ') } : null } } return { value: null, reason: function (k, v) { - return 'ERROR: The format of value `' + v + '` of the `'+ util.camelCaseToHyphened(k) + '` attribute is incorrect. Please specify at least two colors.' + return 'ERROR: The format of value `' + v + '` of the `'+ util.camelCaseToHyphened(k) + + '` attribute is incorrect. Please specify at least two colors.' } } } @@ -1510,7 +1512,8 @@ var ANGLE_VALIDATOR = function ANGLE_VALIDATOR(v) { value: angle + SUPPORT_CSS_ANGLE_UNIT[0], reason: function(k, v) { return 'ERROR: The `' + util.camelCaseToHyphened(k) + - '` attribute does not support `' + unit + '`. It only supports `' + JSON.stringify(SUPPORT_CSS_ANGLE_UNIT) + '`.' + '` attribute does not support `' + unit + '`. It only supports `' + + JSON.stringify(SUPPORT_CSS_ANGLE_UNIT) + '`.' } } } @@ -1519,7 +1522,9 @@ var ANGLE_VALIDATOR = function ANGLE_VALIDATOR(v) { return { value: parseFloat(v) + SUPPORT_CSS_ANGLE_UNIT[0], reason: function(k, v) { - return 'WARNING: No unit is specified for the value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute. The default unit is `' + SUPPORT_CSS_ANGLE_UNIT[0] + '`.' + return 'WARNING: No unit is specified for the value `' + v + + '` of the `' + util.camelCaseToHyphened(k) + '` attribute. The default unit is `' + + SUPPORT_CSS_ANGLE_UNIT[0] + '`.' } } } @@ -1527,7 +1532,8 @@ var ANGLE_VALIDATOR = function ANGLE_VALIDATOR(v) { return { value: null, reason: function(k, v) { - return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + v + '` (only numbers are supported).' + return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + + v + '` (only numbers are supported).' } } } @@ -1563,7 +1569,8 @@ var GRADIENT_DIRECTION_VALIDATOR = function GRADIENT_DIRECTION_VALIDATOR(v) { value: invalid ? null : v, reason: invalid ? function (k, v) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' + return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute is incorrect.' } : null } } @@ -1615,7 +1622,8 @@ var URL_VALIDATOR = function URL_VALIDATOR(v) { return { value: null, reason: function (k, v) { - return 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute must be none or url(...).' + return 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute must be none or url(...).' } } } @@ -1629,7 +1637,8 @@ var NAME_VALIDATOR = function NAME_VALIDATOR(v) { return { value: null, reason: function(k, v) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' + return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute is incorrect.' } } } @@ -1647,7 +1656,8 @@ var ITERATIONCOUNT_VALIDATOR = function ITERATIONCOUNT_VALIDATOR(v) { return { value: null, reason: function(k, v) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect (only integers and infinity are supported).' + return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute is incorrect (only integers and infinity are supported).' } } } @@ -1798,8 +1808,10 @@ var MYLOCATION_VALIDATOR = function MYLOCATION_VALIDATOR(v) { value : null, reason: function(k, v) { return reason == 'value' ? - 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute does not meet the inspection standards for the color or url.' : - 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute must be set in order(color color url).' + 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute does not meet the inspection standards for the color or url.' : + 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute must be set in order(color color url).' } } } @@ -1836,7 +1848,8 @@ var TRANSFORM_ORIGIN_VALIDATOR = function TRANSFORM_ORIGIN_VALIDATOR(v) { return { value: null, reason: function (k, v) { - return 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is invalid. such as left 100px or 50% bottom.' + return 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute is invalid. such as left 100px or 50% bottom.' } } } @@ -1864,7 +1877,8 @@ var CHECK_TRANSFORM_ORIGIN = function CHECK_TRANSFORM_ORIGIN(values) { } } }) - if (directions.length != 2 || directions.length === 2 && (directions[0] === 'vertical' || directions[1] === 'horizon')) { + if (directions.length != 2 || directions.length === 2 && + (directions[0] === 'vertical' || directions[1] === 'horizon')) { reasons.push(function (k, v) { return 'ERROR: Value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' }) @@ -1964,7 +1978,8 @@ var DATE_VALIDATOR = function DATE_VALIDATOR(v) { return { value: null, reason:function (k, v, result) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' + return 'ERROR: The format of value `' + v + '` of the `' + + util.camelCaseToHyphened(k) + '` attribute is incorrect.' } } } @@ -1978,7 +1993,8 @@ var FILTER_VALIDATOR = function FILTER_VALIDATOR(v) { return { value: null, reason:function (k, v, result) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' + return 'ERROR: The format of value `' + v + '` of the `' + + util.camelCaseToHyphened(k) + '` attribute is incorrect.' } } } @@ -1992,7 +2008,8 @@ var FILTER_PERCENTAGE_VALIDATOR = function FILTER_PERCENTAGE_VALIDATOR(v) { if (FILTER_STYLE_REGEXP.test(v)) { const values = v.trim().split(/\s+/) if(values[1] && values.length === 2){ - const blurStyleValidator = genEnumValidator(['small_light', 'medium_light', 'large_light', 'xlarge_light', 'small_dark', 'medium_dark', 'large_dark', 'xlarge_dark']) + const blurStyleValidator = genEnumValidator(['small_light', 'medium_light', 'large_light', + 'xlarge_light', 'small_dark', 'medium_dark', 'large_dark', 'xlarge_dark']) const blurStyleResult = blurStyleValidator(values[1]) if(util.isValidValue(blurStyleResult.value)){ return { value: v } @@ -2014,7 +2031,8 @@ var FILTER_PERCENTAGE_VALIDATOR = function FILTER_PERCENTAGE_VALIDATOR(v) { return { value: null, reason:function (k, v, result) { - return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + '` attribute is incorrect.' + return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) + + '` attribute is incorrect.' } } } @@ -2266,7 +2284,8 @@ var RICH_PROP_NAME_GROUPS = { flexShrink: NUMBER_VALIDATOR, flexBasis: LENGTH_VALIDATOR, flexDirection: genEnumValidator(['row', 'column', 'column-reverse', 'row-reverse']), - justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']), + justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', + 'space-around', 'space-evenly']), alignItems: genEnumValidator(['stretch', 'flex-start', 'flex-end', 'center', 'baseline']), alignContent: genEnumValidator(['stretch', 'flex-start', 'flex-end', 'center', 'space-between', 'space-around']), alignSelf: genEnumValidator(["auto", "flex-start", "flex-end", "center", "baseline", "stretch"]) @@ -2301,7 +2320,8 @@ var RICH_PROP_NAME_GROUPS = { fontSize: LENGTH_VALIDATOR, fontStyle: genEnumValidator(['normal', 'italic']), fontFamily: ANYTHING_VALIDATOR, - fontWeight: genEnumValidator(['normal', 'lighter', 'bold', 'bolder', "medium", "regular", '100', '200', '300', '400', '500', '600', '700', '800', '900']), + fontWeight: genEnumValidator(['normal', 'lighter', 'bold', 'bolder', "medium", "regular", + '100', '200', '300', '400', '500', '600', '700', '800', '900']), textDecoration: genEnumValidator(['none', 'underline', 'line-through']), textAlign: genEnumValidator(['start', 'end', 'left', 'center', 'right']), textOverflow: genEnumValidator(['clip', 'ellipsis']), @@ -2731,7 +2751,8 @@ var LITE_PROP_NAME_GROUPS = { flexbox: { flexDirection: genEnumValidator(['row', 'column']), flexWrap: genEnumValidator(['nowrap', 'wrap']), - justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']), + justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', + 'space-around', 'space-evenly']), alignItems: genEnumValidator(['stretch', 'flex-start', 'flex-end', 'center']), }, position: { @@ -2852,7 +2873,8 @@ var CARD_PROP_NAME_GROUPS = { flexShrink: NUMBER_VALIDATOR, flexBasis: LENGTH_VALIDATOR, flexDirection: genEnumValidator(['row', 'column', 'column-reverse', 'row-reverse']), - justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']), + justifyContent: genEnumValidator(['flex-start', 'flex-end', 'center', 'space-between', + 'space-around', 'space-evenly']), alignItems: genEnumValidator(['stretch', 'flex-start', 'flex-end', 'center', 'baseline']), alignContent: genEnumValidator(['stretch', 'flex-start', 'flex-end', 'center', 'space-between', 'space-around']), }, @@ -2887,7 +2909,8 @@ var CARD_PROP_NAME_GROUPS = { letterSpacing: LENGTH_VALIDATOR, fontStyle: genEnumValidator(['normal', 'italic']), fontFamily: ANYTHING_VALIDATOR, - fontWeight: genEnumValidator(['normal', 'lighter', 'bold', 'bolder', "medium", "regular", '100', '200', '300', '400', '500', '600', '700', '800', '900']), + fontWeight: genEnumValidator(['normal', 'lighter', 'bold', 'bolder', "medium", "regular", + '100', '200', '300', '400', '500', '600', '700', '800', '900']), textDecoration: genEnumValidator(['none', 'underline', 'line-through']), textAlign: genEnumValidator(['start', 'end', 'left', 'center', 'right']), textOverflow: genEnumValidator(['clip', 'ellipsis']), @@ -3032,7 +3055,8 @@ function validate(name, value) { result = {value: value} var suggestedName = SUGGESTED_PROP_NAME_GROUP[name] var suggested = suggestedName ? ', suggest `' + util.camelCaseToHyphened(suggestedName) + '`' : '' - log = {reason: 'WARNING: `' + util.camelCaseToHyphened(name) + '` is not a standard attribute name and may not be supported' + suggested} + log = {reason: 'WARNING: `' + util.camelCaseToHyphened(name) + + '` is not a standard attribute name and may not be supported' + suggested} } return { value: result.value, diff --git a/src/json.js b/src/json.js index 7772f5d..7191219 100644 --- a/src/json.js +++ b/src/json.js @@ -20,7 +20,7 @@ const path = require('path') const transCardArray = require('./templater/bind').transCardArray -const ResourceReferenceParsing = require('./resource-reference-script') +const resourceReferenceParsing = require('./resource-reference-script') import { logWarn } from './util' @@ -39,7 +39,7 @@ module.exports = function (source) { if(source.trim().indexOf('export default') === 0) { source = source.replace('export default', '') } - source = ResourceReferenceParsing(source) + source = resourceReferenceParsing(source) source = source.replace(REG_EVENT_STRING, item => { return item.slice(1,-1) }) @@ -47,7 +47,10 @@ module.exports = function (source) { return '"' + item + '"' }) source = source.replace(REG_THIS, item => { - if (item.charAt(item.length-1) !== '\"' && item.charAt(item.length-1) !== '\'' && item.slice(-2) !== '\"\,' && item.slice(-2) !== '\'\,') { + if (item.charAt(item.length-1) !== '\"' && + item.charAt(item.length-1) !== '\'' && + item.slice(-2) !== '\"\,' && + item.slice(-2) !== '\'\,') { if (item.charAt(item.length-1) === ',') { item = `"{{${transCardArray(item.slice(0, -1))}}}",`.replace(/this\./g, '') } else { diff --git a/src/loader.js b/src/loader.js index 9ed7c10..9908af1 100644 --- a/src/loader.js +++ b/src/loader.js @@ -69,8 +69,6 @@ function getLoaderString (type, config) { return configLoaderString(loaders, config) case 'data': return dataLoaderString(loaders, config) - default: - return } } diff --git a/src/script.js b/src/script.js index dfdac74..59e0bf8 100644 --- a/src/script.js +++ b/src/script.js @@ -43,10 +43,12 @@ module.exports = function (source, map) { if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH || process.env.DEVICE_LEVEL === 'card') { const appName = process.env.abilityType === 'page' ? 'app.js' : `${process.env.abilityType}.js` if (path.basename(this.resourcePath) !== appName) { - parsed += `\nvar moduleOwn = exports.default || module.exports;\nvar accessors = ['public', 'protected', 'private']; + parsed += `\nvar moduleOwn = exports.default || module.exports;\n` + + `var accessors = ['public', 'protected', 'private']; if (moduleOwn.data && accessors.some(function (acc) { return moduleOwn[acc]; - })) {\n throw new Error('For VM objects, attribute data must not coexist with public, protected, or private. Please replace data with public.'); + })) {\n throw new Error('For VM objects, attribute data must not coexist with public,` + + ` protected, or private. Please replace data with public.'); } else if (!moduleOwn.data) { moduleOwn.data = {};\n moduleOwn._descriptor = {};\n accessors.forEach(function(acc) { var accType = typeof moduleOwn[acc]; @@ -56,7 +58,8 @@ if (moduleOwn.data && accessors.some(function (acc) { moduleOwn._descriptor[name] = {access : acc}; } } else if (accType === 'function') { - console.warn('For VM objects, attribute ' + acc + ' value must not be a function. Change the value to an object.'); + console.warn('For VM objects, attribute ' + acc +` + + ` ' value must not be a function. Change the value to an object.'); }\n });\n}` } let result = `module.exports = function(module, exports, $app_require$){${parsed}}` -- Gitee