We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.2.20
chrome浏览器、Vue3-v3.3.4
目前出现问题的情况,使用vue3 jsx开发就会出现无法渲染子节点的情况
import { Carousel } from "ant-design-vue"; import { defineComponent } from "vue"; export default defineComponent({ setup() { const list = [{ title: "1-1" }, { title: "1-2" }]; return () => ( <Carousel> {list.map((item) => ( <div key={item.title}>{item.title}</div> ))} <div> <h3>2</h3> </div> <div> <h3>3</h3> </div> <div> <h3>4</h3> </div> </Carousel> ); } });
目前当前解决办法是,使用vue的h方法创建一个虚拟 DOM 节点
h
import { Carousel } from "ant-design-vue"; import { defineComponent, h } from "vue"; export default defineComponent({ setup() { const list = [{ title: "1-1" }, { title: "1-2" }]; return () => ( <Carousel> {list.map((item) => ( <div key={item.title}>{h("h3", item.title)}</div> ))} <div> <h3>2</h3> </div> <div> <h3>3</h3> </div> <div> <h3>4</h3> </div> </Carousel> ); } });
正常使用vue模板开发模式不会出现问题
<template> <a-carousel :after-change="onChange"> <div><h3>1</h3></div> <div><h3>2</h3></div> <div><h3>3</h3></div> <div><h3>4</h3></div> </a-carousel> </template> <script> const onChange = current => { console.log(current); }; </script> <style scoped> /* For demo */ :deep(.slick-slide) { text-align: center; height: 160px; line-height: 160px; background: #364d79; overflow: hidden; } :deep(.slick-slide h3) { color: #fff; } </style>
修复Carousel组件slide节点无法渲染文本内容bug
组件子节点无法渲染文本内容
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Sorry, something went wrong.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Version
3.2.20
Environment
chrome浏览器、Vue3-v3.3.4
Reproduction link
Steps to reproduce
目前出现问题的情况,使用vue3 jsx开发就会出现无法渲染子节点的情况
目前当前解决办法是,使用vue的
h
方法创建一个虚拟 DOM 节点正常使用vue模板开发模式不会出现问题
What is expected?
修复Carousel组件slide节点无法渲染文本内容bug
What is actually happening?
组件子节点无法渲染文本内容
The text was updated successfully, but these errors were encountered: