-
+
{{ formattedTime }}
@@ -15,13 +15,15 @@ import moment from 'moment';
// 使用ref来存储当前时间
const formattedTime = ref('');
+const fontSizeIndex = ref(2); // 默认字体大小为7rem
+const fontSizes = ['3rem', '5rem', '7rem'];//不同分辨率适合使用不同大小的字体
// 在页面加载完成后初始化时间
onMounted(() => {
updateTime();
});
-const formatDateTime = (isoString) => moment(isoString).format('HH:mm:ss');
+const formatDateTime = (isoString: moment.MomentInput) => moment(isoString).format('HH:mm:ss');
// 更新时间的函数
function updateTime() {
@@ -31,10 +33,15 @@ function updateTime() {
// 每隔一分钟更新一次时间
useIntervalFn(updateTime, 250);
+
+// 切换字体大小的函数
+function cycleFontSize() {
+ fontSizeIndex.value = (fontSizeIndex.value + 1) % fontSizes.length;
+}
diff --git a/src/renderer/src/pages/mainWindow.vue b/src/renderer/src/pages/mainWindow.vue
index 9a50ecb..eb4d545 100644
--- a/src/renderer/src/pages/mainWindow.vue
+++ b/src/renderer/src/pages/mainWindow.vue
@@ -2,14 +2,14 @@
-
- 打开配置
+
+ 打开配置
打开 JSON 配置文件
-
- 直接进入看板
+
+ 直接进入看板
直接进入看板,将继续使用上次加载的配置
@@ -50,6 +50,10 @@ window.electron.ipcRenderer.on('common:openFile', (event, message) => {
width: 100%;
max-width: 300px;
margin: auto;
+ transition: transform 0.3s ease-in-out;
+}
+.v-card:hover {
+ transform: scale(1.05);
}
.v-btn {
height: 48px;
@@ -57,4 +61,26 @@ window.electron.ipcRenderer.on('common:openFile', (event, message) => {
.text-center {
text-align: center;
}
+.fade-in {
+ animation: fadeIn 1s ease-in-out;
+}
+.slide-in {
+ animation: slideIn 1s ease-in-out;
+}
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+@keyframes slideIn {
+ from {
+ transform: translateY(20px);
+ }
+ to {
+ transform: translateY(0);
+ }
+}