mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
fix inheritClass Signed-off-by: seaside_wu <wuhaibin5@huawei.com> Change-Id: Id7f2e5038e7c839236e71eeab46950eefdb69fe3
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user