[improvement] update eslint config (#2288)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ImagePreview } from '../../../packages';
|
||||
import { ImagePreview } from '../..';
|
||||
|
||||
const images = [
|
||||
'https://img.yzcdn.cn/public_files/2017/09/05/3bd347e44233a868c99cf0fe560232be.jpg',
|
||||
|
||||
@@ -6,16 +6,10 @@ exports[`render image 1`] = `
|
||||
1/3
|
||||
</div>
|
||||
<div class="van-swipe">
|
||||
<div class="van-swipe__track" style="width: 0px;">
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/1.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/2.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/3.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe__track" style="width: 0px; transform: translateX(0px);">
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/1.png" class="van-image-preview__image"></div>
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/2.png" class="van-image-preview__image"></div>
|
||||
<div class="van-swipe-item" style="width: 0px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/3.png" class="van-image-preview__image"></div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
@@ -28,16 +22,10 @@ exports[`zoom 1`] = `
|
||||
1/3
|
||||
</div>
|
||||
<div class="van-swipe">
|
||||
<div class="van-swipe__track" style="width: 300px;">
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/1.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/2.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%;">
|
||||
<img src="https://img.yzcdn.cn/3.png" class="van-image-preview__image">
|
||||
</div>
|
||||
<div class="van-swipe__track" style="width: 300px; transform: translateX(0px);">
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/1.png" class="van-image-preview__image" style="transform: scale3d(2, 2, 1) translate(0px, NaNpx);"></div>
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/2.png" class="van-image-preview__image"></div>
|
||||
<div class="van-swipe-item" style="width: 100px; height: 100%; transform: translateX(0px);"><img src="https://img.yzcdn.cn/3.png" class="van-image-preview__image"></div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
|
||||
@@ -96,8 +96,8 @@ test('register component', () => {
|
||||
expect(Vue.component(ImagePreviewVue.name)).toBeTruthy();
|
||||
});
|
||||
|
||||
test('zoom', async() => {
|
||||
const getBoundingClientRect = Element.prototype.getBoundingClientRect;
|
||||
test('zoom', async () => {
|
||||
const { getBoundingClientRect } = Element.prototype;
|
||||
Element.prototype.getBoundingClientRect = jest.fn(() => ({ width: 100 }));
|
||||
|
||||
const wrapper = mount(ImagePreviewVue, {
|
||||
|
||||
Reference in New Issue
Block a user