![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
antd
march_lxy
好的坏的都是风景
展开
-
antdvue限制时间只能选择当前月份
disabledDate(current) { const date = new Date(); const month = date.getMonth(); if (!current) { return false } if(this.selectCurrentDate){ return moment(current).month() != month } else { return false }},原创 2020-07-07 16:52:52 · 2642 阅读 · 0 评论 -
antdvue 文件上传beforeUpload直接return false失效,文件仍然上传
之前做一直是直接beforeUpload里定义规则然后直接return false,一直是正常得,今天突然就失效了,一脸懵逼。然后看官方文档上还支持promise,就写promise就正常了。直接return false还是会调用change事件,使用promise reject后就不会进change了。beforeUpload(file){ return new Promise((resolve, reject) => { const isLt10M = file.size / 102原创 2020-06-04 14:19:08 · 5239 阅读 · 2 评论 -
antd vue select多选下拉同行显示,展示滚动条
做了个需求表格内使用了多选下拉,为了美观所以需要同行显示,antd文档上没看到对应的api,改了点css样式实现<template> <a-select mode="tags" style="width: 20%" :token-separators="[',']"> <a-select-option v-for="i in 25" :key="(i + 9).toString(36) + i">{{ (i + 9).toString(36) + '很长很长.原创 2020-05-29 16:22:22 · 3997 阅读 · 2 评论 -
antd上传图片,预览图样式设置
<template> <a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false" action="https://www.mocky.io/v2/5cc8019d300000980a055e76"...原创 2020-05-05 17:00:13 · 5382 阅读 · 0 评论 -
vue使用antd selectTree设置带所有父级节点的回显
<template> <div> <a-tree-select labelInValue style="width: 20%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="Please selec...原创 2020-05-05 16:48:42 · 8032 阅读 · 5 评论