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

当 wx:if 指令中出现 ‘>’ 时,xmldom 不能正常解析 #118

Closed
brucx opened this issue May 1, 2017 · 5 comments
Closed

当 wx:if 指令中出现 ‘>’ 时,xmldom 不能正常解析 #118

brucx opened this issue May 1, 2017 · 5 comments

Comments

@brucx
Copy link
Contributor

brucx commented May 1, 2017

例如:

<input focus wx:if="{{test > 0}}" @input="changeInput"  @confirm="search"  />

报错:

xmldom warning]        attribute "focus" missed value!! "focus" instead2!!
@#[line:6,col:5]
[xmldom error]  element parse error: Error: invalid attribute:@input
@#[line:6,col:5]
@Gcaufy
Copy link
Collaborator

Gcaufy commented May 2, 2017

经测试,报错并非由wx:if引起的,以下写法不会报错。

wx:if="{{test > 0}}"

上面的错误信息是说attribute "focus" missed value!! "focus" instead2!!

Gcaufy added a commit that referenced this issue May 2, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented May 2, 2017

修复了attribute "focus" missed value!! "focus" instead2!!的问题。

@Gcaufy
Copy link
Collaborator

Gcaufy commented May 2, 2017

在发新版本之间这里可以使用computed或者wx:if="{{!!(test - 0)}}"的这种方式暂时代替

@brucx
Copy link
Contributor Author

brucx commented May 3, 2017

我现在的 workaround 是改写成 <input focus @input="changeInput" @confirm="search" wx:if="{{test > 0}}" />

@brucx brucx closed this as completed May 3, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented May 3, 2017

这样可以,正好避开的BUG

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

2 participants