优化代码
parent
48bc53b3e0
commit
883d2ce770
@ -1,57 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex space-between">
|
||||
<div class="card-title">配置指南</div>
|
||||
<uim-dropdown>
|
||||
<span slot="dpbtn-content">栏目导航</span>
|
||||
<ul slot="dp-menu">
|
||||
<li
|
||||
@click="changeAgentType"
|
||||
v-for="dl in downloads"
|
||||
:data-type="dl.type"
|
||||
:key="dl.type"
|
||||
>{{dl.type}}</li>
|
||||
</ul>
|
||||
</uim-dropdown>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="user-guide">
|
||||
<transition name="rotate-fade" mode="out-in">
|
||||
<div v-if="currentDlType === 'SSR'">
|
||||
<p>
|
||||
<span class="tips tips-blue">1.</span>下载客户端解压至任意磁盘并运行
|
||||
</p>
|
||||
</div>
|
||||
<div v-else-if="currentDlType === 'SS/SSD'">
|
||||
<p>
|
||||
<span class="tips tips-blue">1</span>下载客户端解压至任意磁盘并运行
|
||||
</p>
|
||||
</div>
|
||||
<div v-else-if="currentDlType === 'V2RAY'">
|
||||
<p>
|
||||
<span class="tips tips-blue">1.</span>下载客户端解压至任意磁盘并运行
|
||||
</p>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import storeMap from "@/mixins/storeMap";
|
||||
import userMixin from "@/mixins/userMixin";
|
||||
import agentMixin from "@/mixins/agentMixin";
|
||||
|
||||
import Dropdown from "@/components/dropdown.vue";
|
||||
|
||||
export default {
|
||||
mixins: [userMixin, storeMap, agentMixin],
|
||||
components: {
|
||||
"uim-dropdown": Dropdown
|
||||
},
|
||||
data: function() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex space-between align-center">
|
||||
<div class="card-title">配置指南</div>
|
||||
<div class="card-title-right">
|
||||
<uim-dropdown>
|
||||
<span slot="dpbtn-content">
|
||||
<transition name="fade" mode="out-in">
|
||||
<div :key="agentToken.menuKey">{{currentDlType}}</div>
|
||||
</transition>
|
||||
</span>
|
||||
<ul slot="dp-menu">
|
||||
<li
|
||||
@click="changeAgentType"
|
||||
v-for="dl in downloads"
|
||||
:data-type="dl.type"
|
||||
:key="dl.type"
|
||||
>{{dl.type}}</li>
|
||||
</ul>
|
||||
</uim-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="user-guide relative">
|
||||
<transition name="slide-fadex" mode="in-out">
|
||||
<div class="absolute" :key="agentToken.contentKey">
|
||||
<p v-for="tip in agentToken.tipsArr" :key="tip.id">
|
||||
<span class="tips tips-blue">{{tip.num}}</span>{{tip.content}}
|
||||
</p>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import storeMap from "@/mixins/storeMap";
|
||||
import userMixin from "@/mixins/userMixin";
|
||||
import agentMixin from "@/mixins/agentMixin";
|
||||
|
||||
import Dropdown from "@/components/dropdown.vue";
|
||||
|
||||
export default {
|
||||
mixins: [userMixin, storeMap, agentMixin],
|
||||
components: {
|
||||
"uim-dropdown": Dropdown
|
||||
},
|
||||
computed: {
|
||||
agentToken: function() {
|
||||
switch(this.currentDlType) {
|
||||
case 'SSR':
|
||||
return {
|
||||
menuKey: 'guide-nemu-ssr',
|
||||
contentKey: 'guide-content-ssr',
|
||||
tipsArr: this.agentContent.ssrTip,
|
||||
};
|
||||
break;
|
||||
case 'SS/SSD':
|
||||
return {
|
||||
menuKey: 'guide-nemu-ss',
|
||||
contentKey: 'guide-content-ss',
|
||||
tipsArr: this.agentContent.ssTip,
|
||||
};
|
||||
break;
|
||||
case 'V2RAY':
|
||||
return {
|
||||
menuKey: 'guide-nemu-v2',
|
||||
contentKey: 'guide-content-v2',
|
||||
tipsArr: this.agentContent.v2Tip,
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
agentContent: {
|
||||
ssrTip: [
|
||||
{
|
||||
num: 1,
|
||||
content: '下载客户端解压至任意磁盘并运行',
|
||||
id: 'GT_0_1',
|
||||
},
|
||||
],
|
||||
ssTip: [
|
||||
{
|
||||
num: 1,
|
||||
content: '下载客户端解压至任意磁盘并运行',
|
||||
id: 'GT_1_1',
|
||||
},
|
||||
],
|
||||
v2Tip: [
|
||||
{
|
||||
num: 1,
|
||||
content: '下载客户端解压至任意磁盘并运行',
|
||||
id: 'GT_2_1',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,12 +0,0 @@
|
||||
export default {
|
||||
methods: {
|
||||
successCopied() {
|
||||
let callConfig = {
|
||||
msg: '复制成功!,已将链接复制到剪贴板',
|
||||
icon: 'fa-check-square-o',
|
||||
time: '1500',
|
||||
}
|
||||
this.callMsgr(callConfig);
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
import { mapMutations } from 'vuex'
|
||||
|
||||
export default {
|
||||
methods: ...mapMutations({
|
||||
setGlobalConfig: 'SET_GLOBALCONFIG',
|
||||
setHitokoto: 'SET_HITOKOTO',
|
||||
setJinRiShiCi: 'SET_JINRISHICI',
|
||||
setLoadState: 'SET_LOADSTATE',
|
||||
setLoginToken: 'SET_LOGINTOKEN',
|
||||
setUserMoney: 'SET_USERMONEY',
|
||||
setInviteNum: 'SET_INVITE_NUM',
|
||||
setReasourse: 'SET_RESOURSE',
|
||||
setUserCon: 'SET_USERCON',
|
||||
setUserSettings: 'SET_USERSETTINGS',
|
||||
addNewUserCon: 'ADD_NEWUSERCON',
|
||||
setAllResourse: 'SET_ALLURESOURSE',
|
||||
}),
|
||||
}
|
||||
Loading…
Reference in New Issue