Skip to content

filter in template fail with some complex expression #11638

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

Closed
viruscamp opened this issue Sep 3, 2020 · 1 comment
Closed

filter in template fail with some complex expression #11638

viruscamp opened this issue Sep 3, 2020 · 1 comment

Comments

@viruscamp
Copy link

Version

2.6.11

Reproduction link

https://codepen.io/viruscamp/pen/xxVXmWm

Steps to reproduce

    <ul>
      <li>ok: {{d.中文 | raw}}</li>
      <li>ok: {{d.中文/d.你好}}</li>
      
      <li>fail: {{d.中文/d.你好 | raw}}</li>
      <li>fail: {{(d.中文/d.你好) | raw}}</li>
      
      <li>ok: {{d['中文']/d['你好'] | raw}}</li>
     </ul>

What is expected?

Vue recognizes and uses the filter 'raw'.

What is actually happening?

The 'fail' parts do not recognize the filter 'raw'.
Production:
raw is not defined
Development:
[Vue warn]: Property or method "raw" is not defined on the instance but referenced during render.

@posva
Copy link
Member

posva commented Sep 3, 2020

See #6975 (comment)

@posva posva closed this as completed Sep 3, 2020
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