desktop_task_schedule/code/web/task_schedule/src/App.vue

91 lines
1.7 KiB
Vue
Raw Normal View History

2023-02-15 05:07:17 +00:00
<!--
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
2023-02-17 10:34:10 +00:00
* @LastEditTime: 2023-02-17 11:26:21
2023-02-15 05:07:17 +00:00
* @FilePath: /task_schedule/src/App.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<el-config-provider :locale="this.locale">
<div class="app_wrapper">
<div class="counter_wrapper">
<span>s{{ ui.counter }}</span>
<!-- <el-button type="danger" @click="onCount">点击</el-button> -->
</div>
</div>
</el-config-provider>
</template>
<script>
import HelloWorld from "./components/HelloWorld.vue";
import zhCn from "element-plus/lib/locale/lang/zh-cn"; //element-plus语言组件
import { reactive } from "vue";
export default {
name: "App",
components: { HelloWorld },
setup(props)
{
const locale = zhCn;
const ui = reactive({
counter: 0,
});
const onCount = () =>
{
ui.counter++;
console.log(ui.counter);
};
setInterval(() =>
{
ui.counter += 1;
// console.log(counter);
}, 1000);
setInterval(() =>
{
location.reload();
2023-02-17 10:34:10 +00:00
}, 5000);
2023-02-15 05:07:17 +00:00
return { locale, ui, onCount };
},
};
</script>
<style scoped>
.app_wrapper {
box-sizing: border-box;
width: 100%;
height: calc(100vh - 60px);
/* border: 1px solid brown; */
/* 布局 */
display: flex;
}
.counter_wrapper {
2023-02-15 10:23:32 +00:00
width: 500px;
2023-02-17 10:34:10 +00:00
margin-top: 20px;
2023-02-15 05:07:17 +00:00
margin-left: auto;
margin-right: 20px;
2023-02-17 10:34:10 +00:00
border-radius: 5px;
background-color: rgb(250 250 250 / 75%);
2023-02-15 05:07:17 +00:00
}
.counter_wrapper:hover {
box-shadow: 0px 0px 20px 10px rgb(14 18 22 / 10%);
}
.counter_wrapper span {
2023-02-15 10:23:32 +00:00
display: block;
2023-02-15 05:07:17 +00:00
font-size: 150px;
2023-02-15 10:23:32 +00:00
text-align: right;
2023-02-15 05:07:17 +00:00
}
</style>