添加PyPI镜像站选项
This commit is contained in:
parent
20613844db
commit
2f33c3185b
3 changed files with 57 additions and 24 deletions
|
@ -1,15 +1,22 @@
|
|||
<script setup>
|
||||
const branch = ref(null)
|
||||
const mirror = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
pywebview.api.get_branch().then((value) => {
|
||||
branch.value = value
|
||||
})
|
||||
pywebview.api.get_mirror().then((value) => {
|
||||
mirror.value = value
|
||||
})
|
||||
})
|
||||
|
||||
watch(branch, () => {
|
||||
pywebview.api.set_branch(branch.value)
|
||||
})
|
||||
watch(mirror, () => {
|
||||
pywebview.api.set_mirror(mirror.value)
|
||||
})
|
||||
|
||||
const steps = computed(() => [
|
||||
{
|
||||
|
@ -32,15 +39,25 @@ provide('current_state', current_state)
|
|||
|
||||
<template>
|
||||
<n-flex vertical style="gap: 16px; height: 100%; padding: 16px; box-sizing: border-box">
|
||||
<n-flex>
|
||||
<div>mower-ng 代码分支:</div>
|
||||
<n-radio-group v-model:value="branch">
|
||||
<n-flex>
|
||||
<n-radio value="fast">fast</n-radio>
|
||||
<n-radio value="slow">slow</n-radio>
|
||||
</n-flex>
|
||||
</n-radio-group>
|
||||
</n-flex>
|
||||
<n-form label-placement="left" :show-feedback="false" label-width="auto" label-align="left">
|
||||
<n-form-item label="mower-ng 代码分支">
|
||||
<n-radio-group v-model:value="branch">
|
||||
<n-flex>
|
||||
<n-radio value="fast">fast</n-radio>
|
||||
<n-radio value="slow">slow</n-radio>
|
||||
</n-flex>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
<n-form-item label="PyPI 仓库镜像">
|
||||
<n-radio-group v-model:value="mirror">
|
||||
<n-flex>
|
||||
<n-radio value="pypi">PyPI</n-radio>
|
||||
<n-radio value="sjtu">上海交通大学镜像站</n-radio>
|
||||
<n-radio value="tuna">清华大学镜像站</n-radio>
|
||||
</n-flex>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
<n-steps :current="current_step" :status="current_state" size="small">
|
||||
<n-step v-for="step in steps" :title="step.title" />
|
||||
</n-steps>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue