bugfix: 二创按钮添加debounce
This commit is contained in:
@@ -276,6 +276,7 @@ import { Modal,message } from "ant-design-vue";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import fullScreenImg from '@/component/HomePage/fullScreenImg.vue'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
export default defineComponent({
|
||||
components:{fullScreenImg},
|
||||
@@ -437,26 +438,26 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
}
|
||||
let setChoose = async () =>{
|
||||
let setChoose = debounce(async()=>{
|
||||
if(userDetail.value.systemList.indexOf(1) == -1){
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
|
||||
const targetDate = new Date('2025-09-01T00:00:00');
|
||||
// 解析输入日期字符串
|
||||
const inputDate = new Date(imgData.scaleImageData.createDate);
|
||||
if(inputDate < targetDate){
|
||||
return message.info(t('newScaleImage.jsContent2'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
return message.info(t('newScaleImage.jsContent2'))
|
||||
}
|
||||
let id = await getWorks(imgData.scaleImageData.id)
|
||||
router.push(`/home/history/${id}`)
|
||||
// router.push({name:'home',params: {id:imgData.scaleImageData.id,type:'Works'}})
|
||||
store.commit('setChooseIsDesign',false)
|
||||
// router.push({name:'homePage',params: {id:imgData.scaleImageData.userLikeGroupSourceId,type:'Works'}})
|
||||
}
|
||||
const targetDate = new Date('2025-09-01T00:00:00');
|
||||
// 解析输入日期字符串
|
||||
const inputDate = new Date(imgData.scaleImageData.createDate);
|
||||
if(inputDate < targetDate){
|
||||
return message.info(t('newScaleImage.jsContent2'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
return message.info(t('newScaleImage.jsContent2'))
|
||||
}
|
||||
let id = await getWorks(imgData.scaleImageData.id)
|
||||
router.push(`/home/history/${id}`)
|
||||
// router.push({name:'home',params: {id:imgData.scaleImageData.id,type:'Works'}})
|
||||
store.commit('setChooseIsDesign',false)
|
||||
},300)
|
||||
|
||||
let setCommentReply = (value:any,str:any)=>{
|
||||
imgData.commentReply.leve1Id = value.id
|
||||
imgData.commentReply.leve2Id = null
|
||||
|
||||
Reference in New Issue
Block a user