ANTVUE项目实战二
Posted wangchuang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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"}
以上是关于ANTVUE项目实战二的主要内容,如果未能解决你的问题,请参考以下文章
爬虫遇到头疼的验证码?Python实战讲解弹窗处理和验证码识别