Compare commits

..

No commits in common. "2055bf61b1c1a07e760c8406501f478a9f176cfe" and "1656418c1053344bc64f374321e597a908eead54" have entirely different histories.

5 changed files with 10 additions and 25 deletions

View File

@ -7,7 +7,7 @@
:data-source="list.filter((item) => !!item)"
>
<template #renderItem="{ item, index }">
<a-list-item v-if="item" @click="showDetail(index)">
<a-list-item v-if="item" @click="showDetail(item)">
<template #actions>
<a-button
class="download-plugin-btn"
@ -105,7 +105,7 @@ import {
SelectOutlined
} from '@ant-design/icons-vue';
import { defineProps, ref, computed } from 'vue';
import { defineProps, ref } from 'vue';
import { useStore } from 'vuex';
import { message } from 'ant-design-vue';
import MarkdownIt from 'markdown-it';
@ -121,7 +121,7 @@ const router = useRouter();
const startDownload = (name) => store.dispatch('startDownload', name);
const successDownload = (name) => store.dispatch('successDownload', name);
const props = defineProps({
defineProps({
list: {
type: [Array],
default: () => [],
@ -137,14 +137,13 @@ const downloadPlugin = async (plugin) => {
};
const visible = ref(false);
const showIndex = ref(0);
const detail = ref({});
const markdown = new MarkdownIt();
const content = ref('');
const showDetail = async (index) => {
const item = props.list[index];
const showDetail = async (item) => {
visible.value = true;
showIndex.value = index;
detail.value = item;
content.value = '';
let mdContent = '暂无内容';
try {
@ -157,8 +156,6 @@ const showDetail = async (index) => {
}
};
const detail = computed(() => props.list[showIndex.value]);
const openPlugin = (item) => {
store.commit('commonUpdate', {active: ['installed']})
router.push({

View File

@ -1,6 +1,6 @@
{
"name": "rubick",
"version": "4.1.6",
"version": "4.1.5",
"author": "muwoo <2424880409@qq.com>",
"private": true,
"scripts": {

View File

@ -190,7 +190,6 @@ class API extends DBInstance {
value: data.text,
})})`
);
this.sendSubInputChangeEvent({ data });
}
public getPath({ data }) {

View File

@ -118,7 +118,7 @@ const createPluginManager = (): any => {
if (isPin) {
pin.forEach((p, index) => {
if (p.name === plugin.name) {
plugin = pin.splice(index, 1)[0];
pin.splice(index, 1);
}
});
pin.unshift(plugin);

View File

@ -41,17 +41,6 @@ const optionsManager = ({
options[0].click();
});
const getIndex = (cmd, value) => {
let index = 0;
if (PinyinMatch.match(cmd.label || cmd, value)) {
index += 1;
}
if (cmd.label) {
index -= 1;
}
return index;
};
const getOptionsFromSearchValue = (value, strict = false) => {
const localPlugins = getGlobal('LOCAL_PLUGINS').getLocalPlugins();
let options: any = [];
@ -72,7 +61,7 @@ const optionsManager = ({
desc: fe.explain,
type: plugin.pluginType,
match: PinyinMatch.match(cmd.label || cmd, value),
zIndex: getIndex(cmd, value), // 排序权重
zIndex: cmd.label ? 0 : 1, // 排序权重
click: () => {
pluginClickEvent({
plugin,
@ -128,7 +117,7 @@ const optionsManager = ({
.map((plugin) => {
const option = {
...plugin,
zIndex: 0,
zIndex: 1,
click: () => {
openPlugin(plugin, option);
},