feat(projects): 工作台页面:添加技术栈官网链接

This commit is contained in:
Soybean 2021-11-13 23:42:18 +08:00
parent 5790a4f582
commit 364c64b464
2 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,8 @@
<template> <template>
<div class="p-4px border-1px border-[#efeff5] dark:border-[#ffffff17] rounded-4px hover:shadow-sm cursor-pointer"> <div
class="p-4px border-1px border-[#efeff5] dark:border-[#ffffff17] rounded-4px hover:shadow-sm cursor-pointer"
@click="handleOpenSite"
>
<header class="flex-y-center"> <header class="flex-y-center">
<Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" /> <Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" />
<h3 class="pl-12px text-18px font-semibold">{{ name }}</h3> <h3 class="pl-12px text-18px font-semibold">{{ name }}</h3>
@ -21,12 +24,18 @@ interface Props {
description: string; description: string;
/** 技术作者 */ /** 技术作者 */
author: string; author: string;
/** 技术官网 */
site: string;
/** 技术图标 */ /** 技术图标 */
icon: string; icon: string;
/** 图标颜色 */ /** 图标颜色 */
iconColor?: string; iconColor?: string;
} }
defineProps<Props>(); const props = defineProps<Props>();
function handleOpenSite() {
window.open(props.site, '_blank');
}
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -60,6 +60,7 @@ interface Technology {
name: string; name: string;
description: string; description: string;
author: string; author: string;
site: string;
icon: string; icon: string;
iconColor?: string; iconColor?: string;
} }
@ -83,6 +84,7 @@ const technology: Technology[] = [
name: 'Vue', name: 'Vue',
description: '一套用于构建用户界面的渐进式框架', description: '一套用于构建用户界面的渐进式框架',
author: '尤雨溪 - Evan You', author: '尤雨溪 - Evan You',
site: 'https://v3.cn.vuejs.org/',
icon: 'vscode-icons:file-type-vue' icon: 'vscode-icons:file-type-vue'
}, },
{ {
@ -90,6 +92,7 @@ const technology: Technology[] = [
name: 'TypeScript', name: 'TypeScript',
description: 'JavaScript类型的超集它可以编译成纯JavaScript', description: 'JavaScript类型的超集它可以编译成纯JavaScript',
author: '微软 - Microsoft', author: '微软 - Microsoft',
site: 'https://www.typescriptlang.org/',
icon: 'vscode-icons:file-type-typescript-official' icon: 'vscode-icons:file-type-typescript-official'
}, },
{ {
@ -97,6 +100,7 @@ const technology: Technology[] = [
name: 'Vite', name: 'Vite',
description: '下一代前端开发与构建工具', description: '下一代前端开发与构建工具',
author: '尤雨溪 - Evan You', author: '尤雨溪 - Evan You',
site: 'https://vitejs.cn/',
icon: 'vscode-icons:file-type-vite' icon: 'vscode-icons:file-type-vite'
}, },
{ {
@ -104,6 +108,7 @@ const technology: Technology[] = [
name: 'NaiveUI', name: 'NaiveUI',
description: '一个 Vue 3 组件库', description: '一个 Vue 3 组件库',
author: '图森未来 - TuSimple', author: '图森未来 - TuSimple',
site: 'https://www.naiveui.com/zh-CN/os-theme',
icon: 'mdi:alpha-n-box-outline', icon: 'mdi:alpha-n-box-outline',
iconColor: '#5fbc22' iconColor: '#5fbc22'
}, },
@ -112,6 +117,7 @@ const technology: Technology[] = [
name: 'WindiCSS', name: 'WindiCSS',
description: '下一代实用优先的CSS框架', description: '下一代实用优先的CSS框架',
author: 'Windicss', author: 'Windicss',
site: 'https://windicss.org/',
icon: 'file-icons:windi', icon: 'file-icons:windi',
iconColor: '#48b0f1' iconColor: '#48b0f1'
}, },
@ -120,6 +126,7 @@ const technology: Technology[] = [
name: 'Pinia', name: 'Pinia',
description: 'vue状态管理框架支持vue2、vue3', description: 'vue状态管理框架支持vue2、vue3',
author: 'Posva', author: 'Posva',
site: 'https://pinia.esm.dev/',
icon: 'mdi:fruit-pineapple', icon: 'mdi:fruit-pineapple',
iconColor: '#fecf48' iconColor: '#fecf48'
} }