未验证 提交 a4e898c1 编写于 作者: O openharmony_ci 提交者: Gitee

!758 【挑单monthly1018】修复inheritClass

Merge pull request !758 from seaside/cherry-pick-1668065233
......@@ -184,10 +184,10 @@ export function bindSubVm(vm: Vm, rawSubVm: Vm, rawTemplate: TemplateInterface,
const attr = template.attr || {};
for (const key in attr) {
const value = attr[key];
if (key === 'inhertClass') {
const inhertClasss = value.split(' ');
for (let x = 0; x < inhertClasss.length; x++) {
const cssName = '.' + inhertClasss[x];
if (key === 'inheritClass') {
const inheritClasses = value.split(' ');
for (let x = 0; x < inheritClasses.length; x++) {
const cssName = '.' + inheritClasses[x];
const cssParent = vm._css[cssName];
if (cssParent) {
subVm._css[cssName] = cssParent;
......
......@@ -128,7 +128,7 @@ export default class Vm {
const shareData = options.shareData || {};
this.__vmOptions = options;
this.__computed = options.computed;
this.__css = options.style;
this.__css = options.style || {};
this.__selector = selector(this.__css);
this.__ids = {};
this.$refs = {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册