mirror of https://github.com/ElemeFE/element
MessageBox: support empty title
parent
d6f3be8354
commit
534f9923b7
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue