-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from tylt6688/dev
FEAT(GitHubAction): 增加GitHubAction测试
- Loading branch information
Showing
12 changed files
with
160 additions
and
103 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,33 @@ | ||
name: 监听 Push 打包部署 | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
npm-build: | ||
name: Npm Build and Deploy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 读取仓库内容 | ||
uses: actions/checkout@v4 | ||
|
||
- name: 安装依赖 | ||
run: | | ||
npm install | ||
- name: 打包 | ||
run: | | ||
npm run build | ||
- name: 部署 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: main | ||
folder: dist | ||
|
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
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,36 @@ | ||
<template> | ||
<div class="background-container"> | ||
<!-- Your page content goes here --> | ||
<div class="content"> | ||
<div>页面不见了!</div> | ||
<div>首页瞧瞧,点击<router-link to="/">这里</router-link>进入首页.</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'NotFound', | ||
}; | ||
</script> | ||
|
||
<style lang="less"> | ||
/* Scoped styles for the component */ | ||
.background-container { | ||
/* Adjust the path to your actual image file */ | ||
background-image: url('../../assets/404_images/404.png'); | ||
background-size: cover; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
margin: 0; | ||
padding: 0; | ||
height: 100vh; /* Set the height to 100% of the viewport height */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
.content { | ||
text-align: center; | ||
} | ||
} | ||
</style> |
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
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
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
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
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,31 @@ | ||
/** | ||
* 倒计时提示信息工具,启动函数countDownMessage(),参数time-->倒计时数。msg-->错误提示 | ||
*/ | ||
|
||
import { Message } from 'element-ui'; | ||
import router from "@/router"; | ||
|
||
let element = null; | ||
|
||
export function countDownMessage(time, msg) { | ||
let countTime = (t, m) => { | ||
setTimeout(() => { | ||
if (t === 0) { | ||
router.push('/login'); | ||
} else { | ||
element.message = m + `,将在${t}秒后返回登录页面`; | ||
countTime(--t, m); | ||
} | ||
}, 1000); | ||
}; | ||
|
||
element = Message({ | ||
showClose: false, | ||
message: msg + `,将在${time}秒后返回登录页面`, | ||
type: "error", | ||
duration: `${time}000` | ||
}); | ||
|
||
countTime(time - 1, msg); | ||
} | ||
|
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
Oops, something went wrong.