mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-26 12:42:34 +08:00
🐛 #80 修复 win depd bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-show="!!options.length && (searchValue || !!clipboardFile.length) && !currentPlugin.name" class="options" ref="scrollDom">
|
||||
<a-list item-layout="horizontal" :dataSource="options">
|
||||
<a-list item-layout="horizontal" :dataSource="sort(options)">
|
||||
<template #renderItem="{ item, index }">
|
||||
<a-list-item
|
||||
@click="() => item.click()"
|
||||
@@ -66,6 +66,20 @@ const renderDesc = (desc) => {
|
||||
}
|
||||
return desc;
|
||||
};
|
||||
|
||||
const sort = (options) => {
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
for (let j = i + 1; j < options.length; j++) {
|
||||
if (options[j].zIndex > options[i].zIndex) {
|
||||
let temp = options[i];
|
||||
options[i] = options[j];
|
||||
options[j] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
@@ -178,7 +178,7 @@ const changeHideOnBlur = () => {
|
||||
const getIcon = () => {
|
||||
if (props.clipboardFile[0].dataUrl) return props.clipboardFile[0].dataUrl;
|
||||
return props.clipboardFile[0].isFile ? require("../assets/file.png") : require("../assets/folder.png")
|
||||
}
|
||||
};
|
||||
|
||||
const newWindow = () => {
|
||||
ipcRenderer.send("msg-trigger", {
|
||||
|
||||
Reference in New Issue
Block a user