fix: Translation after image loading error.

pull/22959/head
wangdaodao 2024-09-06 15:06:04 +08:00
parent 00ed0b56a6
commit ad177c9561
1 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@
</template>
<script>
import Locale from 'element-ui/src/mixins/locale';
import { on, off } from 'element-ui/src/utils/dom';
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
import { PopupManager } from 'element-ui/src/utils/popup';
@ -72,7 +73,7 @@ const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';
export default {
name: 'elImageViewer',
mixins: [Locale],
props: {
urlList: {
type: Array,
@ -234,7 +235,7 @@ export default {
},
handleImgError(e) {
this.loading = false;
e.target.alt = '加载失败';
e.target.alt = this.t('el.image.error');
},
handleMouseDown(e) {
if (this.loading || e.button !== 0) return;