From 54ec614936a98bc6d7930ad813f44d00e80f9393 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Jan 2022 14:28:50 +0800 Subject: [PATCH 1/2] patch with linear-gradient --- ace-loader/plugin/templater/component_validator.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ace-loader/plugin/templater/component_validator.js b/ace-loader/plugin/templater/component_validator.js index 93ca88b..19eb4e9 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) -- Gitee From 55e98f83b22107718abde93b605878370c3c6a4c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Jan 2022 15:22:44 +0800 Subject: [PATCH 2/2] apply import css watch patch --- ace-loader/src/resource-reference-style.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ace-loader/src/resource-reference-style.js diff --git a/ace-loader/src/resource-reference-style.js b/ace-loader/src/resource-reference-style.js new file mode 100644 index 0000000..7c349f9 --- /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 -- Gitee