mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 15:04:06 +08:00
各类bug fix
This commit is contained in:
parent
3566e45704
commit
2194b1cdfb
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="command-editor-container"
|
class="command-editor-container"
|
||||||
:class="{ 'leaving': isLeaving, 'run-code': isRunCodePage }"
|
:class="{ leaving: isLeaving, 'run-code': isRunCodePage }"
|
||||||
@animationend="$emit('animationend')"
|
@animationend="$emit('animationend')"
|
||||||
>
|
>
|
||||||
<!-- 命令设置栏 -->
|
<!-- 命令设置栏 -->
|
||||||
@ -125,16 +125,16 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
action: {
|
action: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
allQuickCommandTags: {
|
allQuickCommandTags: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
isLeaving: {
|
isLeaving: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.commandInit();
|
this.commandInit();
|
||||||
@ -279,8 +279,8 @@ export default {
|
|||||||
},
|
},
|
||||||
handleBack() {
|
handleBack() {
|
||||||
// 触发返回事件
|
// 触发返回事件
|
||||||
this.$emit('editorEvent', { type: 'back' });
|
this.$emit("editorEvent", { type: "back" });
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -76,10 +76,15 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
/* 标签栏容器样式 */
|
/* 标签栏容器样式 */
|
||||||
.q-tabs {
|
.q-tabs {
|
||||||
height: 100vh !important;
|
height: auto !important;
|
||||||
|
min-height: 100vh !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-scroll-area {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
/* 标签栏和底栏内的按钮悬浮效果 */
|
/* 标签栏和底栏内的按钮悬浮效果 */
|
||||||
.q-tabs .q-tab:hover {
|
.q-tabs .q-tab:hover {
|
||||||
background: rgba(255, 255, 255, 0.1) !important;
|
background: rgba(255, 255, 255, 0.1) !important;
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="command-side-bar" :style="{ width: sideBarWidth + 'px' }">
|
<div
|
||||||
|
class="command-side-bar"
|
||||||
|
:style="{
|
||||||
|
width: sideBarWidth + 'px',
|
||||||
|
'--icon-url': `url(${currentCommand.features.icon})`,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<!-- 头部区域 -->
|
<!-- 头部区域 -->
|
||||||
<div class="header-section">
|
<div class="header-section">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
@ -13,7 +19,7 @@
|
|||||||
@click="$emit('back')"
|
@click="$emit('back')"
|
||||||
/>
|
/>
|
||||||
<div class="logo-container">
|
<div class="logo-container">
|
||||||
<q-avatar size="64" square class="commandLogo">
|
<q-avatar size="64" square class="featureIco">
|
||||||
<q-img
|
<q-img
|
||||||
@click="showIconPicker = true"
|
@click="showIconPicker = true"
|
||||||
:src="currentCommand.features.icon"
|
:src="currentCommand.features.icon"
|
||||||
@ -601,6 +607,20 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* 其他样式从app.css中继承 */
|
||||||
|
.featureIco {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featureIco:hover {
|
||||||
|
transform: scale(1.02) translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.featureIco:hover::after {
|
||||||
|
opacity: 0.8;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
.command-side-bar {
|
.command-side-bar {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f4f4f4;
|
background: #f4f4f4;
|
||||||
@ -696,12 +716,13 @@ export default {
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.command-side-bar-content *,
|
.command-side-bar-content .q-field,
|
||||||
.side-bar-popup-content .q-item__label {
|
.side-bar-popup-content .q-item__label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-bar-popup-content .q-item__label--caption {
|
.side-bar-popup-content .q-item__label--caption,
|
||||||
|
.command-side-bar-content :deep(.q-chip) {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<!-- 命令编辑界面 -->
|
<!-- 命令编辑界面 -->
|
||||||
<CommandEditor
|
<CommandEditor
|
||||||
v-show="isCommandEditorShow"
|
v-if="isCommandEditorShow"
|
||||||
ref="commandEditor"
|
ref="commandEditor"
|
||||||
:action="commandEditorAction"
|
:action="commandEditorAction"
|
||||||
@editorEvent="editorEvent"
|
@editorEvent="editorEvent"
|
||||||
@ -115,7 +115,9 @@ export default {
|
|||||||
|
|
||||||
switch (this.currentTag) {
|
switch (this.currentTag) {
|
||||||
case "未分类":
|
case "未分类":
|
||||||
return sortByOrder(commands.filter((cmd) => !cmd.tags || cmd.tags.length === 0));
|
return sortByOrder(
|
||||||
|
commands.filter((cmd) => !cmd.tags || cmd.tags.length === 0)
|
||||||
|
);
|
||||||
case "搜索结果":
|
case "搜索结果":
|
||||||
if (this.commandSearchKeyword?.length < 2) return;
|
if (this.commandSearchKeyword?.length < 2) return;
|
||||||
let searchResult = [];
|
let searchResult = [];
|
||||||
@ -142,7 +144,9 @@ export default {
|
|||||||
case "默认":
|
case "默认":
|
||||||
return commands.filter((cmd) => cmd.tags?.includes(this.currentTag));
|
return commands.filter((cmd) => cmd.tags?.includes(this.currentTag));
|
||||||
default:
|
default:
|
||||||
return sortByOrder(commands.filter((cmd) => cmd.tags?.includes(this.currentTag)));
|
return sortByOrder(
|
||||||
|
commands.filter((cmd) => cmd.tags?.includes(this.currentTag))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 标签栏宽度
|
// 标签栏宽度
|
||||||
@ -479,14 +483,14 @@ export default {
|
|||||||
commands.forEach((command, index) => {
|
commands.forEach((command, index) => {
|
||||||
tagCommands[command.features.code] = {
|
tagCommands[command.features.code] = {
|
||||||
...command,
|
...command,
|
||||||
order: index // 添加排序信息
|
order: index, // 添加排序信息
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// 更新存储
|
// 更新存储
|
||||||
this.allQuickCommands = {
|
this.allQuickCommands = {
|
||||||
...this.allQuickCommands,
|
...this.allQuickCommands,
|
||||||
...tagCommands
|
...tagCommands,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 只保存被修改的命令
|
// 只保存被修改的命令
|
||||||
|
Loading…
x
Reference in New Issue
Block a user