This commit is contained in:
van
2026-03-11 22:17:12 +08:00
parent bc33717921
commit da906d52c0

View File

@@ -62,6 +62,12 @@
@click="handleGenerate"> @click="handleGenerate">
生成闲鱼文案 生成闲鱼文案
</el-button> </el-button>
<el-button
class="btn-clear"
:disabled="!form.title && !form.remark"
@click="handleClearInput">
<i class="el-icon-delete"></i> 清空输入
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -152,6 +158,11 @@ export default {
if (this.resizeTimer) clearTimeout(this.resizeTimer) if (this.resizeTimer) clearTimeout(this.resizeTimer)
this.resizeTimer = setTimeout(this.checkMobile, 150) this.resizeTimer = setTimeout(this.checkMobile, 150)
}, },
handleClearInput() {
this.form.title = ''
this.form.remark = ''
this.$message.success('已清空输入')
},
async handleGenerate() { async handleGenerate() {
const title = (this.form.title || '').trim() const title = (this.form.title || '').trim()
if (!title) { if (!title) {
@@ -267,6 +278,9 @@ export default {
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
.btn-clear {
margin-left: 12px;
}
/* 移动端适配 */ /* 移动端适配 */
@media (max-width: 767px) { @media (max-width: 767px) {
@@ -307,6 +321,12 @@ export default {
display: block; display: block;
height: 44px; height: 44px;
font-size: 15px; font-size: 15px;
margin-bottom: 8px;
}
.btn-clear {
width: 100%;
height: 44px;
margin-left: 0;
} }
.result-section { .result-section {
margin-top: 16px; margin-top: 16px;