2.0.1 • Published 2 years ago

wx-easy-calendar v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

wx-easy-calendar

简介 Introduction

  • 这是一个面向广大微信小程序开发者提供的开源日历组件;
  • This is an open-source calendar component for all WeiXin miniprogram developers;
  • 集成了基本的日历显示、日期选择、日期切换;提供暗黑模式选择的功能;
  • Including functions like basic calendar display, date selection, date switching, it also provides a dark mode selection;

上手 Prepare

  • 准备工作:初始化项目

    npm init -y
  • npm 包的安装

    npm install wx-easy-calendar -S --production
  • 允许项目使用npm模块 image-20220222001345197

  • 开始构建 image-20220222001414041

  • 等待构建完成,项目根目录下会出现miniprogram_npm文件夹,包含wx-easy-calendar的一切


使用配置 Config

  • 局部使用
    • 在需要使用的页面的 json 文件中,配置组件 image-20220222001657743)
    • key:easy-calendar 为自定义组件标签
    • value:指向npm文件夹下wx-easy-calendar组件的js文件
  • 全局使用
    • 同上,只需要在全局的app.json中配置即可

正式使用 Render

  • 在页面的 wxml 中,使用配置好的自定义标签 image-20220222002644310

  • 页面的渲染

    image-20220222002846113

    image-20220222002939341


    用法介绍 Usage

    • 正常显示当前日历
    • 点击选中日期
    • 左右滑动切换月份
    • 点击顶部左右箭头切换月份
    • 点击顶部年份/月份,精确选择日期
    • 点击Now,回到当前日期
    • 点击,切换显示模式(light/dark)
2.0.1

2 years ago

2.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago