ソースを参照

GM邮件优化

Administrator 1 年間 前
コミット
f4332e489e

+ 8 - 5
src/components/Table/PropTable/index.vue

@@ -97,8 +97,8 @@
       <!-- ------------分页--------------->
       <div class="pagination">
         <el-pagination
-            v-model:currentPage="currentPage1"
-            :page-size="10"
+            v-model:currentPage="currentPage"
+            v-model:page-size="pageSize"
             background
             layout="total, sizes, prev, pager, next, jumper"
             :total="data.length"
@@ -131,20 +131,23 @@ let props = defineProps({
   },
 })
 
-const currentPage1 = ref(1)
+const currentPage = ref(1)
+const pageSize = ref(10)
 // 收缩展开
 const isExpand = ref(false)
 const handleSizeChange = (val: number) => {
   console.log(`${val} items per page`)
+  pageSize.value = val
+  currentPage.value = 1
 }
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
-  currentPage1.value = val
+  currentPage.value = val
 }
 
 const list = computed(() => {
   let arr = JSON.parse(JSON.stringify(props.data))
-  return arr.splice((currentPage1.value - 1) * 10, 10)
+  return arr.splice((currentPage.value - 1) * pageSize.value, pageSize.value)
 })
 
 const listLoading = ref(false)

+ 8 - 5
src/components/Table/ServerPropTable/index.vue

@@ -98,8 +98,8 @@
       <!-- ------------分页--------------->
       <div class="pagination">
         <el-pagination
-            v-model:currentPage="currentPage1"
-            :page-size="10"
+            v-model:currentPage="currentPage"
+            v-model:page-size="pageSize"
             background
             layout="total, sizes, prev, pager, next, jumper"
             :total="data.length"
@@ -132,20 +132,23 @@ let props = defineProps({
   },
 })
 
-const currentPage1 = ref(1)
+const currentPage = ref(1)
+const pageSize = ref(10)
 // 收缩展开
 const isExpand = ref(false)
 const handleSizeChange = (val: number) => {
   console.log(`${val} items per page`)
+  pageSize.value = val
+  currentPage.value = 1
 }
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
-  currentPage1.value = val
+  currentPage.value = val
 }
 
 const list = computed(() => {
   let arr = JSON.parse(JSON.stringify(props.data))
-  return arr.splice((currentPage1.value - 1) * 10, 10)
+  return arr.splice((currentPage.value - 1) * pageSize.value, pageSize.value)
 })
 
 const listLoading = ref(false)

+ 2 - 2
src/views/operation/gmmail/index.vue

@@ -46,7 +46,7 @@
           <el-input v-model="ruleForm.levelCondition" placeholder="指定角色等级区间[min,max],格式:1,100" />
         </el-form-item>
         <el-form-item label="收件人道具条件" prop="itemCondition">
-          <el-input v-model="ruleForm.itemCondition" placeholder="指定角色拥有道具,支持数组,格式:1001,1002..." />
+          <el-input v-model="ruleForm.itemCondition" placeholder="指定角色拥有道具,支持数组,格式:1001-100,1002-200..." />
         </el-form-item>
         <el-form-item label="收件人英雄条件" prop="heroCondition">
           <el-input v-model="ruleForm.heroCondition" placeholder="指定角色拥有英雄,支持数组,格式:101,102..."/>
@@ -531,7 +531,7 @@ const more = (row) => {
   ruleForm.toServerIds = row.toServerIds
   ruleForm.toPlayerIds = row.toPlayerIds
   ruleForm.levelCondition = row.levelCondition
-  ruleForm.itemCondition = row.itemCondition
+  ruleForm.itemCondition = getItemsLabel(row.itemCondition)
   ruleForm.heroCondition = row.heroCondition
   ruleForm.roleCreateTimeStart = dateUtils.getDate(row.roleCreateTimeStart)
   ruleForm.roleCreateTimeEnd = dateUtils.getDate(row.roleCreateTimeEnd)