mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
perf:优化类型导入
This commit is contained in:
parent
8630e9b317
commit
8ba3b82bc0
@ -3,10 +3,10 @@ import { isAdminApp, checkFileMimetype } from '/@/utils/common'
|
||||
import { getUrl } from '/@/utils/axios'
|
||||
import { useAdminInfo } from '/@/stores/adminInfo'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { ElNotification, UploadRawFile } from 'element-plus'
|
||||
import { ElNotification, type UploadRawFile } from 'element-plus'
|
||||
import { useSiteConfig } from '/@/stores/siteConfig'
|
||||
import { state as uploadExpandState, fileUpload as uploadExpand } from '/@/components/mixins/baUpload'
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import type { AxiosRequestConfig } from 'axios'
|
||||
import { uuid } from '/@/utils/random'
|
||||
import { i18n } from '../lang'
|
||||
|
||||
|
@ -48,14 +48,15 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, watch, useSlots, nextTick } from 'vue'
|
||||
import { UploadInstance, UploadUserFile, UploadProps, genFileId, UploadRawFile, UploadFiles } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile, UploadFiles } from 'element-plus'
|
||||
import { stringToArray } from '/@/components/baInput/helper'
|
||||
import { fullUrl, arrayFullUrl, getFileNameFromPath, getArrayKey } from '/@/utils/common'
|
||||
import { fileUpload } from '/@/api/common'
|
||||
import SelectFile from '/@/components/baInput/components/selectFile.vue'
|
||||
import { uuid } from '/@/utils/random'
|
||||
import { cloneDeep, isEmpty } from 'lodash-es'
|
||||
import { AxiosProgressEvent } from 'axios'
|
||||
import type { AxiosProgressEvent } from 'axios'
|
||||
import Sortable from 'sortablejs'
|
||||
|
||||
type Writeable<T> = { -readonly [P in keyof T]: T[P] }
|
||||
|
@ -76,7 +76,7 @@
|
||||
import { reactive, ref, onMounted, nextTick, watch, computed } from 'vue'
|
||||
import { getAwesomeIconfontNames, getIconfontNames, getElementPlusIconfontNames, getLocalIconfontNames } from '/@/utils/iconfont'
|
||||
import { useEventListener } from '@vueuse/core'
|
||||
import { Placement } from 'element-plus'
|
||||
import type { Placement } from 'element-plus'
|
||||
|
||||
type IconType = 'ele' | 'awe' | 'ali' | 'local'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FieldData } from './index'
|
||||
import type { FieldData } from './index'
|
||||
|
||||
export const npuaFalse = () => {
|
||||
return {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, CSSProperties } from 'vue'
|
||||
import type { Component, CSSProperties } from 'vue'
|
||||
|
||||
/**
|
||||
* 支持的输入框类型
|
||||
|
@ -1,6 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { createVNode, resolveComponent, defineComponent, PropType, VNode, computed, reactive } from 'vue'
|
||||
import { inputTypes, modelValueTypes, InputAttr, InputData } from '/@/components/baInput'
|
||||
import type { PropType, VNode } from 'vue'
|
||||
import type { modelValueTypes, InputAttr, InputData } from '/@/components/baInput'
|
||||
import { createVNode, resolveComponent, defineComponent, computed, reactive } from 'vue'
|
||||
import { inputTypes } from '/@/components/baInput'
|
||||
import Array from '/@/components/baInput/components/array.vue'
|
||||
import RemoteSelect from '/@/components/baInput/components/remoteSelect.vue'
|
||||
import IconSelector from '/@/components/baInput/components/iconSelector.vue'
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { shortUuid } from '/@/utils/random'
|
||||
import { VNode, createVNode, render } from 'vue'
|
||||
import { createVNode, render } from 'vue'
|
||||
import clickCaptchaConstructor from './index.vue'
|
||||
import type { VNode } from 'vue'
|
||||
|
||||
interface ClickCaptchaOptions {
|
||||
// 验证码弹窗的自定义class
|
||||
|
@ -24,7 +24,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, toRaw } from 'vue'
|
||||
import type { Axis, ContextmenuItemClickEmitArg, Props } from './interface'
|
||||
import { RouteLocationNormalized } from 'vue-router'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
import { useEventListener } from '@vueuse/core'
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RouteLocationNormalized } from 'vue-router'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
|
||||
export interface Axis {
|
||||
x: number
|
||||
|
@ -114,7 +114,7 @@ import { reactive } from 'vue'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import { inputTypes } from '/@/components/baInput'
|
||||
import { validatorType } from '/@/utils/validate'
|
||||
import { InputAttr } from '/@/components/baInput'
|
||||
import type { InputAttr } from '/@/components/baInput'
|
||||
import { i18n } from '/@/lang'
|
||||
|
||||
const { t } = i18n.global
|
||||
|
@ -1,7 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { createVNode, defineComponent, resolveComponent, PropType, computed } from 'vue'
|
||||
import { inputTypes, modelValueTypes, InputAttr, InputData } from '/@/components/baInput'
|
||||
import { FormItemAttr } from '/@/components/formItem'
|
||||
import type { PropType } from 'vue'
|
||||
import { createVNode, defineComponent, resolveComponent, computed } from 'vue'
|
||||
import { inputTypes } from '/@/components/baInput'
|
||||
import type { modelValueTypes, InputAttr, InputData } from '/@/components/baInput'
|
||||
import type { FormItemAttr } from '/@/components/formItem'
|
||||
import BaInput from '/@/components/baInput/index.vue'
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { createVNode, resolveComponent, defineComponent, computed, CSSProperties } from 'vue'
|
||||
import { createVNode, resolveComponent, defineComponent, computed, type CSSProperties } from 'vue'
|
||||
import svg from '/@/components/icon/svg/index.vue'
|
||||
import { isExternal } from '/@/utils/common'
|
||||
export default defineComponent({
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, CSSProperties } from 'vue'
|
||||
import { computed, type CSSProperties } from 'vue'
|
||||
import { isExternal } from '/@/utils/common'
|
||||
interface Props {
|
||||
name: string
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import type { AxiosRequestConfig } from 'axios'
|
||||
|
||||
export const state: () => 'disable' | 'enable' = () => 'disable'
|
||||
|
||||
|
@ -172,7 +172,7 @@ import { reactive, computed, watch, onMounted } from 'vue'
|
||||
import { useTerminal } from '/@/stores/terminal'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { taskStatus } from './constant'
|
||||
import { ElMessageBox, TimelineItemProps } from 'element-plus'
|
||||
import { ElMessageBox, type TimelineItemProps } from 'element-plus'
|
||||
import { postChangeTerminalConfig } from '/@/api/common'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import { getUrlPort } from '/@/utils/axios'
|
||||
|
@ -219,7 +219,7 @@ import IconSelector from '/@/components/baInput/components/iconSelector.vue'
|
||||
import { STORE_CONFIG, BEFORE_RESIZE_LAYOUT } from '/@/stores/constant/cacheKey'
|
||||
import { Local, Session } from '/@/utils/storage'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Layout } from '/@/stores/interface'
|
||||
import type { Layout } from '/@/stores/interface'
|
||||
import DarkSwitch from '/@/layouts/common/components/darkSwitch.vue'
|
||||
import toggleDark from '/@/utils/useDark'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
/**
|
||||
* 寻找当前路由在顶栏菜单中的数据
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { computed, nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import Logo from '/@/layouts/backend/components/logo.vue'
|
||||
import MenuTree from '/@/layouts/backend/components/menus/menuTree.vue'
|
||||
import { useRoute, onBeforeRouteUpdate, RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import { useRoute, onBeforeRouteUpdate, type RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
import type { ScrollbarInstance } from 'element-plus'
|
||||
|
@ -19,7 +19,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import { onClickMenu } from '/@/utils/router'
|
||||
|
||||
const config = useConfig()
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import MenuTree from '/@/layouts/backend/components/menus/menuTree.vue'
|
||||
import { useRoute, onBeforeRouteUpdate, RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import { useRoute, onBeforeRouteUpdate, type RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import type { ScrollbarInstance } from 'element-plus'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
|
@ -15,7 +15,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import MenuTree from '/@/layouts/backend/components/menus/menuTree.vue'
|
||||
import { useRoute, onBeforeRouteUpdate, RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
|
||||
import { useRoute, onBeforeRouteUpdate } from 'vue-router'
|
||||
import type { ScrollbarInstance } from 'element-plus'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { useRoute, onBeforeRouteUpdate, RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import { useRoute, onBeforeRouteUpdate, type RouteLocationNormalizedLoaded } from 'vue-router'
|
||||
import { currentRouteTopActivity } from '/@/layouts/backend/components/menus/helper'
|
||||
import MenuTree from '/@/layouts/backend/components/menus/menuTree.vue'
|
||||
import NavMenus from '/@/layouts/backend/components/navMenus.vue'
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { useRoute, useRouter, onBeforeRouteUpdate, RouteLocationNormalized } from 'vue-router'
|
||||
import { useRoute, useRouter, onBeforeRouteUpdate, type RouteLocationNormalized } from 'vue-router'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
import { useTemplateRefsList } from '@vueuse/core'
|
||||
|
@ -14,12 +14,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, watch, onBeforeMount, onUnmounted, nextTick, provide } from 'vue'
|
||||
import { useRoute, RouteLocationNormalized } from 'vue-router'
|
||||
import { useRoute, type RouteLocationNormalized } from 'vue-router'
|
||||
import { mainHeight as layoutMainScrollbarStyle } from '/@/utils/layout'
|
||||
import useCurrentInstance from '/@/utils/useCurrentInstance'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
import { ScrollbarInstance } from 'element-plus'
|
||||
import type { ScrollbarInstance } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'layout/main',
|
||||
|
@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRouter, RouteRecordRaw } from 'vue-router'
|
||||
import { useRouter, type RouteRecordRaw } from 'vue-router'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { useMemberCenter } from '/@/stores/memberCenter'
|
||||
import { onClickMenu } from '/@/utils/router'
|
||||
|
@ -78,7 +78,8 @@ import { fullUrl } from '/@/utils/common'
|
||||
import MenuSub from '/@/layouts/frontend/components/menuSub.vue'
|
||||
import toggleDark from '/@/utils/useDark'
|
||||
import DarkSwitch from '/@/layouts/common/components/darkSwitch.vue'
|
||||
import { RouteLocationNormalizedLoaded, useRoute, useRouter, RouteRecordRaw } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
@ -21,7 +21,7 @@
|
||||
<script setup lang="ts">
|
||||
import { isEmpty } from 'lodash-es'
|
||||
import { onClickMenu } from '/@/utils/router'
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import MenuSub from '/@/layouts/frontend/components/menuSub.vue'
|
||||
|
||||
interface Props {
|
||||
|
@ -20,7 +20,7 @@ import Aside from '/@/layouts/frontend/components/aside.vue'
|
||||
import Main from '/@/layouts/frontend/components/main.vue'
|
||||
import Footer from '/@/layouts/frontend/components/footer.vue'
|
||||
import { mainHeight as layoutMainScrollbarStyle } from '/@/utils/layout'
|
||||
import { ScrollbarInstance } from 'element-plus'
|
||||
import type { ScrollbarInstance } from 'element-plus'
|
||||
|
||||
const mainScrollbarRef = ref<ScrollbarInstance>()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const pageTitle = (name: string): string => {
|
||||
return `pagesTitle.${name}`
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ADMIN_INFO } from '/@/stores/constant/cacheKey'
|
||||
import { AdminInfo } from '/@/stores/interface'
|
||||
import type { AdminInfo } from '/@/stores/interface'
|
||||
|
||||
export const useAdminInfo = defineStore('adminInfo', {
|
||||
state: (): AdminInfo => {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { BA_ACCOUNT } from '/@/stores/constant/cacheKey'
|
||||
import { UserInfo } from '/@/stores/interface'
|
||||
import { postLogout } from '/@/api/backend/module'
|
||||
import { Local } from '/@/utils/storage'
|
||||
import router from '../router'
|
||||
import type { UserInfo } from '/@/stores/interface'
|
||||
|
||||
export const useBaAccount = defineStore('baAccount', {
|
||||
state: (): Partial<UserInfo> => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { STORE_CONFIG } from '/@/stores/constant/cacheKey'
|
||||
import { Layout } from '/@/stores/interface'
|
||||
import type { Layout } from '/@/stores/interface'
|
||||
|
||||
export const useConfig = defineStore(
|
||||
'config',
|
||||
|
@ -1,5 +1,5 @@
|
||||
// 变量名对应含义请在 /stores/* 里边找
|
||||
import { RouteRecordRaw, RouteLocationNormalized } from 'vue-router'
|
||||
import type { RouteRecordRaw, RouteLocationNormalized } from 'vue-router'
|
||||
|
||||
export interface Layout {
|
||||
showDrawer: boolean
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { MemberCenter } from '/@/stores/interface/index'
|
||||
import { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
||||
import type { MemberCenter } from '/@/stores/interface/index'
|
||||
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
||||
|
||||
export const useMemberCenter = defineStore('memberCenter', () => {
|
||||
const state: MemberCenter = reactive({
|
||||
|
@ -3,8 +3,8 @@ import { reactive } from 'vue'
|
||||
import { i18n } from '../lang'
|
||||
import { defineStore } from 'pinia'
|
||||
import { STORE_TAB_VIEW_CONFIG } from '/@/stores/constant/cacheKey'
|
||||
import { NavTabs } from '/@/stores/interface/index'
|
||||
import { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
||||
import type { NavTabs } from '/@/stores/interface/index'
|
||||
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
||||
|
||||
export const useNavTabs = defineStore(
|
||||
'navTabs',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import { SiteConfig } from '/@/stores/interface'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import type { SiteConfig } from '/@/stores/interface'
|
||||
|
||||
export const useSiteConfig = defineStore('siteConfig', {
|
||||
state: (): SiteConfig => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { nextTick, reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { STORE_TERMINAL } from '/@/stores/constant/cacheKey'
|
||||
import { Terminal } from '/@/stores/interface/index'
|
||||
import type { Terminal } from '/@/stores/interface/index'
|
||||
import { buildTerminalUrl } from '/@/api/common'
|
||||
import { uuid } from '/@/utils/random'
|
||||
import { timeFormat } from '/@/utils/common'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { USER_INFO } from '/@/stores/constant/cacheKey'
|
||||
import { UserInfo } from '/@/stores/interface'
|
||||
import type { UserInfo } from '/@/stores/interface'
|
||||
import { postLogout } from '/@/api/frontend/user/index'
|
||||
import { Local } from '/@/utils/storage'
|
||||
import router from '../router'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import type { AxiosRequestConfig, Method } from 'axios'
|
||||
import { ElLoading, LoadingOptions, ElNotification } from 'element-plus'
|
||||
import { ElLoading, type LoadingOptions, ElNotification } from 'element-plus'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { isAdminApp } from '/@/utils/common'
|
||||
import router from '/@/router/index'
|
||||
|
@ -3,7 +3,8 @@ import { auth, getArrayKey } from '/@/utils/common'
|
||||
import type { baTableApi } from '/@/api/common'
|
||||
import Sortable from 'sortablejs'
|
||||
import { findIndexRow } from '/@/components/table'
|
||||
import { ElNotification, FormInstance, TableColumnCtx } from 'element-plus'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import type { FormInstance, TableColumnCtx } from 'element-plus'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { i18n } from '/@/lang/index'
|
||||
|
@ -5,14 +5,14 @@ import router from '/@/router/index'
|
||||
import Icon from '/@/components/icon/index.vue'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
import { useMemberCenter } from '/@/stores/memberCenter'
|
||||
import { FormInstance } from 'element-plus'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { useSiteConfig } from '../stores/siteConfig'
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { i18n } from '../lang'
|
||||
import { getUrl } from './axios'
|
||||
import { adminBaseRoute } from '/@/router/static'
|
||||
import { trim, trimStart } from 'lodash-es'
|
||||
import { TranslateOptions } from 'vue-i18n'
|
||||
import type { TranslateOptions } from 'vue-i18n'
|
||||
|
||||
export function registerIcons(app: App) {
|
||||
/*
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { App, nextTick } from 'vue'
|
||||
import type { App } from 'vue'
|
||||
import { nextTick } from 'vue'
|
||||
import horizontalScroll from '/@/utils/horizontalScroll'
|
||||
import { useEventListener } from '@vueuse/core'
|
||||
import { isString } from 'lodash-es'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import type { CSSProperties } from 'vue'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { isAdminApp } from '/@/utils/common'
|
||||
|
@ -1,5 +1,6 @@
|
||||
import router from '/@/router/index'
|
||||
import { isNavigationFailure, NavigationFailureType, RouteRecordRaw, RouteLocationRaw } from 'vue-router'
|
||||
import { isNavigationFailure, NavigationFailureType } from 'vue-router'
|
||||
import type { RouteRecordRaw, RouteLocationRaw } from 'vue-router'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useNavTabs } from '/@/stores/navTabs'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ComponentInternalInstance, getCurrentInstance } from 'vue'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
import type { ComponentInternalInstance } from 'vue'
|
||||
|
||||
export default function useCurrentInstance() {
|
||||
if (!getCurrentInstance()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { RuleType } from 'async-validator'
|
||||
import { FormItemRule } from 'element-plus'
|
||||
import type { FormItemRule } from 'element-plus'
|
||||
import { i18n } from '../lang'
|
||||
|
||||
/**
|
||||
|
@ -598,10 +598,12 @@ import BaInput from '/@/components/baInput/index.vue'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import type { FieldItem, TableDesignChange, TableDesignChangeType } from '/@/views/backend/crud/index'
|
||||
import { cloneDeep, range, isEmpty } from 'lodash-es'
|
||||
import Sortable, { SortableEvent } from 'sortablejs'
|
||||
import Sortable from 'sortablejs'
|
||||
import type { SortableEvent } from 'sortablejs'
|
||||
import { useTemplateRefsList } from '@vueuse/core'
|
||||
import { changeStep, state as crudState, getTableAttr, fieldItem, designTypes, tableFieldsKey } from '/@/views/backend/crud/index'
|
||||
import { ElNotification, FormItemRule, FormInstance, ElMessageBox, TimelineItemProps, ElMessage, MessageHandler } from 'element-plus'
|
||||
import { ElNotification, ElMessageBox, ElMessage } from 'element-plus'
|
||||
import type { FormItemRule, FormInstance, TimelineItemProps, MessageHandler } from 'element-plus'
|
||||
import { getDatabaseList, getFileData, generateCheck, generate, parseFieldData, postLogStart } from '/@/api/backend/crud'
|
||||
import { getTableFieldList } from '/@/api/common'
|
||||
import { buildValidatorData, regularVarName } from '/@/utils/validate'
|
||||
|
@ -135,7 +135,8 @@ import { ref, reactive } from 'vue'
|
||||
import { getDatabaseList, checkCrudLog } from '/@/api/backend/crud'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import { changeStep, state as crudState } from '/@/views/backend/crud/index'
|
||||
import { ElNotification, FormInstance, FormItemRule } from 'element-plus'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import { buildValidatorData } from '/@/utils/validate'
|
||||
import CrudLog from '/@/views/backend/crud/log.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue'
|
||||
import { UploadFile } from 'element-plus'
|
||||
import type { UploadFile } from 'element-plus'
|
||||
import { fileUpload } from '/@/api/common'
|
||||
import { upload } from '/@/api/backend/module'
|
||||
import { onInstall } from '../index'
|
||||
|
@ -4,10 +4,10 @@ import { useBaAccount } from '/@/stores/baAccount'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { useTerminal } from '/@/stores/terminal'
|
||||
import { taskStatus } from '/@/components/terminal/constant'
|
||||
import { moduleInstallState, moduleState } from './types'
|
||||
import { moduleInstallState, type moduleState } from './types'
|
||||
import { uuid } from '/@/utils/random'
|
||||
import { fullUrl } from '/@/utils/common'
|
||||
import { UserInfo } from '/@/stores/interface'
|
||||
import type { UserInfo } from '/@/stores/interface'
|
||||
import { i18n } from '/@/lang/index'
|
||||
|
||||
export const loadData = () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { reactive } from 'vue'
|
||||
import { uuid } from '/@/utils/random'
|
||||
import { moduleState } from './types'
|
||||
import type { moduleState } from './types'
|
||||
|
||||
export const state = reactive<moduleState>({
|
||||
loading: {
|
||||
|
@ -106,7 +106,7 @@
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { index, log, postData } from '/@/api/backend/routine/AdminInfo'
|
||||
import { FormInstance, FormItemRule } from 'element-plus'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import { fullUrl, onResetForm, timeFormat } from '/@/utils/common'
|
||||
import { uuid } from '../../../utils/random'
|
||||
import { buildValidatorData } from '/@/utils/validate'
|
||||
|
@ -111,12 +111,13 @@
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import { index, postData, del, postSendTestMail } from '/@/api/backend/routine/config'
|
||||
import { FormInstance, FormItemRule, ElMessageBox, ElNotification } from 'element-plus'
|
||||
import { ElMessageBox, ElNotification } from 'element-plus'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import AddFrom from './add.vue'
|
||||
import { routePush } from '/@/utils/router'
|
||||
import { buildValidatorData, buildValidatorParams } from '/@/utils/validate'
|
||||
import { buildValidatorData, type buildValidatorParams } from '/@/utils/validate'
|
||||
import { useSiteConfig } from '/@/stores/siteConfig'
|
||||
import { SiteConfig } from '/@/stores/interface'
|
||||
import type { SiteConfig } from '/@/stores/interface'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { uuid } from '/@/utils/random'
|
||||
|
||||
@ -221,7 +222,7 @@ const onSubmit = () => {
|
||||
postData('edit', formData).then(() => {
|
||||
for (const key in siteConfig.$state) {
|
||||
if (formData[key] && siteConfig.$state[key as keyof SiteConfig] != formData[key]) {
|
||||
siteConfig.$state[key as keyof SiteConfig] = formData[key]
|
||||
;(siteConfig.$state[key as keyof SiteConfig] as any) = formData[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { FormInstance } from 'element-plus'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { onResetForm } from '/@/utils/common'
|
||||
import { buildValidatorData } from '/@/utils/validate'
|
||||
import { changePassword } from '/@/api/frontend/user/index'
|
||||
|
@ -244,7 +244,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { FormInstance, FormItemRule } from 'element-plus'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { onResetForm } from '/@/utils/common'
|
||||
|
@ -1,6 +1,7 @@
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
import { UserConfig, ConfigEnv, ProxyOptions, loadEnv } from 'vite'
|
||||
import { loadEnv } from 'vite'
|
||||
import type { UserConfig, ConfigEnv, ProxyOptions } from 'vite'
|
||||
import { isProd } from '/@/utils/vite'
|
||||
import { svgBuilder } from '/@/components/icon/svg/index'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user