浏览代码

RING:阅文快应用分页

ringcode 3 年之前
父节点
当前提交
554c326b08
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 4 1
      src/views/read/components/user-data.vue
  2. 4 1
      src/views/read/quick-app.vue

+ 4 - 1
src/views/read/components/user-data.vue

@@ -18,6 +18,7 @@
         @change="getList"
         rowKey="uid"
         :loading="loading"
+        :pagination="tablePageOptions"
       >
         <template #platform="{}">头条</template>
         <template #is_paid="{ record }">
@@ -41,6 +42,7 @@
 <script lang="ts">
 import useApp from "@/hooks/useApp";
 import { defineComponent, reactive, toRefs, ref } from "vue";
+import usePagination from "@/hooks/usePagination";
 //getPromotionList
 import { getUserData, forceReport } from "@/api";
 import { message } from "ant-design-vue";
@@ -49,6 +51,7 @@ import { TableColumnOfUserData } from "@/views/_pageOptions/table_yuewen";
 const UserData = defineComponent({
   props: ["channelId"],
   setup(props) {
+    let { tablePageOptions } = usePagination();
     const state = reactive({
       id: "",
       columns: TableColumnOfUserData,
@@ -57,7 +60,7 @@ const UserData = defineComponent({
       is_paid: "",
       loading: false,
     });
-    return { ...toRefs(state) };
+    return { ...toRefs(state), tablePageOptions };
   },
   mounted() {
     this.id = this.$props.channelId;

+ 4 - 1
src/views/read/quick-app.vue

@@ -44,6 +44,7 @@
           @change="getList"
           rowKey="id"
           :loading="loading"
+          :pagination="tablePageOptions"
         >
           <template #operation="{ record }">
             <a @click="onRateConfig(record)">回传配置</a>&nbsp;
@@ -137,6 +138,7 @@
 
 <script lang="ts">
 import useApp from "@/hooks/useApp";
+import usePagination from "@/hooks/usePagination";
 import { defineComponent, reactive, toRefs, ref } from "vue";
 import { onBeforeRouteUpdate } from "vue-router";
 import { TableColumnOfYuewen } from "../_pageOptions/table_yuewen";
@@ -152,6 +154,7 @@ import UserData from "./components/user-data.vue";
 const PutDataIndex = defineComponent({
   components: { UserData },
   setup() {
+    let {  tablePageOptions } = usePagination();
     const formRef = ref();
     const state = reactive({
       search: {
@@ -185,7 +188,7 @@ const PutDataIndex = defineComponent({
         ],
       },
     });
-    return { ...toRefs(state), formRef };
+    return { ...toRefs(state), formRef,tablePageOptions };
   },
   mounted() {
     this.getList({ current: 1 });