更新记录

1.0.0(2025-10-18) 下载此版本


平台兼容性

其他

多语言 暗黑模式 宽屏模式
× ×

引入:
import hbCalendar from "./components/hb-calendar/hbCalendar.vue"

export default {
    components: {
        hbCalendar
    }
}
使用:
<template>
    <view class="content">
        <button @click="showCalendar = true">选择日期 {{ selectedDate ? formatDate(selectedDate) : '点击选择' }}
        </button>
        <hb-calendar 
          :visible="showCalendar"
          @update:visible="showCalendar = $event"
          :show-footer="true"
          :default-date="selectedDate"
          @confirm="onConfirm"
          @select="onChange">
        </hb-calendar>
    </view>
</template>

onChange(date) {
  console.log('当前选中', date);
},
onConfirm(date) {
  console.log('确认选择', date);
},
formatDate(date) {
  const year = date.getFullYear();
  const month = date.getMonth() + 1; 
  const day = date.getDate();
  return `${year}年${month}月${day}日`;
},

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。