适配超级面板

This commit is contained in:
muwoo
2021-12-09 20:36:33 +08:00
parent b3a00c88ad
commit 1ee379b288
10 changed files with 35 additions and 9 deletions

View File

@@ -21,6 +21,7 @@
<script setup>
import { reactive, ref } from "vue";
import { message } from "ant-design-vue";
const formRef = ref();
const formState = reactive({
@@ -45,6 +46,7 @@ const downloadPlugin = async (pluginName) => {
name: pluginName,
isDev: true,
});
message.success(`${pluginName}安装成功!`);
loading.value = false;
};

View File

@@ -6,8 +6,9 @@
<div class="container" v-else>
<div class="installed-list">
<div
:class="currentSelect === index ? 'item active' : 'item'"
:class="currentSelect[0] === index ? 'item active' : 'item'"
:key="index"
@click="currentSelect = [index]"
v-for="(plugin, index) in localPlugins"
>
<img :src="plugin.logo" />
@@ -101,7 +102,7 @@ const localPlugins = computed(() =>
);
const updateLocalPlugin = () => store.dispatch("updateLocalPlugin");
const currentSelect = ref(0);
const currentSelect = ref([0]);
const pluginDetail = computed(() => {
return localPlugins.value[currentSelect.value] || {};

View File

@@ -81,10 +81,12 @@ const newList = computed(() => {
<style lang="less">
.finder {
width: 100%;
height: 100vh;
height: 100%;
overflow-x: hidden;
box-sizing: border-box;
&::-webkit-scrollbar {
width: 0;
}
.ant-carousel .slick-slide {
text-align: center;
height: 235px;

View File

@@ -78,6 +78,7 @@ import {
import { defineProps, ref } from "vue";
import { useStore } from "vuex";
import { message } from "ant-design-vue";
const store = useStore();
@@ -95,6 +96,7 @@ defineProps({
const downloadPlugin = async (plugin) => {
startDownload(plugin.name);
await window.market.downloadPlugin(plugin);
message.success(`${plugin.name}安装成功!`);
successDownload(plugin.name);
};