UI细节调整
This commit is contained in:
@@ -5,10 +5,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
onFinish: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const count = ref(4);
|
||||
@@ -20,7 +16,6 @@ watch(
|
||||
if (timer.value) clearInterval(timer.value);
|
||||
timer.value = setInterval(() => {
|
||||
if (count.value <= 1) {
|
||||
props.onFinish();
|
||||
clearInterval(timer.value);
|
||||
}
|
||||
count.value -= 1;
|
||||
@@ -46,8 +41,8 @@ onUnmounted(() => {
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
position: fixed;
|
||||
top: 120px;
|
||||
position: absolute;
|
||||
top: calc(50% - 50px);
|
||||
left: calc(50% - 30px);
|
||||
}
|
||||
.number {
|
||||
|
||||
Reference in New Issue
Block a user