尝试通过组件重新构建 Ionic-Stencil HN 应用程序组件,重写所有内容以掌握它们如何协同工作,但在重写所有组件并确保任何文件中没有拼写错误并导入 @ionic/核心 npm 模块,我有这个错误:
[44:04.7] @stencil/core v0.1.1-0
[44:04.7] build, app, dev mode, started ...
[44:04.7] compile started ...
[44:09.7] compile finished in 4.99 s
[ ERROR ] typescript: src/components/ask-page/ask-page.tsx, line: 52
Property 'clear' does not exist on type 'IonButtonAttributes'.
L51: onClick={() => this.back ()}
L52: clear
L53: color='primary'
[ ERROR ] typescript: src/components/comments-page/comments-page.tsx, line: 43
Property 'clear' does not exist on type 'IonButtonAttributes'.
L42: <ion-buttons slot='end'>
L43: <ion-button class='close-button' clear onClick={() => this.close()}>
L44: <ion-icon slot='icon-only' name='close' style={{ fill: 'white' }} />
[ ERROR ] typescript: src/components/ionic-hn/ionic-hn.tsx, line: 27
Property 'clear' does not exist on type 'IonButtonAttributes'.
L26: }}
L27: clear>
L28: News
[ ERROR ] typescript: src/components/jobs-page/jobs-page.tsx, line: 67
Property 'clear' does not exist on type 'IonButtonAttributes'.
L66: <ion-buttons slot='end'>
L67: <ion-button onClick={() => this.forward()} clear color='primary'>
L68: Next
[ ERROR ] typescript: src/components/news-page/news-page.tsx, line: 54
Property 'clear' does not exist on type 'IonButtonAttributes'.
L53: onClick={() => this.back()}
L54: clear
L55: color='primary'
[ ERROR ] typescript: src/components/show-page/show-page.tsx, line: 54
Property 'clear' does not exist on type 'IonButtonAttributes'.
L53: onClick={() => this.back()}
L54: clear
L55: color='primary'
[44:09.8] build failed, watching for changes... in 5.08 s
显然只有一个问题:
Property 'clear' does not exist on type 'IonButtonAttributes'.
究竟是什么原因造成的?我错过了什么?