0.1.3 • Published 1 year ago

vue3-roc-date-picker v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue-roc-date-picker

A date picker UI component displays year in Republic Era or Common Era. 以 Vue3 + Typescript 開發,一個可顯示民國 / 西元年的日期選擇器 UI 套件

Demo

Installation 安裝

npm i vue3-roc-date-picker

Usage 用法

// main.ts
import ROCDatePicker from 'vue3-roc-date-picker';
import 'vue3-roc-date-picker/dist/style.css';

app.use(ROCDatePicker);
// App.vue
<ROCDatePicker
  v-model="value"
/>

Attributes 屬性

  • modelValue: 日期選擇器綁定值。
  • lang: 語言選擇。
  • calendarYearType: 年份類型選擇。
  • placeholder: 佔位符文本。
  • type: 日期選擇器的類型。
  • defaultValue: 默認值。
  • disabled: 是否禁用日期選擇器。
  • zIndex: 元素的 z-index。
  • showClearButton: 是否顯示清除按鈕。
NameDescriptionTypeAccepted ValuesDefault Value
model-value / v-modelBinding value.StringAny valid string value''
langLanguage selection.String'en', 'zhTW''zhTW'
calendarYearTypeYear type selection.String'CommonEra', 'RepublicEra''RepublicEra'
placeholderPlaceholder text.StringAny valid string value''
typeType of date picker.String'year', 'month', 'date''date'
defaultValueDefault date of calendar.StringValid date string (e.g., '2023-09-28')''
disabledWhether the date picker is disabled.Booleantrue or falsefalse
zIndexZ-index of the pop-up calendar.NumberAny valid positive integer1
showClearButtonWhether to show the clear button.Booleantrue or falsetrue