Skip to content

Commit

Permalink
perf: update macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed Jul 7, 2024
1 parent 7422d9b commit e5d942a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@jx3box/jx3box-comment-ui": "^1.9.9",
"@jx3box/jx3box-common": "^8.2.24",
"@jx3box/jx3box-common-ui": "^8.9.4",
"@jx3box/jx3box-common-ui": "^8.9.5",
"@jx3box/jx3box-data": "^3.6.0",
"@jx3box/jx3box-dict": "^2.2.2",
"@jx3box/jx3box-editor": "^2.2.11",
Expand Down
5 changes: 5 additions & 0 deletions src/assets/css/list.less
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@
border: 1px solid #fa80a2;
color: #fa80a2;
}
.u-wujie {
border: 1px solid #00dcda;
color: #3ae0f1;
background: #eff;
}
.fz(15px, 2);
font-weight: normal;
.lh(2);
Expand Down
1 change: 1 addition & 0 deletions src/components/list/list_item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</template>
<!-- 资料片 -->
<span class="u-label u-zlp" v-if="item.zlp">{{ item.zlp }}</span>
<span class="u-label u-zlp u-wujie" v-if="item.is_wujie">无界</span>
<!-- 繁体标识 -->
<span class="u-label u-lang" v-if="item.lang == 'tr'">繁體</span>
<!-- 标题文字 -->
Expand Down
40 changes: 23 additions & 17 deletions src/views/Single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,32 @@
<b>{{ item.name }}</b>
</span>
<!---->
<el-divider content-position="left" v-if="item.macro">宏</el-divider>
<el-divider content-position="left" v-if="item.sq && item.sq.length">武学序列</el-divider>
<div class="u-usage" v-if="item.desc">{{ item.desc }}</div>
<div class="u-macro macro-box" :class="{ withUsage: item.desc }" v-if="item.macro">
<macro :ctx="item.macro" :lang="lang" :name="author_info.display_name + '#' + item.name" :id="id" :can-comment="canComment" />
</div>
<div class="u-macro macro-box" :class="{ withUsage: item.desc }" v-if="item.sq && item.sq.length">
<ul class="m-skills-list">
<li
v-for="(skill, index) in item.sq"
:key="skill.SkillID + '' + index"
class="m-skill"
>
<template v-if="!post.is_wujie">
<el-divider content-position="left" v-if="item.macro">宏</el-divider>
<div class="u-usage" v-if="item.desc">{{ item.desc }}</div>
<div class="u-macro macro-box" :class="{ withUsage: item.desc }" v-if="item.macro">
<macro
:ctx="item.macro"
:lang="lang"
:name="author_info.display_name + '#' + item.name"
:id="id"
:can-comment="canComment"
/>
</div>
</template>
<template v-else>
<el-divider content-position="left" v-if="item.sq && item.sq.length">武学序列</el-divider>
<div class="u-macro macro-box" :class="{ withUsage: item.desc }" v-if="item.sq && item.sq.length">
<ul class="m-skills-list">
<li v-for="(skill, index) in item.sq" :key="skill.SkillID + '' + index" class="m-skill">
<div class="u-skill" v-if="skill && skill.IconID">
<img class="u-skill-icon" :src="iconLink(skill.IconID)" :alt="skill.IconID" />
<span class="u-name" :title="skill.Name">{{ skill.Name }}</span>
</div>
</li>
</ul>
</div>
</div>
</template>
<!-- 奇穴 镇派 -->
<template v-if="item.talent">
<el-divider content-position="left">{{ client === "origin" ? "镇派" : "奇穴" }}</el-divider>
Expand Down Expand Up @@ -165,8 +171,8 @@ export default {
return this.post?.author_info;
},
canComment() {
return !this.post?.comment // 0开启 1关闭
}
return !this.post?.comment; // 0开启 1关闭
},
},
methods: {
copy,
Expand Down Expand Up @@ -194,7 +200,7 @@ export default {
iconURL: function (val) {
return __iconPath + "icon/" + val + ".png";
},
iconLink
iconLink,
},
mounted: function () {
if (this.id) {
Expand Down

0 comments on commit e5d942a

Please sign in to comment.