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

Table Columns 使用render 在Nuxtjs中组件未被正常编译 #3243

Closed
1 task
tanjie-ola opened this issue Jul 23, 2024 · 1 comment
Closed
1 task

Table Columns 使用render 在Nuxtjs中组件未被正常编译 #3243

tanjie-ola opened this issue Jul 23, 2024 · 1 comment
Labels

Comments

@tanjie-ola
Copy link

基本信息

  • 依赖包名 及 版本: @arco-design/[email protected]
  • 框架版本: vue3
  • 浏览器版本: chrome126.0.0.0

额外补充

下载最新的Nuxt模板
pnpm dlx nuxi@latest init
安装Arco
pnpm add -D arco-design-nuxt-module
复制上面的代码
pnpm run build && pnpm run preview

在vue 项目中编译后能正常显示,但是nuxt不行

预期结果

开发模式正常,但是在打包后预览a-tag未被编译,
希望a-tag 能正常显示

复现步骤

Nuxt最新版,Arco最新版
示例代码

<script setup lang="jsx">
import { reactive } from 'vue'
const originColumns = [
  {
    title: 'Name',
    dataIndex: 'name',
    width: 200,
    render({ record }) {
      return <a-tag>{record.name}</a-tag>
    },
  },
  {
    title: 'Salary',
    dataIndex: 'salary',
    // slotName: 'salary',

    width: 200,
  },
  {
    title: 'Address',
    dataIndex: 'address',
    width: 200,
  },
  {
    title: 'Email',
    dataIndex: 'email',
    width: 200,
    render({ record }) {
      return <a-tag>{record.email}</a-tag>
    },
  },
]

const data = reactive([
  {
    key: '1',
    name: 'Jane Doe',
    salary: 23000,
    address: '32 Park Road, London',
    email: '[email protected]',
  },
  {
    key: '2',
    name: 'Alisa Ross',
    salary: 25000,
    address: '35 Park Road, London',
    email: '[email protected]',
  },
  {
    key: '3',
    name: 'Kevin Sandra',
    salary: 22000,
    address: '31 Park Road, London',
    email: '[email protected]',
  },
  {
    key: '4',
    name: 'Ed Hellen',
    salary: 17000,
    address: '42 Park Road, London',
    email: '[email protected]',
  },
  {
    key: '5',
    name: 'William Smith',
    salary: 27000,
    address: '62 Park Road, London',
    email: '[email protected]',
  },
])
</script>

<template>

  <a-table :columns="originColumns" :data="data" />
</template>
@tanjie-ola
Copy link
Author

这不是arco得问题,是nuxt的问题,请把他关闭掉吧

@github-actions github-actions bot added the 💤 Inactive Inactive issues label Sep 21, 2024
@oljc oljc closed this as completed Sep 22, 2024
@oljc oljc added ❓Q&A and removed 💤 Inactive Inactive issues labels Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants