🔥 看看我們的新專案 t0ggles - 您終極的專案管理工具! 🔥

列表按鈕 Vue 組件

列表按鈕旨在於 列表 Vue 組件 內使用。

列表按鈕組件

包含以下組件

  • ListButton

ListButton 屬性

名稱類型預設值描述
colors物件

包含 Tailwind CSS 色彩類別的物件

colors.activeBgIos字串'active:bg-primary active:bg-opacity-15'
colors.activeBgMaterial字串''
colors.textIos字串'text-primary'
colors.textMaterial字串'text-md-light-primary dark:text-md-dark-primary'
colors.touchRipple字串'touch-ripple-primary'
component字串'li'

組件的 HTML 元素

href字串

按鈕的連結 href 屬性

linkComponent字串'a'

按鈕 HTML 元素

linkPropsany

要傳遞給連結/按鈕的其他屬性(特性)的物件

target字串

按鈕的連結 target 屬性

touchRipple布林值true

在 Material 主題中啟用觸控漣漪效果

type字串未定義

按鈕的 type 屬性(如果使用 linkComponent: 'button' 呈現為 <button>

valueany

按鈕的 type 屬性(如果使用 linkComponent: 'button' 呈現為 <button>

範例

ListButton.vue
<template>
<k-page>
<k-navbar title="List Button" />
<k-list>
<k-list-button>Button 1</k-list-button>
<k-list-button>Button 2</k-list-button>
<k-list-button>Button 3</k-list-button>
</k-list>
<k-list inset>
<k-list-button>Button 1</k-list-button>
<k-list-button>Button 2</k-list-button>
<k-list-button>Button 3</k-list-button>
</k-list>
<k-list inset>
<k-list-button class="k-color-brand-red"> Red Button </k-list-button>
</k-list>
</k-page>
</template>
<script>
import {
kPage,
kNavbar,
kNavbarBackLink,
kList,
kListButton,
} from 'konsta/vue';
export default {
components: {
kPage,
kNavbar,
kNavbarBackLink,
kList,
kListButton,
},
};
</script>
程式碼授權於 MIT.
2022 © Konsta UI 由 nolimits4web.