Browse Source

RING:阅文快应用分页

ringcode 3 years ago
parent
commit
554c326b08
2 changed files with 8 additions and 2 deletions
  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"
         @change="getList"
         rowKey="uid"
         rowKey="uid"
         :loading="loading"
         :loading="loading"
+        :pagination="tablePageOptions"
       >
       >
         <template #platform="{}">头条</template>
         <template #platform="{}">头条</template>
         <template #is_paid="{ record }">
         <template #is_paid="{ record }">
@@ -41,6 +42,7 @@
 <script lang="ts">
 <script lang="ts">
 import useApp from "@/hooks/useApp";
 import useApp from "@/hooks/useApp";
 import { defineComponent, reactive, toRefs, ref } from "vue";
 import { defineComponent, reactive, toRefs, ref } from "vue";
+import usePagination from "@/hooks/usePagination";
 //getPromotionList
 //getPromotionList
 import { getUserData, forceReport } from "@/api";
 import { getUserData, forceReport } from "@/api";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
@@ -49,6 +51,7 @@ import { TableColumnOfUserData } from "@/views/_pageOptions/table_yuewen";
 const UserData = defineComponent({
 const UserData = defineComponent({
   props: ["channelId"],
   props: ["channelId"],
   setup(props) {
   setup(props) {
+    let { tablePageOptions } = usePagination();
     const state = reactive({
     const state = reactive({
       id: "",
       id: "",
       columns: TableColumnOfUserData,
       columns: TableColumnOfUserData,
@@ -57,7 +60,7 @@ const UserData = defineComponent({
       is_paid: "",
       is_paid: "",
       loading: false,
       loading: false,
     });
     });
-    return { ...toRefs(state) };
+    return { ...toRefs(state), tablePageOptions };
   },
   },
   mounted() {
   mounted() {
     this.id = this.$props.channelId;
     this.id = this.$props.channelId;

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

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