Commit 534f9923 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

MessageBox: support empty title

parent d6f3be83
<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>
<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>
......@@ -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,
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment