@@ -42,7 +42,7 @@ export default {
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 6626f1c..a9549d8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,5 +1,5 @@
import { createApp } from 'vue'
-import showInfo from './scripts/showInfo'
+import showInfo from './scripts/showRepoInfo'
import router from './router'
import App from './App.vue'
diff --git a/src/router/index.js b/src/router/index.js
index f55dafd..4450e7a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -8,13 +8,14 @@ const router = createRouter({
{ path: '/', component: () => import('../../src/views/MainHome.vue') },
{ path: '/about', component: () => import('../../src/views/MainAbout.vue') },
- // GROUP 2 ---- 数据页
- { path: '/category', redirect: '/category/germanium' }, // 临时作为类型首页
- { path: '/category/:platform', name: 'category', component: () => import('../../src/views/DataCategoryList.vue') },
-
- // GROUP 3 ---- 异常情况配置(404)
+ // GROUP 2 ---- 异常情况配置(404)
{ path: '/404', name: '404', component: () => import('../../src/views/NotFound.vue') },
{ path: '/:pathMatch(.*)', redirect: '/404' },
+
+ // GROUP 3 ---- 数据页面
+ { path: '/category', redirect: '/category/germanium' }, // 临时作为类型首页
+ { path: '/category/:platform', name: 'category', component: () => import('../../src/views/DataCategoryList.vue') },
+ { path: '/detail/:platform/:build', name: 'detail', component: () => import('../../src/views/DataDetail.vue') },
]
})
diff --git a/src/scripts/parseInfo.js b/src/scripts/parseInfo.js
deleted file mode 100644
index d9a7dfd..0000000
--- a/src/scripts/parseInfo.js
+++ /dev/null
@@ -1,58 +0,0 @@
-"use strict"
-/**
- * 此脚本用于在处理本项目相关信息
- * @author crrashh1542
- * @version 1.1
- */
-
-import packageInfo from '/package.json'
-import buildInfo from '/temp/buildInfo.json'
-
-// packageInfo 相关
-const packageVerNum = packageInfo.version // 项目版本号
-const packageRepo = packageInfo.repository // 项目地址
-const packageDeps = packageInfo.dependencies // 依赖版本
-
-// buildInfo 相关
-const buildTime = buildInfo.time // 构建时间
-const buildHash = buildInfo.hash // commit hash
-const buildNum = buildInfo.build // 构建次数
-
-// 构建时间处理
-const parseBuildTime = t => {
- // 由 /temp/buildInfo.js 可知,time 参数格式均为 xxxx-xx-xxTyy:yy+zz:zz
- const date = t.slice(0, 10) // 日期
- const time = t.slice(11, 19) // 时间
- const offset = t.slice(19, 25) // 时区偏移
- if(offset === '+08:00') { // 设置时区
- return date + ' ' + time + ' CST'
- } else {
- return date + ' ' + time
- }
-}
-
-// 项目版本处理
-const parseVersion = v => {
- // 如果版本带后缀,就不返回 hash,减少移动端视觉占用空间
- if(v.indexOf('-') !== -1) {
- return 'v' + packageVerNum + ' (build ' + buildNum + ')'
- } else {
- return 'v' + packageVerNum + '@' + buildHash + ' (build ' + buildNum + ')'
- }
-}
-
-// 数据合并
-const pVersion = parseVersion(packageVerNum) // 完整版本
-const pTime = parseBuildTime(buildTime) // 构建时间
-const pRepo = packageRepo.split('https://github.com/')[1] // 项目名
-const pVue = 'v' + packageDeps['vue'].split('^')[1] // Vue 框架版本
-const pUI = 'v' + packageDeps['@fluentui/web-components'].split('^')[1] // 组件库版本
-
-// 导出数据
-export default [
- ['项目版本', 'icon-version' , pVersion],
- ['构建时间', 'icon-time', pTime],
- ['项目地址', 'icon-github', packageRepo, pRepo],
- ['Vue 框架版本', 'icon-vuejs', pVue],
- ['Fluent UI 组件库版本', 'icon-fluent', pUI]
-]
\ No newline at end of file
diff --git a/src/scripts/parseRepoInfo.js b/src/scripts/parseRepoInfo.js
new file mode 100644
index 0000000..944cfa5
--- /dev/null
+++ b/src/scripts/parseRepoInfo.js
@@ -0,0 +1,31 @@
+"use strict"
+/**
+ * 此脚本用于在处理本项目相关信息
+ * @author crrashh1542
+ * @version 1.4
+ */
+
+import packageInfo from '/package.json'
+import buildInfo from '/temp/buildInfo.json'
+
+// packageInfo 相关
+const packageVerNum = packageInfo.version // 项目版本号
+const packageRepo = packageInfo.repository // 项目地址
+const packageDeps = packageInfo.dependencies // 依赖版本
+
+// buildInfo 相关
+const buildNum = buildInfo.build // 构建次数
+
+// 数据合并
+const pVersion = 'v' + packageVerNum + ' (build ' + buildNum + ')' // 完整版本
+const pRepo = packageRepo.split('https://github.com/')[1] // 项目名
+const pVue = 'v' + packageDeps['vue'].split('^')[1] // Vue 框架版本
+const pUI = 'v' + packageDeps['@fluentui/web-components'].split('^')[1] // 组件库版本
+
+// 导出数据
+export default [
+ ['项目版本', 'icon-version' , pVersion],
+ ['项目地址', 'icon-github', packageRepo, pRepo],
+ ['Vue 框架版本', 'icon-vuejs', pVue],
+ ['Fluent UI 组件库版本', 'icon-fluent', pUI]
+]
\ No newline at end of file
diff --git a/src/scripts/showInfo.js b/src/scripts/showInfo.js
deleted file mode 100644
index f0dc751..0000000
--- a/src/scripts/showInfo.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"use strict"
-/**
- * 此脚本用于在控制台中显示本项目相关信息
- * @author crrashh1542
- * @version 3.0
- */
-
-import buildInfo from './parseInfo'
-const version = buildInfo[0][2].split(' (build')[0]
-
-export default function showInfo() {
- let styleName = `font-size: 14px;
- color: #000;
- background-color: #8ad5b3;
- padding: 5px 9px;
- border-radius: 3px 0 0 3px;
- margin: 10px 0;
- `
- let styleVer = `font-size: 14px;
- color: #fff;
- background-color: #607d8b;
- padding: 5px 9px;
- border-radius: 0 3px 3px 0;
- margin: 6px 0;
- `
- console.log('%c%s%c%s', styleName, 'wutd', styleVer, version)
-}
diff --git a/src/scripts/showRepoInfo.js b/src/scripts/showRepoInfo.js
new file mode 100644
index 0000000..5054d76
--- /dev/null
+++ b/src/scripts/showRepoInfo.js
@@ -0,0 +1,69 @@
+"use strict"
+/**
+ * 此脚本用于在控制台中显示本项目相关信息
+ * @author crrashh1542
+ * @version 2.2
+ */
+
+import buildInfo from '../../temp/buildInfo.json'
+import packageInfo from '../../package.json'
+
+// 处理详细版本
+const version = (function() {
+ const packageVersion = packageInfo.version
+ const buildNum = buildInfo.build
+ const buildHash = buildInfo.hash
+
+ return packageVersion + '.b' + buildNum + '.' + buildHash
+})()
+
+// 处理构建标签
+const tag = (function() {
+ // 处理版本号和分支
+ const buildNum = buildInfo.build
+ const buildBranch = buildInfo.branch
+
+ // 处理构建时间
+ const fullTime = buildInfo.time
+ const [bYear, bMonth, bDay, bHour, bMin] =
+ [fullTime.substring(2, 4), fullTime.substring(5, 7),
+ fullTime.substring(8, 10), fullTime.substring(11, 13),
+ fullTime.substring(14, 16)
+ ]
+ const buildTime = bYear + bMonth + bDay + '-' + bHour + bMin
+
+ return buildNum + '.' + buildBranch + '.' + buildTime
+})()
+
+export default function showInfo() {
+ let styleVerName = `font-size: 14px;
+ color: #000;
+ background-color: #8ad5b3;
+ padding: 5px 9px;
+ border-radius: 3px 0 0 3px;
+ margin: 10px 0; `
+ let styleVerValue = `font-size: 14px;
+ color: #fff;
+ background-color: #607d8b;
+ padding: 5px 9px;
+ border-radius: 0 3px 3px 0;
+ margin: 6px 0; `
+ let stylePlaceholder = `margin: 0;
+ padding: 0; `
+ let styleTagName = `font-size: 13px;
+ color: #fff;
+ background-color: #555;
+ padding: 3px 9px;
+ border-radius: 3px 0 0 3px;
+ margin: 0 0 10px; `
+ let styleTagValue = `font-size: 13px;
+ color: #fff;
+ background-color: #5296ff;
+ padding: 3px 9px;
+ border-radius: 0 3px 3px 0;
+ margin: 0 0 10px; `
+ console.log('%c%s%c%s%c%s%c%s%c%s',
+ styleVerName, 'wutd', styleVerValue, version, stylePlaceholder, '\n',
+ styleTagName, 'Build Tag', styleTagValue, tag
+ )
+}
diff --git a/src/views/DataCategoryList.vue b/src/views/DataCategoryList.vue
index 2cb1dc0..f060c7f 100644
--- a/src/views/DataCategoryList.vue
+++ b/src/views/DataCategoryList.vue
@@ -8,10 +8,11 @@ import axios from 'axios'
import Banner from '../components/Banner.vue'
import Card from '../components/Card.vue'
import LoadAnim from '../components/LoadAnim.vue'
+import TopNav from '../components/TopNav.vue'
export default {
name: 'DataCategoryList',
- components: { Banner, LoadAnim, Card },
+ components: { Banner, LoadAnim, Card, TopNav },
setup() {
// STEP1 ------ 设定初始值
let data = reactive({
@@ -49,6 +50,12 @@ export default {
return { ...toRefs(data) }
},
methods: {
+ // 获取点击的构建的 path
+ getPath(build) {
+ return '/detail/' + this.$route.params.platform + '/' + build
+ },
+
+ // 刷新数据
refreshData(platform) {
let vueObj = this
axios.get('https://wutd.crrashh.com/api/category?platform=' + platform)
@@ -81,17 +88,17 @@ export default {
-
-
+
+
{{ category.previous.name }}
-
+
{{ category.next.name }}
-
+
@@ -101,20 +108,19 @@ export default {
-
-
-
- 版本 |
- 发布时间 |
-
-
-
-
- {{ row[0] }} |
- {{ row[1] }} |
-
-
-
+
+
+ 版本
+ 发布时间
+
+
+
+
+ {{ row[0] }}
+ {{ row[1] }}
+
+
+
@@ -127,13 +133,6 @@ export default {
margin-right: .4em;
}
-// 快速导航
-.nav {
- margin: 0 .4em 12px;
- color: #666;
- font-size: var(--td-font-size);
-}
-
// 信息栏
.info {
font-size: var(--info-font-size);
@@ -147,34 +146,38 @@ export default {
}
// 数据表
-table.data {
+.data {
width: 100%;
margin: 1.5em 0;
+ .left { width: 30%; }
+ .right { width: 70%; }
- thead {
+ .head {
background-color: #fff;
text-align-last: left;
border-bottom: 1px solid #ccc;
- th {
+ span {
+ display: inline-block;
padding: 8px 1em;
font-size: var(--th-font-size);
}
}
- tbody {
+ .content {
background-color: @wu-color-theme-bg;
text-align-last: left;
-
- tr:hover {
- background-color: #fff;
- }
-
- td {
+ a { display: block; }
+ span {
padding: 4px 1em;
font-size: var(--td-font-size);
+ display: inline-block;
}
}
+
+ .content:hover {
+ background-color: #fff;
+ }
}
@media screen and (max-width: 650px) {
diff --git a/src/views/DataDetail.vue b/src/views/DataDetail.vue
new file mode 100644
index 0000000..8e6c8ca
--- /dev/null
+++ b/src/views/DataDetail.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+ 版本详情
+
+
+
+
+
+
+
+
+
+
+
+ {{ detail.nav.previous.build }}
+
+
+
+
+ {{ detail.nav.next.build }}
+
+
+
+
+
+
+
构建版号 / {{ detail.build.number }}
+
构建分支 / {{ detail.build.branch }}
+
编译时间 / {{ detail.build.compileTime }}
+
+
+
系统架构 /
+ {{ i }}
+
构建归属 /
+ {{ detail.belongsTo.name }}
+
+
+
+
+
+
+ 发版信息
+
+
+
+
+
+
+
+
+ 从 UUP 获取构建
+
+
+
+
+
+
+
+
+ 下载 ISO / 更新包
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/DataDetails.vue b/src/views/DataDetails.vue
deleted file mode 100644
index e69de29..0000000
diff --git a/src/views/MainAbout.vue b/src/views/MainAbout.vue
index 3c18455..3c512f7 100644
--- a/src/views/MainAbout.vue
+++ b/src/views/MainAbout.vue
@@ -1,5 +1,5 @@