Skip to content

Commit

Permalink
perf: update wujie
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed Jul 4, 2024
1 parent 6112706 commit 3e4ef92
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
26 changes: 26 additions & 0 deletions src/assets/css/list.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@
.m-filter--left {
.flex;
align-items: center;

.u-wujie-filter {
.flex;
align-items: center;

border: 1px solid #00dcda;
color: #3ae0f1;
background: #eff;
padding:1px 5px;
.r(2px);

.el-checkbox__label{
.fz(12px);
padding-left:5px;
color:#00dcda !important;
}

margin-left: 10px;

.el-checkbox__input {
.db;
}
.el-checkbox__inner{
.db;
}
}
}
@media screen and (max-width: @ipad) {
.m-archive-filter {
Expand Down
9 changes: 8 additions & 1 deletion src/components/common-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<menuBy @filter="filterMeta" :data="langs" type="lang" placeholder="语言"></menuBy>
<!-- 资料片过滤 -->
<zlpBy @filter="filterMeta" type="zlp" :client="client"></zlpBy>
<!-- 无界筛选 -->
<el-checkbox v-model="is_wujie" class="u-wujie-filter" :true-label="1" :false-label="0" @change="onWujieChange">只看无界</el-checkbox>
</div>
<div class="m-filter--right">
<!-- 排序过滤 -->
Expand Down Expand Up @@ -49,7 +51,9 @@ export default {
tr: "繁體中文",
},
rows: 1
rows: 1,
is_wujie: 0,
}
},
computed: {
Expand All @@ -68,6 +72,9 @@ export default {
onSearch() {
this.$emit('search', this.search)
},
onWujieChange() {
this.$emit('wujie', this.is_wujie)
}
}
}
</script>
8 changes: 8 additions & 0 deletions src/views/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@filterImperceptibly="filterImperceptibly"
@filterMeta="filterMeta"
@search="onSearch"
@wujie="onWujieChange"
></common-header>

<!-- 推荐 -->
Expand Down Expand Up @@ -97,6 +98,7 @@ export default {
search: "", //搜索字串
lang: "", //语言
zlp: "", //资料片
is_wujie: 0, //无界过滤
drawer: false,
drawer_title: "",
Expand Down Expand Up @@ -128,6 +130,7 @@ export default {
search: this.search,
lang: this.lang,
zlp: this.zlp,
is_wujie: this.is_wujie,
};
},
// 分页相关参数
Expand Down Expand Up @@ -228,6 +231,11 @@ export default {
filterImperceptibly: function (o) {
this[o["type"]] = o["val"];
},
// 无界过滤
onWujieChange: function (val) {
this.is_wujie = val;
this.replaceRoute({ is_wujie: val, page: 1 });
},
// 翻页加载
changePage: function (i) {
this.loadData();
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
},
},
"/api/cms": {
target: process.env["DEV_SERVER"] == "true" ? "http://localhost:5120" : "https://cms.jx3box.com",
target: process.env["DEV_SERVER"] == "true" ? "http://localhost:7100" : "https://cms.jx3box.com",
},
"/api/team": {
target: "https://team.api.jx3box.com",
Expand Down

0 comments on commit 3e4ef92

Please sign in to comment.