7***@qq.com
7***@qq.com
  • 发布:2022-12-13 15:11
  • 更新:2022-12-13 15:11
  • 阅读:149

vue + ts + HBuilderX 声明文件不起作用

分类:HBuilderX

用 HbuilderX 生成的项目,ts 想要在组件中写

export default vue.extend({  
    options: { styleIsolation: 'shared' },  
})

报错

在声明文件中有

import Vue from 'vue'  

declare module "vue/types/options" {  
  type Hooks = App.AppInstance & Page.PageInstance;  
  interface ComponentOptions<V extends Vue> extends Hooks {  
      /**  
       * 组件类型  
       */  
      mpType?: string;  
      options?: { styleIsolation: string }  
  }  
}  

VSCode 不报错,HbuilderX 报错,应该是 HbuilderX 的 bug 吧,请尽快修复。

2022-12-13 15:11 负责人:无 分享
已邀请:

要回复问题请先登录注册