当前位置: 移动技术网 > IT编程>脚本编程>vue.js > vue实现移动端轻量日期组件不依赖第三方库的方法

vue实现移动端轻量日期组件不依赖第三方库的方法

2019年07月21日  | 移动技术网IT编程  | 我要评论

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

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 theand 

总结

以上所述是小编给大家介绍的vue实现移动端轻量日期组件不依赖第三方库的方法,希望对大家有所帮助

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网