diff --git a/src/views/system/comment/index.vue b/src/views/system/comment/index.vue index 107c74c..1168854 100644 --- a/src/views/system/comment/index.vue +++ b/src/views/system/comment/index.vue @@ -5,46 +5,74 @@
- - - - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - 导出 - - + + + + + +
+ +
+ + +
+ 导出 +
@@ -106,46 +134,74 @@
- - - - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - 导出 - - + + + + + +
+ +
+ + +
+ 导出 +
@@ -281,9 +337,16 @@ import { listTbComment, getTbComment, updateTbComment, delTbComment, resetTbCommentByProductId, getCommentStatistics, getJdProductTypeMap, getTbProductTypeMap } from '@/api/jarvis/comment' +import { mapGetters } from 'vuex' +import MobileSearchForm from '@/components/MobileSearchForm' +import MobileButtonGroup from '@/components/MobileButtonGroup' export default { name: 'CommentManagement', + components: { + MobileSearchForm, + MobileButtonGroup + }, data() { return { activeTab: 'jd', @@ -326,6 +389,28 @@ export default { imageList: [] } }, + computed: { + ...mapGetters(['device']), + isMobile() { + if (this.device === 'mobile') { + return true + } + if (typeof window !== 'undefined' && window.innerWidth < 768) { + return true + } + return false + }, + jdActionButtons() { + return [ + { key: 'export', label: '导出', type: 'success', icon: 'el-icon-download', handler: () => this.handleJdExport(), disabled: false } + ] + }, + tbActionButtons() { + return [ + { key: 'export', label: '导出', type: 'success', icon: 'el-icon-download', handler: () => this.handleTbExport(), disabled: false } + ] + } + }, created() { this.getJdList() this.getJdProductTypeMap() @@ -488,5 +573,42 @@ export default { flex-wrap: wrap; justify-content: center; } + +/* 操作按钮区域 */ +.action-buttons-section { + margin-top: 12px; + margin-bottom: 12px; +} + +/* 移动端和桌面端按钮组显示控制 */ +@media (max-width: 768px) { + .desktop-only { + display: none !important; + } + + .action-buttons-section.mobile-only { + display: block; + } +} + +@media (min-width: 769px) { + .mobile-only { + display: none !important; + } + + .desktop-action-buttons.desktop-only { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-top: 12px; + } +} + +.desktop-action-buttons { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-top: 12px; +} diff --git a/src/views/system/favoriteProduct/index.vue b/src/views/system/favoriteProduct/index.vue index f4f05c5..a38a677 100644 --- a/src/views/system/favoriteProduct/index.vue +++ b/src/views/system/favoriteProduct/index.vue @@ -1,43 +1,68 @@