haochuan9421 / vue-ueditor-wrap

🚴Vue + 🚄UEditor + v-model双向绑定🚀
https://hc199421.gitee.io/vue-ueditor-wrap/
MIT License
1.6k stars 449 forks source link

如何在ts项目(vue-typescript-admin-template)中使用该组件? #124

Closed wildcatDownstairs closed 3 years ago

wildcatDownstairs commented 4 years ago

用的另一位大佬的基于ElementUI + TypeScript 开发的后台管理系统模板,我现在这个模板里使用vue-ueditor-wrap插件,但是编辑器报错: Could not find a declaration file for module 'vue-ueditor-wrap'. 'c:/Users/admin/Downloads/vue-typescript-admin-template-minimal/node_modules/vue-ueditor-wrap/lib/vue-ueditor-wrap.min.js' implicitly has an 'any' type. Try npm install @types/vue-ueditor-wrap if it exists or add a new declaration (.d.ts) file containing declare module 'vue-ueditor-wrap'; 这个插件并没有发布到 @types 上,所以如果又想在ts项目里使用该插件应该怎么做?

wildcatDownstairs commented 4 years ago

// @ts-ignore import VueUeditorWrap from 'vue-ueditor-wrap'

我目前是直接忽略对导入插件的类型校验

haochuan9421 commented 3 years ago

3.x 版本支持 TS 了,2.x 没计划支持