@jx3box/jx3box-ui 0.0.1
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/.env +6 -0
- package/README.md +4 -0
- package/assets/css/bread/admin.less +131 -0
- package/assets/css/bread/breadcrumb.less +163 -0
- package/assets/css/bread/crumb.less +17 -0
- package/assets/css/comment/quick-reply.less +56 -0
- package/assets/css/common/bottom.less +21 -0
- package/assets/css/common/footer.less +78 -0
- package/assets/css/common/left-sidebar.less +137 -0
- package/assets/css/common/main.less +75 -0
- package/assets/css/common/right-sidebar.less +193 -0
- package/assets/css/common/suspend-common.less +343 -0
- package/assets/css/editor/article.less +36 -0
- package/assets/css/editor/combo.less +311 -0
- package/assets/css/editor/resource.less +335 -0
- package/assets/css/editor/tinymce.less +80 -0
- package/assets/css/editor/upload.less +111 -0
- package/assets/css/filters/client-by.less +33 -0
- package/assets/css/header/box.less +181 -0
- package/assets/css/interact/like2.less +20 -0
- package/assets/css/interact/share2.less +101 -0
- package/assets/css/mixin.less +64 -0
- package/assets/css/module/author.less +190 -0
- package/assets/css/module/buff.less +78 -0
- package/assets/css/module/directory.less +143 -0
- package/assets/css/module/icon.less +21 -0
- package/assets/css/module/item.less +229 -0
- package/assets/css/module/item_simple.less +51 -0
- package/assets/css/module/jx3_element.less +4 -0
- package/assets/css/module/macro.less +72 -0
- package/assets/css/module/npc.less +220 -0
- package/assets/css/module/resource.less +80 -0
- package/assets/css/module/skill.less +65 -0
- package/assets/css/module/talent.less +424 -0
- package/assets/css/single/author.less +101 -0
- package/assets/css/single/cms-single.less +55 -0
- package/assets/css/single/thx.less +230 -0
- package/assets/css/tinymce/_.less +28 -0
- package/assets/css/tinymce/a.less +29 -0
- package/assets/css/tinymce/code.less +159 -0
- package/assets/css/tinymce/combo.less +86 -0
- package/assets/css/tinymce/fold.less +70 -0
- package/assets/css/tinymce/h.less +58 -0
- package/assets/css/tinymce/hr.less +9 -0
- package/assets/css/tinymce/img.less +16 -0
- package/assets/css/tinymce/imgpreview.less +14 -0
- package/assets/css/tinymce/latex.less +43 -0
- package/assets/css/tinymce/list.less +65 -0
- package/assets/css/tinymce/macro.less +40 -0
- package/assets/css/tinymce/nextpage.less +65 -0
- package/assets/css/tinymce/p.less +8 -0
- package/assets/css/tinymce/plugin.less +3 -0
- package/assets/css/tinymce/pz.less +39 -0
- package/assets/css/tinymce/qixue.less +39 -0
- package/assets/css/tinymce/quote.less +12 -0
- package/assets/css/tinymce/table.less +59 -0
- package/assets/css/tinymce/video.less +61 -0
- package/assets/css/var.less +1 -0
- package/assets/data/box.json +184 -0
- package/assets/data/box2.json +606 -0
- package/assets/data/detach_type.json +29 -0
- package/assets/data/game_font.json +242 -0
- package/assets/data/nav.json +12 -0
- package/assets/data/panel.json +27 -0
- package/assets/data/reply_template.json +6 -0
- package/assets/data/weapon_type.json +20 -0
- package/assets/data/zlp.json +5 -0
- package/assets/img/author/bilibili.png +0 -0
- package/assets/img/author/bilibili.svg +1 -0
- package/assets/img/author/chat.png +0 -0
- package/assets/img/author/douyu.png +0 -0
- package/assets/img/author/douyu.svg +1 -0
- package/assets/img/author/github.svg +1 -0
- package/assets/img/author/huya.png +0 -0
- package/assets/img/author/huya.svg +1 -0
- package/assets/img/author/msg.svg +55 -0
- package/assets/img/author/tuilan.png +0 -0
- package/assets/img/author/weibo.svg +70 -0
- package/assets/img/bread/menu.svg +1 -0
- package/assets/img/comment/comment.svg +1 -0
- package/assets/img/comment/heart_1.svg +1 -0
- package/assets/img/comment/heart_2.svg +1 -0
- package/assets/img/comment/hide.svg +1 -0
- package/assets/img/common/add.svg +1 -0
- package/assets/img/common/android.svg +1 -0
- package/assets/img/common/bell.svg +1 -0
- package/assets/img/common/bilibili-black.svg +1 -0
- package/assets/img/common/bilibili.svg +1 -0
- package/assets/img/common/check.svg +1 -0
- package/assets/img/common/coin.svg +1 -0
- package/assets/img/common/coupon.svg +56 -0
- package/assets/img/common/douyin.svg +1 -0
- package/assets/img/common/edit.svg +1 -0
- package/assets/img/common/followus.svg +18 -0
- package/assets/img/common/gift.svg +1 -0
- package/assets/img/common/harmony.svg +1 -0
- package/assets/img/common/ios.svg +1 -0
- package/assets/img/common/jx3-origin.svg +15 -0
- package/assets/img/common/jx3-www.svg +9 -0
- package/assets/img/common/lang.svg +6 -0
- package/assets/img/common/logo.svg +5 -0
- package/assets/img/common/manage.svg +1 -0
- package/assets/img/common/miniprogram.jpg +0 -0
- package/assets/img/common/miniprogram.svg +1 -0
- package/assets/img/common/mp.jpg +0 -0
- package/assets/img/common/msg.svg +1 -0
- package/assets/img/common/news.svg +20 -0
- package/assets/img/common/qqbot.svg +7 -0
- package/assets/img/common/qrcode.svg +1 -0
- package/assets/img/common/search-key-slash.svg +5 -0
- package/assets/img/common/send.svg +56 -0
- package/assets/img/common/setting.svg +1 -0
- package/assets/img/common/vip.svg +1 -0
- package/assets/img/common/wechat.svg +48 -0
- package/assets/img/common/weibo.svg +70 -0
- package/assets/img/editor/buff.svg +1 -0
- package/assets/img/editor/file.svg +51 -0
- package/assets/img/editor/icons.svg +15 -0
- package/assets/img/editor/item.svg +46 -0
- package/assets/img/editor/jx3.svg +11 -0
- package/assets/img/editor/jx3box.svg +5 -0
- package/assets/img/editor/skill.svg +53 -0
- package/assets/img/editor/view.svg +1 -0
- package/assets/img/footer/android.svg +1 -0
- package/assets/img/footer/china.svg +1 -0
- package/assets/img/footer/harmony.svg +1 -0
- package/assets/img/footer/ios.svg +1 -0
- package/assets/img/footer/logo.svg +5 -0
- package/assets/img/footer/miniprogram.svg +1 -0
- package/assets/img/footer/qqbot.svg +7 -0
- package/assets/img/header/add.svg +1 -0
- package/assets/img/header/bell.svg +1 -0
- package/assets/img/header/check.svg +1 -0
- package/assets/img/header/coin.svg +1 -0
- package/assets/img/header/edit.svg +1 -0
- package/assets/img/header/gift.svg +1 -0
- package/assets/img/header/logo.svg +5 -0
- package/assets/img/header/manage.svg +1 -0
- package/assets/img/header/msg.svg +1 -0
- package/assets/img/header/search-key-slash.svg +5 -0
- package/assets/img/header/send.svg +56 -0
- package/assets/img/header/setting.svg +1 -0
- package/assets/img/header/translator.svg +1 -0
- package/assets/img/header/vip.svg +1 -0
- package/assets/img/leftsidebar/arrow.svg +64 -0
- package/assets/img/leftsidebar/close.svg +49 -0
- package/assets/img/leftsidebar/fans.svg +1 -0
- package/assets/img/leftsidebar/medal.svg +1 -0
- package/assets/img/leftsidebar/more.svg +50 -0
- package/assets/img/leftsidebar/open.svg +51 -0
- package/assets/img/leftsidebar/post.svg +46 -0
- package/assets/img/leftsidebar/team.svg +1 -0
- package/assets/img/leftsidebar/united.svg +1 -0
- package/assets/img/list/post.svg +1 -0
- package/assets/img/mobile/miniprogram.jpg +0 -0
- package/assets/img/mobile/mp.jpg +0 -0
- package/assets/img/npc/attack.svg +69 -0
- package/assets/img/npc/buff.svg +20 -0
- package/assets/img/npc/energy.svg +1 -0
- package/assets/img/npc/miss.svg +1 -0
- package/assets/img/npc/npc.svg +1 -0
- package/assets/img/npc/radar.svg +45 -0
- package/assets/img/npc/shield.svg +1 -0
- package/assets/img/npc/sight.svg +1 -0
- package/assets/img/npc/skull.svg +15 -0
- package/assets/img/npc/target.svg +55 -0
- package/assets/img/price/jin.png +0 -0
- package/assets/img/price/tong.png +0 -0
- package/assets/img/price/yin.png +0 -0
- package/assets/img/price/zhuan.png +0 -0
- package/assets/img/rightsidebar/ac.svg +1 -0
- package/assets/img/rightsidebar/github.svg +1 -0
- package/assets/img/rightsidebar/repo.svg +1 -0
- package/assets/img/rightsidebar/topic_bg.svg +1 -0
- package/assets/img/rightsidebar/topic_bg_bps.svg +113 -0
- package/assets/img/single/author.svg +1 -0
- package/assets/img/single/directory-header.svg +1 -0
- package/assets/img/single/lock.svg +1 -0
- package/assets/img/single/modate.svg +24 -0
- package/assets/img/single/podate.svg +23 -0
- package/assets/img/single/ticket.svg +1 -0
- package/assets/img/suspend/ArrowsLeftRight.svg +1 -0
- package/assets/img/suspend/circle.svg +7 -0
- package/assets/img/suspend/collect.svg +1 -0
- package/assets/img/suspend/collect_slash.svg +1 -0
- package/assets/img/suspend/collect_slash_touchbar.svg +1 -0
- package/assets/img/suspend/collect_slash_touchbar_100.svg +1 -0
- package/assets/img/suspend/collect_touchbar.svg +1 -0
- package/assets/img/suspend/collect_touchbar_100.svg +1 -0
- package/assets/img/suspend/lafter_touchbar.svg +1 -0
- package/assets/img/suspend/later-on.svg +1 -0
- package/assets/img/suspend/line.svg +3 -0
- package/assets/img/suspend/more.svg +1 -0
- package/assets/img/suspend/pin_slash_24.svg +1 -0
- package/assets/img/suspend/pin_slash_touchbar.svg +1 -0
- package/assets/img/suspend/pin_slash_touchbar_24.svg +1 -0
- package/assets/img/suspend/pin_slash_touchbar_40.svg +1 -0
- package/assets/img/suspend/pin_touchbar.svg +1 -0
- package/assets/img/suspend/pin_touchbar_100.svg +1 -0
- package/assets/img/suspend/pin_touchbar_24.svg +1 -0
- package/assets/img/suspend/report_100.svg +1 -0
- package/assets/img/suspend/rss_touchbar.svg +1 -0
- package/assets/img/suspend/rss_touchbar_100.svg +1 -0
- package/assets/img/suspend/search.svg +3 -0
- package/assets/img/suspend/search_touchbar.svg +1 -0
- package/assets/img/widget/admin_gift.svg +10 -0
- package/assets/img/widget/gift.svg +1 -0
- package/assets/img/widget/heart.svg +17 -0
- package/assets/img/widget/heart1.svg +1 -0
- package/assets/img/widget/heart2.svg +11 -0
- package/assets/img/widget/heart3.svg +37 -0
- package/assets/img/widget/like.svg +1 -0
- package/assets/img/widget/like2.svg +1 -0
- package/assets/img/widget/like3.svg +14 -0
- package/assets/img/widget/like4.png +0 -0
- package/assets/img/widget/like4ing.gif +0 -0
- package/assets/img/widget/qq.svg +1 -0
- package/assets/img/widget/qr-code.svg +1 -0
- package/assets/img/widget/qzone.svg +1 -0
- package/assets/img/widget/records.svg +1 -0
- package/assets/img/widget/share-link.png +0 -0
- package/assets/img/widget/share.svg +13 -0
- package/assets/img/widget/share2.svg +19 -0
- package/assets/img/widget/star.svg +9 -0
- package/assets/img/widget/tieba.svg +1 -0
- package/assets/img/widget/unstar.svg +21 -0
- package/assets/img/widget/web_heart_animation.png +0 -0
- package/assets/img/widget/weibo.svg +1 -0
- package/assets/img/widget/weixin.svg +1 -0
- package/assets/js/a.js +46 -0
- package/assets/js/app.js +7 -0
- package/assets/js/code.js +13 -0
- package/assets/js/combo.js +40 -0
- package/assets/js/directory.js +114 -0
- package/assets/js/filter2.js +186 -0
- package/assets/js/fold.js +11 -0
- package/assets/js/gallery.js +14 -0
- package/assets/js/hljs_languages.js +177 -0
- package/assets/js/iframe.js +38 -0
- package/assets/js/img.js +23 -0
- package/assets/js/item/attribute_percent.js +88 -0
- package/assets/js/item/bind.js +18 -0
- package/assets/js/item/border.js +19 -0
- package/assets/js/item/border_quest.js +12 -0
- package/assets/js/item/color.js +25 -0
- package/assets/js/item/hljs_languages.js +177 -0
- package/assets/js/item/icon_url.js +15 -0
- package/assets/js/item/second_format.js +19 -0
- package/assets/js/jx3_element.js +73 -0
- package/assets/js/katex.js +181 -0
- package/assets/js/macro.js +16 -0
- package/assets/js/nextpage.js +4 -0
- package/assets/js/pswp.js +67 -0
- package/assets/js/pswp_template.js +66 -0
- package/assets/js/pz_iframe.js +30 -0
- package/assets/js/qixue.js +28 -0
- package/assets/js/renderImgPreview.js +18 -0
- package/assets/js/script.js +6 -0
- package/assets/js/stat.js +107 -0
- package/assets/js/talent2.js +21 -0
- package/assets/js/tex-mml-chtml.js +36310 -0
- package/assets/js/voice.js +238 -0
- package/assets/js/xss.js +130 -0
- package/babel.config.js +3 -0
- package/docs/README.md +78 -0
- package/i18n/index.js +134 -0
- package/i18n/messages/en-US.js +124 -0
- package/i18n/messages/vi.js +124 -0
- package/i18n/messages/zh-CN.js +124 -0
- package/i18n/messages/zh-TW.js +124 -0
- package/i18n/mixin.js +23 -0
- package/index.js +73 -0
- package/package.json +97 -0
- package/postcss.config.js +3 -0
- package/service/admin.js +20 -0
- package/service/author.js +94 -0
- package/service/breadcrumb.js +13 -0
- package/service/cms.js +137 -0
- package/service/comment.js +187 -0
- package/service/database.js +115 -0
- package/service/design.js +13 -0
- package/service/enum/CollectionPublic.js +13 -0
- package/service/enum/EquipPosition.js +48 -0
- package/service/enum/EquipType.js +33 -0
- package/service/fav.js +27 -0
- package/service/follow.js +55 -0
- package/service/github.js +15 -0
- package/service/header.js +42 -0
- package/service/item.js +22 -0
- package/service/resource.js +31 -0
- package/service/suspend.js +81 -0
- package/service/thx.js +60 -0
- package/src/App.vue +212 -0
- package/src/Bottom.vue +23 -0
- package/src/Box.vue +149 -0
- package/src/Breadcrumb.vue +141 -0
- package/src/CommonFooter.vue +69 -0
- package/src/CommonHeader.vue +270 -0
- package/src/Footer.vue +45 -0
- package/src/LeftSideToggle.vue +64 -0
- package/src/LeftSidebar.vue +123 -0
- package/src/Main.vue +48 -0
- package/src/RightSidebar.vue +61 -0
- package/src/SuspendCommon.vue +705 -0
- package/src/author/AuthorFans.vue +170 -0
- package/src/author/AuthorFollow.vue +205 -0
- package/src/author/AuthorGift.vue +286 -0
- package/src/author/AuthorHonor.vue +128 -0
- package/src/author/AuthorInfo.vue +245 -0
- package/src/author/AuthorLink.vue +113 -0
- package/src/author/AuthorMedals.vue +87 -0
- package/src/author/AuthorMsg.vue +25 -0
- package/src/author/AuthorPosts.vue +114 -0
- package/src/author/AuthorRss.vue +160 -0
- package/src/author/AuthorTeams.vue +106 -0
- package/src/author/Avatar.vue +168 -0
- package/src/author/UserPop.vue +198 -0
- package/src/bread/Admin.vue +400 -0
- package/src/bread/AdminButton.vue +31 -0
- package/src/bread/AdminDirectMessage.vue +73 -0
- package/src/bread/AdminDrop.vue +155 -0
- package/src/bread/Crumb.vue +27 -0
- package/src/bread/DesignTask.vue +194 -0
- package/src/comment/Avatar.vue +124 -0
- package/src/comment/CommentContent.vue +486 -0
- package/src/comment/CommentContentSimple.vue +240 -0
- package/src/comment/CommentInputForm.vue +182 -0
- package/src/comment/CommentWithReply.vue +261 -0
- package/src/comment/QuickReply.vue +64 -0
- package/src/comment/ReplyForReply.vue +127 -0
- package/src/comment/ReplyItem.vue +92 -0
- package/src/comment/ReplyList.vue +126 -0
- package/src/comment/Upload.vue +108 -0
- package/src/editor/Article.vue +230 -0
- package/src/editor/BoxResource.vue +441 -0
- package/src/editor/Resource.vue +623 -0
- package/src/editor/Tinymce.vue +204 -0
- package/src/editor/Upload.vue +277 -0
- package/src/editor/UploadAlum.vue +176 -0
- package/src/editor/UploadBanner.vue +156 -0
- package/src/editor/components/Author.vue +322 -0
- package/src/editor/components/Avatar.vue +95 -0
- package/src/editor/components/Buff.vue +80 -0
- package/src/editor/components/Combo.vue +259 -0
- package/src/editor/components/Equip.vue +299 -0
- package/src/editor/components/GameText.vue +242 -0
- package/src/editor/components/Item.vue +325 -0
- package/src/editor/components/ItemSimple.vue +134 -0
- package/src/editor/components/Medal.vue +43 -0
- package/src/editor/components/Npc.vue +215 -0
- package/src/editor/components/PostAuthor.vue +102 -0
- package/src/editor/components/Skill.vue +71 -0
- package/src/filters/clientBy.vue +96 -0
- package/src/filters/markBy.vue +177 -0
- package/src/filters/menuBy.vue +63 -0
- package/src/filters/orderBy.vue +170 -0
- package/src/filters/tagBy.vue +171 -0
- package/src/filters/topicBy.vue +151 -0
- package/src/filters/versionBy.vue +49 -0
- package/src/filters/zlpBy.vue +70 -0
- package/src/footer/copyright.vue +59 -0
- package/src/footer/links.vue +79 -0
- package/src/footer/official.vue +142 -0
- package/src/footer/resource.vue +146 -0
- package/src/header/alternate.vue +299 -0
- package/src/header/asset.vue +180 -0
- package/src/header/box.vue +161 -0
- package/src/header/box2.vue +479 -0
- package/src/header/bus.js +9 -0
- package/src/header/client.vue +183 -0
- package/src/header/lang.vue +136 -0
- package/src/header/logo.vue +95 -0
- package/src/header/manage.vue +200 -0
- package/src/header/message.vue +93 -0
- package/src/header/nav.vue +356 -0
- package/src/header/publish.vue +38 -0
- package/src/header/search.vue +120 -0
- package/src/header/search_map.json +3 -0
- package/src/header/shop.vue +121 -0
- package/src/header/user.vue +250 -0
- package/src/header/userInfo.vue +621 -0
- package/src/header/utils.js +126 -0
- package/src/header/vip.vue +120 -0
- package/src/interact/BoxcoinAdmin.vue +185 -0
- package/src/interact/BoxcoinRecords.vue +153 -0
- package/src/interact/BoxcoinUser.vue +194 -0
- package/src/interact/Contributors.vue +111 -0
- package/src/interact/Fav.vue +95 -0
- package/src/interact/Like.vue +61 -0
- package/src/interact/Rss.vue +163 -0
- package/src/interact/Share.vue +166 -0
- package/src/interact/WatchLater.vue +108 -0
- package/src/main.js +72 -0
- package/src/single/Author.vue +72 -0
- package/src/single/Collection.vue +176 -0
- package/src/single/Comment.vue +454 -0
- package/src/single/Creators.vue +214 -0
- package/src/single/PostDirectory.vue +147 -0
- package/src/single/PostHeader.vue +397 -0
- package/src/single/PostTopic.vue +127 -0
- package/src/single/SimpleThx.vue +217 -0
- package/src/single/Thx.vue +260 -0
- package/src/single/cms-single.vue +235 -0
- package/tailwind.config.js +13 -0
- package/utils/bus.js +5 -0
- package/utils/emotion.js +21 -0
- package/utils/index.js +36 -0
- package/vue.config.js +158 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-jx3box-reply">
|
|
3
|
+
<el-popover
|
|
4
|
+
:visible-arrow="true"
|
|
5
|
+
placement="top"
|
|
6
|
+
ref="quickReply"
|
|
7
|
+
trigger="click"
|
|
8
|
+
popper-class="c-jx3box-reply-pop"
|
|
9
|
+
>
|
|
10
|
+
<div class="c-jx3box-reply-pop__content">
|
|
11
|
+
<el-icon class="u-close" @click="closePop"><Close></Close></el-icon>
|
|
12
|
+
<div class="u-title">快捷回复</div>
|
|
13
|
+
<div class="m-reply-list">
|
|
14
|
+
<div
|
|
15
|
+
class="m-reply-list__item"
|
|
16
|
+
v-for="(item, index) in replyTemplate"
|
|
17
|
+
:key="index"
|
|
18
|
+
@click="reply(item)"
|
|
19
|
+
>
|
|
20
|
+
{{ item }}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<template #reference>
|
|
25
|
+
<img
|
|
26
|
+
class="u-reference"
|
|
27
|
+
width="24"
|
|
28
|
+
height="24"
|
|
29
|
+
src="../../assets/img/comment/comment.svg"
|
|
30
|
+
alt="comment"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
</el-popover>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import replyTemplate from "../../assets/data/reply_template.json";
|
|
39
|
+
export default {
|
|
40
|
+
name: "QuickReply",
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
replyTemplate,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
emits: ["reply"],
|
|
47
|
+
methods: {
|
|
48
|
+
// 关闭弹窗
|
|
49
|
+
closePop() {
|
|
50
|
+
if (this.$refs.quickReply) {
|
|
51
|
+
this.$refs.quickReply.doClose();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
reply(item) {
|
|
55
|
+
this.$emit("reply", item);
|
|
56
|
+
this.closePop();
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style lang="less">
|
|
63
|
+
@import "../../assets/css/comment/quick-reply.less";
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form ref="form" class="c-comment-subbox">
|
|
3
|
+
<div class="u-subbox-label">
|
|
4
|
+
回复
|
|
5
|
+
<el-link type="primary" target="_blank" :href="userHref"
|
|
6
|
+
>@{{ username }}</el-link
|
|
7
|
+
>
|
|
8
|
+
:
|
|
9
|
+
</div>
|
|
10
|
+
<el-form-item>
|
|
11
|
+
<el-input
|
|
12
|
+
type="textarea"
|
|
13
|
+
v-model="content"
|
|
14
|
+
:id="'id' + inputId"
|
|
15
|
+
placeholder="输入回复..."
|
|
16
|
+
></el-input>
|
|
17
|
+
</el-form-item>
|
|
18
|
+
<el-form-item>
|
|
19
|
+
<div class="c-comment-tools">
|
|
20
|
+
<el-icon class="u-upload-icon" @click="showUploader = !showUploader"><Picture /></el-icon>
|
|
21
|
+
<Emotion
|
|
22
|
+
class="c-comment-emotion"
|
|
23
|
+
@selected="handleEmotionSelected"
|
|
24
|
+
type="pop"
|
|
25
|
+
:max="6">
|
|
26
|
+
</Emotion>
|
|
27
|
+
</div>
|
|
28
|
+
<Uploader
|
|
29
|
+
v-if="showUploader"
|
|
30
|
+
ref="uploader"
|
|
31
|
+
@onFinish="attachmentUploadFinish"
|
|
32
|
+
@onError="attachmentUploadError"
|
|
33
|
+
/>
|
|
34
|
+
</el-form-item>
|
|
35
|
+
<el-form-item>
|
|
36
|
+
<el-button
|
|
37
|
+
size="small"
|
|
38
|
+
type="primary"
|
|
39
|
+
@click="submitReply"
|
|
40
|
+
:disabled="disableSubmitBtn"
|
|
41
|
+
>提交</el-button
|
|
42
|
+
>
|
|
43
|
+
<el-button size="small" link @click="hideForm()"
|
|
44
|
+
>收起</el-button
|
|
45
|
+
>
|
|
46
|
+
</el-form-item>
|
|
47
|
+
</el-form>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import Uploader from "./Upload.vue";
|
|
52
|
+
import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue";
|
|
53
|
+
export default {
|
|
54
|
+
props: ["username", "userHref", "currentId"],
|
|
55
|
+
data: function () {
|
|
56
|
+
return {
|
|
57
|
+
content: "",
|
|
58
|
+
showUploader: false,
|
|
59
|
+
disableSubmitBtn: false,
|
|
60
|
+
inputId: "",
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
components: {
|
|
64
|
+
Uploader,
|
|
65
|
+
Emotion,
|
|
66
|
+
},
|
|
67
|
+
mounted() {
|
|
68
|
+
if (this.currentId) this.inputId = this.currentId;
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
submitReply() {
|
|
72
|
+
this.disableSubmitBtn = true;
|
|
73
|
+
if (this.$refs.uploader) {
|
|
74
|
+
this.$refs.uploader.upload();
|
|
75
|
+
} else {
|
|
76
|
+
this.attachmentUploadFinish([]);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
hideForm() {
|
|
80
|
+
this.$emit("hideForm");
|
|
81
|
+
},
|
|
82
|
+
attachmentUploadFinish(data) {
|
|
83
|
+
this.disableSubmitBtn = false;
|
|
84
|
+
this.$emit("doReply", {
|
|
85
|
+
content: this.content,
|
|
86
|
+
attachmentList: data,
|
|
87
|
+
});
|
|
88
|
+
this.content = "";
|
|
89
|
+
this.showUploader = false;
|
|
90
|
+
},
|
|
91
|
+
attachmentUploadError() {
|
|
92
|
+
this.disableSubmitBtn = false;
|
|
93
|
+
},
|
|
94
|
+
async handleEmotionSelected(emotion) {
|
|
95
|
+
const myField = document.querySelector(`#id${this.inputId}`);
|
|
96
|
+
const value = emotion.key;
|
|
97
|
+
if (myField.selectionStart || myField.selectionStart === 0) {
|
|
98
|
+
let startPos = myField.selectionStart;
|
|
99
|
+
let endPos = myField.selectionEnd;
|
|
100
|
+
|
|
101
|
+
this.content =
|
|
102
|
+
myField.value.substring(0, startPos) +
|
|
103
|
+
value +
|
|
104
|
+
myField.value.substring(endPos, myField.value.length);
|
|
105
|
+
|
|
106
|
+
await this.$nextTick();
|
|
107
|
+
|
|
108
|
+
myField.focus();
|
|
109
|
+
myField.setSelectionRange(
|
|
110
|
+
endPos + value.length,
|
|
111
|
+
endPos + value.length
|
|
112
|
+
);
|
|
113
|
+
} else {
|
|
114
|
+
this.content = value;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style lang="less">
|
|
122
|
+
.c-comment {
|
|
123
|
+
.u-subbox-label {
|
|
124
|
+
margin-bottom: 10px;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-row>
|
|
3
|
+
<!--用户头像-->
|
|
4
|
+
<CommentAvatar
|
|
5
|
+
:user-avatar="showAvatar(reply.avatar)"
|
|
6
|
+
:user-href="profileLink(reply.userId)"
|
|
7
|
+
:username="reply.displayName"
|
|
8
|
+
:avatarFrame="reply.user_avatar_frame"
|
|
9
|
+
:avatarSize="36"
|
|
10
|
+
/>
|
|
11
|
+
<!--评论主体内容-->
|
|
12
|
+
<CommentContentSimple
|
|
13
|
+
:comment-id="reply.id"
|
|
14
|
+
:date="reply.commentDate"
|
|
15
|
+
:content="reply.content"
|
|
16
|
+
:attachments="stringToArray(reply.attachments)"
|
|
17
|
+
:can-delete="power.can_del || power.uid == reply.userId"
|
|
18
|
+
:can-hide="power.is_author == 1 || power.is_editor == 1"
|
|
19
|
+
:can-reply="power.uid != reply.userId"
|
|
20
|
+
:user-href="profileLink(reply.replyForUID)"
|
|
21
|
+
:reply-for-username="reply.replyForUsername"
|
|
22
|
+
:reply-for-user-id="reply.replyForUID"
|
|
23
|
+
:is-like="reply.is_likes == 1"
|
|
24
|
+
:likes="~~reply.likes"
|
|
25
|
+
@delete="deleteReply"
|
|
26
|
+
@showReplyInput="showReplyForReplyFrom = !showReplyForReplyFrom"
|
|
27
|
+
@setLikeComment="setLikeComment"
|
|
28
|
+
@hide="hideReply"
|
|
29
|
+
/>
|
|
30
|
+
<!--隐藏起来的回复评论的评论表单-->
|
|
31
|
+
<ReplyForReply
|
|
32
|
+
v-if="showReplyForReplyFrom"
|
|
33
|
+
:username="reply.displayName"
|
|
34
|
+
:user-href="profileLink(reply.userId)"
|
|
35
|
+
:current-id="reply.id"
|
|
36
|
+
@hideForm="showReplyForReplyFrom = false"
|
|
37
|
+
@doReply="doReply"
|
|
38
|
+
/>
|
|
39
|
+
</el-row>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
|
|
44
|
+
import CommentContentSimple from "./CommentContentSimple.vue";
|
|
45
|
+
import ReplyForReply from "./ReplyForReply.vue";
|
|
46
|
+
import CommentAvatar from "./Avatar.vue";
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
props: ["reply", "power"],
|
|
50
|
+
components: {
|
|
51
|
+
CommentAvatar,
|
|
52
|
+
CommentContentSimple,
|
|
53
|
+
ReplyForReply,
|
|
54
|
+
},
|
|
55
|
+
backReplyList: [],
|
|
56
|
+
data: function () {
|
|
57
|
+
return {
|
|
58
|
+
showReplyForReplyFrom: false,
|
|
59
|
+
decoration: "",
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
profileLink: function (uid) {
|
|
64
|
+
return authorLink(uid);
|
|
65
|
+
},
|
|
66
|
+
stringToArray: function (str) {
|
|
67
|
+
if (!str) {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
return JSON.parse(str);
|
|
71
|
+
},
|
|
72
|
+
showAvatar: function (val) {
|
|
73
|
+
return showAvatar(val, 84);
|
|
74
|
+
},
|
|
75
|
+
deleteReply(id) {
|
|
76
|
+
this.$emit("deleteReply", id);
|
|
77
|
+
},
|
|
78
|
+
hideReply(id) {
|
|
79
|
+
this.$emit("hide", id);
|
|
80
|
+
},
|
|
81
|
+
setLikeComment(setLike) {
|
|
82
|
+
this.$emit("setLikeComment", this.reply.id, setLike);
|
|
83
|
+
},
|
|
84
|
+
doReply(replyData) {
|
|
85
|
+
(replyData.replyForUID = this.reply.userId),
|
|
86
|
+
(replyData.replyForCommentId = this.reply.id),
|
|
87
|
+
this.$emit("addReply", replyData);
|
|
88
|
+
this.showReplyForReplyFrom = false;
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-comment-replylist" v-if="data.length">
|
|
3
|
+
<reply-item
|
|
4
|
+
class="c-comment-reply"
|
|
5
|
+
v-for="reply in data"
|
|
6
|
+
:key="reply.id"
|
|
7
|
+
:reply="reply"
|
|
8
|
+
:power="power"
|
|
9
|
+
@deleteReply="deleteReply"
|
|
10
|
+
@addReply="addReply"
|
|
11
|
+
@setLikeComment="setLikeComment"
|
|
12
|
+
@hide="hideReply"
|
|
13
|
+
/>
|
|
14
|
+
<!-- 分页 -->
|
|
15
|
+
<el-row v-if="data.length >= 3 || showPager">
|
|
16
|
+
<el-col :span="4">
|
|
17
|
+
<el-button link v-show="showPager" @click="showLess()">收起</el-button>
|
|
18
|
+
<el-button link v-show="!showPager" @click="showMore()">查看更多</el-button>
|
|
19
|
+
</el-col>
|
|
20
|
+
<el-col :span="20" class="c-comment-reply-pages">
|
|
21
|
+
<el-pagination
|
|
22
|
+
v-show="showPager"
|
|
23
|
+
size="small"
|
|
24
|
+
@current-change="handleCurrentChange"
|
|
25
|
+
:current-page="pager.index"
|
|
26
|
+
:page-size="pager.pageSize"
|
|
27
|
+
layout="total, prev, pager, next"
|
|
28
|
+
:total="pager.total"
|
|
29
|
+
></el-pagination>
|
|
30
|
+
</el-col>
|
|
31
|
+
</el-row>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import ReplyItem from "./ReplyItem.vue";
|
|
37
|
+
export default {
|
|
38
|
+
props: ["data", "power", "pager"],
|
|
39
|
+
components: {
|
|
40
|
+
ReplyItem,
|
|
41
|
+
},
|
|
42
|
+
data: function () {
|
|
43
|
+
return {
|
|
44
|
+
showPager: false,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
emits: ["goto", "resetReply", "deleteReply", "addNewReply", "setLikeComment", "hide"],
|
|
48
|
+
methods: {
|
|
49
|
+
showMore() {
|
|
50
|
+
this.showPager = true;
|
|
51
|
+
this.$emit("goto", 1);
|
|
52
|
+
},
|
|
53
|
+
showLess() {
|
|
54
|
+
this.showPager = false;
|
|
55
|
+
this.$emit("resetReply");
|
|
56
|
+
},
|
|
57
|
+
handleCurrentChange(gotoIndex) {
|
|
58
|
+
this.$emit("goto", gotoIndex);
|
|
59
|
+
},
|
|
60
|
+
deleteReply(id) {
|
|
61
|
+
this.$emit("deleteReply", id);
|
|
62
|
+
},
|
|
63
|
+
hideReply(id) {
|
|
64
|
+
this.$emit("hide", id);
|
|
65
|
+
},
|
|
66
|
+
setLikeComment(id, isLike) {
|
|
67
|
+
this.$emit("setLikeComment", id, isLike);
|
|
68
|
+
},
|
|
69
|
+
addReply(data) {
|
|
70
|
+
this.$emit("addNewReply", data);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="less">
|
|
77
|
+
.c-comment-replylist {
|
|
78
|
+
padding: 10px 0 10px 68px;
|
|
79
|
+
border-top: 1px dashed #eee;
|
|
80
|
+
}
|
|
81
|
+
.c-comment-reply {
|
|
82
|
+
padding-top: 5px;
|
|
83
|
+
background-size: cover;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
&:not(:last-of-type) {
|
|
86
|
+
border-bottom: 1px dashed #eee;
|
|
87
|
+
padding-bottom: 10px;
|
|
88
|
+
margin-bottom: 10px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.c-comment-avatar {
|
|
92
|
+
margin-right: 10px;
|
|
93
|
+
width: auto;
|
|
94
|
+
}
|
|
95
|
+
.u-avatar {
|
|
96
|
+
float: left;
|
|
97
|
+
}
|
|
98
|
+
.u-avatar-pic {
|
|
99
|
+
// width: 28px;
|
|
100
|
+
// height: 28px;
|
|
101
|
+
margin-right: 10px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.u-name {
|
|
105
|
+
font-size: 12px;
|
|
106
|
+
line-height: 28px;
|
|
107
|
+
padding: 0 !important;
|
|
108
|
+
display: inline;
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.u-reply {
|
|
113
|
+
padding: 5px;
|
|
114
|
+
line-height: 1.715;
|
|
115
|
+
.u-attachements {
|
|
116
|
+
margin-top: 10px;
|
|
117
|
+
.el-image {
|
|
118
|
+
margin-right: 20px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.c-comment-reply-pages {
|
|
124
|
+
padding: 7px 0;
|
|
125
|
+
}
|
|
126
|
+
</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-upload
|
|
4
|
+
action="https://cms.jx3box.com/api/cms/upload"
|
|
5
|
+
ref="upload"
|
|
6
|
+
list-type="picture-card"
|
|
7
|
+
:on-preview="handlePictureCardPreview"
|
|
8
|
+
:auto-upload="false"
|
|
9
|
+
:file-list="fileList"
|
|
10
|
+
:limit="maxCount"
|
|
11
|
+
:accept="acceptedExtensions.reduce((acc, cur) => acc + `.${cur},`, '')"
|
|
12
|
+
multiple
|
|
13
|
+
with-credentials
|
|
14
|
+
:on-exceed="onExceed"
|
|
15
|
+
:on-change="onChange"
|
|
16
|
+
:on-success="onSuccess"
|
|
17
|
+
:on-error="onError"
|
|
18
|
+
>
|
|
19
|
+
<el-icon><Plus></Plus></el-icon>
|
|
20
|
+
<template #tip>
|
|
21
|
+
<div class="el-upload__tip">
|
|
22
|
+
最多上传 {{ maxCount }} 张
|
|
23
|
+
{{ acceptedExtensions.join(" / ").toUpperCase() }} 格式图片,单张图片不能超过
|
|
24
|
+
{{ maxSize / 1024 / 1024 }} MB
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
</el-upload>
|
|
28
|
+
<el-dialog v-model="dialogVisible">
|
|
29
|
+
<img width="60%" :src="dialogImageUrl" alt />
|
|
30
|
+
</el-dialog>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
export default {
|
|
36
|
+
name: "CommentUploader",
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
dialogImageUrl: "",
|
|
40
|
+
dialogVisible: false,
|
|
41
|
+
fileList: [],
|
|
42
|
+
successList: [],
|
|
43
|
+
|
|
44
|
+
acceptedExtensions: ["jpg", "jpeg", "png", "gif"],
|
|
45
|
+
maxCount: 5,
|
|
46
|
+
maxSize: 2 * 1024 * 1024,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
emits: ["onFinish", "onError"],
|
|
50
|
+
methods: {
|
|
51
|
+
handlePictureCardPreview(file) {
|
|
52
|
+
this.dialogImageUrl = file.url;
|
|
53
|
+
this.dialogVisible = true;
|
|
54
|
+
},
|
|
55
|
+
onExceed() {
|
|
56
|
+
this.$notify({
|
|
57
|
+
title: "",
|
|
58
|
+
message: `最多上传 ${this.maxCount} 张图片!`,
|
|
59
|
+
type: "error",
|
|
60
|
+
duration: 3000,
|
|
61
|
+
position: "bottom-right",
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
onChange(file, fileList) {
|
|
65
|
+
if (file.status == "ready") {
|
|
66
|
+
if (file.size > this.maxSize) {
|
|
67
|
+
this.$notify({
|
|
68
|
+
title: "",
|
|
69
|
+
message: `单张图片大小不能超过 ${this.maxSize / 1024 / 1024} MB!`,
|
|
70
|
+
type: "error",
|
|
71
|
+
duration: 3000,
|
|
72
|
+
position: "bottom-right",
|
|
73
|
+
});
|
|
74
|
+
fileList.pop();
|
|
75
|
+
} else {
|
|
76
|
+
this.fileList = fileList;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
upload() {
|
|
81
|
+
if (this.fileList.length > 0) {
|
|
82
|
+
this.$refs.upload.submit();
|
|
83
|
+
} else {
|
|
84
|
+
this.$emit("onFinish", []);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
onSuccess(response) {
|
|
88
|
+
this.successList = this.successList.concat(response.data);
|
|
89
|
+
if (this.successList.length == this.fileList.length) {
|
|
90
|
+
this.$emit("onFinish", this.successList || []);
|
|
91
|
+
this.fileList = [];
|
|
92
|
+
this.successList = [];
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
onError() {
|
|
96
|
+
this.$notify({
|
|
97
|
+
title: "",
|
|
98
|
+
message: "图片上传失败!",
|
|
99
|
+
type: "error",
|
|
100
|
+
duration: 3000,
|
|
101
|
+
position: "bottom-right",
|
|
102
|
+
});
|
|
103
|
+
this.$emit("onError");
|
|
104
|
+
this.fileList = [];
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
</script>
|