diff --git a/ace-loader/plugin/templater/component_validator.js b/ace-loader/plugin/templater/component_validator.js index 93ca88bf4c0bbc10c8a65a00cb9ae875281100a3..19eb4e95c55aabb86a44e64ddb9f431ab6a304b9 100644 --- a/ace-loader/plugin/templater/component_validator.js +++ b/ace-loader/plugin/templater/component_validator.js @@ -783,11 +783,7 @@ function processCssArray(css, out, nodeLoc, cssStyle, cssArray, log) { let value = bind(styleContent[1].trim(), undefined, true, out, nodeLoc) const contentValue = styleContent[1].trim().toString(); if (contentValue.match(/^linear-gradient/) && contentValue.match(/\(.*\{\{.*\}\}.*\)/)) { - log.push({ - line: nodeLoc.line || 1, - column: nodeLoc.col || 1, - reason: `ERROR: can not bind data for linear-gradient in inline style at ${css}` - }) + value = styleContent[1].trim(); } if (key === 'flex' && typeof value === 'string') { expandFlex(key, value, cssStyle, nodeLoc, log) diff --git a/ace-loader/src/resource-reference-style.js b/ace-loader/src/resource-reference-style.js new file mode 100644 index 0000000000000000000000000000000000000000..7c349f9ac1bf21ced528fcadd06748c9adbabe51 --- /dev/null +++ b/ace-loader/src/resource-reference-style.js @@ -0,0 +1,20 @@ +/* + * 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. + */ + +module.exports = function (source) { + this.cacheable && this.cacheable() + const callback = this.async() + callback(null, JSON.stringify({})) +} \ No newline at end of file