ANTVUE项目实战二
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"}
3.形如:gutter=“100”,转译后变成每个col的padding-left: 50px;padding-right: 50px;
posted on 2020-04-29 17:35 HOT SUMMER 阅读(270) 评论(0) 编辑 收藏 举报