mirror of
https://github.com/headporter81/specialsource-homepage-frontend.git
synced 2026-08-08 15:21:11 +09:00
This commit is contained in:
@@ -3,29 +3,16 @@ import { computed } from 'vue';
|
||||
|
||||
// [Props 정의]
|
||||
const props = defineProps({
|
||||
// 현재 진행 값
|
||||
progress: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0
|
||||
},
|
||||
// 총량
|
||||
total: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
// 하단에 표시할 상태 메시지
|
||||
status: {
|
||||
progress: { type: Number, required: true, default: 0 },
|
||||
total: { type: Number, default: 100 },
|
||||
status: { type: String, default: 'Initializing...' },
|
||||
barLength: { type: Number, default: 30 },
|
||||
|
||||
username: {
|
||||
type: String,
|
||||
default: 'Initializing...'
|
||||
},
|
||||
// 막대의 총 글자 길이
|
||||
barLength: {
|
||||
type: Number,
|
||||
default: 30
|
||||
default: 'anonymous'
|
||||
}
|
||||
});
|
||||
|
||||
// [핵심 로직: Computed로 실시간 계산]
|
||||
|
||||
// 1. 퍼센트 계산 (0 ~ 100, 소수점 버림)
|
||||
@@ -51,7 +38,7 @@ const barString = computed(() => {
|
||||
<template>
|
||||
<div class="tui-window">
|
||||
<div class="tui-header">
|
||||
<span class="tui-prompt">porter@specialsource-nas:~$</span>
|
||||
<span class="tui-prompt">{{ username }}@specialsource-nas:~$</span>
|
||||
<span class="tui-cmd">deploy-service --watch</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user