diff --git a/src/views/spring/avatar/avatarDecor/index.vue b/src/views/spring/avatar/avatarDecor/index.vue index f8fe750..0640c13 100644 --- a/src/views/spring/avatar/avatarDecor/index.vue +++ b/src/views/spring/avatar/avatarDecor/index.vue @@ -18,7 +18,14 @@ - + + + @@ -94,6 +101,15 @@ clearTimeout(this.timeOutID) }, methods: { + handleCopyId(text) { + const input = document.createElement('input') + input.value = text + document.body.appendChild(input) + input.select() + document.execCommand('copy') + document.body.removeChild(input) + this.$baseMessage('复制成功', 'success') + }, setSelectRows(val) { this.selectRows = val }, diff --git a/src/views/spring/avatar/avatarFrame/index.vue b/src/views/spring/avatar/avatarFrame/index.vue index dc8c242..0cf49b0 100644 --- a/src/views/spring/avatar/avatarFrame/index.vue +++ b/src/views/spring/avatar/avatarFrame/index.vue @@ -18,7 +18,14 @@ - + + + @@ -94,6 +101,15 @@ clearTimeout(this.timeOutID) }, methods: { + handleCopyId(text) { + const input = document.createElement('input') + input.value = text + document.body.appendChild(input) + input.select() + document.execCommand('copy') + document.body.removeChild(input) + this.$baseMessage('复制成功', 'success') + }, setSelectRows(val) { this.selectRows = val }, diff --git a/src/views/spring/avatar/systemAvatar/index.vue b/src/views/spring/avatar/systemAvatar/index.vue index 1ca117f..506889b 100644 --- a/src/views/spring/avatar/systemAvatar/index.vue +++ b/src/views/spring/avatar/systemAvatar/index.vue @@ -18,7 +18,14 @@ - + + + @@ -95,6 +102,15 @@ clearTimeout(this.timeOutID) }, methods: { + handleCopyId(text) { + const input = document.createElement('input') + input.value = text + document.body.appendChild(input) + input.select() + document.execCommand('copy') + document.body.removeChild(input) + this.$baseMessage('复制成功', 'success') + }, setSelectRows(val) { this.selectRows = val }, diff --git a/src/views/spring/index/recommend/components/RecommendEdit.vue b/src/views/spring/index/recommend/components/RecommendEdit.vue index 8ef259c..aab0647 100644 --- a/src/views/spring/index/recommend/components/RecommendEdit.vue +++ b/src/views/spring/index/recommend/components/RecommendEdit.vue @@ -16,9 +16,9 @@ - +
- + 查询
@@ -27,6 +27,15 @@
+ + @@ -57,15 +66,19 @@ form: { scene: '', type: '', - resourceId: '', + recommendId: '', tag: '', isEnabled: true, imageUrl: '', + title: '', + content: '', }, rules: { scene: [{ required: true, trigger: 'change', message: '请选择场景' }], type: [{ required: true, trigger: 'change', message: '请选择类型' }], - resourceId: [{ required: true, trigger: 'blur', message: '请输入资源ID' }], + recommendId: [{ required: true, trigger: 'blur', message: '请输入资源ID' }], + title: [{ required: true, trigger: 'blur', message: '请输入推荐标题' }], + content: [{ required: true, trigger: 'blur', message: '请输入推荐内容' }], }, title: '添加推介', dialogFormVisible: false, @@ -97,7 +110,7 @@ } }, async handleCheckId() { - if (!this.form.scene || !this.form.type || !this.form.resourceId) { + if (!this.form.scene || !this.form.type || !this.form.recommendId) { this.$baseMessage('请先完善场景、类型和资源ID', 'warning') return } @@ -108,7 +121,7 @@ const { data } = await getItemDetail({ scene: this.form.scene, type: this.form.type, - id: this.form.resourceId, + id: this.form.recommendId, }) if (data && data.imageUrl) { this.previewImage = data.imageUrl @@ -129,10 +142,12 @@ this.form = { scene: '', type: '', - resourceId: '', + recommendId: '', tag: '', isEnabled: true, imageUrl: '', + title: '', + content: '', } this.previewImage = '' this.canSave = false