使用离子芯4时不会显示离子含量
我正在开发一个使用Vue.js和Ionic的应用程序,但是我无法弄清楚为什么更新Ionic核心版本会破坏ion-content标签,我尝试使用Google搜索来检查该标签是否已停用,但它没有似乎并非如此.
I'm developing an app that uses Vue.js and Ionic, but I can't figure it out why updating my Ionic core version breaks the ion-content tag, I tried googling if the tag was discontinued, but it doesn't seem to be the case.
为说明起见,我举了一个使用离子芯的示例.在最新的Ionic版本中,不会显示ion-content标签,但是如果切换到旧的Ionic版本,则显示就很好了.
To illustrate, I've made a example that uses Ionic core. With the latest Ionic version the ion-content tag doesn't show up, but if you switch to the older Ionic version, then it shows just fine.
<head>
<meta charset="UTF-8">
<title>Ionic Test</title>
<script src="https://unpkg.com/@ionic/core@latest/dist/ionic.js"></script>
<!-- <script src="https://unpkg.com/@ionic/core@0.0.2-30/dist/ionic.js"></script> -->
</head>
<body>
<ion-app>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Example</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="content" padding>
<ion-list>
</ion-item>
<ion-label full>I'm an example text...</ion-label>
<ion-button>Example button</ion-button>
</ion-item>
</ion-list>
</ion-content>
</ion-page>
</ion-app>
</body>
以下是此代码的jsFiddle: https://jsfiddle.net/telmo/chk9h080/
Here's a jsFiddle for this code: https://jsfiddle.net/telmo/chk9h080/
有人可以向我解释这里发生了什么吗?
Can someone explain to me what is happening here?
自@ionic/core
(aka Ionic4)版本0.0.4开始,没有更多的<ion-page>
.您可以直接将标题和内容放在<ion-app>
下.
Since @ionic/core
(aka Ionic4) version 0.0.4, there is no more <ion-page>
. You directly put your header and content under the <ion-app>
.
如果确实有必要,可以将它们包装在<div class="ion-page">
中.
If really necessary, you can wrap them in a <div class="ion-page">
.