MessageBox: support empty title

pull/6582/head
Leopoldthecoder 2017-08-18 14:36:39 +08:00 committed by 杨奕
parent d6f3be8354
commit 534f9923b7
4 changed files with 7 additions and 34 deletions

View File

@ -1,27 +0,0 @@
<template>
<div>
<el-button @click="value = '#fff'">Change Value</el-button>
<div>Value: {{ value }}</div>
<el-color-picker v-model="value"></el-color-picker>
<div>Value2: {{ value2 }}</div>
<el-color-picker v-model="value2" show-alpha></el-color-picker>
</div>
</template>
<style scoped>
</style>
<script type="text/ecmascript-6">
export default {
methods: {
},
data() {
return {
value: '#bfcbd9',
value2: null
};
}
};
</script>

View File

@ -1,14 +1,8 @@
<template>
<div style="margin: 20px;">
<!-- Write your component in component.vue -->
<play-component></play-component>
</div>
</template>
<script>
import PlayComponent from './component.vue';
export default {
components: {
PlayComponent
}
};
</script>

View File

@ -158,6 +158,8 @@ MessageBox.alert = (message, title, options) => {
if (typeof title === 'object') {
options = title;
title = '';
} else if (title === undefined) {
title = '';
}
return MessageBox(merge({
title: title,
@ -172,6 +174,8 @@ MessageBox.confirm = (message, title, options) => {
if (typeof title === 'object') {
options = title;
title = '';
} else if (title === undefined) {
title = '';
}
return MessageBox(merge({
title: title,
@ -185,6 +189,8 @@ MessageBox.prompt = (message, title, options) => {
if (typeof title === 'object') {
options = title;
title = '';
} else if (title === undefined) {
title = '';
}
return MessageBox(merge({
title: title,

View File

@ -3,7 +3,7 @@
<div class="el-message-box__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClick">
<div class="el-message-box" :class="customClass">
<div class="el-message-box__header" v-if="title !== undefined">
<div class="el-message-box__title">{{ title || t('el.messagebox.title') }}</div>
<div class="el-message-box__title">{{ title }}</div>
<button type="button" class="el-message-box__headerbtn" aria-label="Close"
v-if="showClose" @click="handleAction('cancel')">
<i class="el-message-box__close el-icon-close"></i>