Commit 711f9cc
authored
fix(lazyload): lazy-image h is not a function (#11230)
in vue 3.x h is not function. this.$slots.default is a function.
[vue 3.x refs render-function-api-change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0008-render-function-api-change.md)
[vue 3.x docs h](https://cn.vuejs.org/api/render-function.html#h)
- reappear
- test
```vue
// vant/packages/vant/src/lazyload/demo/index.vue
<script lang="ts">
import Lazyload from '..';
if (window.app) {
window.app.use(Lazyload, { lazyComponent: true, lazyImage: true });
}
</script>
<template>
<demo-block :title="t('basicUsage')">
<lazy-image v-for="img in imageList" :key="img" :src="img">
</lazy-image>
</demo-block>
</teamplate>
```1 parent 97d2bad commit 711f9cc
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
0 commit comments