You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
ruan-cat-own-notes/vue/element-ui/%E7%BB%84%E4%BB%B6%E4%BC%A0%E9%80%92%E5%8F%82%E6%95%B0
困境 在vue组件的data内,定义了很多的变量,并且这些变量都需要传递给子组件。如下: 那么在模板内,子组件的就要写很多的props值来接受,代码冗长,不利于统一维护。一旦未来要增加了更多要传递给子组件的单一变量props值,那么就需要每次到模板内再次手动增加新的props值。很繁琐。 优化 优化思路,使用v-bind (https://cn.vue...
https://www.ruan-cat.com/ruan-cat-own-notes/vue/element-ui/%E7%BB%84%E4%BB%B6%E4%BC%A0%E9%80%92%E5%8F%82%E6%95%B0.html
Beta Was this translation helpful? Give feedback.
All reactions