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
-
a.vue
const width = ref(0)
<style scoped lang="less"> :slotted(.header){ max-width:v-bind(width ) } </style>const clickHandler = ()=>{
width.value = 10
}
然后对a组件进行递归,会发现这里v-bind里的width并非父组件的值,而是当前组件的width的值
Beta Was this translation helpful? Give feedback.
All reactions