Merge branch 'master' into feature/unit_test
This commit is contained in:
@@ -76,6 +76,8 @@ var DialogBox = options => {
|
||||
DialogBox.alert = function(options) {
|
||||
return DialogBox(merge({
|
||||
type: 'alert',
|
||||
title: '',
|
||||
message: '',
|
||||
closeOnClickOverlay: false,
|
||||
showCancelButton: false
|
||||
}, options));
|
||||
@@ -84,6 +86,8 @@ DialogBox.alert = function(options) {
|
||||
DialogBox.confirm = function(options) {
|
||||
return DialogBox(merge({
|
||||
type: 'confirm',
|
||||
title: '',
|
||||
message: '',
|
||||
closeOnClickOverlay: true,
|
||||
showCancelButton: true
|
||||
}, options));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="zan-dialog__title" v-text="title"></div>
|
||||
</div>
|
||||
<div class="zan-dialog__content" v-if="message">
|
||||
<div class="zan-dialog__message" v-html="message"></div>
|
||||
<div class="zan-dialog__message" :class="{ 'zan-dialog__message--notitle': !title }" v-html="message"></div>
|
||||
</div>
|
||||
<div class="zan-dialog__footer" :class="{ 'is-twobtn': showCancelButton && showConfirmButton }">
|
||||
<button class="zan-dialog__btn zan-dialog__cancel" v-show="showCancelButton" @click="handleAction('cancel')">{{ cancelButtonText }}</button>
|
||||
|
||||
@@ -56,12 +56,7 @@ export default {
|
||||
},
|
||||
message: {
|
||||
type: String,
|
||||
default: '',
|
||||
validator(value) {
|
||||
if (this.type === 'success' || this.type === 'fail') {
|
||||
return value.length <= 16;
|
||||
}
|
||||
}
|
||||
default: ''
|
||||
},
|
||||
forbidClick: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<template>
|
||||
<div class="zan-uploader">
|
||||
<slot>
|
||||
<div>
|
||||
<zan-button block>上传文件</zan-button>
|
||||
</div>
|
||||
|
||||
</slot>
|
||||
<input type="file" @change="onValueChange" class="zan-uploader__input" ref="input" />
|
||||
<template v-if="disabled">
|
||||
<input type="file" @change="onValueChange" disabled="disabled" class="zan-uploader__input" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<input type="file" @change="onValueChange" class="zan-uploader__input" ref="input" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -40,12 +43,10 @@
|
||||
reader.onload = (e) => {
|
||||
this.afterRead && this.afterRead(
|
||||
{
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
size: file.size,
|
||||
file: file,
|
||||
content: e.target.result
|
||||
});
|
||||
this.$refs.input.value = '';
|
||||
this.$refs.input && (this.$refs.input.value = '');
|
||||
};
|
||||
if (this.resultType === 'dataUrl') {
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@youzan/zanui-css",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"description": "zanui css.",
|
||||
"main": "lib/index.css",
|
||||
"style": "lib/index.css",
|
||||
|
||||
@@ -46,6 +46,11 @@
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
|
||||
@m notitle {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@e footer {
|
||||
|
||||
Reference in New Issue
Block a user