Skip to content

Commit

Permalink
fix:美人图优化
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthThirteen committed Jan 10, 2025
1 parent 83de834 commit 8689530
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/gonggao/Daily.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="m-daily-item">
<div class="u-title">
<div class="u-mrt-title">
美人图 ·
美人图 ·
<el-select class="u-select" placeholder="区服" v-model="currentServer" size="small">
<el-option v-for="(item, i) in servers" :key="i" :label="item" :value="item"></el-option>
</el-select>
Expand All @@ -53,7 +53,7 @@
<SimpleMrt class="m-daily-content" :server="currentServer"></SimpleMrt>
</div>
</template>
<MrtDialog :visible="visible" @close="visible = false"></MrtDialog>
<MrtDialog :visible="visible" :currentServer="currentServer" @close="visible = false"></MrtDialog>
</div>
</template>

Expand Down
22 changes: 16 additions & 6 deletions src/components/gonggao/daily/MrtDialog.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<el-dialog title="美人图查询" :visible.sync="show" width="90%" custom-class="m-mrt-dialog" @close="close">
<div class="m-toolbar">
<el-select v-model="server" filterable clearable>
<el-select v-model="server" filterable>
<template #prefix>
<div class="u-select-label">区服</div>
</template>
<el-option v-for="(item, i) in servers" :key="i" :label="item" :value="item"></el-option>
</el-select>
<el-select v-model="school_id" filterable clearable>
<el-select v-model="school_id" filterable>
<template #prefix>
<div class="u-select-label">门派</div>
</template>
Expand All @@ -18,7 +18,7 @@
:value="item.value"
></el-option>
</el-select>
<el-select v-model="body_id" filterable clearable>
<el-select v-model="body_id" filterable>
<template #prefix>
<div class="u-select-label">体型</div>
</template>
Expand Down Expand Up @@ -51,7 +51,7 @@ import servers_origin from "@jx3box/jx3box-data/data/server/server_origin.json";
import dayjs from "@/plugins/day";
export default {
name: "MrtDialog",
props: ["visible"],
props: ["visible", "currentServer"],
components: {},
data: function () {
return {
Expand Down Expand Up @@ -105,7 +105,17 @@ export default {
}
},
},
watch: {},
watch: {
visible: {
immediate: true,
handler() {
console.log(this.visible);
if (this.visible && !this.server) {
this.server = this.currentServer;
}
},
},
},
methods: {
close() {
this.$emit("close");
Expand All @@ -117,7 +127,7 @@ export default {
},
onSearch() {
if (!this.server || !this.school_id || !this.body_id) {
return this.$message.error("请输入查询条件");
return this.$message.error("请选择查询条件");
}
const params = {
client: this.client,
Expand Down

0 comments on commit 8689530

Please sign in to comment.