arrow-left

Only this pageAll pages
gitbookPowered by GitBook
1 of 33

繁體中文

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Piman 無障礙網頁前端 UI 框架

為無障礙網頁而生的 UI 框架 無障礙,讓你我被世界善待

  • 快速開始 (Vue2)

  • Github (Vue2)arrow-up-right

hashtag
Accessibility, Design System and UI Framework

近年來「以使用者為中心」的概念已深植人心, 而這股力量也開始擴散至無障礙網頁設計領域, 藉由不斷改善網頁的親和力, 期望能達成通用設計的核心概念:Design for All。

Piman 正是為此而生, 從人們日常生活常頻繁接觸的網頁開始著手改善, 所以首要任務便是推廣開發者使用 Piman 開發政府機關網站, 進而應用在產品、官網等地方,如此企業可善盡社會責任,也可與國際趨勢接軌。

hashtag
為什麼要使用無障礙網頁 UI 框架?

  • 降低無障礙網頁開發成本:快速創造出友善的網頁

  • 未來每個網站都會注重無障礙網頁設計:已經成為世紀趨勢,尤其是 UX 意識提升的現在

  • WTO 統計全球已有超過 10% 以上的人有一定程度的身心障礙:落實 Design for All 精神,讓更多用戶使用

hashtag
基於 Vue 2 開發的 UI 框架(Vue 3 版開發中)

  • 我們希望盡可能讓更多人使用 Piman,而對無障礙學習者與切版新手來說, Vue 在技術面上成熟且相對其他框架好上手。

  • 無障礙網頁設計要注意許多技術、結構規範,複製/貼上 html 等方式可能會遺漏細節或誤用,因此我們決定使用 Vue 來製作元件,希望降低錯誤發生機率。

  • 同時為考慮 IE11 的良好支援 ,選擇了 Vue 2 來進行開發。

hashtag
讓我們保持聯繫吧!

歡迎訂閱,我們會將各種有關無障礙網頁設計的資訊分享給您。

Vue3 版本

Vue2 版本

Vue2 已停止開發,若您想繼續使用以便支援 IE11,建議熟讀 https://www.herodevs.com/support/nes-vuearrow-up-right

