jin-yufeng / mp-html

小程序富文本组件,支持渲染和编辑 html,支持在微信、QQ、百度、支付宝、头条和 uni-app 平台使用
https://jin-yufeng.gitee.io/mp-html
MIT License
3.31k stars 485 forks source link

按教程使用时出现TypeError: Cannot read property '$options' of undefined #102

Closed mahaoming closed 4 years ago

mahaoming commented 4 years ago

问题描述
image image image image

jin-yufeng commented 4 years ago

uni 的版本?

mahaoming commented 4 years ago

是的

jin-yufeng commented 4 years ago

用的 uni-app 编译器的版本是多少?

mahaoming commented 4 years ago

"dependencies": { "@dcloudio/uni-app-plus": "^2.0.0-26520200314001", "@dcloudio/uni-h5": "^2.0.0-26520200314001", "@dcloudio/uni-helper-json": "", "@dcloudio/uni-mp-alipay": "^2.0.0-26520200314001", "@dcloudio/uni-mp-baidu": "^2.0.0-26520200314001", "@dcloudio/uni-mp-qq": "^2.0.0-26520200314001", "@dcloudio/uni-mp-toutiao": "^2.0.0-26520200314001", "@dcloudio/uni-mp-weixin": "^2.0.0-26520200314001", "@dcloudio/uni-stat": "^2.0.0-26520200314001", "flyio": "^0.6.2", "js-base64": "^2.5.1", "regenerator-runtime": "^0.12.1", "sass": "1.24.0", "sass-loader": "^7.3.0", "vue": "^2.6.11", "vuex": "^3.1.3" }, "devDependencies": { "@dcloudio/uni-cli-shared": "^2.0.0-26520200314001", "@dcloudio/uni-migration": "^2.0.0-26520200314001", "@dcloudio/uni-template-compiler": "^2.0.0-26520200314001", "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-26520200314001", "@dcloudio/vue-cli-plugin-uni": "^2.0.0-26520200314001", "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-26520200314001", "@dcloudio/webpack-uni-mp-loader": "^2.0.0-26520200314001", "@dcloudio/webpack-uni-pages-loader": "^2.0.0-26520200314001", "@types/html5plus": "", "@types/uni-app": "", "@vue/cli-plugin-babel": "3.5.1", "@vue/cli-service": "^4.2.3", "babel-plugin-import": "^1.11.0", "mini-types": "", "miniprogram-api-typings": "^2.10.2", "postcss-comment": "^2.0.0", "vue-template-compiler": "^2.6.11" },

jin-yufeng commented 4 years ago

你用我这个项目试一下吧 demo.zip,打开后

npm install
npm run dev:%PLATFORM%

我这里是没有这个问题的

mahaoming commented 4 years ago

可以了, 是 uni-app 版本的问题, 把版本升到最新就可以了 太感谢啦