App Vue コンポーネントは、グローバルテーマ(iOSまたはMaterial)とその他の便利なグローバル設定を定義できるメインのアプリコンポーネントです。
Konsta UI を他のフレームワーク(Framework7 や Ionic など)と併用する場合は、代わりに KonstaProvider を使用してください。
以下のコンポーネントが含まれています。
App
名前 | 型 | デフォルト | 説明 |
---|---|---|---|
component | 文字列 | 'div' | コンポーネントのHTML要素 |
dark | ブール値 | false |
|
safeAreas | ブール値 | true | コンテナに |
theme | 'ios' | 'material' | 'parent' | 'material' | アプリのテーマ。 |
touchRipple | ブール値 | true | Materialテーマでタッチリップル効果を有効にします。すべてのコンポーネントのタッチリップルをグローバルに無効にすることができます。 |
App
コンポーネントは、すべてのKonsta UIコンポーネントのメインラッパーとして使用し、アプリには一度に1つのApp
コンポーネントのみを含める必要があります。
<template>
<!-- App component ideally should be the main root component -->
<k-app theme="ios" safe-areas>
<!-- rest of Konsta UI components -->
</k-app>
</template>
<script>
import { kApp } from 'konsta/vue';
export default {
components: {
kApp,
},
};
</script>