attrs和slots是有状态的对象,当组件本身更新的时候会随同组件更新。这意味着避免使用解构语法,而应该使用引用方法获取参数值,例如:attrs.x 和
slots.x
Also note that unlike props, attrs and slots are not reactive. If you intend to apply side effects based on attrs
or slots changes, you should do so inside an onUpdated lifecycle hook.
vue3 中文档 Composition API SetupSetup参数 ArgumentsPropsContextAccessing Component PropertiesUsage with TemplatesUsage with Render FunctionsUsage of thisSetup参数 Arguments1.props 组件props2.context 执行上下问Propssetup函数的第一个参数就是props。没错,和你想的一样,他就是标准组件中的props,在s