@jx3box/jx3box-ui 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.js +22 -13
- package/.storybook/storybookMocks.js +191 -0
- package/README.md +6 -19
- package/assets/css/bread/admin.less +20 -2
- package/assets/css/bread/breadcrumb.less +5 -2
- package/assets/css/comment/quick-reply.less +1 -1
- package/assets/css/common/left-sidebar.less +1 -1
- package/assets/css/interact/like2.less +5 -2
- package/assets/css/single/author.less +15 -10
- package/assets/css/single/cms-single.less +1 -0
- package/assets/css/single/thx.less +34 -11
- package/assets/data/nav.json +344 -10
- package/assets/img/comment/comment.svg +1 -1
- package/assets/img/comment/heart_1.svg +1 -1
- package/assets/img/comment/hide.svg +1 -1
- package/assets/img/leftsidebar/medal.svg +1 -1
- package/assets/img/leftsidebar/post.svg +27 -46
- package/i18n/messages/en-US.js +357 -22
- package/i18n/messages/vi.js +350 -22
- package/i18n/messages/zh-CN.js +469 -20
- package/i18n/messages/zh-TW.js +350 -22
- package/index.js +19 -7
- package/package.json +8 -5
- package/service/cms.js +22 -0
- package/service/commit-history.js +18 -0
- package/service/community.js +60 -0
- package/service/fav.js +5 -6
- package/src/App.vue +154 -80
- package/src/Breadcrumb.vue +24 -11
- package/src/CommonFooter.vue +2 -2
- package/src/Footer.vue +13 -5
- package/src/LeftSideToggle.vue +10 -3
- package/src/LeftSidebar.vue +19 -5
- package/src/Main.vue +9 -2
- package/src/RightSidebar.vue +12 -3
- package/src/SuspendCommon.vue +52 -38
- package/src/author/AuthorFans.vue +7 -5
- package/src/author/AuthorFollow.vue +14 -7
- package/src/author/AuthorGift.vue +25 -17
- package/src/author/AuthorInfo.vue +46 -19
- package/src/author/AuthorLink.vue +3 -1
- package/src/author/AuthorMedals.vue +5 -2
- package/src/author/AuthorPosts.vue +31 -13
- package/src/author/AuthorRss.vue +7 -3
- package/src/author/AuthorTeams.vue +3 -1
- package/src/author/UserPop.vue +29 -17
- package/src/bread/Admin.vue +55 -32
- package/src/bread/AdminDirectMessage.vue +15 -8
- package/src/bread/AdminDrop.vue +124 -45
- package/src/bread/CommunityAdmin.vue +527 -0
- package/src/bread/DesignTask.vue +30 -26
- package/src/bread/ListAdmin.vue +199 -0
- package/src/bread/MigrateCommunity.vue +192 -0
- package/src/bread/MoveToCommunityDialog.vue +234 -0
- package/src/comment/Avatar.vue +18 -24
- package/src/comment/CommentContent.vue +57 -37
- package/src/comment/CommentContentSimple.vue +61 -63
- package/src/comment/CommentInputForm.vue +45 -34
- package/src/comment/CommentWithReply.vue +9 -6
- package/src/comment/QuickReply.vue +5 -1
- package/src/comment/ReplyForReply.vue +6 -4
- package/src/comment/ReplyList.vue +28 -18
- package/src/comment/Upload.vue +24 -6
- package/src/filters/clientBy.vue +10 -8
- package/src/filters/markBy.vue +35 -31
- package/src/filters/menuBy.vue +20 -22
- package/src/filters/orderBy.vue +17 -11
- package/src/filters/tagBy.vue +4 -2
- package/src/filters/topicBy.vue +12 -10
- package/src/filters/versionBy.vue +5 -3
- package/src/filters/zlpBy.vue +29 -25
- package/src/footer/copyright.vue +5 -5
- package/src/footer/links.vue +2 -2
- package/src/footer/official.vue +1 -1
- package/src/footer/resource.vue +6 -6
- package/src/header/alternate.vue +35 -18
- package/src/header/asset.vue +9 -19
- package/src/header/box.vue +20 -8
- package/src/header/box2.vue +16 -9
- package/src/header/client.vue +7 -7
- package/src/header/lang.vue +41 -6
- package/src/header/logo.vue +2 -3
- package/src/header/manage.vue +2 -2
- package/src/header/message.vue +3 -3
- package/src/header/nav.vue +26 -23
- package/src/header/publish.vue +2 -2
- package/src/header/search.vue +2 -2
- package/src/header/shop.vue +2 -2
- package/src/header/user.vue +4 -4
- package/src/header/userInfo.vue +22 -24
- package/src/header/vip.vue +2 -2
- package/src/interact/BoxcoinAdmin.vue +30 -16
- package/src/interact/BoxcoinRecords.vue +28 -11
- package/src/interact/BoxcoinUser.vue +33 -17
- package/src/interact/Fav.vue +5 -1
- package/src/interact/Homework.vue +318 -0
- package/src/interact/Like.vue +4 -2
- package/src/interact/Rss.vue +10 -4
- package/src/interact/Share.vue +18 -19
- package/src/interact/WatchLater.vue +5 -1
- package/src/main.js +1 -0
- package/src/single/Author.vue +5 -1
- package/src/single/CmsSingle.vue +29 -15
- package/src/single/Collection.vue +36 -26
- package/src/single/Comment.vue +19 -13
- package/src/single/Creators.vue +5 -3
- package/src/single/PostCollection.vue +158 -0
- package/src/single/PostDirectory.vue +0 -126
- package/src/single/PostGuide.vue +93 -0
- package/src/single/PostHeader.vue +39 -17
- package/src/single/PostTopic.vue +3 -3
- package/src/single/PostVersion.vue +219 -0
- package/src/single/RightAffix.vue +160 -0
- package/src/single/SimpleThx.vue +4 -2
- package/src/single/Thx.vue +14 -2
- package/src/single/VersionDialog.vue +238 -0
- package/src/stories/components/StoryPropsTable.vue +137 -0
- package/src/stories/filters/FilterGallery.stories.js +110 -0
- package/src/stories/filters/clientBy.stories.js +24 -0
- package/src/stories/filters/markBy.stories.js +6 -0
- package/src/stories/filters/menuBy.stories.js +6 -0
- package/src/stories/filters/orderBy.stories.js +6 -0
- package/src/stories/filters/tagBy.stories.js +6 -0
- package/src/stories/filters/topicBy.stories.js +6 -0
- package/src/stories/filters/versionBy.stories.js +6 -0
- package/src/stories/filters/zlpBy.stories.js +6 -0
- package/src/stories/layout/BaseShell.stories.js +38 -0
- package/src/stories/layout/Breadcrumb.stories.js +40 -0
- package/src/stories/layout/CommonFooter.stories.js +1 -1
- package/src/stories/layout/CommonHeader.stories.js +1 -1
- package/src/stories/layout/LeftSideToggle.stories.js +78 -0
- package/src/stories/layout/LeftSidebar.stories.js +40 -0
- package/src/stories/layout/Main.stories.js +41 -0
- package/src/stories/layout/RightSidebar.stories.js +36 -0
- package/src/stories/layout/StorybookShell.vue +271 -0
- package/src/stories/layout/SuspendCommon.stories.js +67 -0
- package/src/stories/layout/SuspendCommonStage.vue +143 -0
- package/src/stories/mockData.js +275 -0
- package/src/stories/other/UserPop.stories.js +51 -0
- package/src/stories/single/Author.stories.js +19 -0
- package/src/stories/single/AuthorStoryStage.vue +103 -0
- package/src/stories/single/CmsSingle.stories.js +19 -0
- package/src/stories/single/CmsSingleStoryStage.vue +118 -0
- package/src/stories/single/Collection.stories.js +34 -0
- package/src/stories/single/Comment.stories.js +36 -0
- package/src/stories/single/Creators.stories.js +34 -0
- package/src/stories/single/PostCollection.stories.js +34 -0
- package/src/stories/single/PostDirectory.stories.js +31 -0
- package/src/stories/single/PostGuide.stories.js +47 -0
- package/src/stories/single/PostHeader.stories.js +39 -0
- package/src/stories/single/PostVersion.stories.js +41 -0
- package/src/stories/single/RightAffix.stories.js +84 -0
- package/src/stories/single/SimpleThx.stories.js +39 -0
- package/src/stories/single/SingleGallery.stories.js +207 -0
- package/src/stories/single/Thx.stories.js +38 -0
- package/vue.config.js +2 -12
- package/assets/css/common/bottom.less +0 -25
- package/assets/css/editor/article.less +0 -36
- package/assets/css/editor/combo.less +0 -362
- package/assets/css/editor/resource.less +0 -399
- package/assets/css/editor/tinymce.less +0 -100
- package/assets/css/editor/upload.less +0 -136
- package/assets/css/module/author.less +0 -231
- package/assets/css/module/buff.less +0 -88
- package/assets/css/module/directory.less +0 -165
- package/assets/css/module/icon.less +0 -25
- package/assets/css/module/item.less +0 -279
- package/assets/css/module/item_simple.less +0 -58
- package/assets/css/module/jx3_element.less +0 -5
- package/assets/css/module/macro.less +0 -89
- package/assets/css/module/npc.less +0 -265
- package/assets/css/module/resource.less +0 -93
- package/assets/css/module/skill.less +0 -74
- package/assets/css/module/talent.less +0 -495
- package/assets/js/a.js +0 -46
- package/assets/js/code.js +0 -13
- package/assets/js/combo.js +0 -40
- package/assets/js/directory.js +0 -114
- package/assets/js/filter2.js +0 -186
- package/assets/js/fold.js +0 -11
- package/assets/js/gallery.js +0 -14
- package/assets/js/hljs_languages.js +0 -177
- package/assets/js/iframe.js +0 -38
- package/assets/js/img.js +0 -23
- package/assets/js/item/attribute_percent.js +0 -88
- package/assets/js/item/bind.js +0 -18
- package/assets/js/item/border.js +0 -19
- package/assets/js/item/border_quest.js +0 -12
- package/assets/js/item/color.js +0 -25
- package/assets/js/item/hljs_languages.js +0 -177
- package/assets/js/item/icon_url.js +0 -15
- package/assets/js/item/second_format.js +0 -19
- package/assets/js/jx3_element.js +0 -73
- package/assets/js/katex.js +0 -181
- package/assets/js/macro.js +0 -16
- package/assets/js/nextpage.js +0 -4
- package/assets/js/pswp.js +0 -67
- package/assets/js/pswp_template.js +0 -66
- package/assets/js/pz_iframe.js +0 -30
- package/assets/js/qixue.js +0 -28
- package/assets/js/renderImgPreview.js +0 -18
- package/assets/js/script.js +0 -6
- package/assets/js/stat.js +0 -107
- package/assets/js/talent2.js +0 -21
- package/assets/js/tex-mml-chtml.js +0 -36310
- package/assets/js/voice.js +0 -238
- package/assets/js/xss.js +0 -130
- package/src/editor/Article.vue +0 -230
- package/src/editor/BoxResource.vue +0 -441
- package/src/editor/Resource.vue +0 -623
- package/src/editor/Tinymce.vue +0 -204
- package/src/editor/Upload.vue +0 -277
- package/src/editor/UploadAlum.vue +0 -176
- package/src/editor/UploadBanner.vue +0 -156
- package/src/editor/components/Author.vue +0 -322
- package/src/editor/components/Avatar.vue +0 -95
- package/src/editor/components/Buff.vue +0 -80
- package/src/editor/components/Combo.vue +0 -259
- package/src/editor/components/Equip.vue +0 -299
- package/src/editor/components/GameText.vue +0 -242
- package/src/editor/components/Item.vue +0 -325
- package/src/editor/components/ItemSimple.vue +0 -134
- package/src/editor/components/Medal.vue +0 -43
- package/src/editor/components/Npc.vue +0 -215
- package/src/editor/components/PostAuthor.vue +0 -102
- package/src/editor/components/Skill.vue +0 -71
package/src/editor/Resource.vue
DELETED
|
@@ -1,623 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="c-resource">
|
|
3
|
-
<!-- 上传触发按钮 -->
|
|
4
|
-
<el-button class="u-switch" type="primary" @click="openDialog" :disabled="!enable">
|
|
5
|
-
<img class="u-icon u-jx3-icon" svg-inline src="../../assets/img/editor/jx3.svg" />剑三资源
|
|
6
|
-
</el-button>
|
|
7
|
-
|
|
8
|
-
<!-- 弹出界面 -->
|
|
9
|
-
<el-dialog class="c-large-dialog" title="剑三数据库" v-model="dialogVisible">
|
|
10
|
-
<div class="c-resource-content" v-loading="loading">
|
|
11
|
-
<div class="m-database-search">
|
|
12
|
-
<el-radio-group class="u-client" v-model="client" @change="search">
|
|
13
|
-
<el-radio-button value="std">剑三</el-radio-button>
|
|
14
|
-
<el-radio-button value="origin">缘起</el-radio-button>
|
|
15
|
-
</el-radio-group>
|
|
16
|
-
<el-input
|
|
17
|
-
class="u-input"
|
|
18
|
-
placeholder="请输入 ID 或 名称"
|
|
19
|
-
v-model="query"
|
|
20
|
-
@change="search"
|
|
21
|
-
@keyup.enter="search"
|
|
22
|
-
>
|
|
23
|
-
<template #prepend>ID /名称</template>
|
|
24
|
-
<template #append v-if="isPC">
|
|
25
|
-
<el-switch
|
|
26
|
-
v-model="strict"
|
|
27
|
-
active-text="精确匹配"
|
|
28
|
-
@change="search"
|
|
29
|
-
title="仅对Buff/Skill有效"
|
|
30
|
-
></el-switch>
|
|
31
|
-
</template>
|
|
32
|
-
</el-input>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<el-tabs class="m-database-tabs" v-model="type" type="card" @tab-change="changeType">
|
|
36
|
-
<el-tab-pane label="Buff" name="buff">
|
|
37
|
-
<template #label>
|
|
38
|
-
<span class="u-tab-label">
|
|
39
|
-
<img class="u-icon" svg-inline src="../../assets/img/editor/buff.svg" />
|
|
40
|
-
<b>Buff</b>
|
|
41
|
-
<em class="u-count">{{ stat.buff }}</em>
|
|
42
|
-
</span>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<div v-if="total && done" class="m-resource-count">
|
|
46
|
-
<el-icon><Histogram /></el-icon> 共找到 <b>{{ total }}</b> 条记录
|
|
47
|
-
<div class="u-mode">
|
|
48
|
-
插入模式:
|
|
49
|
-
<el-radio-group v-model="buff_mode" size="small" @change="changeMode">
|
|
50
|
-
<el-radio-button value="simple">简版</el-radio-button>
|
|
51
|
-
<el-radio-button value="full">完整版</el-radio-button>
|
|
52
|
-
</el-radio-group>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
<ul class="m-resource-list">
|
|
56
|
-
<li
|
|
57
|
-
v-for="(o, i) in buff"
|
|
58
|
-
class="u-item"
|
|
59
|
-
:key="i"
|
|
60
|
-
:class="{ on: !!o.isSelected }"
|
|
61
|
-
@click="selectBuff(o, i)"
|
|
62
|
-
ref="buff"
|
|
63
|
-
>
|
|
64
|
-
<span class="u-id">
|
|
65
|
-
ID:{{ o.BuffID }}
|
|
66
|
-
<span class="u-detach">{{ showDetachType(o.DetachType) }}</span>
|
|
67
|
-
</span>
|
|
68
|
-
<img class="u-pic" :title="'IconID:' + o.IconID" :src="iconURL(o.IconID)" />
|
|
69
|
-
<span class="u-primary">
|
|
70
|
-
<span class="u-name">
|
|
71
|
-
{{ o.Name }}
|
|
72
|
-
<em v-if="o.BuffName">({{ o.BuffName }})</em>
|
|
73
|
-
</span>
|
|
74
|
-
<span class="u-content">{{ o.Desc }}</span>
|
|
75
|
-
</span>
|
|
76
|
-
</li>
|
|
77
|
-
</ul>
|
|
78
|
-
<el-alert v-if="!buff.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
|
|
79
|
-
</el-tab-pane>
|
|
80
|
-
<el-tab-pane label="技能" name="skill">
|
|
81
|
-
<template #label>
|
|
82
|
-
<span class="u-tab-label">
|
|
83
|
-
<img class="u-icon" svg-inline src="../../assets/img/editor/skill.svg" />
|
|
84
|
-
<b>技能</b>
|
|
85
|
-
<em class="u-count">{{ stat.skill }}</em>
|
|
86
|
-
</span>
|
|
87
|
-
</template>
|
|
88
|
-
|
|
89
|
-
<div v-if="total && done" class="m-resource-count">
|
|
90
|
-
<el-icon><Histogram /></el-icon> 共找到 <b>{{ total }}</b> 条记录
|
|
91
|
-
<div class="u-mode">
|
|
92
|
-
插入模式:
|
|
93
|
-
<el-radio-group v-model="skill_mode" size="small" @change="changeMode">
|
|
94
|
-
<el-radio-button value="simple">简版</el-radio-button>
|
|
95
|
-
<el-radio-button value="full">完整版</el-radio-button>
|
|
96
|
-
</el-radio-group>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<ul class="m-resource-list">
|
|
100
|
-
<li
|
|
101
|
-
v-for="(o, i) in skill"
|
|
102
|
-
class="u-item"
|
|
103
|
-
:key="i"
|
|
104
|
-
:class="{ on: !!o.isSelected }"
|
|
105
|
-
@click="selectSkill(o, i)"
|
|
106
|
-
ref="skill"
|
|
107
|
-
>
|
|
108
|
-
<span class="u-id">ID:{{ o.SkillID }}</span>
|
|
109
|
-
<img class="u-pic" :title="'IconID:' + o.IconID" :src="iconURL(o.IconID)" />
|
|
110
|
-
<span class="u-primary">
|
|
111
|
-
<span class="u-name">
|
|
112
|
-
{{ o.Name }}
|
|
113
|
-
<em v-if="o.SkillName">({{ o.SkillName }})</em>
|
|
114
|
-
</span>
|
|
115
|
-
<span class="u-content">
|
|
116
|
-
{{ filterRaw(o.Desc) }}
|
|
117
|
-
</span>
|
|
118
|
-
</span>
|
|
119
|
-
</li>
|
|
120
|
-
</ul>
|
|
121
|
-
<el-alert
|
|
122
|
-
v-if="!skill.length && done"
|
|
123
|
-
title="没有找到相关条目"
|
|
124
|
-
type="info"
|
|
125
|
-
show-icon
|
|
126
|
-
></el-alert>
|
|
127
|
-
</el-tab-pane>
|
|
128
|
-
<el-tab-pane label="物品" name="item">
|
|
129
|
-
<template #label>
|
|
130
|
-
<span class="u-tab-label">
|
|
131
|
-
<img class="u-icon" svg-inline src="../../assets/img/editor/item.svg" />
|
|
132
|
-
<b>物品</b>
|
|
133
|
-
<em class="u-count">{{ stat.item }}</em>
|
|
134
|
-
</span>
|
|
135
|
-
</template>
|
|
136
|
-
<p v-if="total && done" class="m-resource-count">
|
|
137
|
-
<el-icon><Histogram /></el-icon> 共找到 <b>{{ total }}</b> 条记录
|
|
138
|
-
</p>
|
|
139
|
-
<ul class="m-resource-list" v-if="item.length">
|
|
140
|
-
<el-popover
|
|
141
|
-
popper-class="m-item-pop"
|
|
142
|
-
:visible-arrow="false"
|
|
143
|
-
trigger="hover"
|
|
144
|
-
placement="left"
|
|
145
|
-
v-for="(o, i) in item"
|
|
146
|
-
:key="i"
|
|
147
|
-
>
|
|
148
|
-
<template #reference>
|
|
149
|
-
<li
|
|
150
|
-
class="u-item"
|
|
151
|
-
:class="{ on: o.isSelected }"
|
|
152
|
-
@click="selectItem(o, i)"
|
|
153
|
-
ref="item"
|
|
154
|
-
>
|
|
155
|
-
<span class="u-id">ID:{{ o.id }}</span>
|
|
156
|
-
<img class="u-pic" :title="'IconID:' + o.IconID" :src="iconURL(o.IconID)" />
|
|
157
|
-
<span class="u-name">{{ o.Name }}</span>
|
|
158
|
-
<span class="u-content">
|
|
159
|
-
<game-text :text="o.Desc"></game-text>
|
|
160
|
-
</span>
|
|
161
|
-
<span class="u-remark">
|
|
162
|
-
{{ o.Requirement }}
|
|
163
|
-
</span>
|
|
164
|
-
</li>
|
|
165
|
-
</template>
|
|
166
|
-
|
|
167
|
-
<jx3-item :item_id="o.id" :client="client"></jx3-item>
|
|
168
|
-
</el-popover>
|
|
169
|
-
</ul>
|
|
170
|
-
<el-alert v-if="!item.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
|
|
171
|
-
</el-tab-pane>
|
|
172
|
-
<el-tab-pane label="Npc" name="npc">
|
|
173
|
-
<template #label>
|
|
174
|
-
<span class="u-tab-label">
|
|
175
|
-
<img class="u-icon" svg-inline src="../../assets/img/npc/skull.svg" />
|
|
176
|
-
<b>Npc</b>
|
|
177
|
-
<em class="u-count">{{ stat.npc }}</em>
|
|
178
|
-
</span>
|
|
179
|
-
</template>
|
|
180
|
-
<p v-if="total && done" class="m-resource-count">
|
|
181
|
-
<el-icon><Histogram /></el-icon> 共找到 <b>{{ total }}</b> 条记录
|
|
182
|
-
</p>
|
|
183
|
-
<ul class="m-resource-list" v-if="npc.length">
|
|
184
|
-
<li
|
|
185
|
-
v-for="(o, i) in npc"
|
|
186
|
-
:key="i"
|
|
187
|
-
class="u-item"
|
|
188
|
-
:class="{ on: o.isSelected }"
|
|
189
|
-
@click="selectNpc(o, i)"
|
|
190
|
-
ref="item"
|
|
191
|
-
>
|
|
192
|
-
<span class="u-id">ID:{{ o.ID }}</span>
|
|
193
|
-
<img class="u-pic" :title="'IconID:' + o.IconID" :src="iconURL(o.IconID)" />
|
|
194
|
-
<span class="u-name">
|
|
195
|
-
{{ o.Name }}
|
|
196
|
-
<em v-if="o.Level">(等级:{{ o.Level }})</em>
|
|
197
|
-
</span>
|
|
198
|
-
<span class="u-content">
|
|
199
|
-
<span class="u-map">地图:{{ o.MapName }}</span>
|
|
200
|
-
<span class="u-life">血量:{{ o.MaxLife }}</span>
|
|
201
|
-
<span class="u-mana">内力:{{ o.MaxMana }}</span>
|
|
202
|
-
</span>
|
|
203
|
-
<span class="u-remark">
|
|
204
|
-
{{ o.Requirement }}
|
|
205
|
-
</span>
|
|
206
|
-
</li>
|
|
207
|
-
</ul>
|
|
208
|
-
<el-alert v-if="!npc.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
|
|
209
|
-
</el-tab-pane>
|
|
210
|
-
<el-tab-pane label="图标" name="icon">
|
|
211
|
-
<template #label>
|
|
212
|
-
<span class="u-tab-label">
|
|
213
|
-
<img class="u-icon" svg-inline src="../../assets/img/editor/icons.svg" />
|
|
214
|
-
<b>图标</b>
|
|
215
|
-
<em class="u-count">{{ stat.icon }}</em>
|
|
216
|
-
</span>
|
|
217
|
-
</template>
|
|
218
|
-
<p v-if="icon.length && done" class="m-resource-count">
|
|
219
|
-
<el-icon><Histogram /></el-icon> 共找到 <b>{{ icon.length }}</b> 条记录
|
|
220
|
-
</p>
|
|
221
|
-
<ul class="m-resource-iconlist">
|
|
222
|
-
<li
|
|
223
|
-
v-for="(o, i) in icon"
|
|
224
|
-
class="u-item"
|
|
225
|
-
:key="i"
|
|
226
|
-
:class="{ on: !!o.isSelected }"
|
|
227
|
-
@click="selectIcon(o)"
|
|
228
|
-
ref="icon"
|
|
229
|
-
>
|
|
230
|
-
<!-- <el-tooltip
|
|
231
|
-
effect="dark"
|
|
232
|
-
:content="o.Name || query"
|
|
233
|
-
placement="top"
|
|
234
|
-
>-->
|
|
235
|
-
<img class="e-jx3-icon" :src="iconURL(o.iconID)" :alt="query" />
|
|
236
|
-
<!-- </el-tooltip> -->
|
|
237
|
-
</li>
|
|
238
|
-
</ul>
|
|
239
|
-
<el-alert v-if="!icon.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
|
|
240
|
-
</el-tab-pane>
|
|
241
|
-
</el-tabs>
|
|
242
|
-
|
|
243
|
-
<template v-if="multipage">
|
|
244
|
-
<!-- 下一页 -->
|
|
245
|
-
<el-button
|
|
246
|
-
class="m-archive-more"
|
|
247
|
-
:class="{ show: hasNextPage }"
|
|
248
|
-
type="primary"
|
|
249
|
-
icon="ArrowDown"
|
|
250
|
-
@click="appendPage"
|
|
251
|
-
>加载更多</el-button
|
|
252
|
-
>
|
|
253
|
-
<!-- 分页 -->
|
|
254
|
-
<el-pagination
|
|
255
|
-
class="m-archive-pages"
|
|
256
|
-
background
|
|
257
|
-
layout="total, prev, pager, next,jumper"
|
|
258
|
-
:hide-on-single-page="true"
|
|
259
|
-
:page-size="per"
|
|
260
|
-
:total="total"
|
|
261
|
-
v-model:current-page="page"
|
|
262
|
-
@current-change="changePage"
|
|
263
|
-
></el-pagination>
|
|
264
|
-
</template>
|
|
265
|
-
|
|
266
|
-
<div class="m-database-tip" v-show="isBlank">❤ 请输入搜索条件查询</div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
<!-- 插入按钮 -->
|
|
270
|
-
<template #footer>
|
|
271
|
-
<span class="dialog-footer">
|
|
272
|
-
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
273
|
-
<el-button type="primary" @click="insert">
|
|
274
|
-
{{ buttonTXT }}
|
|
275
|
-
</el-button>
|
|
276
|
-
</span>
|
|
277
|
-
</template>
|
|
278
|
-
</el-dialog>
|
|
279
|
-
</div>
|
|
280
|
-
</template>
|
|
281
|
-
|
|
282
|
-
<script>
|
|
283
|
-
import { loadResource, loadStat, getIcons } from "../../service/database";
|
|
284
|
-
import { loadEmotions } from "../../service/cms";
|
|
285
|
-
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
286
|
-
import detach_types from "../../assets/data/detach_type.json";
|
|
287
|
-
import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
288
|
-
import GameText from "./components/GameText.vue";
|
|
289
|
-
import User from "@jx3box/jx3box-common/js/user";
|
|
290
|
-
import Item from "./components/Item.vue";
|
|
291
|
-
|
|
292
|
-
const { __iconPath, __Root, __OriginRoot } = JX3BOX;
|
|
293
|
-
|
|
294
|
-
export default {
|
|
295
|
-
name: "ResourceDialog",
|
|
296
|
-
props: {
|
|
297
|
-
enable: {
|
|
298
|
-
type: Boolean,
|
|
299
|
-
default: true,
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
data: function () {
|
|
303
|
-
return {
|
|
304
|
-
dialogVisible: false,
|
|
305
|
-
actived: false,
|
|
306
|
-
userInfo: {},
|
|
307
|
-
|
|
308
|
-
type: "buff",
|
|
309
|
-
query: "",
|
|
310
|
-
strict: false,
|
|
311
|
-
client: location.hostname.includes("origin") ? "origin" : "std",
|
|
312
|
-
|
|
313
|
-
skill: [],
|
|
314
|
-
buff: [],
|
|
315
|
-
item: [],
|
|
316
|
-
icon: [],
|
|
317
|
-
npc: [],
|
|
318
|
-
authors: [],
|
|
319
|
-
selectedAuthor: {},
|
|
320
|
-
emotions: [],
|
|
321
|
-
|
|
322
|
-
stat: {
|
|
323
|
-
skill: 0,
|
|
324
|
-
buff: 0,
|
|
325
|
-
item: 0,
|
|
326
|
-
npc: 0,
|
|
327
|
-
icon: 0,
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
done: false,
|
|
331
|
-
loading: false,
|
|
332
|
-
|
|
333
|
-
isSuper: false,
|
|
334
|
-
|
|
335
|
-
html: "",
|
|
336
|
-
isPC: true,
|
|
337
|
-
|
|
338
|
-
per: 10,
|
|
339
|
-
page: 1,
|
|
340
|
-
total: 1,
|
|
341
|
-
pages: 1,
|
|
342
|
-
|
|
343
|
-
buff_mode: "simple",
|
|
344
|
-
skill_mode: "simple",
|
|
345
|
-
};
|
|
346
|
-
},
|
|
347
|
-
computed: {
|
|
348
|
-
buttonTXT: function () {
|
|
349
|
-
return this.selectedCount ? "插 入" : "确 定";
|
|
350
|
-
},
|
|
351
|
-
isBlank: function () {
|
|
352
|
-
return !this.query && !this[this.type]["length"];
|
|
353
|
-
},
|
|
354
|
-
selectedCount: function () {
|
|
355
|
-
return !!this.html;
|
|
356
|
-
},
|
|
357
|
-
isNumber: function () {
|
|
358
|
-
return !isNaN(this.query);
|
|
359
|
-
},
|
|
360
|
-
hasNextPage: function () {
|
|
361
|
-
return this.total > 1 && this.page < this.pages;
|
|
362
|
-
},
|
|
363
|
-
multipage: function () {
|
|
364
|
-
return this.type !== "icon" && this.done && this.pages > 1;
|
|
365
|
-
},
|
|
366
|
-
iconDir: function () {
|
|
367
|
-
return this.client == "origin" ? "origin_icon" : "icon";
|
|
368
|
-
},
|
|
369
|
-
userStatus: function () {
|
|
370
|
-
return User.getInfo().status;
|
|
371
|
-
},
|
|
372
|
-
uid: function () {
|
|
373
|
-
return User.getInfo().uid;
|
|
374
|
-
},
|
|
375
|
-
canInsertAuthor: function () {
|
|
376
|
-
return User.getLevel(this.userInfo && this.userInfo.experience) >= 2;
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
watch: {
|
|
380
|
-
html: function (newval) {
|
|
381
|
-
this.$emit("update", newval);
|
|
382
|
-
},
|
|
383
|
-
client: function () {
|
|
384
|
-
loadStat({ client: this.client }).then((data) => {
|
|
385
|
-
this.stat = data;
|
|
386
|
-
this.actived = true;
|
|
387
|
-
});
|
|
388
|
-
},
|
|
389
|
-
},
|
|
390
|
-
methods: {
|
|
391
|
-
getData: function (page = 1, append = false) {
|
|
392
|
-
if (!this.query) return;
|
|
393
|
-
|
|
394
|
-
this.loading = true;
|
|
395
|
-
this.per = 10;
|
|
396
|
-
this.done = false;
|
|
397
|
-
let query = this.query;
|
|
398
|
-
let params = {
|
|
399
|
-
strict: ~~this.strict,
|
|
400
|
-
per: this.per,
|
|
401
|
-
page: page,
|
|
402
|
-
client: this.client,
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
// 图标
|
|
406
|
-
if (this.type == "icon") {
|
|
407
|
-
if (isNaN(query)) {
|
|
408
|
-
getIcons(query, params)
|
|
409
|
-
.then((data) => {
|
|
410
|
-
this.icon = data;
|
|
411
|
-
})
|
|
412
|
-
.finally(() => {
|
|
413
|
-
this.done = true;
|
|
414
|
-
this.loading = false;
|
|
415
|
-
});
|
|
416
|
-
} else {
|
|
417
|
-
let arr = [
|
|
418
|
-
{
|
|
419
|
-
iconID: ~~this.query,
|
|
420
|
-
isSelected: false,
|
|
421
|
-
},
|
|
422
|
-
];
|
|
423
|
-
this.icon = arr;
|
|
424
|
-
this.done = true;
|
|
425
|
-
this.loading = false;
|
|
426
|
-
}
|
|
427
|
-
} else if (this.type === "emotions") {
|
|
428
|
-
this.per = 30;
|
|
429
|
-
params = {
|
|
430
|
-
per: this.per,
|
|
431
|
-
page: page,
|
|
432
|
-
search: query,
|
|
433
|
-
};
|
|
434
|
-
loadEmotions(params)
|
|
435
|
-
.then((res) => {
|
|
436
|
-
if (!append) this.emotions = [];
|
|
437
|
-
let list = this.transformData(res.data.data.list);
|
|
438
|
-
this.emotions = this.emotions.concat(list);
|
|
439
|
-
this.pages = res.data.data.pages;
|
|
440
|
-
this.total = res.data.data.total;
|
|
441
|
-
})
|
|
442
|
-
.finally(() => {
|
|
443
|
-
this.done = true;
|
|
444
|
-
this.loading = false;
|
|
445
|
-
});
|
|
446
|
-
} else {
|
|
447
|
-
// 非图标
|
|
448
|
-
loadResource(this.type, query, params)
|
|
449
|
-
.then((data) => {
|
|
450
|
-
if (!append) this[this.type] = [];
|
|
451
|
-
let list;
|
|
452
|
-
if (this.type == "item") {
|
|
453
|
-
list = this.transformData(data.data);
|
|
454
|
-
this.pages = data.last_page;
|
|
455
|
-
this.total = data.total;
|
|
456
|
-
} else {
|
|
457
|
-
list = this.transformData(data.list || []);
|
|
458
|
-
this.pages = data.pages;
|
|
459
|
-
this.total = data.total;
|
|
460
|
-
}
|
|
461
|
-
this[this.type] = this[this.type].concat(list);
|
|
462
|
-
})
|
|
463
|
-
.finally(() => {
|
|
464
|
-
this.done = true;
|
|
465
|
-
this.loading = false;
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
},
|
|
469
|
-
search: function () {
|
|
470
|
-
this.page = 1;
|
|
471
|
-
this.getData();
|
|
472
|
-
},
|
|
473
|
-
appendPage: function () {
|
|
474
|
-
this.getData(++this.page, true);
|
|
475
|
-
},
|
|
476
|
-
changePage: function (i) {
|
|
477
|
-
this.getData(i);
|
|
478
|
-
},
|
|
479
|
-
changeType: function () {
|
|
480
|
-
this.page = 1;
|
|
481
|
-
this.getData();
|
|
482
|
-
},
|
|
483
|
-
insert: function () {
|
|
484
|
-
this.$emit("insert", this.html);
|
|
485
|
-
this.dialogVisible = false;
|
|
486
|
-
},
|
|
487
|
-
transformData: function (data) {
|
|
488
|
-
data.forEach((item) => {
|
|
489
|
-
item.isSelected = false;
|
|
490
|
-
});
|
|
491
|
-
return data;
|
|
492
|
-
},
|
|
493
|
-
changeMode: function () {
|
|
494
|
-
this.resetItems();
|
|
495
|
-
},
|
|
496
|
-
selectBuff: function (o, i) {
|
|
497
|
-
this.resetItems();
|
|
498
|
-
o.isSelected = true;
|
|
499
|
-
if (this.buff_mode == "simple") {
|
|
500
|
-
// <img src="${this.iconURL(
|
|
501
|
-
// o.IconID
|
|
502
|
-
// )}">
|
|
503
|
-
this.html = `<a data-type="buff" class="e-jx3-buff w-jx3-element ${
|
|
504
|
-
o.CanCancel == 1 ? "isBuff" : "isDebuff"
|
|
505
|
-
}" href="${this.getDbLink("buff", this.client, o.BuffID, o.Level)}" data-client="${
|
|
506
|
-
this.client
|
|
507
|
-
}" data-id="${o.BuffID}" data-level="${o.Level}">[${o.Name}]</a>`;
|
|
508
|
-
} else {
|
|
509
|
-
this.html = `<pre data-type="buff" data-id="${o.BuffID}" class="e-jx3-resource">${
|
|
510
|
-
this.$refs[this.type][i]["innerHTML"]
|
|
511
|
-
}</pre>`;
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
selectSkill: function (o, i) {
|
|
515
|
-
this.resetItems();
|
|
516
|
-
o.isSelected = true;
|
|
517
|
-
if (this.skill_mode == "simple") {
|
|
518
|
-
this.html = `<a data-type="skill" class="e-jx3-skill w-jx3-element" href="${this.getDbLink(
|
|
519
|
-
"skill",
|
|
520
|
-
this.client,
|
|
521
|
-
o.SkillID,
|
|
522
|
-
o.Level
|
|
523
|
-
)}" data-client="${this.client}" data-id="${o.SkillID}" data-level="${o.Level}">[${o.Name}]</a>`;
|
|
524
|
-
} else {
|
|
525
|
-
this.html = `<pre data-type="skill" data-id="${o.SkillID}" class="e-jx3-resource">${
|
|
526
|
-
this.$refs[this.type][i]["innerHTML"]
|
|
527
|
-
}</pre>`;
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
selectItem: function (o) {
|
|
531
|
-
this.resetItems();
|
|
532
|
-
o.isSelected = true;
|
|
533
|
-
this.html = `<a data-type="item" class="e-jx3-item e-jx3-item-q${
|
|
534
|
-
o.Quality
|
|
535
|
-
} w-jx3-element" data-mode="" data-id="${o.id}" data-quality="${o.Quality}" data-client="${
|
|
536
|
-
this.client
|
|
537
|
-
}" target="_blank" href="${this.getLink("item", o.id)}">[${o.Name}]</a>`;
|
|
538
|
-
},
|
|
539
|
-
selectIcon: function (o) {
|
|
540
|
-
this.resetItems();
|
|
541
|
-
o.isSelected = true;
|
|
542
|
-
this.html = `<img class="e-jx3-icon" src="${__iconPath}${this.iconDir}/${o.iconID}.png" alt="${o.iconID}"/>`;
|
|
543
|
-
},
|
|
544
|
-
selectNpc: function (o) {
|
|
545
|
-
this.resetItems();
|
|
546
|
-
o.isSelected = true;
|
|
547
|
-
this.html = `<a data-type="npc" class="e-jx3-npc w-jx3-element" data-mode="" data-id="${
|
|
548
|
-
o.ID
|
|
549
|
-
}" data-client="${this.client}" target="_blank" href="${this.getDbLink("npc", this.client, o.ID, "")}">${
|
|
550
|
-
o.Name
|
|
551
|
-
}]</a>`;
|
|
552
|
-
},
|
|
553
|
-
selectEmotion: function (o) {
|
|
554
|
-
this.resetItems();
|
|
555
|
-
o.isSelected = true;
|
|
556
|
-
this.html = `<img class="e-jx3-emotion" style="width:80px;" src="${o.url}" alt="${o.id}"/>`;
|
|
557
|
-
},
|
|
558
|
-
resetItems: function () {
|
|
559
|
-
let data = this[this.type];
|
|
560
|
-
data.forEach((item) => {
|
|
561
|
-
item.isSelected = false;
|
|
562
|
-
});
|
|
563
|
-
this.html = "";
|
|
564
|
-
},
|
|
565
|
-
checkUA: function () {
|
|
566
|
-
this.isPC = window.innerWidth > 720;
|
|
567
|
-
},
|
|
568
|
-
iconURL: function (id) {
|
|
569
|
-
return iconLink(id, this.client);
|
|
570
|
-
},
|
|
571
|
-
getDbLink: function (type, client, id, level) {
|
|
572
|
-
let domain = client == "origin" ? __OriginRoot : __Root;
|
|
573
|
-
return domain + "app/database/?type=" + type + `&query=${id}&level=${level}`;
|
|
574
|
-
},
|
|
575
|
-
getLink: function (type, id) {
|
|
576
|
-
let domain = this.client == "origin" ? __OriginRoot : __Root;
|
|
577
|
-
return domain + getLink(type, id).slice(1);
|
|
578
|
-
},
|
|
579
|
-
userAvatar: function (url) {
|
|
580
|
-
return showAvatar(url, "m");
|
|
581
|
-
},
|
|
582
|
-
|
|
583
|
-
// 杂项
|
|
584
|
-
// ==============================
|
|
585
|
-
openDialog: function () {
|
|
586
|
-
this.dialogVisible = true;
|
|
587
|
-
if (!this.actived) {
|
|
588
|
-
loadStat({ client: this.client }).then((data) => {
|
|
589
|
-
this.stat = data;
|
|
590
|
-
this.actived = true;
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
|
-
filterRaw: function (str) {
|
|
595
|
-
return str && str.replace(/\\n/g, "\n");
|
|
596
|
-
},
|
|
597
|
-
showDetachType: function (val) {
|
|
598
|
-
if (val && detach_types[val]) {
|
|
599
|
-
return detach_types[val];
|
|
600
|
-
} else {
|
|
601
|
-
return "";
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
},
|
|
605
|
-
created: function () {
|
|
606
|
-
this.checkUA();
|
|
607
|
-
},
|
|
608
|
-
components: {
|
|
609
|
-
"jx3-item": Item,
|
|
610
|
-
GameText,
|
|
611
|
-
},
|
|
612
|
-
};
|
|
613
|
-
</script>
|
|
614
|
-
|
|
615
|
-
<style lang="less">
|
|
616
|
-
@import "../../assets/css/editor/resource.less";
|
|
617
|
-
|
|
618
|
-
.m-item-pop {
|
|
619
|
-
padding: 0 !important;
|
|
620
|
-
background: none !important;
|
|
621
|
-
border: none;
|
|
622
|
-
}
|
|
623
|
-
</style>
|