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

设置3个tab 页,级联选择器放在第三个 tab 中,打开级联选择器,选项在第一个tab页中展示,而且 展示不正常 #3096

Open
jinxia-hou opened this issue May 31, 2024 · 3 comments

Comments

@jinxia-hou
Copy link

NutUI 包名

@nutui/nutui

NutUI 版本号

3.2.5

平台

h5

重现链接

https://codesandbox.io/p/devbox/nutui3-vite-demo-forked-65yp5g?file=%2Fsrc%2FApp.vue

重现步骤

设置3个tab 页,级联选择器放在第三个 tab 中,打开级联选择器,选项在第一个tab页中展示,而且 展示不正常

期望的结果是什么?

在哪个tab页打开就展示在哪个tab页中,页面展示正常

实际的结果是什么?

设置3个tab 页,级联选择器放在第三个 tab 中,打开级联选择器,选项在第一个tab页中展示,而且 展示不正常

环境信息

No response

其他补充信息

No response

@jinxia-hou
Copy link
Author

代码:

Tab 1 Tab 2 <script lang="ts"> import { reactive } from "vue"; export default { setup() { // 基础用法 const state = reactive({ tab1value: "0", visible: false, // value: ['湖南'], value: [], options: [ { value: "浙江", text: "浙江", children: [ { value: "杭州", text: "杭州", disabled: true, children: [ { value: "西湖区", text: "西湖区" }, { value: "余杭区", text: "余杭区" }, ], }, { value: "温州", text: "温州", children: [ { value: "鹿城区", text: "鹿城区" }, { value: "瓯海区", text: "瓯海区" }, ], }, ], }, { value: "湖南", text: "湖南", disabled: true, }, { value: "福建", text: "福建", children: [ { value: "福州", text: "福州", children: [ { value: "鼓楼区", text: "鼓楼区" }, { value: "台江区", text: "台江区" }, ], }, ], }, ], }); const events = { change(...args: any) { console.log("change", ...args); }, pathChange(...args: any) { console.log("pathChange", ...args); }, };
return {
  state,
  events,
};

},
};
</script>

@ilk-1
Copy link

ilk-1 commented Jul 6, 2024

fixed布局被吸附在了tab容器上
截屏2024-07-06 23 05 58
在tab上设置一个transform就可以解决了

@eiinu
Copy link
Member

eiinu commented Jul 9, 2024

参考 Tabs 「无切换动画」的 demo:https://nutui.jd.com/h5/vue/4x/#/zh-CN/component/tabs

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

No branches or pull requests

3 participants