父组件中
provide() { return { screen: ref(this.screen), } },
子组件中 inject: ['screen'], 或者用computed函数,像官网的例子一样,传入getter函数
inject: ['screen'],
provide() { return { screen: computed(()=>this.screen), } },