@wangyao-test/vue-element-template 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/package.json +14 -0
  2. package/template/.github/workflows/ci.yml +27 -0
  3. package/template/.github/workflows/gh-pages.yml +57 -0
  4. package/template/.vscode/extensions.json +3 -0
  5. package/template/.vscode/settings.json +36 -0
  6. package/template/README.md +47 -0
  7. package/template/eslint.config.js +7 -0
  8. package/template/index.html +18 -0
  9. package/template/package.json +40 -0
  10. package/template/pnpm-lock.yaml +5757 -0
  11. package/template/public/CNAME +1 -0
  12. package/template/public/element-plus-logo-small.svg +1 -0
  13. package/template/public/favicon.svg +1 -0
  14. package/template/public/vite.svg +1 -0
  15. package/template/src/App.vue +22 -0
  16. package/template/src/assets/vue.svg +1 -0
  17. package/template/src/components/HelloWorld.vue +127 -0
  18. package/template/src/components/Logos.vue +31 -0
  19. package/template/src/components/MessageBoxDemo.vue +24 -0
  20. package/template/src/components/layouts/BaseHeader.vue +73 -0
  21. package/template/src/components/layouts/BaseSide.vue +85 -0
  22. package/template/src/components.d.ts +29 -0
  23. package/template/src/composables/dark.ts +4 -0
  24. package/template/src/composables/index.ts +1 -0
  25. package/template/src/env.d.ts +8 -0
  26. package/template/src/main.ts +46 -0
  27. package/template/src/pages/index.vue +4 -0
  28. package/template/src/pages/nav/1/item-1.vue +5 -0
  29. package/template/src/pages/nav/2.vue +5 -0
  30. package/template/src/pages/nav/4.vue +5 -0
  31. package/template/src/styles/element/dark.scss +11 -0
  32. package/template/src/styles/element/index.scss +42 -0
  33. package/template/src/styles/index.scss +40 -0
  34. package/template/src/typed-router.d.ts +26 -0
  35. package/template/src/types.ts +3 -0
  36. package/template/tsconfig.json +27 -0
  37. package/template/uno.config.ts +37 -0
  38. package/template/vite.config.ts +59 -0
