如何調用父類的構造函數 es6
1 回答

慕神8447489
TA貢獻1780條經驗 獲得超1個贊
E9 和 IE10。原因是 ocs 實例創建失敗,因為沒有調用父類的構造函數。
在github上找到解決方案:super() not calling parent's constructor on IE9
實踐之后:
{
"plugins": [
["transform-es2015-classes", {"loose": true}],
"transform-proto-to-assign",
"transform-decorators-legacy"
],
"presets": [
"es2015",
"react",
"stage-0"
]
}
又碰到了下面的問題。
ERROR in ./js/kill/order/index.js
Module build failed: SyntaxError: C:/Users/Administrator/Desktop/ydh-qiang-web/src/main/webapp/pc/js/kill/order/index.js: Missing class properties transform.
23 | }
24 |
> 25 | state = {
| ^
26 | loading: false,
- 1 回答
- 0 關注
- 782 瀏覽
添加回答
舉報
0/150
提交
取消