• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Beck Reed
要做就要下定决心持之以恒去做,要么就果敢的放弃不碰。
博客园    首页    新随笔    联系   管理    订阅  订阅
vue 移动端轻量日期组件不依赖第三方库

Vue版移动端日期选择组件

1.优点:不需要依赖其他第三方库,灵活可配置:

 

不需要依赖第三方组件的vue日期移动端组件  小轮子 轻量可复用:  https://github.com/BeckReed/datepicker-for-vue  

如果有用请点start

2.用法:参见 src/view/demo.vue 文件的用法,简单易懂

 
 <div>
        <h3>三列(年月日)日期弹窗示例--带标题)</h3>
        <button class="blue-btn" @click="togglePicker2">显示三列带标题日期弹框Demo2</button>
        <v-date-picker :type="1" :isShow="isShow2" @confirm="confirmDemo2" @cancel="cancelDemo2" v-model="selectedValue2">请选择日期</v-date-picker>
    </div>

  

3.该例子基于vue进行示例: 运行命令如下: npm run dev 请先npm install

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run all tests
npm test

  

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

4.结语:如对您有帮助,请给一个github start

如果有问题欢迎拍砖提问题,进行优化

posted on 2019-04-27 16:57  Beck Reed  阅读(1748)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3