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

自定义指令:后面的指令会意外取得上一个指令的参数 #5162

Closed
zhiqinyigu opened this issue Mar 10, 2017 · 0 comments
Closed

Comments

@zhiqinyigu
Copy link

zhiqinyigu commented Mar 10, 2017

Vue.js version

2.0.2
原谅我英文渣,实际上在2.2.2也能重现

Reproduction Link

https://jsfiddle.net/rdjjpc7a/2080/
注意custom指令的消息

Steps to reproduce

一个组件应用了多个自定义指令。比如应用了两个,前面的有参数,后面的没有参数。

What is Expected?

后面的自定义指令的binding.arg会取得前面的自定义指令的binding.arg。

What is actually happening?

不同的指令binding.arg应该是独立的,隔离的。

awamwang added a commit to awamwang/vue that referenced this issue Mar 16, 2017
* 'dev' of https://github.com/vuejs/vue: (118 commits)
  [weex] Support unary and left open tags (vuejs#5052)
  [release] 2.2.4
  [build] 2.2.4
  fix perf measure regression for nested components of the same name (fix vuejs#5181)
  [release] 2.2.3
  [build] 2.2.3
  perf code coverage
  improve camelCase prop warning message
  warn when template contains text outside root element (vuejs#5164)
  Warn when not passing props in kebab-case (vuejs#5161)
  turn off perf timeline measuring by default + reduce its impact on dev time perf (fix vuejs#5174)
  v-bind object should have lower priority than explicit bindings (fix vuejs#5150)
  fix custom directive arg fall through (fix vuejs#5162)
  formatting tweaks
  refactor create-component
  fix wrong order of generate modifier code (vuejs#5147)
  fix v-on unit test (vuejs#5144)
  fix vuejs#5121: parse content in textarea as plaintext (vuejs#5143)
  [release] 2.2.2
  [build] 2.2.2
  ...

# Conflicts:
#	dist/vue.runtime.common.js
#	src/core/vdom/helpers/update-listeners.js
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