使用 vxe-table 来格式化任意的金额格式,支持导出与复制单元格格式到 excel
使用 vxe-table 来格式化任意的金额格式,支持导出与复制单元格格式到 excel查看官网:https://vxetable.cn
gitbub:https://github.com/x-extends/vxe-table
gitee:https://gitee.com/x-extends/vxe-table
安装
npm install vxe-pc-ui@4.5.23 vxe-table@4.13.4import VxeUIAll from 'vxe-pc-ui'
import 'vxe-pc-ui/lib/style.css'
import VxeUITable from 'vxe-table'
import 'vxe-table/lib/style.css'
createApp(App).use(VxeUIAll).use(VxeUITable).mount('#app')格式化金额
通过内置的 FormatNumberInput 格式化数值渲染器,配置 type = amount 为货币类型就可以了
<template>
<vxe-grid v-bind="gridOptions"></vxe-grid>
</template>导出到 excel
支持导出分组表头、合并、单元格类型、导出图片等格式
<template>
<vxe-button status="primary" @click="exportEvent">高级导出</vxe-button>
<vxe-grid ref="gridRef" v-bind="gridOptions"></vxe-grid>
</template>复制到 excel(企业版)
<template>
<vxe-grid v-bind="gridOptions"></vxe-grid>
</template>https://gitee.com/x-extends/vxe-table
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页:
[1]