符合臺灣無障礙網頁設計規範的 UI 框架套件不多:為了符合無障礙而修改原始碼容易造成版本鎖死、維護不易
  • 良好的管理設計樣式:完善的 Design System,提升維護與開發效率

  • 另外 Vue3 版也在開發中,但只支援現代最新瀏覽器。

    Design Tips

    提供設計師無障礙網頁設計的重點,避免重複踩到前人踩過的地雷。

    Figma Template

    完善的 Design System, 快速、方便執行無障礙網頁設計。

    Vue Components

    提供多樣常見的元件, 站在巨人的肩膀上開發!

    Nuxt Template

    快速開啟無障礙網頁前端專案,省下環境設定的時間。

    設計系統

    建議直接觀看設計檔案

    常見問答

    hashtag
    使用 Piman UI 框架需要先暸解什麼呢?

    hashtag
    當我用了 Piman,我的網站就會符合無障礙網頁規範了嗎?

    很可惜,我們也很想,但因為每個網站的目標與內容都不相同,排版也不會一樣,所以您還是需要擁有無障礙網頁設計規範的知識來製作網站,Piman 目前提供 、 以及 。(Vue3、Nuxt3 Template 開發中)

    hashtag
    瀏覽器支援程度如何呢?

    Piman Vue2 版支援現代主流瀏覽器與 IE11,規劃中的 Piman Vue3 版則無支援 IE,這是因為 Vue3 前端框架已經不支援 IE 的關係。

    hashtag
    我還是不太滿意 Piman,有沒有推薦符合無障礙設計規範的 UI 框架?

    當然有,只要您想要設計無障礙網頁,我們很樂意提供您除了 Piman 之外的資訊。

    目前主流 UI 框架應該都有符合無障礙網頁設計規範,例如 ,而我們私心推薦的是 ,因爲它包含了三大前端框架,且有完整的 demo 和 文件。 或是可以選擇類似例如: 跟 等 headless,這些專注在行為上,UI 風格則是自己額外建立。

    只不過有一點您可能要注意的是,因為 Piman 是有對臺灣數位發展部的無障礙網路空間服務網規範有特別關注,所以您在使用別的框架時,可能會遇到臺灣規定掃描的軟體 freego 機器掃描掃出來的問題和人工檢測的問題。

    另外 Vue2 版有支援 IE 11,可以讓更多相對舊款的設備使用,但同時要注意的是 IE 11 已經停止維護,具有資安風險。如何在無障礙精神與資安問題取得協調,是開發者們需要自行好好評估!

    hashtag
    有什麼資源可以下載呢?

    Piman 提供以下資源,從設計到前端開發不再走冤望路

    • :Design System、後台範本設計稿

    • Nuxt 範本:、 範本

    Cards

    介紹使用 Cards 卡片元件

    Cards,卡片,推薦使用在展示一系列的資訊或是特別想介紹的內容。

    hashtag
    基本使用

    hashtag
    沒有內距

    hashtag
    客製化標頭、尾

    hashtag
    陰影

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    Demo

    Breadcrumb

    介紹使用 Breadcrumb 麵包屑元件

    Breadcrumb,也就是俗稱的「麵包屑」,就如「糖果屋」故事裡為了怕迷路而撒下的麵包屑,在網頁裡,使用者有時候會突然忘記自己在哪個層級的頁面裡,這時候 Breadcrumb 就會發揮它的作用,指出方向讓使用者知道自己的方位。

    hashtag
    基本使用

    <bpa-breadcrumb :key="$route.path">
      <bpa-breadcrumb-item
        v-for="(pathItem, pathIndex) in path"
        :key="`pathIndex-${pathIndex}`"
        :title="`goto${pathItem.title}`"
        :to="pathItem.url"
      >
        {{ pathItem.title }}
      </bpa-breadcrumb-item>
    </bpa-breadcrumb>

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    Demo

    快速開始

    學習快速上手 Piman 無障礙網頁設計 UI 框架

    hashtag
    安裝 Piman

    開始使用前需要先安裝 Node.jsarrow-up-right 18 版本並且建立 Vue 2 或 Nuxt 2 專案。

    如果您目前有很多專案且 Node.js 版本都不同, 我們推薦您可以學習使用 nvmarrow-up-right 來管理 Node.js 版本。

    接著在要使用的資料夾,執行:

    npm install @yasai/piman

    hashtag
    Import

    hashtag
    Vue2

    hashtag
    Nuxt 2

    接下來,就是暸解元件的使用方式。

    設計系統

    建議直接觀看設計檔案

    關於 Piman

    hashtag
    Piman 的願景

    網頁都能達成通用設計,落實「Design for All」。

    hashtag
    Piman 的使命

    降低設計與開發無障礙網頁的成本,並考慮到更具包容性的使用場景和更加多樣的用戶需求。

    hashtag
    Piman 重點概要

    hashtag
    一起成為 Piman 的貢獻者吧!

    前往 Github 暸解貢獻者:

    hashtag
    給予我們一些建議

    傳送給 Piman 表達您的心情、感受以及建議,謝謝!

    Buttons

    介紹使用 Buttons 按鈕元件

    Button,中文名為按鈕,通常用在網頁想要和使用者互動時的一種方法,互動的內容則會呈現在按鈕裡的文字。

    hashtag
    主題色

    hashtag

    Input

    介紹使用 Input 輸入框元件

    Input 輸入框是一種可以讓網頁與使用者互相傳遞訊息的元件,而訊息又具有多種類型,例如:密碼、單行文字、多行文字,其中密碼類型必須考量使用者在填寫時,盡量不要讓人看到,或是有時候會忘記自己打到哪邊,所以會設置一個按鈕,將隱藏的文字重新顯示。另外,使用者也會需要用到清除的按鈕以快速清除然後重新輸入內容。

    circle-exclamation

    注意

    Message

    介紹使用 Message 提示訊息元件

    Message 提示訊息,通常會用來當 Notification,但 Message 用途不在此限,舉凡通知、錯誤提示、小提醒等都可以使用 Message 來傳遞訊息給使用者,並且還有輕重緩急程度的區別。

    circle-exclamation

    提示: 要在 mounted 之後觸發

    Accordion

    介紹使用 Accordion 手風琴元件

    Accordion 通常中文會翻譯成「手風琴」效果,在畫面上的呈現就好像是演奏手風琴時,手部拉開再合攏的效果。Accordion 經常應用在例如常見問答的頁面,因內文太豐富,所以先利用標題吸引使用者點擊展開閱讀,避免網頁內容太長導致使用者失去耐性以及不好跳躍閱讀。

    常見的另一個名詞為 Collapse。

    hashtag
    基本使用

    Dialog

    介紹使用 Dialog 對話框元件

    Dialog 是網頁與使用者一種強烈的互動,這個元件顯示後,將會吸引使用者所有的注意力,所以一般會用在非常重要的地方,或是想讓使用者完全專心的情境之下。

    hashtag
    基本使用

    hashtag

    Form

    介紹使用 Form 表單元件

    Dropdown 下拉式選單,用在讓使用者針對選取的資料採取下一步互動。點擊按鈕會出現一個懸浮區域,裡面是一系列的選項,外觀與 Select 相似,但與 Select 最大的不同之處在於 Dropdown 點擊選項後觸發選項事件,並且關閉懸浮區域。

    hashtag
    範例

    hashtag

    <bpa-card>
      Cotnent
    </bpa-card>

    hashtag
    您必須熟讀 HTML 字典arrow-up-right 與 CSS 字典arrow-up-right

    hashtag
    至無障礙網路空間服務網arrow-up-right熟讀各項無障礙網頁設計規範

    hashtag
    了解 WAI-ARIA 並謹記 WAI-ARIA 的宗旨為: No ARIA is better than Bad ARIAarrow-up-right

    hashtag
    保持耐心,慢慢學習無障礙網頁相關知識。 也歡迎追蹤我們的 Instagramarrow-up-right,會不定時分享小知識。

    Figma 設計稿arrow-up-right
    Vue2 元件arrow-up-right
    Nuxt 2 的 簡易模板arrow-up-right
    Bootstraparrow-up-right
    IBM 的 Carbonarrow-up-right
    https://headlessui.dev/arrow-up-right
    https://www.radix-ui.com/arrow-up-right
    Figma Communityarrow-up-right
    Nuxt2arrow-up-right
    Nuxt3arrow-up-right
    //main.js
    import Vue from 'vue'
    
    import piman from "@yasai/piman";
    import '@yasai/piman/dist/piman.css';
    Vue.use(piman)
    // nuxt.config.js
    export default {
      plugins: [
        '@/plugins/piman.js',
      ],
    }
    // create a file bp-a11y.js in /plugins
    import Vue from 'vue'
    import piman from "@yasai/piman";
    Vue.use(piman)

    String

    nopadding

    Boolean

    padding=0

    shadow

    Boolean

    false

    show/hide shadow

    header

    { text } or template

    String

    footer

    Card 介紹示意圖

    { text } or template

    String

    <a title="title">

    to

    { url path }

    Vue Route

    title

    Breadcrumb 介紹示意圖

    大小

    hashtag
    禁用

    hashtag
    載入中

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    theme

    primary, success, warning, danger, primary-ghost, success-ghost, warning-ghost, danger-ghost

    String

    disabled

    hashtag
    Demo

    Button 介紹示意圖
    hashtag
    大小

    hashtag
    提示文字

    hashtag
    禁用

    hashtag
    必填

    hashtag
    唯讀

    hashtag
    錯誤提示

    hashtag
    快捷鍵

    hashtag
    隱藏清除按鈕

    hashtag
    類型

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    value

    hashtag
    Demo

    Input 介紹示意圖
    hashtag
    範例

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    prefix

    emoji, text, Html(danger)

    String

    text 或 html(但有危險性)

    theme

    hashtag
    方法

    Name

    Msg( msg | options )

    Msg.primary( msg | options )

    Msg.success( msg | options )

    Msg.warning( msg | options )

    Msg.danger( msg | options )

    hashtag
    Demo

    Message 介紹示意圖
    hashtag
    預設展開內容

    hashtag
    客製化標題

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    title

    hashtag
    Demo

    Accordion 介紹示意圖
    客製化標頭、尾

    hashtag
    點擊外面遮罩時,不關閉對話框

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    header

    hashtag
    Demo

    Dialog 介紹示意圖
    驗證

    hashtag
    Fieldset

    hashtag
    bpa-form 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    model

    Object

    random

    rules

    hashtag
    bpa-form 方法

    Name
    Parameters

    validate

    Function () : Promise({valid: booleaml; error: object})

    hashtag
    bpa-form-item 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    prop

    String

    label

    hashtag
    bpa-form-item 方法

    Name
    Parameters
    Note

    validate

    { valid: boolean, message: string }

    hashtag
    Demo

    Form 介紹示意圖

    Piman 無障礙 UI 框架源起

    • 沒辦法要求所有參與人員都深入暸解無障礙規範。

    • 國外的 UI 框架、套件與臺灣規範不盡相符。

    • 機器掃描與人工檢測,導致時程壓力。

    使用者與利益關係人

    • 設計師:快速開啟設計專案,並與前端工程接軌。

    • 切版:可以專注版面,並提示工程師細節。

    • 前端工程:可以專注在優先度更高的事,提升 UX 。

    解決方案

    • Design System 設計稿 (Figma)

    • 各種包裝好的元件 (Vue 2,Vue3 開發中)

    • 簡易專案範本 (Nuxt 2&3)

    Vue2arrow-up-right
    Vue3arrow-up-right
    Piman 社群分享圖,寫著 Accessibility, Design System 與 UI Framework

    Dropdown

    介紹使用 Dropdown 下拉式選單元件

    Dropdown 下拉式選單,用在讓使用者針對選取的資料採取下一步互動。點擊按鈕會出現一個懸浮區域,裡面是一系列的選項,外觀與 Select 相似,但與 Select 最大的不同之處在於 Dropdown 點擊選項後觸發選項事件,並且關閉懸浮區域。

    hashtag
    主題色

    hashtag
    大小

    hashtag
    提示文字

    hashtag
    禁用

    hashtag
    前綴與後綴

    hashtag
    如果上層有"position: fixed"

    hashtag
    在 bp-form-item 裡面

    hashtag
    客製化列表寬度

    hashtag
    Options 與 Methods

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    Demo

    Radio

    介紹使用 Radio 選項按鈕元件

    Radio 選項按鈕,通常用於表單之中,同一系列中的選項按鈕只能選取其中一個成為回答。

    hashtag
    基本使用

    hashtag

    Tabs

    介紹使用 Tabs 頁籤元件

    Tabs 頁籤,通常應用在某一個主題有多種不同內容的情況下使用。

    hashtag
    基本使用

    hashtag

    Popover

    介紹使用 Popover 彈出框元件

    Popover 彈出框,通常應用在呈現輔助資訊,例如畫面上空間不夠但是又必須呈現很多說明文字時,就可以使用此種元件。顯示時會懸浮於畫面上,蓋住部分原來網頁。

    circle-info

    使用 Popover 可以讓使用者的自由度比較大,若您想要讓使用者更專注在彈出框的情境,建議使用 Dialog 元件。

    hashtag

    成為貢獻者,一起開發 Piman

    感謝您對 Piman 有興趣!

    Piman 的目標是盡量讓通用設計的理念「Design for all」落實在網頁設計上。

    在成為開發夥伴之前,請您先花一點點時間閱讀以下項目:

    • Issue

      • 請先搜尋 Github 上有沒有相關 issue

    Checkbox

    介紹使用 Checkbox 核取方塊元件

    Checkbox 呈現了一系列可以選擇的項目,使用者可以都不選、選一個或者是選擇多個項目。

    hashtag
    基本使用

    hashtag

    Pagination

    介紹使用 Pagination 分頁碼元件

    Pagination 分頁碼,是用在一頁無法完整所有資訊時,切換頁面繼續從上次閱讀的地方繼續往後閱讀。常見的內容有頁碼,上下一頁、第一頁、最末頁、總共有多少項目、總共有多少頁、目前在第幾頁、前往第幾頁等功能,幫助使用者快速跳至某個頁面閱讀資料。

    circle-exclamation

    提示: 要在 mounted 之後觸發

    Switch

    介紹使用 Switch 元件

    Switch 切換開關,通常用在開啟或關閉的功能上。

    hashtag
    基本使用

    hashtag

    Tooltip

    介紹使用 Tooltip 提示框元件

    Tooltip 提示框,隱藏起來的次要資訊,當需要時才顯示。

    hashtag
    範例

    hashtag

    <bpa-card nopadding>
      Cotnent
    </bpa-card>
    <bpa-card 
      header="card header text"
      footer="card footer text"
    >
      Cotnent
    </bpa-card>
    <bpa-card>
      <template v-slot:header>
        <mark>Card Header</mark>
      </template>
      Content
      <template v-slot:footer>
        <bpa-button>Card Footer Button</bpa-button>
      </template>
    </bpa-card>
    <bpa-card shadow>
      Cotnent
    </bpa-card>
    <bpa-button theme="primary">Button</bpa-button>
    <bpa-button size="small">Button</bpa-button>
    <bpa-button disabled>Button</bpa-button>
    <bpa-button :loading="true">Button</bpa-button>
    使用 <bpa-input :id="{id}"> 時,需要 <label :for="{id}">
    但如果是在 <bpa-form-item :labelFor="{id}"> 裡面時,就不需要加 <label>。
    
    <label for="test">Label</label>
    <bpa-input id="test"/>
    ...
    <bpa-form-item :labelFor="test">
        <bpa-input id="test"/>
    </bpa-form-item>
    <bpa-input v-model="value" size="small"/>
    <bpa-input v-model="value" placeholder="Please enter here!"/>
    <bpa-input v-model="value" disabled/>
    <bpa-input v-model="value" required/>
    <bpa-input v-model="value" readonly/>
    <bpa-input v-model="value" error/>
    <bpa-input v-model="value" accesskey="K"/>
    <bpa-input v-model="value" disabledClear/>
    <!-- password -->
    <bpa-input v-model="value" type="password"/>
    
    <!-- multiple lines -->
    <bpa-input v-model="value" type="textarea"/>
    <template>
      <div>
        <section>
          <h2>訊息提示</h2>
          <article>
            <section>
              <h3>基本</h3>
              <bpa-button @click="openMsg1">提示</bpa-button>
            </section>
            <section>
              <h3>前綴</h3>
              <bpa-button @click="openMsg2">純文字</bpa-button>
              <bpa-button @click="openMsg3">客製化前綴(具有危險性)</bpa-button>
            </section>
            <section>
              <h3>展示時間</h3>
              <bpa-button @click="openMsg4">顯示5秒鐘</bpa-button>
              <bpa-button @click="openMsg9">永不關閉(主動關閉)</bpa-button>
            </section>
            <section>
              <h3>主題色</h3>
              <bpa-button @click="openMsg5">Normal</bpa-button>
              <bpa-button @click="openMsg6">Success</bpa-button>
              <bpa-button @click="openMsg7">Warning</bpa-button>
              <bpa-button @click="openMsg8">Danger</bpa-button>
            </section>
            <section>
              <h3>另一種寫法</h3>
              <bpa-button @click="openMsg10">另一種寫法</bpa-button>
            </section>
            <section>
              <h3>關閉觸發</h3>
              <bpa-button @click="openMsg11">關閉訊息觸發</bpa-button>
            </section>
          </article>
        </section>
      </div>
    </template>
    
    <script lang="ts">
    import Vue from 'vue'
    import Bpa from "@/components";
    const { Msg } = Bpa
    export default Vue.extend({
      methods: {
        openMsg1() {
          (this as any).$msg({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg2() {
          (this as any).$msg({
            prefix: '⚠',
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg3() {
          (this as any).$msg({
            prefix: '<img src="favicon.ico" alt=""/>',
            dangerHTML: true,
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg4() {
          (this as any).$msg({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
            duration: 5000
          })
        },
        openMsg5() {
          (this as any).$msg({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg6() {
          (this as any).$msg.success({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg7() {
          (this as any).$msg.warning({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg8() {
          (this as any).$msg.danger({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
          })
        },
        openMsg9() {
          (this as any).$msg({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
            duration: 0
          })
        },
        openMsg10() {
          Msg({
            prefix: '<img src="favicon.ico" alt=""/>',
            dangerHTML: true,
            msg: '很短',
            duration: 0,
            theme: 'primary',
          })
        },
        openMsg11() {
          (this as any).$msg({
            msg: 'These can be useful for demos with large templates or in extremely small applications, but should otherwise be avoided, because they separate templates from the rest of the component definition.',
            duration: 0,
            onClose: function(){
              alert('關閉了')
            }
          })
        },
      },
    })
    </script>
    <bpa-accordion>
      <bpa-accordion-item>
        Content 1
      </bpa-accordion-item>
      <bpa-accordion-item>
        Content 2
      </bpa-accordion-item>
    </bpa-accordion>
    <bpa-accordion>
      <bpa-accordion-item open>
        Content 1
      </bpa-accordion-item>
      <bpa-accordion-item open>
        Content 2
      </bpa-accordion-item>
    </bpa-accordion>
    <bpa-accordion>
      <bpa-accordion-item title="Custom title text">
        Content 1
      </bpa-accordion-item>
      <bpa-accordion-item>
        <template v-slot:title>
          <mark>Custom title Html</mark>
        </template>
        Content 2
      </bpa-accordion-item>
    </bpa-accordion>
    <bpa-button @click="isBpaDialogVisible = true">
      Open Dialog
    </bpa-button>
    
    <bpa-dialog :visible.sync="isBpaDialogVisible">
      Content
    </bpa-dialog>
    <bpa-dialog
      :visible.sync="isBpaDialogVisible"
      header="custom header text"
      footer="custom footer text"
    >
      Content
    </bpa-dialog>
    <bpa-dialog
      :visible.sync="isBpaDialogVisible"
    >
      <template v-slot:header>
        <mark>custom header Html</mark>
      </template>
      Content
      <template v-slot:footer>
        <mark>custom footer Html</mark>
      </template>
    </bpa-dialog>
    <bpa-dialog :clickoutside="false">
      Cotnent
    </bpa-dialog>
    <bpa-form
      :model="exampleForm"
      ref="refExampleForm"
      :rules="exampleRules"
    >
      <bpa-form-item
        label="姓名"
        prop="name"
        required
        labelFor="thisIDIsMustTheSame"
        @validate="onValidate"
      >
        <bpa-input
          v-model="exampleForm.name"
          id="thisIDIsMustTheSame"
        />
      </bpa-form-item>
    </bpa-form>
    data() {
      return {
        exampleRules: {
          name: [
            { required: true, message: 'name is required' },
            { min: 3, max: 5, message: 'at least 3 to 5 words', trigger: 'change' }
          ]
        }
      }
    }
    // required
    const rules = {
      input:[{ required: true, message: '此欄位必填', trigger: 'blur' }]
    }
    
    // multiple
    const rules = {
      check:[{ required: true, type:'array', message: 'please check', trigger: 'change' }]
    }
    
    // multiple
    const rules = {
      check:[{ required: true, type:'array', message: 'please check', trigger: 'change' }]
    }
    
    // max and min
    const rules = {
      check:[{ min:0, max: 3, type:'array', message: 'please check(max 3)', trigger: 'change' }]
    }
    
    // password
    const form = {
       password:'',
       confirm:''
     }
     const validatePsw = (rule: Array<any>, value: string, callback: (par?: any)=>{}) => {
       if (value !== form.password) {
         let msg = 'Not Match!'
         callback(new Error(msg));
       } else {
         callback();
       }
     }
     const rules = {
       confirm:[
         { required: true, validator: validatePsw, trigger:'blur'}
       ],
     }
    
    // regular express
    const rules = {
       password:[
         { 
           pattern: /(?=.{12,})((?=.*\d)(?=.*[a-z])(?=.*[A-Z])|(?=.*\d)(?=.*[a-zA-Z])(?=.*[\W_])|(?=.*[a-z])(?=.*[A-Z])(?=.*[\W_])).*/,  
           trigger: 'blur' 
         }
       ],
     }ja
    <fieldset class="bpa-fieldset">
      <legend>Experience</legend>
      <div class="bpa-fieldset-container">
        <bpa-form-item
          label="Company"
          prop="company"
          labelFor="testModelId2"
         >
          <bpa-input
             v-model="exampleForm.company"
             id="testModelId2"
          />
        </bpa-form-item>
      </div>
    </fieldset>
    <bpa-dropdown v-model="value" :options="options" theme="primary" @click="onClick"/>

    Vue2

    訂閱電子報47f3ef82.sibforms.comchevron-right

    String

    v-model

    String

    options

    Array<{ label: string; type?: ‘link’ or ‘external-link’; url: string }>

    disabled

    Boolean

    placeholder

    String

    theme

    primary,

    success,

    warning,

    danger,

    primary-ghost,

    success-ghost,

    warning-ghost,

    danger-ghost

    String

    optionWidth

    String

    fixed

    Boolean

    v-slot:prefix

    v-slot:affix

    listboxClass

    String

    可以在 listbox 增加 classname

    id

    String

    random

    size

    Dropdown 介紹示意圖

    small, large

    應付心態,卻對真正需要幫助的使用者造成困擾。

  • 公司都需要一套 Design System 。

  • 公家機關多數仍要求支援 IE11。

  • 利益關係人:PM 與 QA 進行自我檢測降低風險。

    彙整 Checklist 與 檢測工具

    禁用

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    name

    hashtag
    Demo

    Radio 介紹示意圖
    輔助資訊

    hashtag
    前、後綴

    hashtag
    Tabs 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    v-model / value

    String

    hashtag
    Tabs-panel 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    name

    String

    prefixIcon

    hashtag
    Tabs 事件

    Name
    Parameters
    Desciption

    input

    當頁籤變更時

    hashtag
    Demo

    Radio 介紹示意圖
    Tabs 介紹示意圖
    基本使用

    hashtag
    大小

    hashtag
    主題色

    hashtag
    沒有內距

    hashtag
    標題

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    theme

    hashtag
    Demo

    Popover 介紹示意圖

    有的話,可以嘗試解解看

  • 沒有的話可以開一個新 issue

  • 並且使用我們設定的 label

  • Pull Request

    • fork repo

    • clone fork

    • commit 訊息

      • feat:新功能

      • fix:修正 bug

      • refactor:coding style, project arch, 文件

      • revert:revert commit

    • DO NOT PR dist 資料夾

    • rebase

    • PR 到 dev 分支

  • Tag

    • release format:x.x.x-{y}.x

  • 禁用

    hashtag
    群組

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    value

    hashtag
    Demo

    Checkbox 介紹示意圖
    hashtag
    範例

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    total

    Number

    總共多少項目

    currentPage

    hashtag
    事件

    Name
    Parameters
    Description

    sync-page-param

    {currentPage: number}

    換頁時觸發

    change:page

    換頁時觸發

    change:pageSize

    hashtag
    Demo

    circle-info

    此元件在小螢幕時,pagerCount 只顯示目前所在頁面。如果您在demo頁上只看到目前所在頁面,可以試著調整解析度或將網頁縮小等方式看到完整外觀。

    Pagination 介紹示意圖
    客製化文字

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    id

    String

    random

    labelText

    hashtag
    事件

    Name
    Parameters
    Desciption

    change

    hashtag
    Demo

    Radio 介紹示意圖
    Switch 介紹示意圖
    屬性
    Name
    Value
    Type
    Default
    Required
    Note

    text

    String || Number

    hashtag
    Demo

    Radio 介紹示意圖
    Tooltip 介紹示意圖

    Boolean

    loading

    Boolean

    size

    small, large

    String

    [ String, Number ]

    size

    small, large

    type

    placeholder

    disabled

    required

    readonly

    error

    accesskey

    disabledClear

    primary, success, warning, danger

    String

    primary

    dangerHTML

    Boolean

    false

    使用 html tag

    msg

    String

    duration

    Number

    200

    出現在螢幕上的時間

    vOffset

    Number

    20

    onClose

    Function

    null

    關閉後觸發

    { text } or template

    String

    open

    Boolean

    false

    展開 bpa-accordion-item

    { text } or template

    String

    footer

    { text } or template

    String

    visible

    Boolean

    false

    clickoutside

    Boolean

    true

    Object (async-validatorarrow-up-right)

    autofocus

    Boolean

    true

    自動聚焦

    String

    labelFor

    String

    required

    Boolean

    error

    Boolean

    hint

    String

    rules

    [Object, Array]

    model

    [Object, Array, Boolean, String, Number]

    i18n

    Your time is limited, so don’t waste it living someone else’s life.

    —— Steve Jobs

    多語言設定就好像是這句名言,如果沒有翻譯成多種語言,那麼就僅僅是在一個文化圈流傳,這樣有點太可惜了。

    一個寫著不同語言的我愛你的版子。

    hashtag
    Vue2

    hashtag
    Nuxt2

    hashtag
    設定

    hashtag
    Bpai18n

    hashtag
    文字

    hashtag
    v-bind

    hashtag
    Methods

    hashtag
    使用

    hashtag
    新增語言

    1. 新增語言檔至 /lang 資料夾

    2. 在 /lang/index.ts 寫 export

    hashtag
    限制

    若有使用其他第三方套件,則需手動為其改變語言。

    hashtag
    Options

    Update

    I’m not a great programmer; I’m just a good programmer with great habits.

    —— Kent Beck

    更新版本是一種持續性的過程,所以必須有良好的識別度。

    一台打字機,上面放著一張寫著update字樣的圖片

    hashtag
    package.json

    在 package.json 裡更改 version 內容,其格式為 x.x.x-{y}.x

    hashtag
    Build

    hashtag
    釋出版本

    1. 貼上版號標籤: x.x.x-{y}.x

    2. 撰寫 release note

    hashtag
    更新 Codesandbox

    如果您有權限更改,請更新範例演示內容。

    Develope Component

    Give someone a program, you frustrate them for a day; teach them how to program, you frustrate them for a lifetime.

    —— David Leinweber

    開發元件是如此的有趣、有意義,以至於開發者會無時無刻在腦海裡邊寫程式,只為了好用。

    一台螢幕發出藍、紅、黃、粉、紫色的筆記型電腦

    hashtag
    開新檔案

    1. 在 src/components 建立 .vue 檔。

    2. naming style:Camel Case,以 ‘Bpa’開頭,例如: BpaButton.vue

    hashtag
    註冊

    然後在 .vue 檔使用。

    hashtag
    Type

    在 /type 資料夾內新增 newFileName}.d.ts 檔案, 然後在 /types/bpa.d.ts 裡註冊

    hashtag
    如果想快速在 Nuxt2 開發時測試…

    1. npm run build

    2. 複製 /dist 資料夾內容到 Nuxt

    3. import piman from “your-path/piman.umd.js

    更新日誌

    Piman 無障礙網頁設計 UI 框架的更新訊息都會在這裡可以看到。

    https://github.com/ya-sai/piman/releasesarrow-up-right


    Vue2 停止開發

    hashtag
    v1.0.0-alpha.36

    • 可以使用 node 18

    hashtag
    v1.0.0-alpha.32

    • demo 頁面目前已換上全新後台 layout 範本

    • 修正 package.json

    • 修正文件文字

    hashtag
    v1.0.0-alpha.30

    • 補上 TAB 的操作方式提示與多國語言。

    • 補上 Select 與 Dropdown 的 aria-control。

    • 修正 Select 與 Dropdown 的 aria-description 與其多國語言。

    hashtag
    v1.0.0-alpha.29

    • Form Error 提示狀態補上驚嘆號標示,避免只使用顏色作為提示。

    • input, checkbox, select ,Error 狀態使用虛線表示

    • 修正 dropdown placeholder多國語言

    hashtag
    v1.0.0-alpha.28

    • 將 emoji 都增加 aria-hidden 屬性,避免報讀軟體讀出 emoji 的意思和想表達的意思不一致。

    • 修正 switch 顏色對比。

    • 修正 input type=”password” 的顯示/隱藏 emoji 為 svg,因為原本使用的 顯示 emoji ,在 safari 和 行動裝置上,在 Dialog 裡使用會被拆解成兩個 emoji。

    CSS & SCSS

    Life’s too short to build something nobody wants.

    —— Ash Maurya, Running Lean: Iterate from Plan A to a Plan That Worksarrow-up-right

    無障礙網頁設計在排版與色彩上需要注意的地方很多,擁有良好管理方式是促進無障礙變得更好。

    很多個不同顏色的拱門,一眼望去像是一系列的漸層色彩變化。

    hashtag
    資料夾位置

    src/assets/scss

    hashtag
    結構

    hashtag
    覆寫 SCSS

    在 _variables.scss 複寫 Piman 的 scss variable 即可。例如您如果使用我們的 Nuxt 範本,只需要在這個檔案覆寫變數。

    Select

    介紹使用 Select 下拉選項元件

    Select 介紹示意圖

    Select 下拉選擇,用在讓使用者針對選取的資料做進一步的篩選,或是與選項按鈕一樣,選一個特定值。點擊按鈕會出現一個懸浮區域,裡面是一系列的選項,外觀與 Dropdown 相似,但與 Dropdown 最大的不同之處在於 Select 點擊選項後,值變成選項內容,並且關閉懸浮區域。

    hashtag
    主題色

    hashtag
    大小

    hashtag
    提示文字

    hashtag
    禁用

    hashtag
    隱藏清除按鈕

    hashtag
    前綴與後綴

    hashtag
    如果外層有 position: fixed

    為了不讓外層的 position 狀態影響下拉式選單彈出的位置,需要加上 fixed 修正。

    hashtag
    在 bpa-form-item 裡

    在表單項目 bpa-form-item 裡面使用時,需要一起做搭配。

    hashtag
    客製化下拉式選單彈出框的寬度

    hashtag
    可多選模式

    hashtag
    選項群組

    hashtag
    搜尋下拉式選單裡的選項

    circle-info

    預設 0.8 秒後啟動 autocomplete 過濾選項,若要手動搜尋:使用 "@search"

    hashtag
    屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    事件

    Name
    Paramaters
    Description

    hashtag
    Demo

    Tree

    介紹使用 Tree 樹狀組織元件

    Tree 介紹示意圖

    Tree 樹狀組織,顯示一系列相關且有組織層級的資料,可以選擇某些節點,常用於過濾資訊。

    hashtag
    範例

    hashtag
    附加 Checkbox 形式

    hashtag
    展開全部節點

    hashtag
    Tree 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    Treenode 屬性

    Name
    Value
    Type
    Default
    Required
    Note

    hashtag
    Tree 方法

    Name
    Parameters
    Desciption

    hashtag
    Tree 事件

    Name
    Parameters
    Desciption

    hashtag
    Demo

    FigmaFigmachevron-right
    FigmaFigmachevron-right
    <bpa-dropdown v-model="value" :options="options" size="small" @click="onClick"/>
    <bpa-dropdown v-model="value" :options="options" placeholder="自訂文字" @click="onClick"/>
    <bpa-dropdown v-model="value" :options="options" theme="primary" disabled @click="onClick"/>
    <bpa-dropdown v-model="value" :options="options" @click="onClick">
      <template v-slot:prefix>Prefix</template>
      <template v-slot:affix>Affix</template>
    </bpa-dropdown>
    <bpa-dropdown v-model="value" :options="options" fixed @click="onClick"/>
    <bpa-form-item labelFor="bpa-dropdown-{id}-btn">
    	<bpa-dropdown v-model="value" :options="options" :id="{id}" @click="onClick"/>
    </bpa-form-item>
    <bpa-dropdown v-model="value" :options="options" optionWidth="100px" @click="onClick"/>
    //data
    options: [
      { 
        type: 'link',
        url: '/',
        label: 'Internal Link',
      },
      { 
        type: 'external-link',
        url: 'https://google.com',
        label: 'External Link',
      },
      { 
        label: 'Text',
      }
    ]
    
    //methods
    onClick(item: any){
      console.log(item);
    }
    <bpa-radio name="example-name" value="1" v-model="example-data">Radio</bpa-radio>
    <bpa-radio name="example-name" value="1" v-model="example-data" disabled>Radio</bpa-radio>
    <bpa-tabs v-model="demoTabs">
      <bpa-tab-panel name="first-tab" label="First tab">
        This is the content of the first tab
      </bpa-tab-panel>
      <bpa-tab-panel name="second-tab" label="Second tab">
        This is the content of the second tab
      </bpa-tab-panel>
    </bpa-tabs>
    <bpa-tabs v-model="demoTabs">
      <bpa-tab-panel name="first-tab" label="First tab" badge="95">
        This is the content of the first tab
      </bpa-tab-panel>
      <bpa-tab-panel name="second-tab" label="Second tab" badge="27">
        This is the content of the second tab
      </bpa-tab-panel>
    </bpa-tabs>
    <bpa-tabs v-model="demoTabs">
      <bpa-tab-panel name="first-tab" label="First tab" prefix-icon="fas fa-search">
        This is the content of the first tab
      </bpa-tab-panel>
      <bpa-tab-panel name="second-tab" label="Second tab" affix-icon="fas fa-search">
        This is the content of the second tab
      </bpa-tab-panel>
    </bpa-tabs>
    <bpa-popover>content</bpa-popover>
    <bpa-popover size="small">small</bpa-popover>
    <bpa-popover theme="primary">primary</bpa-popover>
    <bpa-popover nopadding>content</bpa-popover>
    <bpa-popover title="title">content</bpa-popover>
    <bpa-popover>
      <template v-slot:title>
        <mark>title</mark>
      </template>
      content
    </bpa-popover>
    <bpa-checkbox value="1" v-model="demoModel">Checkbox</bpa-checkbox>
    <bpa-checkbox value="1" v-model="demoModel" disabled>Checkbox</bpa-checkbox>
    <bpa-checkbox value="1" v-model="demoModel" name="demo">Checkbox</bpa-checkbox>
    <bpa-checkbox value="2" v-model="demoModel" name="demo">Checkbox</bpa-checkbox>
    demoModel: ["1", "2"]
    <bpa-pagination
      :total="totalPages"
      :current-page.sync="currentPage"
      :pager-count="pagerCount"
      :pageSize="pageSize"
      :pageSizeOptions="pageSizeOptions"
      :layout=['total_item', 'total_page', 'page_size', 'first', 'last', 'jump']
      @change:page="onChangePage"
      @change:pageSize="onChangeSize"
    />
    <bpa-switch labelText="text" v-model="isOpen"/>
    <bpa-switch labelText="text" v-model="isOpen">
      <template v-slot:close-text><img src="favicon.ico" alt=""/>Off</template>
      <template v-slot:open-text>On👍🏽</template>
    </bpa-switch>
    <bpa-tooltip text="text here">
      <bpa-button>align left</bpa-button>
    </bpa-tooltip>
     
    <bpa-tooltip text="text here">
      <bpa-button>align center(default)</bpa-button>
    </bpa-tooltip>
     
    <bpa-tooltip text="text here">
      <bpa-button>align right</bpa-button>
    </bpa-tooltip>
    //main.js
    import Vue from 'vue'
    
    import piman from "@yasai/piman";
    import '@yasai/piman/dist/piman.css';
    Vue.use(piman) //Default is “zh-Hant-TW”
    //Vue.use(piman,{ locale: 'en' })
    <bpa-select v-model="value" :options="options" theme="primary" />
    <bpa-tree
      :data="treeData"
    />
    treeData: [
      {
        id: 1,
        label: "A",
        children: [
          {
            id: 4,
            label: "D"
          },
          {
            id: 5,
            label: "E"
          }
        ]
      },
      {
        id: 2,
        label: "B",
        children: [
          {
            id: 6,
            label: "F"
          },
          {
            id: 7,
            label: "G",
            children: [
              {
                id: 8,
                label: "H"
              },
              {
                id: 9,
                label: "I"
              }
            ]
          }
        ]
      },
      {
        id: 3,
        label: "C",
      }
    ]

    unittest

    修正 Select 與 Dropdown 的 placeholder 螢幕報讀的 visually-hidden 方式描述與其多國語言。
  • 修正語法錯誤

  • 新增按鈕有 icon 的範例

  • 修正 Breadcrumb 的 html tag <div> to <nav>

  • 刪除 accordion 的 aria-selected=”false”

  • 修正表單項目的 aria-live

  • 修正 Readme

  • 聯絡表單47f3ef82.sibforms.comchevron-right
    npm run dev
    https://github.com/ya-sai/piman-nuxt2-template/blob/main/assets/scss/base/_variables.scssarrow-up-right
    // nuxt.config.js
    export default {
      plugins: [
        '@/plugins/piman.js',
      ],
    }
    
    // plugins/bp-a11y.js
    import Vue from 'vue'
    import piman from "@yasai/piman";
    Vue.use(piman) //Default is “zh-Hant-TW”
    //Vue.use(piman,{ locale: 'en' })
    
    import piman from "@yasai/piman"
    
    piman.i18n.use({
      "pagination":{
        "page":"ページ"
      },
    })
    import BpaI18n from '../locale'
    
    export default Vue.extend({
      mixins: [ BpaI18n ],
      //...
    })
    <!-- text -->
    <span>{{ t('pagination.per') }}</span>
    <!-- v-bind -->
    <nav
      :aria-label="t('pagination.aria')"
      class="bpa-pagination"
    />
    //template
    {{ add() }}
    
    //script
    methods: {
      add(){
        let text = this.t('pagination.aria')
        text = text + 'Add'
        return text
      },
    }
    import piman from "@yasai/piman"
    
    piman.i18n.use('en')
    // All options
    {
      "pagination":{
        "total":"共",
        "page":"頁",
        "per":"每頁",
        "result":"項",
        "goto":"前往",
        "exceed":"噢!此頁碼不適用。",
        "aria":"分頁選擇",
        "input_goto":"請輸入想前往的頁面",
        "first_page_text":"第一頁",
        "prev_page_text":"上一頁",
        "next_page_text":"下一頁",
        "last_page_text":"最後一頁",
      },
      "form":{
        "required": "必填"
      },
      "breadcrumb":{
        "current_page":"現在頁面位置"
      },
      "button":{
        "loading": "載入中"
      },
      "dialog":{
        "close":"關閉燈箱"
      },
      "dropdown":{
        "goto":"前往",
        "new_tab":"另開視窗前往"
      },
      "input":{
        "show":"點擊顯示密碼",
        "hide":"點擊隱藏密碼",
        "clear":"清空輸入",
        "placeholder":"請輸入"
      },
      "msg":{
        "area":"訊息區域",
        "close":"關閉訊息框",
      },
      "select":{
        "placeholder": "請選擇",
        "clear":"清空下拉式選單",
        "search":"搜尋",
        "area_search":"請輸入關鍵字搜尋與過濾下拉式選單選項"
      },
      "collapse":{
        "title": "標題",
      },
      "switch":{
        "off": "關閉",
        "on": "開啟"
      }
    }
    npm run build
    npm login (or npm adduser and then login)
    npm publish
    // src/components/index.ts
    
    import BpaButton from "./BpaButton.vue";
    
    const Components: {[key: string]: any} = {
      BpaButton,
      //...
    }
    // types/bpa.d.ts
    
    // import
    import { BpaNewComponent } from './new-component'
    
    // export
    /** NewComponent Component */
    export class NewComponent extends BpaNewComponent {}
    scss/
    ├── base/
    ├───├── _core.scss
    ├───├── _keyframes.scss
    ├───├── _mixins.scss
    ├───├── _reset.scss
    ├───├── _utilities.scss
    ├───├── _variables.scss
    ├── components/
    ├───├── _core.scss
    ├── layout/
    ├───├── pages/
    ├───├── _layout.scss
    ├───├── _core.scss
    ├── plugins/
    ├── style.scss

    String

    v-model

    String

    options

    Array<{ label: string, value: any }> | Array<{ label: string, type: 'group', options: Option[] >

    disabled

    Boolean

    false

    disabledClear

    Boolean

    false

    隱藏清除按鈕

    placeholder

    String

    請選擇/select

    theme

    primary,

    success,

    warning,

    danger,

    primary-ghost,

    success-ghost,

    warning-ghost,

    danger-ghost

    String

    optionWidth

    String

    fixed

    Boolean

    false

    v-slot:prefix

    提示文字的前方客製化區域

    v-slot:affix

    提示文字的前方客製化區域

    toolbar

    Array<'search'>

    工具列,目前支援 搜尋 search 功能

    multiple

    'accordion' or undefined

    多選,無需給值,若欲摺疊選項則給值 accordion

    listboxClass

    String

    可以在 listbox 增加 classname

    id

    String

    random

    size

    search

    keyword

    搜尋輸入值改變時

    input

    Radio 介紹示意圖

    small, large

    String

    show-checkbox

    Boolean

    false

    可以勾選節點

    default-expand-all

    Boolean

    false

    預設展開所有節點

    String || Number

    children

    Array

    disabled

    Boolean

    false

    resetChecked

    清除所有勾選節點

    data

    Array

    label

    id

    Number

    label

    getCheckedNodes

    Array

    回傳選擇的節點

    getCheckedKeys

    Array

    回傳選擇的節點 key(id)

    setCheckedNodes

    Array

    使用 key(id) (Object) 設置被勾選的節點

    setCheckedKeys

    Array

    使用 key(id) 設置被勾選的節點

    node-check

    (data, component)

    勾選/取消勾選節點

    node-click/node-expand

    (data, component)

    當節點被勾選/展開

    Radio 介紹示意圖

    String

    disabled

    Boolean

    value

    String

    model

    String

    String

    label

    String

    affixIcon

    String

    badge

    String || Number

    primary,

    success,

    warning,

    danger,

    primary-ghost,

    success-ghost,

    warning-ghost,

    danger-ghost

    String

    title

    String

    'Popover'

    nopadding

    Boolean

    size

    small,

    large

    String

    disabled

    String, Boolean

    String

    v-model

    Array

    disabled

    Boolean

    Number

    設定目前所在頁面

    pagerCount

    Number

    5

    設定顯示多少個分頁碼

    pageSizeOption

    Array

    [ { label: '10', value: 10 }, { label: '20', value: 20 }, { label: '50', value: 50 }, { label: '100', value: 100 }, ]

    可以設定每頁顯示多少個項目的下拉式選單

    pageSize

    Number

    10

    每頁多少個項目

    layout

    Array

    ['total_item', 'total_page', 'page_size', 'first', 'last', 'jump']

    設定要顯示的元件

    size

    String

    按鈕大小

    String

    v-slot:close-text

    String

    關閉/OFF

    v-slot:open-text

    String

    開啟/ON

    https://www.figma.com/community/file/1182586164850970870/piman-3-a11y-design-systemwww.figma.comchevron-right
    <bpa-select v-model="value" :options="options" size="small" />
    <bpa-select v-model="value" :options="options" placeholder="placeholder"/>
    <bpa-select v-model="value" :options="options" disabled/>
    <bpa-select v-model="value" :options="options" disabledClear/>
    <bpa-select v-model="value" :options="options">
      <template v-slot:prefix>prefix</template>
      <template v-slot:affix>affix</template>
    </bpa-select>
    <bpa-select v-model="value" :options="options" fixed @click="onClick"/>
    <bpa-form-item labelFor="bpa-select-{id}-btn">
        <bpa-select v-model="value" :options="options" :id="{id}" @click="onClick"/>
    </bpa-form-item>
    <bpa-select v-model="value" :options="options" optionWidth="100px" @click="onClick"/>
    <!-- show all options -->
    <bpa-select v-model="value" :options="options" multiple /> 
    
    <!-- show first option, others using "n+" -->
    <bpa-select v-model="value" :options="options" multiple="accordion" /> 
    {
      label: '第一群',
      type: 'group',
        options: [
          { label: 'label10', value: '10' },
          { label: 'label20', value: '20' },
          { label: 'label30', value: '30' }
        ]
      }
    }
    <bpa-select v-model="value" :options="options" multiple :toolbar="['search']"/>
    <bpa-tree
      :data="treeData"
      show-checkbox
    />
    <bpa-tree
      :data="treeData"
      default-expand-all
    />
    Logo
    Logo