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

fix(lazyload): lazy-image h is not a function #11229

Merged
merged 1 commit into from Nov 8, 2022

Conversation

ruochuan12
Copy link
Contributor

in vue 3.x h is not function. this.$slots.default is a function.

vue 3.x refs render-function-api-change
vue 3.x docs h

  • reappear
  • test
// 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>

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 文档 h 渲染函数](https://cn.vuejs.org/api/render-function.html#h)
@chenjiahan chenjiahan merged commit f071e48 into youzan:main Nov 8, 2022
@chenjiahan
Copy link
Member

已发布 vant@3.6.5~

wjw-gavin pushed a commit to wjw-gavin/vant that referenced this pull request Nov 12, 2022
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 文档 h 渲染函数](https://cn.vuejs.org/api/render-function.html#h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants