-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
734 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: GitHub Pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14.x" | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Type Check | ||
run: npm run typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
.vite-ssg-temp | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-* | ||
cabal-dev | ||
*.o | ||
*.hi | ||
*.hie | ||
*.chi | ||
*.chs.h | ||
*.dyn_o | ||
*.dyn_hi | ||
.hpc | ||
.hsenv | ||
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
*.prof | ||
*.aux | ||
*.hp | ||
*.eventlog | ||
.stack-work/ | ||
cabal.project.local | ||
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
dist-ssr | ||
*.local | ||
|
||
# lock | ||
yarn.lock | ||
package-lock.json | ||
pnpm-lock.yaml | ||
|
||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
{ | ||
"recommendations": ["Vue.volar"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,42 @@ | ||
# www2 | ||
|
||
# element-plus-vite-starter | ||
|
||
> A starter kit for Element Plus with Vite | ||
- Preview: <https://vite-starter.element-plus.org> | ||
|
||
This is an example of on-demand element-plus with [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components). | ||
|
||
> If you want to import all, it may be so simple that no examples are needed. Just follow [quickstart | Docs](https://element-plus.org/zh-CN/guide/quickstart.html) and import them. | ||
If you just want an on-demand import example `manually`, you can check [unplugin-element-plus/examples/vite](https://github.com/element-plus/unplugin-element-plus/tree/main/examples/vite). | ||
|
||
## Project setup | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
### Compiles and minifies for production | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
git clone https://github.com/element-plus/element-plus-vite-starter | ||
cd element-plus-vite-starter | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
### Custom theme | ||
|
||
See `src/styles/element/index.scss`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Element Plus Vite Starter</title> | ||
<!-- element css cdn, if you use custom theme, remove it. --> | ||
<!-- <link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css" | ||
/> --> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "element-plus-vite-starter", | ||
"private": true, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"generate": "vite-ssg build", | ||
"preview": "vite preview", | ||
"typecheck": "vue-tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"element-plus": "^2.6.2", | ||
"vue": "^3.4.21", | ||
"vue-router": "^4.4.0" | ||
}, | ||
"devDependencies": { | ||
"@iconify-json/ep": "^1.1.15", | ||
"@types/node": "^20.11.30", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"sass": "^1.72.0", | ||
"typescript": "^5.4.3", | ||
"unocss": "^0.58.6", | ||
"unplugin-vue-components": "^0.26.0", | ||
"vite": "^5.2.5", | ||
"vite-ssg": "^0.23.6", | ||
"vue-tsc": "^2.0.7" | ||
}, | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vite-starter.element-plus.org |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
<el-config-provider namespace="ep"> | ||
<el-container> | ||
<el-header> | ||
<BaseHeader | ||
:currentPage="currentPage" | ||
:pages="pages" | ||
@navigate-to="navigateTo" | ||
/> | ||
</el-header> | ||
<el-container style="max-width: 100em"> | ||
<el-main> | ||
<RouterView :projects="pages[0].items" /> | ||
</el-main> | ||
<el-footer>Footer</el-footer> | ||
</el-container> | ||
</el-container> | ||
</el-config-provider> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from "vue"; | ||
import { useRoute, useRouter } from "vue-router"; | ||
const router = useRouter(); | ||
const currentPage = ref("0"); | ||
const pages = ref([ | ||
{ | ||
index: "1", | ||
label: "Projects", | ||
items: [ | ||
{ | ||
label: "ATA-GUI", | ||
path: "/projects/ata-gui", | ||
index: "0", | ||
img: "/src/assets/banner3.png", | ||
}, | ||
{ | ||
label: "Ares", | ||
path: "/projects/ares", | ||
index: "1", | ||
img: "/src/assets/banner3.png", | ||
}, | ||
{ | ||
label: "ATA", | ||
path: "/projects/ata", | ||
index: "2", | ||
img: "/src/assets/banner3.png", | ||
}, | ||
], | ||
}, | ||
{ index: "2", label: "Contact", path: "/contact" }, | ||
]); | ||
function navigateHome() { | ||
router.push("/"); | ||
} | ||
function navigateTo(index) { | ||
if (index === "0") navigateHome(); | ||
else if (index.includes("-")) { | ||
let iS = index.split("-"); | ||
router.push( | ||
pages.value | ||
.find((it) => it.index == iS[0]) | ||
?.items.find((it) => it.index == iS[1]).path | ||
); | ||
} else router.push(pages.value.find((it) => it.index == index).path); | ||
} | ||
</script> | ||
<style> | ||
#app { | ||
text-align: center; | ||
color: var(--ep-text-color-primary); | ||
} | ||
.main-container { | ||
height: calc(100vh - var(--ep-menu-item-height) - 3px); | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
// @ts-nocheck | ||
// Generated by unplugin-vue-components | ||
// Read more: https://github.com/vuejs/core/pull/3399 | ||
export {} | ||
|
||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
BaseHeader: typeof import('./components/BaseHeader.vue')['default'] | ||
BaseSide: typeof import('./components/BaseSide.vue')['default'] | ||
ElAside: typeof import('element-plus/es')['ElAside'] | ||
ElButton: (typeof import("element-plus/es"))["ElButton"] | ||
ElCard: typeof import('element-plus/es')['ElCard'] | ||
ElCarousel: typeof import('element-plus/es')['ElCarousel'] | ||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] | ||
ElCol: typeof import('element-plus/es')['ElCol'] | ||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] | ||
ElContainer: typeof import('element-plus/es')['ElContainer'] | ||
ElDatePicker: (typeof import("element-plus/es"))["ElDatePicker"] | ||
ElFooter: typeof import('element-plus/es')['ElFooter'] | ||
ElHeader: typeof import('element-plus/es')['ElHeader'] | ||
ElIcon: typeof import('element-plus/es')['ElIcon'] | ||
ElImage: typeof import('element-plus/es')['ElImage'] | ||
ElInput: (typeof import("element-plus/es"))["ElInput"] | ||
ElMain: typeof import('element-plus/es')['ElMain'] | ||
ElMenu: typeof import('element-plus/es')['ElMenu'] | ||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] | ||
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] | ||
ElRow: typeof import('element-plus/es')['ElRow'] | ||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] | ||
ElSwitch: typeof import('element-plus/es')['ElSwitch'] | ||
ElTag: (typeof import("element-plus/es"))["ElTag"] | ||
RouterLink: typeof import('vue-router')['RouterLink'] | ||
RouterView: typeof import('vue-router')['RouterView'] | ||
} | ||
} |
Oops, something went wrong.