mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-08 14:24:03 +08:00
fix: 主界面最多展示数量改为5 修改路径后自动保存
This commit is contained in:
parent
fc6f1680bf
commit
d9dbfba67e
@ -2,7 +2,7 @@
|
|||||||
"database.path": "",
|
"database.path": "",
|
||||||
"database.maxsize": 800,
|
"database.maxsize": 800,
|
||||||
"database.maxage": 14,
|
"database.maxage": 14,
|
||||||
"operation.shown": ["copy", "view", "collect", "remove"],
|
"operation.shown": ["copy", "view", "collect", "un-collect", "remove"],
|
||||||
"operation.custom": [
|
"operation.custom": [
|
||||||
{
|
{
|
||||||
"id": "custom.1663583455000",
|
"id": "custom.1663583455000",
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
class="operation-select"
|
class="operation-select"
|
||||||
v-model="shown"
|
v-model="shown"
|
||||||
multiple
|
multiple
|
||||||
:multiple-limit="4"
|
:multiple-limit="5"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
>
|
>
|
||||||
@ -93,22 +93,6 @@ const handleLinkClick = (index) => {
|
|||||||
utools.shellOpenExternal(links[index])
|
utools.shellOpenExternal(links[index])
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePathBtnClick = (param) => {
|
|
||||||
if (param === 'modify') {
|
|
||||||
const file = document.getElementById('database-path')
|
|
||||||
file.click()
|
|
||||||
file.onchange = (e) => {
|
|
||||||
const { files } = e.target
|
|
||||||
if (files.length > 0) {
|
|
||||||
path.value = files[0].path
|
|
||||||
}
|
|
||||||
ElMessage.info('修改成功 不要忘记点击保存按钮')
|
|
||||||
}
|
|
||||||
} else if (param === 'open') {
|
|
||||||
utools.shellShowItemInFolder(path.value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSaveBtnClick = () => {
|
const handleSaveBtnClick = () => {
|
||||||
// 校验格式
|
// 校验格式
|
||||||
if (path.value === '') {
|
if (path.value === '') {
|
||||||
@ -154,6 +138,22 @@ const handleSaveBtnClick = () => {
|
|||||||
ElMessage.success('保存成功 重启插件生效')
|
ElMessage.success('保存成功 重启插件生效')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handlePathBtnClick = (param) => {
|
||||||
|
if (param === 'modify') {
|
||||||
|
const file = document.getElementById('database-path')
|
||||||
|
file.click()
|
||||||
|
file.onchange = (e) => {
|
||||||
|
const { files } = e.target
|
||||||
|
if (files.length > 0) {
|
||||||
|
path.value = files[0].path
|
||||||
|
}
|
||||||
|
handleSaveBtnClick()
|
||||||
|
}
|
||||||
|
} else if (param === 'open') {
|
||||||
|
utools.shellShowItemInFolder(path.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const handleRestoreBtnClick = () => {
|
const handleRestoreBtnClick = () => {
|
||||||
ElMessageBox.confirm('确定要重置设置吗', '警告', {
|
ElMessageBox.confirm('确定要重置设置吗', '警告', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user