1. .env文件變量獲取 process.env.VUE_APP_ProjectName
2. getDataList() { this.selectedRowKeys = [] this.loading = true
this.$http .post('/BaseWarehouse/T_Warehouse/GetDataList', { PageIndex: this.pagination.current, PageRows: this.pagination.pageSize, SortField: this.sorter.field || 'Id', SortType: this.sorter.order, ...this.queryParam, ...this.filters }) .then(resJson => { this.loading = false
this.data = resJson.Data const pagination = { ...this.pagination } pagination.total = resJson.Total this.pagination = pagination }) }, 查詢參數: {"PageIndex":1,"PageRows":10,"SortField":"Id","SortType":"asc"} 去掉 PageIndex: this.pagination.current, PageRows: this.pagination.pageSize, 查詢參數爲: {"SortField":"Id","SortType":"asc"} 採用展開符號: ...this.pagination, 查詢參數爲: {"current":1,"pageSize":10,"SortField":"Id","SortType":"asc"} 爲了用好參數能夠用展開符號修改些: pagination: { PageIndex: 1, PageRows: 10, showTotal: (total, range) => `總數:${total} 當前:${range[0]}-${range[1]}` }, 發送參數爲: {"PageIndex":1,"PageRows":10,"SortField":"Id","SortType":"asc"}