Skip to content

not support <text value='123'/>,reason found . hope to merge code #6

Open
@fengwuxp

Description

@fengwuxp

template:
output html:

repair: src/components/text.js

processText methods

//handle : 或
let value = attrsMap.value || attrsMap[":value"];
if (value) {
if (attrsMap.value) {
el.children.push({
type: 3,
text: value
});
} else {
el.children.push({
type: 2,
expression: '_s(' + value + ')',
// tokens: [[Object]],
text: '{{' + value + '}}'
});
}

    let i = -1;
    let b = attrs.some(function (item, index) {
        i = index;
        return item.name.endsWith("value");
    });
    //remove value
    if (b) {
        attrs.splice(i, 1);
    }
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions