回滚代码格式化的问题

This commit is contained in:
jmal 2024-03-18 12:05:20 +08:00
parent 306762738c
commit 9467abc6c0
6 changed files with 70 additions and 83 deletions

View File

@ -386,10 +386,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip
v-if=" v-if="scope.row.index === cellMouseIndex && (!scope.row.isShare || scope.row.shareBase)"
scope.row.index === cellMouseIndex &&
(!scope.row.isShare || scope.row.shareBase)
"
class="item" class="item"
effect="light" effect="light"
content="分享" content="分享"
@ -693,15 +690,9 @@
> >
</el-form-item> </el-form-item>
<el-form-item label="位置:" class="details-position"> <el-form-item label="位置:" class="details-position">
<a <a :href="'/?path=' + rowContextData.path + '&highlight=' + rowContextData.name">{{
:href=" rowContextData.path
'/?path=' + }}</a>
rowContextData.path +
'&highlight=' +
rowContextData.name
"
>{{ rowContextData.path }}</a
>
</el-form-item> </el-form-item>
<el-form-item label="创建时间:"> <el-form-item label="创建时间:">
<span>{{ rowContextData.uploadDate }}</span> <span>{{ rowContextData.uploadDate }}</span>
@ -816,11 +807,8 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<tag-dialog <tag-dialog :fileList="tagDialogObjectList"
:fileList="tagDialogObjectList" :status.sync="tagDialogVisible" @onSuccess="allocateTagSuccess"/>
:status.sync="tagDialogVisible"
@onSuccess="allocateTagSuccess"
/>
<share-dialog <share-dialog
:file.sync="shareDialogObject" :file.sync="shareDialogObject"
:status.sync="shareDialogVisible" :status.sync="shareDialogVisible"
@ -1241,11 +1229,19 @@ export default {
} }
}, },
created() {}, created() {},
watch: {
$route(to) {
if (to.query.tagId && this.queryCondition.tagId !== this.$route.query.tagId) {
this.queryCondition.tagId = this.$route.query.tagId;
this.getFileList();
}
}
},
mounted() { mounted() {
Bus.$on("fileSuccess", (filename) => { Bus.$on("fileSuccess", (filename) => {
this.setOnCreateFilename(filename) this.setOnCreateFilename(filename)
}); });
Bus.$on("loadFileFaild", () => { Bus.$on("loadFileFailed", () => {
this.notPreviewDialogVisible = true; this.notPreviewDialogVisible = true;
}); });
Bus.$on("clickMore", rows => { Bus.$on("clickMore", rows => {
@ -1330,7 +1326,7 @@ export default {
}, },
destroyed() { destroyed() {
Bus.$off("fileSuccess"); Bus.$off("fileSuccess");
Bus.$off("loadFileFaild"); Bus.$off("loadFileFailed");
Bus.$off("clickMore"); Bus.$off("clickMore");
Bus.$off("renameRow"); Bus.$off("renameRow");
Bus.$off("msg/file/change"); Bus.$off("msg/file/change");
@ -1401,7 +1397,6 @@ export default {
: chineseLength; : chineseLength;
}, },
keydown(event) { keydown(event) {
console.log('sdf')
const isMac = navigator.platform.startsWith("Mac"); const isMac = navigator.platform.startsWith("Mac");
const { key, c, keyCode, ctrlKey, metaKey } = event; const { key, c, keyCode, ctrlKey, metaKey } = event;
this.isCmd = (isMac && metaKey) || (!isMac && ctrlKey); this.isCmd = (isMac && metaKey) || (!isMac && ctrlKey);
@ -4187,7 +4182,7 @@ export default {
} }
a:hover { a:hover {
color: #409eff; color: #409EFF;
} }
} }
@ -4219,7 +4214,7 @@ export default {
>>> .plTableBox .el-table .el-table__header { >>> .plTableBox .el-table .el-table__header {
th { th {
background-color: #ffffff; background-color: #FFFFFF;
} }
.is-sortable:hover { .is-sortable:hover {
@ -4239,7 +4234,7 @@ export default {
} }
.home-link:hover { .home-link:hover {
color: #409eff; color: #409EFF;
} }
.info-statistics { .info-statistics {
@ -4268,7 +4263,7 @@ export default {
margin-left: 5px !important; margin-left: 5px !important;
} }
> .open-file-dialog { > > > .open-file-dialog {
.el-dialog { .el-dialog {
width: 420px; width: 420px;
} }
@ -4282,13 +4277,13 @@ export default {
} }
} }
> .v-contextmenu-item { > > > .v-contextmenu-item {
.svg-icon { .svg-icon {
font-size: 14px; font-size: 14px;
} }
} }
> .new-text-file-dialog { > > > .new-text-file-dialog {
height: 350px; height: 350px;
top: calc(50% - 175px); top: calc(50% - 175px);
@ -4312,7 +4307,7 @@ export default {
} }
} }
> .van-grid-item__content { > > > .van-grid-item__content {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
padding: 0; padding: 0;
@ -4377,3 +4372,4 @@ export default {
} }
} }
</style> </style>

View File

@ -140,11 +140,11 @@ export default {
this.drawioUrlValid = true this.drawioUrlValid = true
} else { } else {
this.$emit('onClose') this.$emit('onClose')
Bus.$emit('loadFileFaild') Bus.$emit('loadFileFailed')
} }
}).catch(() => { }).catch(() => {
this.$emit('onClose') this.$emit('onClose')
Bus.$emit('loadFileFaild') Bus.$emit('loadFileFailed')
}) })
}, },
viewHistoryFile({historyInfo, recovery}) { viewHistoryFile({historyInfo, recovery}) {

View File

@ -96,7 +96,7 @@ export default {
$J.loadScript($J.apiUrl(officeApiUrl), (e) => { $J.loadScript($J.apiUrl(officeApiUrl), (e) => {
if (e !== null) { if (e !== null) {
this.$emit('onClose') this.$emit('onClose')
Bus.$emit('loadFileFaild') Bus.$emit('loadFileFailed')
return return
} }
if(this.$store.state.user.token && this.$store.state.user.userId === this.file.userId){ if(this.$store.state.user.token && this.$store.state.user.userId === this.file.userId){

View File

@ -98,7 +98,7 @@ export default {
let that = this let that = this
this.delayClosing = setTimeout(function () { this.delayClosing = setTimeout(function () {
if (!that.readyShow) { if (!that.readyShow) {
that.loadFileFaild() that.loadFileFailed()
} }
},12000) },12000)
} }
@ -129,9 +129,9 @@ export default {
/** /**
* 加载失败 * 加载失败
*/ */
loadFileFaild() { loadFileFailed() {
this.close() this.close()
Bus.$emit('loadFileFaild') Bus.$emit('loadFileFailed')
this.readyShow = true this.readyShow = true
}, },
/** /**

View File

@ -178,7 +178,6 @@ export default {
mounted() { mounted() {
tagApi.tagList({userId: this.$store.state.user.userId,}).then(res => { tagApi.tagList({userId: this.$store.state.user.userId,}).then(res => {
this.tagList = res.data this.tagList = res.data
console.log(this.tagList)
}) })
Bus.$on('msg/file/change', (msg) => this.onmessage(msg)) Bus.$on('msg/file/change', (msg) => this.onmessage(msg))
}, },
@ -209,9 +208,7 @@ export default {
}) })
}, },
tagClick(tag) { tagClick(tag) {
console.log('tagClick', tag.id)
this.$router.push(`/tag?tagId=${tag.id}`); this.$router.push(`/tag?tagId=${tag.id}`);
Bus.$emit('tagPageChange', tag.id)
}, },
mouseleave() { mouseleave() {
}, },

View File

@ -28,17 +28,11 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('tag mounted')
if (this.$route.query.tagId) { if (this.$route.query.tagId) {
this.queryCondition.tagId = this.$route.query.tagId this.queryCondition.tagId = this.$route.query.tagId
} }
Bus.$on('tagPageChange', (tagId) => {
console.log('tagPageChange', tagId)
this.queryCondition.tagId = tagId
})
}, },
destroyed() { destroyed() {
Bus.$off('tagPageChange')
} }
} }
</script> </script>