Chore: misc updates (#10370)

pull/10371/head
杨奕 2018-03-26 17:38:17 +08:00 committed by GitHub
parent 39ba058d0d
commit e62c2f8b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 18 deletions

View File

@ -234,7 +234,9 @@
if (this.lang !== 'zh-CN') return; if (this.lang !== 'zh-CN') return;
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示') this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
.then(() => { .then(() => {
location.href = location.href.replace('element.', 'element-cn.'); location.href = location.href
.replace('https:', 'http:')
.replace('element.', 'element-cn.');
}) })
.catch(() => { .catch(() => {
localStorage.setItem('PREFER_GITHUB', 'true'); localStorage.setItem('PREFER_GITHUB', 'true');

View File

@ -7,26 +7,31 @@
@click.self="handleWrapperClick" @click.self="handleWrapperClick"
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
:aria-label="title || 'dialog'" :aria-label="title || 'dialog'">
>
<div class="el-message-box" :class="[customClass, center && 'el-message-box--center']"> <div class="el-message-box" :class="[customClass, center && 'el-message-box--center']">
<div class="el-message-box__header" v-if="title !== null"> <div class="el-message-box__header" v-if="title !== null">
<div class="el-message-box__title"> <div class="el-message-box__title">
<div class="el-message-box__status" :class="[ typeClass ]" v-if="typeClass && center && message !== ''"></div> <div
:class="['el-message-box__status', typeClass]"
v-if="typeClass && center">
</div>
<span>{{ title }}</span> <span>{{ title }}</span>
</div> </div>
<button type="button" <button
class="el-message-box__headerbtn" type="button"
aria-label="Close" class="el-message-box__headerbtn"
v-if="showClose" aria-label="Close"
@click="handleAction('cancel')" v-if="showClose"
@keydown.enter="handleAction('cancel')" @click="handleAction('cancel')"
> @keydown.enter="handleAction('cancel')">
<i class="el-message-box__close el-icon-close"></i> <i class="el-message-box__close el-icon-close"></i>
</button> </button>
</div> </div>
<div class="el-message-box__content"> <div class="el-message-box__content">
<div class="el-message-box__status" :class="[ typeClass ]" v-if="typeClass && !center"></div> <div
:class="['el-message-box__status', typeClass]"
v-if="typeClass && !center && message !== ''">
</div>
<div class="el-message-box__message" v-if="message !== ''"> <div class="el-message-box__message" v-if="message !== ''">
<slot> <slot>
<p v-if="!dangerouslyUseHTMLString">{{ message }}</p> <p v-if="!dangerouslyUseHTMLString">{{ message }}</p>
@ -37,7 +42,7 @@
<el-input <el-input
v-model="inputValue" v-model="inputValue"
:type="inputType" :type="inputType"
@keydown.enter.native="handleInputEnter()" @keydown.enter.native="handleInputEnter"
:placeholder="inputPlaceholder" :placeholder="inputPlaceholder"
ref="input"></el-input> ref="input"></el-input>
<div class="el-message-box__errormsg" :style="{ visibility: !!editorErrorMessage ? 'visible' : 'hidden' }">{{ editorErrorMessage }}</div> <div class="el-message-box__errormsg" :style="{ visibility: !!editorErrorMessage ? 'visible' : 'hidden' }">{{ editorErrorMessage }}</div>
@ -47,12 +52,11 @@
<el-button <el-button
:loading="cancelButtonLoading" :loading="cancelButtonLoading"
:class="[ cancelButtonClasses ]" :class="[ cancelButtonClasses ]"
v-show="showCancelButton" v-if="showCancelButton"
:round="roundButton" :round="roundButton"
size="small" size="small"
@click.native="handleAction('cancel')" @click.native="handleAction('cancel')"
@keydown.enter="handleAction('cancel')" @keydown.enter="handleAction('cancel')">
>
{{ cancelButtonText || t('el.messagebox.cancel') }} {{ cancelButtonText || t('el.messagebox.cancel') }}
</el-button> </el-button>
<el-button <el-button
@ -63,8 +67,7 @@
:round="roundButton" :round="roundButton"
size="small" size="small"
@click.native="handleAction('confirm')" @click.native="handleAction('confirm')"
@keydown.enter="handleAction('confirm')" @keydown.enter="handleAction('confirm')">
>
{{ confirmButtonText || t('el.messagebox.confirm') }} {{ confirmButtonText || t('el.messagebox.confirm') }}
</el-button> </el-button>
</div> </div>