Compare commits
No commits in common. "fc5fbdff95bee8fab8e00a10c49d7f8dba13cddd" and "4b34b72cf4217c743d95a95009cea1a6f063b1b9" have entirely different histories.
fc5fbdff95
...
4b34b72cf4
3 changed files with 19 additions and 34 deletions
|
@ -52,20 +52,19 @@ provide('steps', steps)
|
||||||
<n-spin v-if="loading" class="container">
|
<n-spin v-if="loading" class="container">
|
||||||
<template #description>加载中</template>
|
<template #description>加载中</template>
|
||||||
</n-spin>
|
</n-spin>
|
||||||
<n-notification-provider v-else>
|
<n-tabs
|
||||||
<n-tabs
|
v-else
|
||||||
type="card"
|
type="card"
|
||||||
placement="left"
|
placement="left"
|
||||||
class="container"
|
class="container"
|
||||||
:default-value="page"
|
:default-value="page"
|
||||||
@before-leave="!running"
|
@update:value="set_page"
|
||||||
@update:value="set_page"
|
:disabled="running"
|
||||||
>
|
>
|
||||||
<n-tab-pane name="init" tab="初始化"><init /></n-tab-pane>
|
<n-tab-pane name="init" tab="初始化"><init /></n-tab-pane>
|
||||||
<n-tab-pane name="update" tab="更新代码"><update /></n-tab-pane>
|
<n-tab-pane name="update" tab="更新代码"><update /></n-tab-pane>
|
||||||
<n-tab-pane name="launch" tab="启动程序"><launch /></n-tab-pane>
|
<n-tab-pane name="launch" tab="启动程序"><launch /></n-tab-pane>
|
||||||
</n-tabs>
|
</n-tabs>
|
||||||
</n-notification-provider>
|
|
||||||
<n-global-style />
|
<n-global-style />
|
||||||
</n-config-provider>
|
</n-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -8,8 +8,6 @@ const steps = inject('steps')
|
||||||
const current_step = inject('current_step')
|
const current_step = inject('current_step')
|
||||||
const current_state = inject('current_state')
|
const current_state = inject('current_state')
|
||||||
|
|
||||||
const notification = useNotification()
|
|
||||||
|
|
||||||
async function start() {
|
async function start() {
|
||||||
log.value = ''
|
log.value = ''
|
||||||
running.value = true
|
running.value = true
|
||||||
|
@ -22,37 +20,25 @@ async function start() {
|
||||||
}
|
}
|
||||||
current_state.value = 'finish'
|
current_state.value = 'finish'
|
||||||
running.value = false
|
running.value = false
|
||||||
notification['info']({
|
|
||||||
content: '提示',
|
|
||||||
meta: '命令运行完成',
|
|
||||||
duration: 3000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-button
|
<n-button class="float" type="primary" :loading="running" :disabled="running" @click="start">
|
||||||
class="float"
|
|
||||||
type="primary"
|
|
||||||
:loading="running"
|
|
||||||
:disabled="running"
|
|
||||||
@click="start"
|
|
||||||
circle
|
|
||||||
size="large"
|
|
||||||
>
|
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon>
|
<n-icon>
|
||||||
<play-icon />
|
<play-icon />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
|
{{ running ? '' : '运行' }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.float {
|
.float {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 36px;
|
right: 28px;
|
||||||
bottom: 36px;
|
bottom: 28px;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ const log_ele = inject('log_ele')
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-config-provider :theme="darkTheme" class="provider">
|
<n-config-provider :theme="darkTheme" class="provider">
|
||||||
<n-card class="full" content-style="height: 100%">
|
<n-card class="full" ref="log_ele" content-style="height: 100%">
|
||||||
<n-log :log="log" class="full" ref="log_ele" />
|
<n-log :log="log" class="full" />
|
||||||
</n-card>
|
</n-card>
|
||||||
</n-config-provider>
|
</n-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue