jcq 1 settimana fa
parent
commit
c511aaa304
3 ha cambiato i file con 18 aggiunte e 8 eliminazioni
  1. 2 2
      .env
  2. 1 1
      src/components/Pagination/index.vue
  3. 15 5
      src/views/marketing/rules/index.vue

+ 2 - 2
.env

@@ -6,8 +6,8 @@ VITE_PUBLIC_PATH = /
 
 # 后端请求前缀
 # VITE_API_URL = http://192.168.10.101:9999
-# VITE_API_URL = http://192.168.3.118:9999
- VITE_API_URL = http://192.168.3.17:9999
+VITE_API_URL = http://192.168.3.118:9999
+# VITE_API_URL = http://192.168.3.17:9999
 
 # OAUTH2 密码模式客户端信息
 VITE_OAUTH2_PASSWORD_CLIENT='pig:pig'

+ 1 - 1
src/components/Pagination/index.vue

@@ -33,7 +33,7 @@ const props = defineProps({
 	pageSizes: {
 		type: Array as () => number[],
 		default: () => {
-			return [1, 10, 20, 50, 100, 200];
+			return [5, 10, 20, 50, 100, 200];
 		},
 	},
 	layout: {

+ 15 - 5
src/views/marketing/rules/index.vue

@@ -44,9 +44,7 @@
 					</template>
 				</el-table-column>
 				<el-table-column label="延时推送" prop="delayPush" show-overflow-tooltip width="100">
-					<template #default="{ row }">
-						{{ row.delayPush }}s
-					</template>
+					<template #default="{ row }"> {{ row.delayPush }}s </template>
 				</el-table-column>
 				<el-table-column label="备注" prop="remark" show-overflow-tooltip width="200"></el-table-column>
 				<el-table-column label="操作" width="100" fixed="right">
@@ -66,7 +64,13 @@
 					</div>
 				</template>
 			</el-dialog>
-			<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"> </pagination>
+			<pagination
+				@current-change="currentChangeHandle"
+				@size-change="sizeChangeHandle"
+				:pageSizes="[5, 10, 20, 50, 100, 200]"
+				v-bind="state.pagination"
+			>
+			</pagination>
 		</div>
 	</div>
 </template>
@@ -91,7 +95,7 @@ const formatNum = (value: string | number = 0) => {
 	if (num > 0 && num < 1) {
 		return (num * 100).toFixed(0) + '%';
 	} else if (num >= 1 && num < 10000) {
-		return '每'+num+'次推送';
+		return '每' + num + '次推送';
 	}
 	return '--';
 };
@@ -107,6 +111,12 @@ const state: BasicTableProps = reactive<BasicTableProps>({
 	},
 	selectObjs: [],
 	pageList: pageListIp,
+	pagination: {
+		current: 1,
+		size: 10,
+		total: 0,
+		pageSizes: [5, 10, 20, 50, 100],
+	},
 });
 
 //  table hook