我正在按照本教程制作一个带有 Framework7-Vue 的应用程序。 http://blog.toast38coza.me/building-a-mobile-app-with-vuejs-cordova-webpack-and-framework-7/
出于某种原因,复制所有代码并安装所有内容后,我会看到空白屏幕。我在编译期间没有收到任何错误。应用程序在控制台中运行后出现以下错误
Uncaught TypeError: Cannot assign to read only property 'prototype' of function 'class Template7 {
constructor(template) {
const t = this;
t.template = template;
function getCom...<omitted>...
}'
at Object.eval (webpack-internal:///29:381)
at eval (webpack-internal:///29:557)
at Object.<anonymous> (app.js:879)
at __webpack_require__ (app.js:660)
at fn (app.js:86)
at eval (webpack-internal:///21:1)
at Object.<anonymous> (app.js:826)
at __webpack_require__ (app.js:660)
at fn (app.js:86)
at eval (webpack-internal:///10:3)
有什么想法可能导致这种情况吗?
最佳答案
不要使用最新的framework7,使用1.x版本,就像:
您可以找到版本npm info Framework7
yarn升级framework7@1.6.4
或npm升级framework7@1.6.4
关于javascript - 无法分配给函数“class Template7”的只读属性 'prototype',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45955494/