wangzhibo
2026-07-16 b57020623cf0c946706573bf102e548c3a544423
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<template>
    <div class="dt-doc">
        <div class="list">
            <div
                class="item"
                :class="{
                    'is-left': item.icon == list[index - 1]?.icon,
                    'is-right': item.icon == list[index + 1]?.icon
                }"
                v-for="(item, index) in list"
                :key="index"
                @click="toLink(item.link)"
            >
                <img :src="item.icon" v-if="item.icon" />
                <span>{{ item.label }}</span>
            </div>
        </div>
    </div>
</template>
 
<script setup lang="ts">
import { ref } from 'vue';
import Cool from '../static/cool.png';
import Vue from '../static/vue.png';
import Echarts from '../static/echarts.png';
import Tailwindcss from '../static/tailwindcss.png';
import ElementPlus from '../static/element-plus.png';
import Vite from '../static/vite.png';
import Pinia from '../static/pinia.png';
import Lodash from '../static/lodash.png';
 
const list = ref([
    {
        label: 'cool',
        icon: Cool,
        link: 'https://cool-js.com/'
    },
    {
        label: 'vue',
        icon: Cool,
        link: 'https://vue.cool-admin.com/'
    },
    {
        label: 'node',
        icon: Cool,
        link: 'https://node.cool-admin.com/'
    },
    {
        label: 'vue',
        icon: Vue,
        link: 'https://cn.vuejs.org/'
    },
    {
        label: 'vue-router',
        icon: Vue,
        link: 'https://router.vuejs.org/zh/'
    },
    {
        label: 'pinia',
        link: 'https://pinia.vuejs.org/',
        icon: Pinia
    },
    {
        label: 'vite',
        link: 'https://vite.dev/',
        icon: Vite
    },
    {
        label: 'element-plus',
        link: 'https://element-plus.org/zh-CN/component/overview.html',
        icon: ElementPlus
    },
    {
        label: 'tailwindcss',
        link: 'https://tailwindui.com/components',
        icon: Tailwindcss
    },
    {
        label: 'echarts',
        link: 'https://echarts.apache.org/examples/zh/index.html',
        icon: Echarts
    },
    {
        label: 'lodash',
        link: 'https://lodash.com',
        icon: Lodash
    }
]);
 
function toLink(url?: string) {
    if (url) {
        window.open(url, '_blank');
    }
}
</script>
 
<style lang="scss" scoped>
.dt-doc {
    .list {
        display: flex;
        flex-wrap: wrap;
 
        .item {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 10px 20px;
            background-color: var(--el-fill-color-light);
            border-radius: 8px;
            cursor: pointer;
            margin: 0 5px 5px 0;
            height: 72px;
            transition: all 0.3s;
 
            img {
                height: 28px;
                margin-bottom: 5px;
            }
 
            span {
                font-size: 12px;
 
                &:nth-child(1) {
                    font-size: 18px;
                }
            }
 
            &:hover {
                background-color: var(--el-fill-color-dark);
            }
 
            &.is-left {
                border-radius: 0 8px 8px 0;
            }
 
            &.is-right {
                border-radius: 8px 0 0 8px;
                margin-right: 0;
            }
 
            &.is-left.is-right {
                border-radius: 0;
            }
        }
    }
}
</style>