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

Error Codegen node is missing for element/if/for node. Apply appropriate transforms first. #7538

Open
1 task
gethin036 opened this issue Apr 28, 2024 · 0 comments

Comments

@gethin036
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.1

Environment

windows chrome

Reproduction link

Edit on CodeSandbox

Steps to reproduce

当我们循环 a-tab-pane 的时候,因为里面的内容不一致,使用了 v-if 判断,并用 template 包裹,然后 a-tab-pane 又想使用 tab slot,所以也使用了 template #tab

<template>
  <a-tabs v-model:activeKey="activeKey">
    <a-tab-pane v-for="pane in paneList" :key="pane.key">
      <template v-if="pane.tabTitle === 'Tool Chain'">
        <template #tab>{{ pane.tabTitle }}</template>
        Content of Tab Pane 11
      </template>
      <template v-else>
        <template #tab>
          <!-- icon -->
          {{ pane.tabTitle }}
        </template>
        Content of Tab Pane 22
      </template>
    </a-tab-pane>
  </a-tabs>
</template>

What is expected?

tab slot 插槽能正常使用

What is actually happening?

报错,如标题
Error Codegen node is missing for element/if/for node. Apply appropriate transforms first.

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

1 participant