mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-18 22:05:05 +08:00
🎨 fit market style
This commit is contained in:
parent
9e2b6f52a4
commit
f766ea3bde
@ -6,7 +6,11 @@
|
|||||||
<template #renderItem="{ item, index }">
|
<template #renderItem="{ item, index }">
|
||||||
<a-list-item v-if="item" @click="showDetail(item)">
|
<a-list-item v-if="item" @click="showDetail(item)">
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a-button style="color: #ff4ea4;" type="text" :loading="item.isloading">
|
<a-button
|
||||||
|
style="color: #ff4ea4"
|
||||||
|
type="text"
|
||||||
|
:loading="item.isloading"
|
||||||
|
>
|
||||||
<CloudDownloadOutlined
|
<CloudDownloadOutlined
|
||||||
v-show="!item.isloading && !item.isdownload"
|
v-show="!item.isloading && !item.isdownload"
|
||||||
@click.stop="downloadPlugin(item, index)"
|
@click.stop="downloadPlugin(item, index)"
|
||||||
@ -16,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<a-list-item-meta>
|
<a-list-item-meta>
|
||||||
<template #description>
|
<template #description>
|
||||||
<span class="ellipse">{{ item.description }}</span>
|
<span class="ellipse desc">{{ item.description }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span class="ellipse">{{ item.pluginName }}</span>
|
<span class="ellipse">{{ item.pluginName }}</span>
|
||||||
@ -38,18 +42,15 @@
|
|||||||
:get-container="false"
|
:get-container="false"
|
||||||
class="plugin-info"
|
class="plugin-info"
|
||||||
:style="{ position: 'absolute' }"
|
:style="{ position: 'absolute' }"
|
||||||
@close="visible=false"
|
@close="visible = false"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="plugin-title-info">
|
<div class="plugin-title-info">
|
||||||
<div class="back-icon" @click="visible=false">
|
<div class="back-icon" @click="visible = false">
|
||||||
<ArrowLeftOutlined />
|
<ArrowLeftOutlined />
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<img
|
<img :src="detail.logo" class="plugin-icon" />
|
||||||
:src="detail.logo"
|
|
||||||
class="plugin-icon"
|
|
||||||
/>
|
|
||||||
<div class="plugin-desc">
|
<div class="plugin-desc">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{ detail.pluginName }}
|
{{ detail.pluginName }}
|
||||||
@ -57,9 +58,17 @@
|
|||||||
<div class="desc">
|
<div class="desc">
|
||||||
{{ detail.description }}
|
{{ detail.description }}
|
||||||
</div>
|
</div>
|
||||||
<a-button v-if="!detail.isdownload" @click.stop="downloadPlugin(detail)" shape="round" type="primary" :loading="detail.isloading">
|
<a-button
|
||||||
|
v-if="!detail.isdownload"
|
||||||
|
@click.stop="downloadPlugin(detail)"
|
||||||
|
shape="round"
|
||||||
|
type="primary"
|
||||||
|
:loading="detail.isloading"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<CloudDownloadOutlined v-show="!detail.isloading && !detail.isdownload" />
|
<CloudDownloadOutlined
|
||||||
|
v-show="!detail.isloading && !detail.isdownload"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
获取
|
获取
|
||||||
</a-button>
|
</a-button>
|
||||||
@ -74,7 +83,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
CloudDownloadOutlined,
|
CloudDownloadOutlined,
|
||||||
ArrowLeftOutlined,
|
ArrowLeftOutlined
|
||||||
} from "@ant-design/icons-vue";
|
} from "@ant-design/icons-vue";
|
||||||
|
|
||||||
import { defineProps, ref } from "vue";
|
import { defineProps, ref } from "vue";
|
||||||
@ -85,18 +94,18 @@ import request from "../../../assets/request/index";
|
|||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
const startDownload = (name) => store.dispatch("startDownload", name);
|
const startDownload = name => store.dispatch("startDownload", name);
|
||||||
const successDownload = (name) => store.dispatch("successDownload", name);
|
const successDownload = name => store.dispatch("successDownload", name);
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: [Array],
|
type: [Array],
|
||||||
default: () => [],
|
default: () => []
|
||||||
},
|
},
|
||||||
title: String,
|
title: String
|
||||||
});
|
});
|
||||||
|
|
||||||
const downloadPlugin = async (plugin) => {
|
const downloadPlugin = async plugin => {
|
||||||
startDownload(plugin.name);
|
startDownload(plugin.name);
|
||||||
await window.market.downloadPlugin(plugin);
|
await window.market.downloadPlugin(plugin);
|
||||||
message.success(`${plugin.name}安装成功!`);
|
message.success(`${plugin.name}安装成功!`);
|
||||||
@ -108,7 +117,7 @@ const detail = ref({});
|
|||||||
const markdown = new MarkdownIt();
|
const markdown = new MarkdownIt();
|
||||||
const content = ref("");
|
const content = ref("");
|
||||||
|
|
||||||
const showDetail = async (item) => {
|
const showDetail = async item => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
detail.value = item;
|
detail.value = item;
|
||||||
let mdContent = "暂无内容";
|
let mdContent = "暂无内容";
|
||||||
@ -127,6 +136,7 @@ const showDetail = async (item) => {
|
|||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
.title {
|
.title {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
.ellipse {
|
.ellipse {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -134,13 +144,17 @@ const showDetail = async (item) => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
color: var(--color-text-content);
|
||||||
|
&.desc {
|
||||||
|
color: var(--color-text-desc);
|
||||||
}
|
}
|
||||||
&:after{
|
}
|
||||||
|
&:after {
|
||||||
content: " ";
|
content: " ";
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid var(--color-border-light);
|
||||||
transform: scaleY(0.5);
|
transform: scaleY(0.5);
|
||||||
}
|
}
|
||||||
.ant-list-item {
|
.ant-list-item {
|
||||||
@ -156,6 +170,22 @@ const showDetail = async (item) => {
|
|||||||
|
|
||||||
.ant-drawer-content-wrapper {
|
.ant-drawer-content-wrapper {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
.ant-drawer-content {
|
||||||
|
background: var(--color-body-bg);
|
||||||
|
|
||||||
|
}
|
||||||
|
.ant-drawer-header {
|
||||||
|
background: var(--color-body-bg);
|
||||||
|
border-bottom: 1px solid var(--color-border-light);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark {
|
||||||
|
.plugin-title-info {
|
||||||
|
.back-icon {
|
||||||
|
filter: invert(1) brightness(200%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +212,7 @@ const showDetail = async (item) => {
|
|||||||
.title {
|
.title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
@ -189,11 +220,15 @@ const showDetail = async (item) => {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
color: var(--color-text-desc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home-page-container {
|
.home-page-container {
|
||||||
|
* {
|
||||||
|
color: var(--color-text-content);
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -100,10 +100,10 @@ const { searchValue, current } = toRefs(state);
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #F3EFEF;
|
background: var(--color-menu-bg);
|
||||||
height: calc(~"100vh - 46px");
|
height: calc(~"100vh - 46px");
|
||||||
.container {
|
.container {
|
||||||
background: #fff;
|
background: var(--color-body-bg);
|
||||||
width: calc(~'100% - 200px');
|
width: calc(~'100% - 200px');
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user