Skip to content

Commit 2be42d3

Browse files
committed
feat add github link
1 parent c63972a commit 2be42d3

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ declare module 'vue' {
8686
ElTree: typeof import('element-plus/es')['ElTree']
8787
ElUpload: typeof import('element-plus/es')['ElUpload']
8888
ElWatermark: typeof import('element-plus/es')['ElWatermark']
89+
Github: typeof import('./src/components/icons/Github.vue')['default']
8990
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
9091
IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
9192
IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']

src/components/icons/Github.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" data-v-b5250014="">
3+
<path
4+
fill="currentColor"
5+
d="M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476c0-.237-.013-1.024-.013-1.862c-2.512.463-3.162-.612-3.362-1.175c-.113-.288-.6-1.175-1.025-1.413c-.35-.187-.85-.65-.013-.662c.788-.013 1.35.725 1.538 1.025c.9 1.512 2.338 1.087 2.912.825c.088-.65.35-1.087.638-1.337c-2.225-.25-4.55-1.113-4.55-4.938c0-1.088.387-1.987 1.025-2.688c-.1-.25-.45-1.275.1-2.65c0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337c1.912-1.3 2.75-1.024 2.75-1.024c.55 1.375.2 2.4.1 2.65c.637.7 1.025 1.587 1.025 2.687c0 3.838-2.337 4.688-4.562 4.938c.362.312.675.912.675 1.85c0 1.337-.013 2.412-.013 2.75c0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z"
6+
></path>
7+
</svg>
8+
</template>

src/views/ThemeEditor.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<template>
22
<el-row style="padding: 40px 20px 0 20px">
3-
<el-col :span="6">主题编辑器</el-col>
3+
<el-col :span="6">
4+
<div class="flex items-center gap-2">
5+
<span>主题编辑器</span>
6+
<el-button type="primary" link @click="openGithub">
7+
<Github style="color: rgb(48, 49, 51)" class="!w-5 !h-5" />
8+
</el-button>
9+
</div>
10+
</el-col>
411
<el-col :span="18" style="display: flex; justify-content: end; align-items: start">
512
<el-switch
613
v-model="isDark"
@@ -336,6 +343,7 @@ import color from '@/common/config/theme/color'
336343
import size from '@/common/config/theme/size'
337344
import style from '@/common/config/theme/style'
338345
import other from '@/common/config/theme/other'
346+
import Github from '@/components/icons/Github.vue'
339347
340348
const activeName = ref('first')
341349
const activeNames = ref(['1'])
@@ -386,6 +394,10 @@ function saveObjectAsCss(filename: string) {
386394
URL.revokeObjectURL(url)
387395
document.body.removeChild(a)
388396
}
397+
398+
const openGithub = () => {
399+
window.open('https://github.com/DeepFundAI/element-plus-theme-editor', '_blank')
400+
}
389401
</script>
390402
<style lang="less" scoped>
391403
.editor-container {

0 commit comments

Comments
 (0)