不要地中海灬 2019-07-24 16:04 采纳率: 0%
浏览 371

为什么nw.js封装vue项目成exe后用的ant-design-vue的Table不显示

<template>
  <div>
    <div class="tableBox">
      <a-table class="myTable"  :customRow="setRow"  rowKey="SLBH" :columns=columns :dataSource=data bordered :pagination="true"
               :rowSelection="{selectedRowKeys:selectedRowKeys,onChange:onSelectChange,onSelect:onSelectRow,type:'radio'}" >
        <template slot="title" slot-scope="currentPageData" >
          <div style="height: 45px">
            <div style="font-size: 30px;margin-bottom: 0;text-align: center">
              <span style="float: left">历史操作记录</span>
              <a-button class="printBtn"  type="primary"  size="large" icon="printer"  v-on:click="Print()">打印</a-button>
            </div>
          </div>
        </template>
      </a-table>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
  const column = [
    {
      title: '号码',
      dataIndex: 'TXZHM',
      width: '35%',
    },{
      title: '名称',
      dataIndex: 'MC',
      width: '30%',
    },{
      title: '时间',
      width: '22%',
      dataIndex: 'HandleDate',
    }];
  const d = [{
    SLBH:'43243242346777771',
    MC:'小票1',
    TXZHM:'43243243244324',
    HandleDate:'20190202'
  },{
    SLBH:'321324343243122356411',
    TXZHM:'43243243244324',
    MC:'小票2',
    HandleDate:'20180303'
  }
  ]
  export default {
    data() {
      return {
        data: d,
        columns:column,
      }
    },
    methods:{
     //选择数据单选设置
      setRow:function (record) {
        let that = this;
        return {
          on: {
            click: () => {
            }
          }
        }
      },
      onSelectChange:function (selectedRowKeys, selectedRows) {
      },
      onSelectRow: function(record, selected, selectedRows) {

      }
    }
  }
</script>

未封装成exe前在网页上打开
图片说明

封装成exe后打开exe
图片说明

  • 写回答

1条回答 默认 最新

  • ~佛系小哥~ 2023-06-26 14:47
    关注

    应该是对应的vue前端静态文件路径配置不正确导致,可以检查相关路径配置是否正确进行修改

    评论

报告相同问题?

悬赏问题

  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