🔥 新しいプロジェクトのご紹介 t0ggles - 究極のプロジェクト管理ツール! 🔥

プログレスバー Vue コンポーネント

プリローダーに加えて、アクティビティを示すための確定プログレスバーもあります。

プログレスバー コンポーネント

次のコンポーネントが含まれています

  • プログレスバー

プログレスバーのプロパティ

名前デフォルト説明
colorsオブジェクト

Tailwind CSS カラークラスを持つオブジェクト

colors.bgIos文字列'bg-primary'
colors.bgMaterial文字列'bg-md-light-primary dark:bg-md-dark-primary'
component文字列'span'

コンポーネントのHTML要素

progress数値0

確定プログレス (0~1)

Progressbar.vue
<template>
<k-page>
<k-navbar title="Progressbar" />
<k-block-title>Determinate Progress Bar</k-block-title>
<k-block strong inset-material outline-ios>
<div class="my-4">
<k-progressbar :progress="progress" />
</div>
<k-segmented raised>
<k-segmented-button
:active="progress === 0.1"
@click="() => (progress = 0.1)"
>
10%
</k-segmented-button>
<k-segmented-button
:active="progress === 0.3"
@click="() => (progress = 0.3)"
>
30%
</k-segmented-button>
<k-segmented-button
:active="progress === 0.5"
@click="() => (progress = 0.5)"
>
50%
</k-segmented-button>
<k-segmented-button
:active="progress === 1.0"
@click="() => (progress = 1.0)"
>
100%
</k-segmented-button>
</k-segmented>
</k-block>
<k-block-title>Colors</k-block-title>
<k-block strong inset-material outline-ios class="space-y-4">
<k-progressbar class="k-color-brand-red" :progress="0.25" />
<k-progressbar class="k-color-brand-green" :progress="0.5" />
<k-progressbar class="k-color-brand-yellow" :progress="0.75" />
<k-progressbar class="k-color-brand-purple" :progress="1" />
</k-block>
</k-page>
</template>
<script>
import { ref } from 'vue';
import {
kPage,
kNavbar,
kNavbarBackLink,
kBlock,
kBlockTitle,
kProgressbar,
kSegmented,
kSegmentedButton,
} from 'konsta/vue';
export default {
components: {
kPage,
kNavbar,
kNavbarBackLink,
kBlock,
kBlockTitle,
kProgressbar,
kSegmented,
kSegmentedButton,
},
setup() {
const progress = ref(0.1);
return {
progress,
};
},
};
</script>
コードは MIT.
2022 © Konsta UI by nolimits4web.