The source of everything

This morning, I’d like to introduce a new bug.

Test: you this picture shows different height

The framework I’m using is Vant, which actually implements this functionality.

But good dead dead, vant does not achieve click to enlarge function. So, I gave up on Van-Image.

zoom

A real warrior for choosing native IMG over van-image. And to do that, I chose Vue-photo-Preview.

1.yarn add vue-photo-preview

2. Main. Js

import preview from 'vue-photo-preview' import 'vue-photo-preview/dist/skin.css' let options = { fullscreenEl: false, } Vue.use(preview, options) Vue.use(preview)

3. Specific use

4. It’s worth noting

$previewRefresh(); this.$previewRefresh();

5. End result

Cover effect

So the question is, the amplification is achieved, then what about the cover effect? I stared at my ugly code, lost in thought.

I,AKA, was thick-skinned enough to ask if I didn’t understand, so I turned to my master, a front end worker with full stack capability who hadn’t been baffled by my questions yet, and wanted to make products and liked self-testing.

After my vivid description, the master soon got to my question, of course, he asked me to praise my ignorance.

More praise, no need to preach, it’s time to show the real technology.

Wuhu! I’m not using elementUi, but!! Here’s a screenshot. That’s

So I

AKA copy king is about to go live, so copy it into my code.

What’s new: The object-fit attribute specifies how the contents of an element should fit into the height and width of a given container. This attribute is typically used with the IMG and video tags, and can be used to cut, scale, or stretch the elements to their original proportions.

surprise!!!

The last

At the end

I send this poem to my master. BGM up!!!!!!!!!!