提交 2a62f740 编写于 作者: C csdn_xiaomei

Auto Commit

上级 7a093d7e
run = "npm i && npm run dev" run = "npm i && npm run dev"
language = "node"
[deployment] [deployment]
build = "npm i && npm run build" build = "npm i && npm run build"
...@@ -8,3 +9,6 @@ run = "npm run preview" ...@@ -8,3 +9,6 @@ run = "npm run preview"
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config" XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
[debugger]
program = "main.js"
<script setup>
import HelloWorld from './components/HelloWorld.vue'
import TheWelcome from './components/TheWelcome.vue'
</script>
<template> <template>
<header> <div>
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" /> <h2>{{ time }}</h2>
<button @click="handleClick">{{ str }}</button>
<div class="wrapper">
<HelloWorld msg="You did it!" />
</div> </div>
</header>
<main>
<TheWelcome />
</main>
</template> </template>
<style scoped> <script setup>
header { import { ref } from "vue";
line-height: 1.5; let str = ref("倒计时");
} let isClick = ref(false);
let time = ref(10);
.logo { const handleClick = () => {
display: block; if (isClick.value) return false;
margin: 0 auto 2rem; isClick.value = true;
} let timer = setInterval(() => {
time.value--;
@media (min-width: 1024px) { str.value = `剩余${time.value}秒`;
header { if (time.value < 1) {
display: flex; clearInterval(timer);
place-items: center; isClick.value = false;
padding-right: calc(var(--section-gap) / 2); time.value = 10;
} str.value = `再次发送`;
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
} }
} }, 1000);
</style> };
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册