chore: 支持手动上传证书并部署

This commit is contained in:
xiaojunnuo
2025-03-19 00:28:50 +08:00
parent 873f2b618b
commit d1b61b6bf9
17 changed files with 491 additions and 172 deletions
@@ -0,0 +1,27 @@
<template>
<div class="file-input">
<a-button :type="type" @click="onClick">{{ text }}</a-button> {{ fileName }}
<div class="hidden">
<input ref="fileInputRef" type="file" @change="onFileChange" />
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, defineEmits, defineProps } from "vue";
const fileInputRef = ref<HTMLInputElement | null>(null);
const props = defineProps<{
text: string;
type: string;
}>();
const fileName = ref("");
const emit = defineEmits(["change"]);
function onClick() {
fileInputRef.value.click();
}
function onFileChange(e: any) {
fileName.value = e.target.files[0].name;
emit("change", e);
}
</script>
@@ -10,10 +10,12 @@ import Plugins from "./plugins/index";
import LoadingButton from "./loading-button.vue";
import IconSelect from "./icon-select.vue";
import ExpiresTimeText from "./expires-time-text.vue";
import FileInput from "./file-input.vue";
export default {
install(app: any) {
app.component("PiContainer", PiContainer);
app.component("TextEditable", TextEditable);
app.component("FileInput", FileInput);
app.component("CronLight", CronLight);
app.component("CronEditor", CronEditor);
@@ -29,5 +31,5 @@ export default {
app.component("ExpiresTimeText", ExpiresTimeText);
app.use(vip);
app.use(Plugins);
}
},
};