【发布时间】:2020-12-28 09:52:24
【问题描述】:
我创建了一个空白的 Ionic Vue 项目,并在以下视图中添加了 ion-icon 元素以及 IonIcon 导入:
<template>
<ion-page>
<ion-header :translucent="true">
<ion-toolbar>
<ion-title>Blank</ion-title>
</ion-toolbar>
</ion-header>
<ion-content :fullscreen="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">Blank</ion-title>
</ion-toolbar>
</ion-header>
<div id="container">
<strong>Ready to create an app?</strong>
<ion-icon name="home-outline"></ion-icon>
</div>
</ion-content>
</ion-page>
</template>
<script lang="ts">
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonIcon } from '@ionic/vue';
import { defineComponent } from 'vue';
export default defineComponent({
name: 'Home',
components: {
IonContent,
IonHeader,
IonPage,
IonTitle,
IonToolbar,
IonIcon
}
});
</script>
但我还是看不到图标,而且我也没有收到任何错误。
【问题讨论】: