@xuanmo/v-form
Version:
* 目前已经集成的组件(Address/Checkbox/DatePicker/Input/Radio/Select/Text/Switch/Upload) * 组件不满足的情况可自定义开发组件或者使用 `slot` 的形式 * 组件的调用方式采取 `JSON` 配置的形式,具体参数见model数据说明 * 校验规则已经集成 `VeeValidate` 插件,也可以自定义扩展规则,更多资料 [https://logaretm.github.io/vee-validate](https://logaretm
83 lines (72 loc) • 1.5 kB
text/less
@import './var.less';
@item-width: 80px;
@item-height: 80px;
@icon-color: #dcdee0;
.v-form__upload {
.v-form__upload-preview {
display: flex;
flex-wrap: wrap;
}
.van-uploader__preview-delete {
background: none;
}
.v-form__upload-preview-item {
position: relative;
z-index: 1;
width: @item-width;
height: @item-height;
margin: 0 10px 10px 0;
img {
max-width: 100%;
max-height: 100%;
border-radius: @border-radius;
}
}
.v-form__upload-preview-text {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.v-form__upload-preview-mask {
position: absolute;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: @mask-color;
border-radius: @border-radius;
color: #fff;
}
.v-form__upload-loading-text {
margin-top: 5px;
font-size: 12px;
}
// 上传按钮
.v-form__upload-input {
position: relative;
z-index: 1;
width: @item-width;
height: @item-height;
background-color: @background-color;
border-radius: @border-radius;
input {
width: 100%;
height: 100%;
opacity: 0;
}
.van-icon {
position: absolute;
top: 50%;
left: 50%;
z-index: -1;
font-size: 24px;
color: @icon-color;
transform: translate(-50%, -50%);
}
}
}