From 2b9e1aef3fba4f718a461df6d29b6274ab9209d6 Mon Sep 17 00:00:00 2001 From: van Date: Wed, 11 Mar 2026 21:40:23 +0800 Subject: [PATCH] 1 --- .../system/social-media/xianyu-wenan.vue | 155 ++++++++++++++++-- 1 file changed, 141 insertions(+), 14 deletions(-) diff --git a/src/views/system/social-media/xianyu-wenan.vue b/src/views/system/social-media/xianyu-wenan.vue index cf1f22a..2e340b8 100644 --- a/src/views/system/social-media/xianyu-wenan.vue +++ b/src/views/system/social-media/xianyu-wenan.vue @@ -35,12 +35,16 @@
- + @@ -53,6 +57,7 @@ 生成闲鱼文案 @@ -62,14 +67,15 @@
- - + + -
- 代下单(一键代下) +
+ 代下单(一键代下) 复制 @@ -77,13 +83,14 @@
{{ result.daixiadan }}
- + -
- 教你下单 +
+ 教你下单 复制 @@ -113,10 +120,38 @@ export default { daixiadan: '', jiaonixiadan: '' }, - generating: false + generating: false, + mobile: false, + resizeTimer: null } }, + computed: { + labelWidth() { + return this.mobile ? '80px' : '100px' + }, + labelPosition() { + return this.mobile ? 'top' : 'right' + }, + gutter() { + return this.mobile ? 12 : 20 + } + }, + mounted() { + this.checkMobile() + window.addEventListener('resize', this.onResize) + }, + beforeDestroy() { + window.removeEventListener('resize', this.onResize) + if (this.resizeTimer) clearTimeout(this.resizeTimer) + }, methods: { + checkMobile() { + this.mobile = document.documentElement.clientWidth < 768 + }, + onResize() { + if (this.resizeTimer) clearTimeout(this.resizeTimer) + this.resizeTimer = setTimeout(this.checkMobile, 150) + }, async handleGenerate() { const title = (this.form.title || '').trim() if (!title) { @@ -186,9 +221,11 @@ export default {