前端大佬们请进~。~

2021-03-12 16:20:29 +08:00
 supuwoerc

请教大家两个问题:

ps:表格全部是动态数据。

<template>
<el-table-column :prop="'persons_'+cols.remark" :label="cols.title" :width="cols.width?cols.width:150" align="center">
    <template v-if="cols.children">
        <loop-column v-for="(item, index) in cols.children" :key="index" :cols="item">
        </loop-column>
    </template>
</el-table-column>
</template>
<script>
export default {
    name: "loopColumn",
    props: {
        cols: {
            type: Object,
            default: () => {
                return {}
            }
        }

    }
}
<script>
975 次点击
所在节点    问与答
6 条回复
murmur
2021-03-12 16:35:49 +08:00
excel 导出都是手写样式,一个单元格一个调,dom 转 excel 玩具都不算

我们是买了第三方报表工具实现的这个功能
toesbieya
2021-03-12 16:42:32 +08:00
1. [exceljs]( https://github.com/exceljs/exceljs)

2. render
putaozhenhaochi
2021-03-12 16:48:57 +08:00
推给后端 /逃
supuwoerc
2021-03-12 16:56:27 +08:00
@toesbieya 感谢! 太长时间没有 render,都快忘记还能这样了,一直在钻用插槽的牛角尖~~
supuwoerc
2021-03-12 18:22:55 +08:00
@toesbieya
大佬你好,请问 render 具体咋实现呢?我自己实现了一下,报错了。 =。=||
之前没太使用过这种场景,如果方便的话能回答下嘛? =。=||
supuwoerc
2021-03-15 19:31:27 +08:00
@toesbieya 打扰了,小弟今天重新读了 render 相关的文档,问题已经解决了! 十分感谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/761081

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX