Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fengwuxp opened this issue Sep 22, 2018 · 0 comments
Open

Comments

@fengwuxp
Copy link

fengwuxp commented Sep 22, 2018

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);
    }
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant