Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Image add infinite props #22959

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Translation after image loading error.
  • Loading branch information
wangdaodao committed Sep 6, 2024
commit ad177c9561c06acf92bcf4d8e7c8c8329670f25d
5 changes: 3 additions & 2 deletions packages/image/src/image-viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -72,7 +73,7 @@ const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';

export default {
name: 'elImageViewer',

mixins: [Locale],
props: {
urlList: {
type: Array,
Expand Down Expand Up @@ -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;
Expand Down
Loading