From ab52f8b18fe9060a93088851ec794390ddfe85bc Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 20 Apr 2023 14:17:21 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=88=B7=E6=96=B0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=8C=89=E9=92=AE=EF=BC=8C=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E6=98=93=E7=94=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/menu/index.vue | 93 +++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 323126c2..95e71b5c 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -5,27 +5,27 @@ - 搜索 - 重置 - - 新增 + + + 搜索 - - 展开/折叠 + + + 重置 + + + + 新增 + + + + 展开/折叠 + + + + 刷新菜单缓存 @@ -56,50 +68,50 @@ - - + + - - - - - + + + + + - + - diff --git a/src/views/mp/components/wx-reply/components/TabMusic.vue b/src/views/mp/components/wx-reply/components/TabMusic.vue index 2c3b04e5..b19fb592 100644 --- a/src/views/mp/components/wx-reply/components/TabMusic.vue +++ b/src/views/mp/components/wx-reply/components/TabMusic.vue @@ -1,14 +1,11 @@ diff --git a/src/views/mp/components/wx-reply/components/TabNews.vue b/src/views/mp/components/wx-reply/components/TabNews.vue index bb9272e7..88a82a53 100644 --- a/src/views/mp/components/wx-reply/components/TabNews.vue +++ b/src/views/mp/components/wx-reply/components/TabNews.vue @@ -1,11 +1,8 @@ diff --git a/src/views/mp/components/wx-reply/components/TabText.vue b/src/views/mp/components/wx-reply/components/TabText.vue index bd7b0187..aac698e8 100644 --- a/src/views/mp/components/wx-reply/components/TabText.vue +++ b/src/views/mp/components/wx-reply/components/TabText.vue @@ -1,15 +1,10 @@ diff --git a/src/views/mp/components/wx-reply/components/TabVoice.vue b/src/views/mp/components/wx-reply/components/TabVoice.vue index 6d40a052..c4868cf8 100644 --- a/src/views/mp/components/wx-reply/components/TabVoice.vue +++ b/src/views/mp/components/wx-reply/components/TabVoice.vue @@ -1,12 +1,9 @@ diff --git a/src/views/mp/components/wx-reply/components/types.ts b/src/views/mp/components/wx-reply/components/types.ts index d5273334..3e07d6e5 100644 --- a/src/views/mp/components/wx-reply/components/types.ts +++ b/src/views/mp/components/wx-reply/components/types.ts @@ -1,25 +1,54 @@ -type ReplyType = '' | 'news' | 'image' | 'voice' | 'video' | 'music' | 'text' +enum ReplyType { + News = 'news', + Image = 'image', + Voice = 'voice', + Video = 'video', + Music = 'music', + Text = 'text' +} -interface ObjData { +interface _Reply { accountId: number type: ReplyType - name: string | null - content: string | null - mediaId: string | null - url: string | null - title: string | null - description: string | null - thumbMediaId: string | null - thumbMediaUrl: string | null - musicUrl: string | null - hqMusicUrl: string | null - introduction: string | null - articles: any[] + name?: string | null + content?: string | null + mediaId?: string | null + url?: string | null + title?: string | null + description?: string | null + thumbMediaId?: string | null + thumbMediaUrl?: string | null + musicUrl?: string | null + hqMusicUrl?: string | null + introduction?: string | null + articles?: any[] } +type Reply = _Reply //Partial<_Reply> + enum NewsType { Published = '1', Draft = '2' } -export { ObjData, NewsType } +/** 利用旧的reply[accountId, type]初始化新的Reply */ +const createEmptyReply = (old: Reply | Ref): Reply => { + return { + accountId: unref(old).accountId, + type: unref(old).type, + name: null, + content: null, + mediaId: null, + url: null, + title: null, + description: null, + thumbMediaId: null, + thumbMediaUrl: null, + musicUrl: null, + hqMusicUrl: null, + introduction: null, + articles: [] + } +} + +export { Reply, NewsType, ReplyType, createEmptyReply } diff --git a/src/views/mp/components/wx-reply/index.ts b/src/views/mp/components/wx-reply/index.ts new file mode 100644 index 00000000..d1da217e --- /dev/null +++ b/src/views/mp/components/wx-reply/index.ts @@ -0,0 +1,7 @@ +import { Reply, NewsType, ReplyType, createEmptyReply } from './components/types' + +import WxReplySelect from './main.vue' + +export type { Reply } +export { createEmptyReply, NewsType, ReplyType } +export default WxReplySelect diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue index b00e4345..32a31222 100644 --- a/src/views/mp/components/wx-reply/main.vue +++ b/src/views/mp/components/wx-reply/main.vue @@ -8,24 +8,59 @@ ④ 支持发送【视频】消息时,支持新建视频 --> diff --git a/src/views/mp/components/wx-msg/card.scss b/src/views/mp/components/wx-msg/card.scss index 67ac9219..7fbbe802 100644 --- a/src/views/mp/components/wx-msg/card.scss +++ b/src/views/mp/components/wx-msg/card.scss @@ -1,25 +1,27 @@ -.avue-card{ - &__item{ +.avue-card { + &__item { margin-bottom: 16px; border: 1px solid #e8e8e8; background-color: #fff; box-sizing: border-box; - color: rgba(0,0,0,.65); + color: rgba(0, 0, 0, 0.65); font-size: 14px; font-variant: tabular-nums; line-height: 1.5; list-style: none; - font-feature-settings: "tnum"; + font-feature-settings: 'tnum'; cursor: pointer; - height:200px; - &:hover{ - border-color: rgba(0,0,0,.09); - box-shadow: 0 2px 8px rgba(0,0,0,.09); + height: 200px; + + &:hover { + border-color: rgba(0, 0, 0, 0.09); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09); } - &--add{ - border:1px dashed #000; + + &--add { + border: 1px dashed #000; width: 100%; - color: rgba(0,0,0,.45); + color: rgba(0, 0, 0, 0.45); background-color: #fff; border-color: #d9d9d9; border-radius: 2px; @@ -27,74 +29,87 @@ align-items: center; justify-content: center; font-size: 16px; - i{ + + i { margin-right: 10px; } - &:hover{ + + &:hover { color: #40a9ff; background-color: #fff; border-color: #40a9ff; } } } - &__body{ + + &__body { display: flex; padding: 24px; } - &__detail{ - flex:1 + + &__detail { + flex: 1; } - &__avatar{ + + &__avatar { width: 48px; height: 48px; border-radius: 48px; overflow: hidden; margin-right: 12px; - img{ + + img { width: 100%; height: 100%; } } - &__title{ - color: rgba(0,0,0,.85); + + &__title { + color: rgba(0, 0, 0, 0.85); margin-bottom: 12px; font-size: 16px; - &:hover{ - color:#1890ff; + + &:hover { + color: #1890ff; } } - &__info{ - color: rgba(0,0,0,.45); + + &__info { + color: rgba(0, 0, 0, 0.45); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; height: 64px; } - &__menu{ + + &__menu { display: flex; - justify-content:space-around; + justify-content: space-around; height: 50px; background: #f7f9fa; - color: rgba(0,0,0,.45); + color: rgba(0, 0, 0, 0.45); text-align: center; line-height: 50px; - &:hover{ - color:#1890ff; + + &:hover { + color: #1890ff; } } } /** joolun 额外加的 */ .avue-comment__main { - flex: unset!important; - border-radius: 5px!important; - margin: 0 8px!important; + flex: unset !important; + border-radius: 5px !important; + margin: 0 8px !important; } + .avue-comment__header { border-top-left-radius: 5px; border-top-right-radius: 5px; } + .avue-comment__body { border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; diff --git a/src/views/mp/components/wx-msg/comment.scss b/src/views/mp/components/wx-msg/comment.scss index 3f1341b2..aaeaccaf 100644 --- a/src/views/mp/components/wx-msg/comment.scss +++ b/src/views/mp/components/wx-msg/comment.scss @@ -1,27 +1,33 @@ /* 来自 https://github.com/nmxiaowei/avue/blob/master/styles/src/element-ui/comment.scss */ -.avue-comment{ +.avue-comment { margin-bottom: 30px; display: flex; align-items: flex-start; - &--reverse{ - flex-direction:row-reverse; - .avue-comment__main{ - &:before,&:after{ + + &--reverse { + flex-direction: row-reverse; + + .avue-comment__main { + &:before, + &:after { left: auto; right: -8px; border-width: 8px 0 8px 8px; } - &:before{ + + &:before { border-left-color: #dedede; } - &:after{ + + &:after { border-left-color: #f8f8f8; margin-right: 1px; margin-left: auto; } } } - &__avatar{ + + &__avatar { width: 48px; height: 48px; border-radius: 50%; @@ -29,7 +35,8 @@ box-sizing: border-box; vertical-align: middle; } - &__header{ + + &__header { padding: 5px 15px; background: #f8f8f8; border-bottom: 1px solid #eee; @@ -37,18 +44,22 @@ align-items: center; justify-content: space-between; } - &__author{ + + &__author { font-weight: 700; font-size: 14px; color: #999; } - &__main{ - flex:1; + + &__main { + flex: 1; margin: 0 20px; position: relative; border: 1px solid #dedede; border-radius: 2px; - &:before,&:after{ + + &:before, + &:after { position: absolute; top: 10px; left: -8px; @@ -56,32 +67,39 @@ width: 0; height: 0; display: block; - content: " "; + content: ' '; border-color: transparent; border-style: solid solid outset; border-width: 8px 8px 8px 0; pointer-events: none; } + &:before { border-right-color: #dedede; z-index: 1; } - &:after{ + + &:after { border-right-color: #f8f8f8; margin-left: 1px; z-index: 2; } } - &__body{ + + &__body { padding: 15px; overflow: hidden; background: #fff; - font-family: Segoe UI,Lucida Grande,Helvetica,Arial,Microsoft YaHei,FreeSans,Arimo,Droid Sans,wenquanyi micro hei,Hiragino Sans GB,Hiragino Sans GB W3,FontAwesome,sans-serif;color: #333; + font-family: Segoe UI, Lucida Grande, Helvetica, Arial, Microsoft YaHei, FreeSans, Arimo, + Droid Sans, wenquanyi micro hei, Hiragino Sans GB, Hiragino Sans GB W3, FontAwesome, + sans-serif; + color: #333; font-size: 14px; } - blockquote{ - margin:0; - font-family: Georgia,Times New Roman,Times,Kai,Kaiti SC,KaiTi,BiauKai,FontAwesome,serif; + + blockquote { + margin: 0; + font-family: Georgia, Times New Roman, Times, Kai, Kaiti SC, KaiTi, BiauKai, FontAwesome, serif; padding: 1px 0 1px 15px; border-left: 4px solid #ddd; } diff --git a/src/views/mp/components/wx-music/main.vue b/src/views/mp/components/wx-music/main.vue index 52555f15..70f4c58b 100644 --- a/src/views/mp/components/wx-music/main.vue +++ b/src/views/mp/components/wx-music/main.vue @@ -56,5 +56,5 @@ defineExpose({ diff --git a/src/views/mp/components/wx-reply/components/TabImage.vue b/src/views/mp/components/wx-reply/components/TabImage.vue index 1a82c3aa..71950e04 100644 --- a/src/views/mp/components/wx-reply/components/TabImage.vue +++ b/src/views/mp/components/wx-reply/components/TabImage.vue @@ -123,7 +123,7 @@ const selectMaterial = (item) => { .select-item { width: 280px; padding: 10px; - margin: 0 auto 10px auto; + margin: 0 auto 10px; border: 1px solid #eaeaea; .material-img { @@ -131,11 +131,11 @@ const selectMaterial = (item) => { } .item-name { - font-size: 12px; overflow: hidden; + font-size: 12px; + text-align: center; text-overflow: ellipsis; white-space: nowrap; - text-align: center; .item-infos { width: 30%; @@ -149,18 +149,18 @@ const selectMaterial = (item) => { } .col-select { - border: 1px solid rgb(234, 234, 234); - padding: 50px 0px; - height: 160px; width: 49.5%; + height: 160px; + padding: 50px 0; + border: 1px solid rgb(234 234 234); } .col-add { - border: 1px solid rgb(234, 234, 234); - padding: 50px 0px; - height: 160px; - width: 49.5%; float: right; + width: 49.5%; + height: 160px; + padding: 50px 0; + border: 1px solid rgb(234 234 234); .el-upload__tip { line-height: 18px; diff --git a/src/views/mp/components/wx-reply/components/TabNews.vue b/src/views/mp/components/wx-reply/components/TabNews.vue index 88a82a53..ecb5026d 100644 --- a/src/views/mp/components/wx-reply/components/TabNews.vue +++ b/src/views/mp/components/wx-reply/components/TabNews.vue @@ -65,7 +65,7 @@ const onDelete = () => { .select-item { width: 280px; padding: 10px; - margin: 0 auto 10px auto; + margin: 0 auto 10px; border: 1px solid #eaeaea; .ope-row { diff --git a/src/views/mp/components/wx-reply/components/TabVoice.vue b/src/views/mp/components/wx-reply/components/TabVoice.vue index c4868cf8..5c9f64a7 100644 --- a/src/views/mp/components/wx-reply/components/TabVoice.vue +++ b/src/views/mp/components/wx-reply/components/TabVoice.vue @@ -120,15 +120,15 @@ const selectMaterial = (item: Reply) => { diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 2fda5100..08a202c2 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -102,19 +102,45 @@ const handleDelete = async (item: any) => { } diff --git a/src/views/mp/menu/index.vue b/src/views/mp/menu/index.vue index c8ed0835..442e33b5 100644 --- a/src/views/mp/menu/index.vue +++ b/src/views/mp/menu/index.vue @@ -367,7 +367,6 @@ div { margin-left: 20px; background-color: #e8e7e7; box-sizing: border-box; - box-sizing: border-box; } } From d99f9e98fbfccba07f0582d2fa6eb4266c7da791 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 21 Apr 2023 23:35:31 +0800 Subject: [PATCH 4/8] =?UTF-8?q?feat:=20mp/menu=20=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mp/menu/components/MenuPreviewer.vue | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/views/mp/menu/components/MenuPreviewer.vue b/src/views/mp/menu/components/MenuPreviewer.vue index aca1c2ae..637c8805 100644 --- a/src/views/mp/menu/components/MenuPreviewer.vue +++ b/src/views/mp/menu/components/MenuPreviewer.vue @@ -4,6 +4,9 @@