mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
🎨 代码格式化
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
/**
|
||||
* @file component func confirm.ts
|
||||
* @description 封装自定义 confirm 组件,通过函数调用的方式,简化 confirm 的使用
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.3
|
||||
* @since Beta v0.3.3
|
||||
*/
|
||||
|
||||
// vue
|
||||
import { h, render, type VNode } from "vue";
|
||||
// confirm
|
||||
|
||||
import confirm from "./confirm.vue";
|
||||
|
||||
const confirmId = "tg-func-confirm";
|
||||
@@ -24,7 +22,7 @@ const renderBox = (props: TGApp.Component.Confirm.Params): VNode => {
|
||||
let confirmInstance: VNode;
|
||||
|
||||
const showConfirm = async (props: TGApp.Component.Confirm.Params): Promise<string | boolean> => {
|
||||
if (confirmInstance) {
|
||||
if (confirmInstance !== undefined) {
|
||||
const boxVue = confirmInstance.component;
|
||||
return boxVue?.exposeProxy?.displayBox(props);
|
||||
} else {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
import { h, render, type VNode } from "vue";
|
||||
|
||||
import geetest from "./geetest.vue";
|
||||
|
||||
const geetestId = "tg-func-geetest";
|
||||
@@ -21,7 +22,7 @@ const renderBox = (): VNode => {
|
||||
let geetestInstance: VNode;
|
||||
|
||||
const showGeetest = async (): Promise<boolean> => {
|
||||
if (geetestInstance) {
|
||||
if (geetestInstance !== undefined) {
|
||||
const boxVue = geetestInstance.component;
|
||||
return boxVue?.exposeProxy?.displayBox();
|
||||
} else {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
|
||||
import showSnackbar from "./snackbar";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import TGRequest from "../../web/request/TGRequest";
|
||||
@@ -68,7 +69,6 @@ async function displayBox(): Promise<void> {
|
||||
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
|
||||
geetestRef.value.innerHTML = "";
|
||||
captchaObj.appendTo("#geetest");
|
||||
// @eslint-ignore-next-line @typescript-eslint/no-misused-promises
|
||||
captchaObj.onSuccess(async () => {
|
||||
const validate = captchaObj.getValidate();
|
||||
const cookie = {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/**
|
||||
* @file component func snackbar.ts
|
||||
* @description 封装 vuetify 的 snackbar 组件,通过函数调用的方式,简化 snackbar 的使用
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.3
|
||||
* @since Beta v0.3.3
|
||||
*/
|
||||
|
||||
// vue
|
||||
import { h, render, type VNode } from "vue";
|
||||
// snackbar
|
||||
|
||||
import snackbar from "./snackbar.vue";
|
||||
|
||||
const snackbarId = "tg-func-snackbar";
|
||||
@@ -24,7 +22,7 @@ const renderBox = (props: TGApp.Component.Snackbar.Params): VNode => {
|
||||
let snackbarInstance: VNode;
|
||||
|
||||
const showSnackbar = (props: TGApp.Component.Snackbar.Params): void => {
|
||||
if (snackbarInstance) {
|
||||
if (snackbarInstance !== undefined) {
|
||||
const boxVue = snackbarInstance.component;
|
||||
boxVue?.exposeProxy?.displayBox(props);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user