🎨 代码格式化

This commit is contained in:
BTMuli
2023-10-10 23:15:26 +08:00
parent 5c2bb4e5af
commit b04f49ec46
114 changed files with 379 additions and 548 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 = {

View File

@@ -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 {