@@ -0,0 +1 @@
1
+ vite-starter.element-plus.org
@@ -0,0 +1 @@
1
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><defs><style>.cls-1{fill:#409eff;fill-rule:evenodd;}</style></defs><title>element plus-logo-small 副本</title><path id="element_plus-logo-small" data-name="element plus-logo-small" class="cls-1" d="M37.41,32.37c0,1.57-.83,1.93-.83,1.93L21.51,43A1.69,1.69,0,0,1,20,43S5.2,34.4,4.66,34a1.29,1.29,0,0,1-.55-1V15.24c0-.78,1-1.33,1-1.33L19.86,5.36a2,2,0,0,1,1.79,0l14.46,8.41a2.06,2.06,0,0,1,1.25,2.06V32.37Zm-5.9-17L21.35,9.5a1.59,1.59,0,0,0-1.41,0L8.33,16.15s-.77.46-.76,1.08,0,13.92,0,13.92A1,1,0,0,0,8,31.9c.43.3,12,7,12,7a1.31,1.31,0,0,0,1.19,0C21.91,38.5,33,32.11,33,32.11s.65-.28.65-1.51V27.13l-13,7.9V32a3.05,3.05,0,0,1,1-2.07L33.2,23a2.44,2.44,0,0,0,.55-1.46V18.43L20.64,26.35v-3.2a2.22,2.22,0,0,1,.83-1.79ZM41.07,4.22a.39.39,0,0,0-.37-.42H38V1.06c0-.16-.26-.22-.53-.22L36,1.08c-.18,0-.31.12-.31.23V3.8H33a.4.4,0,0,0-.36.37v2h3V9c0,.16.26.27.54.23l1.51-.25c.18,0,.29-.13.29-.23V6.14h3Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><defs><style>.cls-1{fill:#409eff;fill-rule:evenodd;}</style></defs><title>element plus-logo-small 副本</title><path id="element_plus-logo-small" data-name="element plus-logo-small" class="cls-1" d="M37.41,32.37c0,1.57-.83,1.93-.83,1.93L21.51,43A1.69,1.69,0,0,1,20,43S5.2,34.4,4.66,34a1.29,1.29,0,0,1-.55-1V15.24c0-.78,1-1.33,1-1.33L19.86,5.36a2,2,0,0,1,1.79,0l14.46,8.41a2.06,2.06,0,0,1,1.25,2.06V32.37Zm-5.9-17L21.35,9.5a1.59,1.59,0,0,0-1.41,0L8.33,16.15s-.77.46-.76,1.08,0,13.92,0,13.92A1,1,0,0,0,8,31.9c.43.3,12,7,12,7a1.31,1.31,0,0,0,1.19,0C21.91,38.5,33,32.11,33,32.11s.65-.28.65-1.51V27.13l-13,7.9V32a3.05,3.05,0,0,1,1-2.07L33.2,23a2.44,2.44,0,0,0,.55-1.46V18.43L20.64,26.35v-3.2a2.22,2.22,0,0,1,.83-1.79ZM41.07,4.22a.39.39,0,0,0-.37-.42H38V1.06c0-.16-.26-.22-.53-.22L36,1.08c-.18,0-.31.12-.31.23V3.8H33a.4.4,0,0,0-.36.37v2h3V9c0,.16.26.27.54.23l1.51-.25c.18,0,.29-.13.29-.23V6.14h3Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <el-config-provider namespace="ep">
3
+ <BaseHeader />
4
+ <div class="main-container flex">
5
+ <BaseSide />
6
+ <div w="full" py="4">
7
+ <RouterView />
8
+ </div>
9
+ </div>
10
+ </el-config-provider>
11
+ </template>
12
+
13
+ <style>
14
+ #app {
15
+ text-align: center;
16
+ color: var(--ep-text-color-primary);
17
+ }
18
+
19
+ .main-container {
20
+ height: calc(100vh - var(--ep-menu-item-height) - 4px);
21
+ }
22
+ </style>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -0,0 +1,127 @@
1
+ <script setup lang="ts">
2
+ import { ElMessage } from 'element-plus'
3
+ import { ref } from 'vue'
4
+
5
+ defineProps<{ msg: string }>()
6
+
7
+ const count = ref(0)
8
+ const input = ref('element-plus')
9
+
10
+ const curDate = ref('')
11
+
12
+ function toast() {
13
+ ElMessage.success('Hello')
14
+ }
15
+
16
+ const value1 = ref(true)
17
+ </script>
18
+
19
+ <template>
20
+ <h1 color="$ep-color-primary">
21
+ {{ msg }}
22
+ </h1>
23
+
24
+ <p>
25
+ See
26
+ <a href="https://element-plus.org" target="_blank">element-plus</a> for more
27
+ information.
28
+ </p>
29
+
30
+ <!-- example components -->
31
+ <div class="mb-4">
32
+ <el-button size="large" @click="toast">
33
+ El Message
34
+ </el-button>
35
+
36
+ <MessageBoxDemo />
37
+ </div>
38
+
39
+ <div class="my-2 flex flex-wrap items-center justify-center text-center">
40
+ <el-button @click="count++">
41
+ count is: {{ count }}
42
+ </el-button>
43
+ <el-button type="primary" @click="count++">
44
+ count is: {{ count }}
45
+ </el-button>
46
+ <el-button type="success" @click="count++">
47
+ count is: {{ count }}
48
+ </el-button>
49
+ <el-button type="warning" @click="count++">
50
+ count is: {{ count }}
51
+ </el-button>
52
+ <el-button type="danger" @click="count++">
53
+ count is: {{ count }}
54
+ </el-button>
55
+ <el-button type="info" @click="count++">
56
+ count is: {{ count }}
57
+ </el-button>
58
+ </div>
59
+
60
+ <div>
61
+ <el-tag type="success" class="m-1">
62
+ Tag 1
63
+ </el-tag>
64
+ <el-tag type="warning" class="m-1">
65
+ Tag 1
66
+ </el-tag>
67
+ <el-tag type="danger" class="m-1">
68
+ Tag 1
69
+ </el-tag>
70
+ <el-tag type="info" class="m-1">
71
+ Tag 1
72
+ </el-tag>
73
+ </div>
74
+
75
+ <div>
76
+ <el-switch v-model="value1" />
77
+ <el-switch
78
+ v-model="value1"
79
+ class="m-2"
80
+ style="--ep-switch-on-color: black; --ep-switch-off-color: gray;"
81
+ />
82
+ </div>
83
+
84
+ <div class="my-2">
85
+ <el-input v-model="input" class="m-2" style="width: 200px" />
86
+ <el-date-picker
87
+ v-model="curDate"
88
+ class="m-2"
89
+ type="date"
90
+ placeholder="Pick a day"
91
+ />
92
+ </div>
93
+
94
+ <p>For example, we can custom primary color to 'green'.</p>
95
+
96
+ <p>
97
+ Edit
98
+ <code>components/HelloWorld.vue</code> to test components.
99
+ </p>
100
+ <p>
101
+ Edit
102
+ <code>styles/element/var.scss</code> to test scss variables.
103
+ </p>
104
+
105
+ <p>
106
+ Full Example:
107
+ <a
108
+ href="https://github.com/element-plus/element-plus-vite-starter"
109
+ target="_blank"
110
+ >element-plus-vite-starter</a>
111
+ | On demand Example:
112
+ <a
113
+ href="https://github.com/element-plus/unplugin-element-plus"
114
+ target="_blank"
115
+ >unplugin-element-plus/examples/vite</a>
116
+ </p>
117
+ </template>
118
+
119
+ <style>
120
+ .ep-button {
121
+ margin: 4px;
122
+ }
123
+ .ep-button + .ep-button {
124
+ margin-left: 0;
125
+ margin: 4px;
126
+ }
127
+ </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div>
3
+ <a href="https://vitejs.dev" target="_blank">
4
+ <img src="/vite.svg" class="logo" alt="Vite logo">
5
+ </a>
6
+ <a href="https://vuejs.org/" target="_blank">
7
+ <img src="../assets/vue.svg" class="logo vue" alt="Vue logo">
8
+ </a>
9
+ <a href="https://element-plus.org/" target="_blank">
10
+ <img src="/element-plus-logo-small.svg" class="logo element-plus" alt="Element Plus logo">
11
+ </a>
12
+ </div>
13
+ </template>
14
+
15
+ <style scoped>
16
+ .logo {
17
+ height: 6em;
18
+ padding: 1.5em;
19
+ will-change: filter;
20
+ transition: filter 300ms;
21
+ }
22
+ .logo:hover {
23
+ filter: drop-shadow(0 0 2em #646cffaa);
24
+ }
25
+ .logo.vue:hover {
26
+ filter: drop-shadow(0 0 2em #42b883aa);
27
+ }
28
+ .logo.element-plus:hover {
29
+ filter: drop-shadow(0 0 2em #409effaa);
30
+ }
31
+ </style>
@@ -0,0 +1,24 @@
1
+ <script lang="ts" setup>
2
+ import type { Action } from 'element-plus'
3
+ import { ElMessage, ElMessageBox } from 'element-plus'
4
+
5
+ function open() {
6
+ ElMessageBox.alert('This is a message', 'Title', {
7
+ // if you want to disable its autofocus
8
+ // autofocus: false,
9
+ confirmButtonText: 'OK',
10
+ callback: (action: Action) => {
11
+ ElMessage({
12
+ type: 'info',
13
+ message: `action: ${action}`,
14
+ })
15
+ },
16
+ })
17
+ }
18
+ </script>
19
+
20
+ <template>
21
+ <el-button plain @click="open">
22
+ Click to open the Message Box
23
+ </el-button>
24
+ </template>
@@ -0,0 +1,73 @@
1
+ <script lang="ts" setup>
2
+ import { repository } from '~/../package.json'
3
+
4
+ import { toggleDark } from '~/composables'
5
+ </script>
6
+
7
+ <template>
8
+ <el-menu class="el-menu-demo" mode="horizontal" :ellipsis="false" router>
9
+ <el-menu-item index="/">
10
+ <div class="flex items-center justify-center gap-2">
11
+ <div class="text-xl" i-ep-element-plus />
12
+ <span>Element Plus</span>
13
+ </div>
14
+ </el-menu-item>
15
+ <el-sub-menu index="2">
16
+ <template #title>
17
+ Workspace
18
+ </template>
19
+ <el-menu-item index="2-1">
20
+ item one
21
+ </el-menu-item>
22
+ <el-menu-item index="2-2">
23
+ item two
24
+ </el-menu-item>
25
+ <el-menu-item index="2-3">
26
+ item three
27
+ </el-menu-item>
28
+ <el-sub-menu index="2-4">
29
+ <template #title>
30
+ item four
31
+ </template>
32
+ <el-menu-item index="2-4-1">
33
+ item one
34
+ </el-menu-item>
35
+ <el-menu-item index="2-4-2">
36
+ item two
37
+ </el-menu-item>
38
+ <el-menu-item index="2-4-3">
39
+ item three
40
+ </el-menu-item>
41
+ </el-sub-menu>
42
+ </el-sub-menu>
43
+ <el-menu-item index="3" disabled>
44
+ Info
45
+ </el-menu-item>
46
+ <el-menu-item index="4">
47
+ Orders
48
+ </el-menu-item>
49
+
50
+ <el-menu-item h="full" @click="toggleDark()">
51
+ <button
52
+ class="w-full cursor-pointer border-none bg-transparent"
53
+ style="height: var(--ep-menu-item-height)"
54
+ >
55
+ <i inline-flex i="dark:ep-moon ep-sunny" />
56
+ </button>
57
+ </el-menu-item>
58
+
59
+ <el-menu-item h="full">
60
+ <a class="size-full flex items-center justify-center" :href="repository.url" target="_blank">
61
+ <div i-ri-github-fill />
62
+ </a>
63
+ </el-menu-item>
64
+ </el-menu>
65
+ </template>
66
+
67
+ <style lang="scss">
68
+ .el-menu-demo {
69
+ &.ep-menu--horizontal > .ep-menu-item:nth-child(1) {
70
+ margin-right: auto;
71
+ }
72
+ }
73
+ </style>
@@ -0,0 +1,85 @@
1
+ <script lang="ts" setup>
2
+ import {
3
+ Document,
4
+ Menu as IconMenu,
5
+ Location,
6
+ Setting,
7
+ } from '@element-plus/icons-vue'
8
+
9
+ // const isCollapse = ref(true)
10
+ function handleOpen(key: string, keyPath: string[]) {
11
+ // eslint-disable-next-line no-console
12
+ console.log(key, keyPath)
13
+ }
14
+ function handleClose(key: string, keyPath: string[]) {
15
+ // eslint-disable-next-line no-console
16
+ console.log(key, keyPath)
17
+ }
18
+ </script>
19
+
20
+ <template>
21
+ <el-menu
22
+ router
23
+ default-active="1"
24
+ class="el-menu-vertical-demo"
25
+ @open="handleOpen"
26
+ @close="handleClose"
27
+ >
28
+ <el-sub-menu index="1">
29
+ <template #title>
30
+ <el-icon>
31
+ <Location />
32
+ </el-icon>
33
+ <span>Navigator One</span>
34
+ </template>
35
+ <el-menu-item-group>
36
+ <template #title>
37
+ <span>Group One</span>
38
+ </template>
39
+ <el-menu-item index="/nav/1/item-1">
40
+ item one
41
+ </el-menu-item>
42
+ <el-menu-item index="1-2">
43
+ item two
44
+ </el-menu-item>
45
+ </el-menu-item-group>
46
+ <el-menu-item-group title="Group Two">
47
+ <el-menu-item index="1-3">
48
+ item three
49
+ </el-menu-item>
50
+ </el-menu-item-group>
51
+ <el-sub-menu index="1-4">
52
+ <template #title>
53
+ <span>item four</span>
54
+ </template>
55
+ <el-menu-item index="1-4-1">
56
+ item one
57
+ </el-menu-item>
58
+ </el-sub-menu>
59
+ </el-sub-menu>
60
+ <el-menu-item index="/nav/2">
61
+ <el-icon>
62
+ <IconMenu />
63
+ </el-icon>
64
+ <template #title>
65
+ Navigator Two
66
+ </template>
67
+ </el-menu-item>
68
+ <el-menu-item index="3" disabled>
69
+ <el-icon>
70
+ <Document />
71
+ </el-icon>
72
+ <template #title>
73
+ Navigator Three
74
+ </template>
75
+ </el-menu-item>
76
+ <el-menu-item index="/nav/4">
77
+ <el-icon>
78
+ <Setting />
79
+ </el-icon>
80
+ <template #title>
81
+ Navigator Four
82
+ </template>
83
+ </el-menu-item>
84
+ </el-menu>
85
+ </template>
@@ -0,0 +1,29 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ // Generated by unplugin-vue-components
4
+ // Read more: https://github.com/vuejs/core/pull/3399
5
+ export {}
6
+
7
+ /* prettier-ignore */
8
+ declare module 'vue' {
9
+ export interface GlobalComponents {
10
+ BaseHeader: typeof import('./components/layouts/BaseHeader.vue')['default']
11
+ BaseSide: typeof import('./components/layouts/BaseSide.vue')['default']
12
+ ElButton: typeof import('element-plus/es')['ElButton']
13
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
14
+ ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
15
+ ElIcon: typeof import('element-plus/es')['ElIcon']
16
+ ElInput: typeof import('element-plus/es')['ElInput']
17
+ ElMenu: typeof import('element-plus/es')['ElMenu']
18
+ ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
19
+ ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
20
+ ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
21
+ ElSwitch: typeof import('element-plus/es')['ElSwitch']
22
+ ElTag: typeof import('element-plus/es')['ElTag']
23
+ HelloWorld: typeof import('./components/HelloWorld.vue')['default']
24
+ Logos: typeof import('./components/Logos.vue')['default']
25
+ MessageBoxDemo: typeof import('./components/MessageBoxDemo.vue')['default']
26
+ RouterLink: typeof import('vue-router')['RouterLink']
27
+ RouterView: typeof import('vue-router')['RouterView']
28
+ }
29
+ }
@@ -0,0 +1,4 @@
1
+ import { useDark, useToggle } from '@vueuse/core'
2
+
3
+ export const isDark = useDark()
4
+ export const toggleDark = useToggle(isDark)
@@ -0,0 +1 @@
1
+ export * from './dark'
@@ -0,0 +1,8 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+
6
+ const component: DefineComponent<object, object, any>
7
+ export default component
8
+ }
@@ -0,0 +1,46 @@
1
+ import type { UserModule } from './types'
2
+ import { ViteSSG } from 'vite-ssg'
3
+
4
+ // import "~/styles/element/index.scss";
5
+
6
+ // import ElementPlus from "element-plus";
7
+ // import all element css, uncommented next line
8
+ // import "element-plus/dist/index.css";
9
+
10
+ // or use cdn, uncomment cdn link in `index.html`
11
+
12
+ import { routes } from 'vue-router/auto-routes'
13
+ import App from './App.vue'
14
+
15
+ import '~/styles/index.scss'
16
+
17
+ import 'uno.css'
18
+ // If you want to use ElMessage, import it.
19
+ import 'element-plus/theme-chalk/src/message.scss'
20
+ import 'element-plus/theme-chalk/src/message-box.scss'
21
+
22
+ // if you do not need ssg:
23
+ // import { createApp } from "vue";
24
+
25
+ // const app = createApp(App);
26
+ // app.use(createRouter({
27
+ // history: createWebHistory(),
28
+ // routes,
29
+ // }))
30
+ // // app.use(ElementPlus);
31
+ // app.mount("#app");
32
+
33
+ // https://github.com/antfu/vite-ssg
34
+ export const createApp = ViteSSG(
35
+ App,
36
+ {
37
+ routes,
38
+ base: import.meta.env.BASE_URL,
39
+ },
40
+ (ctx) => {
41
+ // install all modules under `modules/`
42
+ Object.values(import.meta.glob<{ install: UserModule }>('./modules/*.ts', { eager: true }))
43
+ .forEach(i => i.install?.(ctx))
44
+ // ctx.app.use(Previewer)
45
+ },
46
+ )
@@ -0,0 +1,4 @@
1
+ <template>
2
+ <Logos my="4" />
3
+ <HelloWorld msg="Hello Vue 3 + Element Plus + Vite" />
4
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div>
3
+ Item One
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div>
3
+ Navigation 2
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div>
3
+ Navigation 4
4
+ </div>
5
+ </template>
@@ -0,0 +1,11 @@
1
+ // only scss variables
2
+
3
+ $--colors: (
4
+ 'primary': (
5
+ 'base': #589ef8,
6
+ ),
7
+ );
8
+
9
+ @forward 'element-plus/theme-chalk/src/dark/var.scss' with (
10
+ $colors: $--colors
11
+ );
@@ -0,0 +1,42 @@
1
+ $--colors: (
2
+ 'primary': (
3
+ 'base': green,
4
+ ),
5
+ 'success': (
6
+ 'base': #21ba45,
7
+ ),
8
+ 'warning': (
9
+ 'base': #f2711c,
10
+ ),
11
+ 'danger': (
12
+ 'base': #db2828,
13
+ ),
14
+ 'error': (
15
+ 'base': #db2828,
16
+ ),
17
+ 'info': (
18
+ 'base': #42b8dd,
19
+ ),
20
+ );
21
+
22
+ // we can add this to custom namespace, default is 'el'
23
+ @forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
24
+ $namespace: 'ep'
25
+ );
26
+
27
+ // You should use them in scss, because we calculate it by sass.
28
+ // comment next lines to use default color
29
+ @forward 'element-plus/theme-chalk/src/common/var.scss' with (
30
+ // do not use same name, it will override.
31
+ $colors: $--colors,
32
+ $button-padding-horizontal: ('default': 50px)
33
+ );
34
+
35
+ // if you want to import all
36
+ // @use "element-plus/theme-chalk/src/index.scss" as *;
37
+
38
+ // You can comment it to hide debug info.
39
+ // @debug $--colors;
40
+
41
+ // custom dark variables
42
+ @use './dark.scss';
@@ -0,0 +1,40 @@
1
+ // import dark theme
2
+ @use 'element-plus/theme-chalk/src/dark/css-vars.scss' as *;
3
+
4
+ // :root {
5
+ // --ep-color-primary: red;
6
+ // }
7
+
8
+ body {
9
+ font-family: Inter, system-ui, Avenir, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
10
+ 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
11
+ -webkit-font-smoothing: antialiased;
12
+ -moz-osx-font-smoothing: grayscale;
13
+ margin: 0;
14
+ }
15
+
16
+ a {
17
+ color: var(--ep-color-primary);
18
+ }
19
+
20
+ code {
21
+ border-radius: 2px;
22
+ padding: 2px 4px;
23
+ background-color: var(--ep-color-primary-light-9);
24
+ color: var(--ep-color-primary);
25
+ }
26
+
27
+ #nprogress {
28
+ pointer-events: none;
29
+ }
30
+
31
+ #nprogress .bar {
32
+ background: rgb(13, 148, 136);
33
+ opacity: 0.75;
34
+ position: fixed;
35
+ z-index: 1031;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 2px;
40
+ }
@@ -0,0 +1,26 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
5
+ // It's recommended to commit this file.
6
+ // Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
7
+
8
+ declare module 'vue-router/auto-routes' {
9
+ import type {
10
+ RouteRecordInfo,
11
+ ParamValue,
12
+ ParamValueOneOrMore,
13
+ ParamValueZeroOrMore,
14
+ ParamValueZeroOrOne,
15
+ } from 'vue-router'
16
+
17
+ /**
18
+ * Route name map generated by unplugin-vue-router
19
+ */
20
+ export interface RouteNamedMap {
21
+ '/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
22
+ '/nav/1/item-1': RouteRecordInfo<'/nav/1/item-1', '/nav/1/item-1', Record<never, never>, Record<never, never>>,
23
+ '/nav/2': RouteRecordInfo<'/nav/2', '/nav/2', Record<never, never>, Record<never, never>>,
24
+ '/nav/4': RouteRecordInfo<'/nav/4', '/nav/4', Record<never, never>, Record<never, never>>,
25
+ }
26
+ }
@@ -0,0 +1,3 @@
1
+ import type { ViteSSGContext } from 'vite-ssg'
2
+
3
+ export type UserModule = (ctx: ViteSSGContext) => void
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "jsx": "preserve",
5
+ "lib": ["esnext", "dom"],
6
+ "useDefineForClassFields": true,
7
+ "baseUrl": ".",
8
+ "module": "esnext",
9
+ "moduleResolution": "bundler",
10
+ "paths": {
11
+ "~/*": ["src/*"]
12
+ },
13
+ "resolveJsonModule": true,
14
+ "types": [
15
+ "vite/client",
16
+ "unplugin-vue-router/client"
17
+ ],
18
+ "strict": true,
19
+ "sourceMap": true,
20
+ "esModuleInterop": true,
21
+ "skipLibCheck": true
22
+ },
23
+ "vueCompilerOptions": {
24
+ "target": 3
25
+ },
26
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
27
+ }