前端vue后台管理系统项目优化
2022-08-03 09:57:03
215
{{single.collect_count}}

1.项目运行一段时间会出现缓存过多,处理办法: this.$destroy();

在销毁的时候处理:

destroyed(){this.$destroy();}

2.button按钮不让用户连续点击,点击完后等待2秒,才可以再次点击

处理方法:v-preventReClick

<Button v-preventReClick @click="loadListData" type="primary" icon="md-search">查询</Button>

3.webpack打包并且可以预览每个打包后的文件大小

一般都是用:npm run dev  或者   npm run build:prod

处理方法:打包指令:
npm run build:prod --report

打包后dist里面有重复的文件:如下图

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}