mirror of https://github.com/ElemeFE/element
fix: Translation after image loading error.
parent
00ed0b56a6
commit
ad177c9561
|
@ -53,6 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Locale from 'element-ui/src/mixins/locale';
|
||||||
import { on, off } from 'element-ui/src/utils/dom';
|
import { on, off } from 'element-ui/src/utils/dom';
|
||||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
|
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
|
||||||
import { PopupManager } from 'element-ui/src/utils/popup';
|
import { PopupManager } from 'element-ui/src/utils/popup';
|
||||||
|
@ -72,7 +73,7 @@ const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'elImageViewer',
|
name: 'elImageViewer',
|
||||||
|
mixins: [Locale],
|
||||||
props: {
|
props: {
|
||||||
urlList: {
|
urlList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -234,7 +235,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleImgError(e) {
|
handleImgError(e) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
e.target.alt = '加载失败';
|
e.target.alt = this.t('el.image.error');
|
||||||
},
|
},
|
||||||
handleMouseDown(e) {
|
handleMouseDown(e) {
|
||||||
if (this.loading || e.button !== 0) return;
|
if (this.loading || e.button !== 0) return;
|
||||||
|
|
Loading…
Reference in New Issue