This commit is contained in:
huangjinming 2023-01-28 19:25:58 +08:00
parent c0e46d9085
commit 77e197b7c1
3 changed files with 40 additions and 25 deletions

View File

@ -1,22 +1,22 @@
module.exports = { // module.exports = {
plugins: { // plugins: {
autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit--moz-等等 // autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit--moz-等等
"postcss-px-to-viewport": { // "postcss-px-to-viewport": {
unitToConvert: "px", // 要转化的单位 // unitToConvert: "px", // 要转化的单位
viewportWidth: 1080, // UI设计稿的宽度 // viewportWidth: 1080, // UI设计稿的宽度
unitPrecision: 6, // 转换后的精度,即小数点位数 // unitPrecision: 6, // 转换后的精度,即小数点位数
propList: ["*"], // 指定转换的css属性的单位*代表全部css属性的单位都进行转换 // propList: ["*"], // 指定转换的css属性的单位*代表全部css属性的单位都进行转换
viewportUnit: "vw", // 指定需要转换成的视窗单位默认vw // viewportUnit: "vw", // 指定需要转换成的视窗单位默认vw
fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位默认vw // fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位默认vw
selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, // selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名,
minPixelValue: 1, // 默认值1小于或等于1px则不进行转换 // minPixelValue: 1, // 默认值1小于或等于1px则不进行转换
mediaQuery: true, // 是否在媒体查询的css代码中也进行转换默认false // mediaQuery: true, // 是否在媒体查询的css代码中也进行转换默认false
replace: true, // 是否转换后直接更换属性值 // replace: true, // 是否转换后直接更换属性值
exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 // exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配
landscape: false // 是否处理横屏情况 // landscape: false // 是否处理横屏情况
}, // },
} // }
}; // };

View File

@ -59,6 +59,7 @@
import { formatAddress } from "@/utils/formatAddress"; import { formatAddress } from "@/utils/formatAddress";
import { formatSelect } from "@/utils/UTCTime"; import { formatSelect } from "@/utils/UTCTime";
import { AppModule } from "@/store/modules/app"; import { AppModule } from "@/store/modules/app";
export default { export default {
props: ["tableData"], props: ["tableData"],
data() { data() {

View File

@ -30,6 +30,13 @@
<div class="content" v-show="nftid == 4"> <div class="content" v-show="nftid == 4">
<ItemTable :tableData="tableData"></ItemTable> <ItemTable :tableData="tableData"></ItemTable>
</div> </div>
<pagination
v-if="totalPage > 10"
:total="totalPage"
:current="currentPage"
@to-page="toPage"
class="page-comp"
></pagination>
</div> </div>
</div> </div>
</div> </div>
@ -40,13 +47,16 @@ import ItemTable from "./ItemTable.vue";
import { AppModule } from "@/store/modules/app"; import { AppModule } from "@/store/modules/app";
import { UserModule } from "@/store/modules/user"; import { UserModule } from "@/store/modules/user";
import { getTransactionRecordList } from "@/api/Market"; import { getTransactionRecordList } from "@/api/Market";
import Pagination from "@/components/market/Pagination.vue";
export default { export default {
props: ["curentid", "nftBtnList"], props: ["curentid", "nftBtnList"],
components: { ItemTable }, components: { ItemTable,Pagination },
data() { data() {
return { return {
nftid: 0, nftid: 0,
totalPage:1,
currentPage:1,
starts:0,
tableData: [], tableData: [],
}; };
}, },
@ -66,19 +76,23 @@ export default {
async handNftActive(i) { async handNftActive(i) {
this.nftid = i; this.nftid = i;
this.getTableList() this.getTableList()
console.log(this.tableData, "this.tableData2");
}, },
async getTableList(){ async getTableList(){
const data = { const data = {
account: AppModule.accountId, account: AppModule.accountId,
type: this.nftid == 4 ? 5 : this.nftid, type: this.nftid == 4 ? 5 : this.nftid,
start: 0, start: this.starts,
page_size: 10, page_size: 10,
}; };
const res = await getTransactionRecordList(data); const res = await getTransactionRecordList(data);
this.tableData = res.nfts; this.tableData = res.nfts;
console.log(this.tableData, "this.tableData1"); this.totalPage = parseInt(res.total) || 1;
} this.currentPage = res.start / res.page_size + 1;
},
toPage(pageNo) {
this.starts = (pageNo - 1) * 10;
this.getTableList();
}
}, },
}; };
</script> </script>