perf: aotu import hooks

pull/2/head
xingyu 2023-01-18 14:23:45 +08:00
parent fcd19e1371
commit 8c74e527a9
132 changed files with 116 additions and 308 deletions

View File

@ -32,7 +32,24 @@ export function createVitePlugins(VITE_APP_TITLE: string) {
PurgeIcons(),
vueSetupExtend(),
AutoImport({
imports: ['vue', 'vue-router'],
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/ // .md
],
imports: [
'vue',
'vue-router',
{
'@/hooks/web/useI18n': ['useI18n'],
'@/hooks/web/useXTable': ['useXTable'],
'@/hooks/web/useMessage': ['useMessage'],
'@/hooks/web/useVxeCrudSchemas': ['useVxeCrudSchemas'],
'@/utils/formRules': ['required'],
'@/utils/dict': ['DICT_TYPE']
}
],
dts: 'src/types/auto-imports.d.ts',
resolvers: [ElementPlusResolver()],
eslintrc: {

View File

@ -1,6 +1,6 @@
{
"name": "yudao-ui-admin-vue3",
"version": "1.6.6-snapshot.1923",
"version": "1.6.6-snapshot.1925",
"description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu",
"private": false,

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
const { getPrefixCls } = useDesign()

View File

@ -13,7 +13,7 @@
</template>
<script setup lang="ts">
import { useDesign } from '@/hooks/web/useDesign'
import { useMessage } from '@/hooks/web/useMessage'
import { propTypes } from '@/utils/propTypes'
import { useI18n } from 'vue-i18n'
import CopperModal from './CopperModal.vue'

View File

@ -3,7 +3,6 @@ import pageError from '@/assets/svgs/404.svg'
import networkError from '@/assets/svgs/500.svg'
import noPermission from '@/assets/svgs/403.svg'
import { propTypes } from '@/utils/propTypes'
import { useI18n } from '@/hooks/web/useI18n'
interface ErrorMap {
url: string

View File

@ -1,4 +1,3 @@
import { useI18n } from '@/hooks/web/useI18n'
import type { Slots } from 'vue'
import { getSlot } from '@/utils/tsxHelper'
import { PlaceholderMoel } from './types'

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes'
import { useI18n } from '@/hooks/web/useI18n'
import { useForm } from '@/hooks/web/useForm'
import { findIndex } from '@/utils'
import { cloneDeep } from 'lodash-es'

View File

@ -34,7 +34,7 @@
</template>
<script setup lang="ts" name="UploadFile">
import { PropType } from 'vue'
import { useMessage } from '@/hooks/web/useMessage'
import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth'
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus'

View File

@ -52,8 +52,7 @@
<script setup lang="ts" name="UploadImg">
import type { UploadProps } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { generateUUID } from '@/utils'
import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth'

View File

@ -49,7 +49,7 @@
import { PropType, ref } from 'vue'
import { ElUpload, ElNotification, ElImageViewer } from 'element-plus'
import type { UploadProps, UploadFile, UploadUserFile } from 'element-plus'
import { useMessage } from '@/hooks/web/useMessage'
import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth'

View File

@ -38,7 +38,6 @@
* */
import { VerifySlide, VerifyPoints } from './Verify'
import { computed, ref, toRefs, watchEffect } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
export default {
name: 'Vue3Verify',

View File

@ -66,7 +66,6 @@ import { resetSize } from './../utils/util'
import { aesEncrypt } from './../utils/ase'
import { getCodeApi, reqCheckApi } from '@/api/login'
import { onMounted, reactive, ref, nextTick, toRefs, getCurrentInstance } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
const props = defineProps({
//popfixed

View File

@ -79,7 +79,6 @@
import { aesEncrypt } from './../utils/ase'
import { resetSize } from './../utils/util'
import { getCodeApi, reqCheckApi } from '@/api/login'
import { useI18n } from '@/hooks/web/useI18n'
const props = defineProps({
captchaType: {

View File

@ -12,9 +12,8 @@ import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'
import { XTableProps } from './type'
import { isBoolean, isFunction } from '@/utils/is'
import { useMessage } from '@/hooks/web/useMessage'
import download from '@/utils/download'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
const message = useMessage() //

View File

@ -10,7 +10,7 @@ import qs from 'qs'
import { config } from '@/config/axios/config'
import { getAccessToken, getRefreshToken, getTenantId, removeToken, setToken } from '@/utils/auth'
import errorCode from './errorCode'
import { useI18n } from '@/hooks/web/useI18n'
import { resetRouter } from '@/router'
import { useCache } from '@/hooks/web/useCache'

View File

@ -1,6 +1,6 @@
import type { App } from 'vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() // 国际化
export function hasPermi(app: App<Element>) {

View File

@ -1,6 +1,6 @@
import type { App } from 'vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() // 国际化
export function hasRole(app: App<Element>) {

View File

@ -3,7 +3,7 @@ import { AxiosPromise } from 'axios'
import { findIndex } from '@/utils'
import { eachTree, treeMap, filter } from '@/utils/tree'
import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict'
import { useI18n } from '@/hooks/web/useI18n'
import { FormSchema } from '@/types/form'
import { TableColumn } from '@/types/table'
import { DescriptionsSchema } from '@/types/descriptions'

View File

@ -1,7 +1,7 @@
import introJs from 'intro.js'
import { IntroJs, Step, Options } from 'intro.js'
import 'intro.js/introjs.css'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
export const useIntro = (setps?: Step[], options?: Options) => {

View File

@ -3,7 +3,7 @@ import { Table, TableExpose } from '@/components/Table'
import { ElMessage, ElMessageBox, ElTable } from 'element-plus'
import { computed, nextTick, reactive, ref, unref, watch } from 'vue'
import type { TableProps } from '@/components/Table/src/types'
import { useI18n } from '@/hooks/web/useI18n'
import { TableSetPropsType } from '@/types/table'
const { t } = useI18n()

View File

@ -1,7 +1,6 @@
import { watch, ref } from 'vue'
import { isString } from '@/utils/is'
import { useAppStoreWithOut } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n'
const appStore = useAppStoreWithOut()

View File

@ -1,5 +1,3 @@
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
type Callback = (error?: string | Error | undefined) => void

View File

@ -6,7 +6,7 @@ import {
VxeTableDefines
} from 'vxe-table'
import { eachTree } from 'xe-utils'
import { useI18n } from '@/hooks/web/useI18n'
import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict'
import { FormSchema } from '@/types/form'
import { VxeTableColumn } from '@/types/table'

View File

@ -2,8 +2,7 @@ import { computed, nextTick, reactive } from 'vue'
import { SizeType, VxeGridProps, VxeTablePropTypes } from 'vxe-table'
import { useAppStore } from '@/store/modules/app'
import { VxeAllSchemas } from './useVxeCrudSchemas'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import download from '@/utils/download'
const { t } = useI18n()

View File

@ -6,7 +6,7 @@ import { usePermissionStore } from '@/store/modules/permission'
import { filterBreadcrumb } from './helper'
import { filter, treeToList } from '@/utils/tree'
import type { RouteLocationNormalizedLoaded, RouteMeta } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n'
import { Icon } from '@/components/Icon'
import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { PropType } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { contextMenuSchema } from '@/types/contextMenu'

View File

@ -1,6 +1,5 @@
import type { RouteMeta } from 'vue-router'
import { Icon } from '@/components/Icon'
import { useI18n } from '@/hooks/web/useI18n'
export const useRenderMenuTitle = () => {
const renderMenuTitle = (meta: RouteMeta) => {

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { ElMessage } from 'element-plus'
import { useCssVar, useClipboard } from '@vueuse/core'
import { useI18n } from '@/hooks/web/useI18n'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { setCssVar } from '@/utils'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
import { useWatermark } from '@/hooks/web/useWatermark'
import { useAppStore } from '@/store/modules/app'

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { useAppStore } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n'
import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign'
import { ElementPlusSize } from '@/types/elementPlus'

View File

@ -1,7 +1,7 @@
<script lang="tsx">
import { usePermissionStore } from '@/store/modules/permission'
import { useAppStore } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n'
import { ElScrollbar } from 'element-plus'
import { Icon } from '@/components/Icon'
import { Menu } from '@/layout/components/Menu'

View File

@ -3,7 +3,7 @@ import type { RouteLocationNormalizedLoaded, RouterLinkProps } from 'vue-router'
import { usePermissionStore } from '@/store/modules/permission'
import { useTagsViewStore } from '@/store/modules/tagsView'
import { useAppStore } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n'
import { filterAffixTags } from './helper'
import { ContextMenu, ContextMenuExpose } from '@/layout/components/ContextMenu'
import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { ElMessageBox } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useDesign } from '@/hooks/web/useDesign'
import avatarImg from '@/assets/imgs/avatar.gif'

View File

@ -1,4 +1,3 @@
import { useI18n } from '@/hooks/web/useI18n'
import { ElDatePicker } from 'element-plus'
import { VXETable } from 'vxe-table'

View File

@ -1,5 +1,5 @@
import { Layout } from '@/utils/routerHelper'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
/**
* redirect: noredirect noredirect

View File

@ -1,6 +1,7 @@
// Generated by 'unplugin-auto-import'
export {}
declare global {
const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE']
const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
@ -37,6 +38,7 @@ declare global {
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const required: typeof import('@/utils/formRules')['required']
const resolveComponent: typeof import('vue')['resolveComponent']
const resolveDirective: typeof import('vue')['resolveDirective']
const shallowReactive: typeof import('vue')['shallowReactive']
@ -50,10 +52,14 @@ declare global {
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useI18n: typeof import('@/hooks/web/useI18n')['useI18n']
const useLink: typeof import('vue-router')['useLink']
const useMessage: typeof import('@/hooks/web/useMessage')['useMessage']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const useVxeCrudSchemas: typeof import('@/hooks/web/useVxeCrudSchemas')['useVxeCrudSchemas']
const useXTable: typeof import('@/hooks/web/useXTable')['useXTable']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']

View File

@ -1,5 +1,3 @@
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
// 必填项

View File

@ -164,7 +164,7 @@
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { formatTime } from '@/utils'
import { useI18n } from '@/hooks/web/useI18n'
import { useUserStore } from '@/store/modules/user'
import { useWatermark } from '@/hooks/web/useWatermark'
import avatarImg from '@/assets/imgs/avatar.gif'

View File

@ -143,7 +143,7 @@
<script setup lang="ts">
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
import type { AnalysisTotalTypes } from './types'
import { pieOptions, barOptions, lineOptions } from './echarts-data'

View File

@ -1,5 +1,4 @@
import { EChartsOption } from 'echarts'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()

View File

@ -60,7 +60,7 @@
</template>
<script setup lang="ts">
import { underlineToHump } from '@/utils'
import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign'
import { useAppStore } from '@/store/modules/app'
import { ThemeSwitch } from '@/layout/components/ThemeSwitch'

View File

@ -131,10 +131,9 @@
import { ElLoading } from 'element-plus'
import LoginFormTitle from './LoginFormTitle.vue'
import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n'
import { useIcon } from '@/hooks/web/useIcon'
import { useMessage } from '@/hooks/web/useMessage'
import { required } from '@/utils/formRules'
import * as authUtil from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission'
import * as LoginApi from '@/api/login'

View File

@ -4,7 +4,6 @@
</h2>
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/web/useI18n'
import { LoginStateEnum, useLoginState } from './useLogin'
const { t } = useI18n()

View File

@ -93,10 +93,9 @@
</template>
<script setup lang="ts">
import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n'
import { useIcon } from '@/hooks/web/useIcon'
import { useMessage } from '@/hooks/web/useMessage'
import { required } from '@/utils/formRules'
import { setTenantId, setToken } from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission'
import { getTenantIdByNameApi, sendSmsCodeApi, smsLoginApi } from '@/api/login'

View File

@ -18,7 +18,7 @@
</template>
<script setup lang="ts">
import logoImg from '@/assets/imgs/logo.png'
import { useI18n } from '@/hooks/web/useI18n'
import LoginFormTitle from './LoginFormTitle.vue'
import { useLoginState, LoginStateEnum } from './useLogin'

View File

@ -37,7 +37,7 @@
</template>
<script setup lang="ts">
import type { FormRules } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { useForm } from '@/hooks/web/useForm'
import { useValidator } from '@/hooks/web/useValidator'
import LoginFormTitle from './LoginFormTitle.vue'

View File

@ -31,7 +31,6 @@
</div>
</template>
<script setup lang="ts" name="Profile">
import { useI18n } from '@/hooks/web/useI18n'
import { BasicInfo, ProfileUser, ResetPwd, UserSocial } from './components/'
const { t } = useI18n()

View File

@ -13,7 +13,7 @@
<script setup lang="ts">
import type { FormRules } from 'element-plus'
import { ElMessage } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { FormSchema } from '@/types/form'
import type { FormExpose } from '@/components/Form'
import {

View File

@ -42,7 +42,7 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import UserAvatar from './UserAvatar.vue'
import { useI18n } from '@/hooks/web/useI18n'
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
const { t } = useI18n()

View File

@ -17,8 +17,7 @@
</template>
<script setup lang="ts">
import type { FormRules, FormInstance } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { InputPassword } from '@/components/InputPassword'
import { updateUserPwdApi } from '@/api/system/user/profile'

View File

@ -22,7 +22,6 @@
</el-table>
</template>
<script setup lang="ts">
import { useMessage } from '@/hooks/web/useMessage'
import { SystemUserSocialTypeEnum } from '@/utils/constants'
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser'

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -1,14 +1,13 @@
<script setup lang="ts" name="Form">
import dayjs from 'dayjs'
import { ElMessage } from 'element-plus'
import { DICT_TYPE } from '@/utils/dict'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import type { FormExpose } from '@/components/Form'
import type { FormVO } from '@/api/bpm/form/types'
import { rules, allSchemas } from './form.data'
import * as FormApi from '@/api/bpm/form'
import { useTable } from '@/hooks/web/useTable'
const { t } = useI18n() //
const message = useMessage()
// ========== ==========
const { register, tableObject, methods } = useTable<FormVO>({
@ -56,10 +55,10 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel as FormVO
if (actionType.value === 'create') {
await FormApi.createFormApi(data)
ElMessage.success(t('common.createSuccess'))
message.success(t('common.createSuccess'))
} else {
await FormApi.updateFormApi(data)
ElMessage.success(t('common.updateSuccess'))
message.success(t('common.updateSuccess'))
}
//
dialogVisible.value = false

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -1,9 +1,7 @@
<script setup lang="ts" name="Group">
import dayjs from 'dayjs'
import { ElMessage } from 'element-plus'
import { DICT_TYPE } from '@/utils/dict'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import type { FormExpose } from '@/components/Form'
import type { UserGroupVO } from '@/api/bpm/userGroup/types'
import { rules, allSchemas } from './group.data'
@ -12,6 +10,7 @@ import { getListSimpleUsersApi } from '@/api/system/user'
import { UserVO } from '@/api/system/user'
const { t } = useI18n() //
const message = useMessage()
// ========== ==========
const { register, tableObject, methods } = useTable<UserGroupVO>({
@ -66,10 +65,10 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel as UserGroupVO
if (actionType.value === 'create') {
await UserGroupApi.createUserGroupApi(data)
ElMessage.success(t('common.createSuccess'))
message.success(t('common.createSuccess'))
} else {
await UserGroupApi.updateUserGroupApi(data)
ElMessage.success(t('common.updateSuccess'))
message.success(t('common.updateSuccess'))
}
//
dialogVisible.value = false

View File

@ -2,14 +2,13 @@
import dayjs from 'dayjs'
import { DICT_TYPE } from '@/utils/dict'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import type { FormExpose } from '@/components/Form'
import type { ModelVO } from '@/api/bpm/model/types'
import { rules, allSchemas } from './model.data'
import * as ModelApi from '@/api/bpm/model'
import { useMessage } from '@/hooks/web/useMessage'
const message = useMessage()
const { t } = useI18n() //
const message = useMessage()
// ========== ==========
const { register, tableObject, methods } = useTable<ModelVO>({

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -2,12 +2,12 @@
import dayjs from 'dayjs'
import { DICT_TYPE } from '@/utils/dict'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import type { ProcessInstanceVO } from '@/api/bpm/processInstance/types'
import { allSchemas } from './process.data'
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessageBox } from 'element-plus'
const { t } = useI18n() //
const message = useMessage()
// ========== ==========
const { register, tableObject, methods } = useTable<ProcessInstanceVO>({
@ -31,7 +31,7 @@ const handleCancel = (row: ProcessInstanceVO) => {
inputErrorMessage: '取消原因不能为空'
}).then(async ({ value }) => {
await ProcessInstanceApi.cancelProcessInstanceApi(row.id, value)
ElMessage.success('取消成功')
message.success('取消成功')
getList()
})
}

View File

@ -1,6 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// CrudSchema

View File

@ -1,6 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// CrudSchema

View File

@ -2,11 +2,10 @@
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import { DICT_TYPE } from '@/utils/dict'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import type { TaskDoneVO } from '@/api/bpm/task/types'
import { allSchemas } from './done.data'
import * as TaskDoneApi from '@/api/bpm/task'
import { useTable } from '@/hooks/web/useTable'
dayjs.extend(duration)
const { t } = useI18n() //
const { push } = useRouter()

View File

@ -1,4 +1,3 @@
import { useI18n } from '@/hooks/web/useI18n'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -1,5 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// CrudSchema
const crudSchemas = reactive<VxeCrudSchema>({

View File

@ -36,8 +36,6 @@
</XModal>
</template>
<script setup lang="ts" name="ApiAccessLog">
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import { allSchemas } from './apiAccessLog.data'
import * as ApiAccessLogApi from '@/api/infra/apiAccessLog'

View File

@ -1,5 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// CrudSchema
const crudSchemas = reactive<VxeCrudSchema>({

View File

@ -52,12 +52,9 @@
</XModal>
</template>
<script setup lang="ts" name="ApiErrorLog">
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import { allSchemas } from './apiErrorLog.data'
import * as ApiErrorLogApi from '@/api/infra/apiErrorLog'
import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants'
import { useMessage } from '@/hooks/web/useMessage'
const { t } = useI18n() //
const message = useMessage()

View File

@ -21,8 +21,6 @@
</ContentWrap>
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { BasicInfoForm, CloumInfoForm } from './components'
import { getCodegenTableApi, updateCodegenTableApi } from '@/api/infra/codegen'
import { CodegenTableVO, CodegenColumnVO, CodegenUpdateReqVO } from '@/api/infra/codegen/types'

View File

@ -1,6 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -2,14 +2,13 @@
<Form :rules="rules" @register="register" />
</template>
<script setup lang="ts">
import { PropType } from 'vue'
import { required } from '@/utils/formRules'
import { useForm } from '@/hooks/web/useForm'
import { FormSchema } from '@/types/form'
import { CodegenTableVO } from '@/api/infra/codegen/types'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { getIntDictOptions } from '@/utils/dict'
import { listSimpleMenusApi } from '@/api/system/menu'
import { handleTree, defaultProps } from '@/utils/tree'
import { PropType } from 'vue'
const props = defineProps({
basicInfo: {

View File

@ -49,8 +49,6 @@
</XModal>
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { VxeTableInstance } from 'vxe-table'
import type { DatabaseTableVO } from '@/api/infra/codegen/types'
import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen'

View File

@ -31,8 +31,6 @@
</template>
<script setup lang="ts">
import { useClipboard } from '@vueuse/core'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { handleTree2 } from '@/utils/tree'
import { previewCodegenApi } from '@/api/infra/codegen'
import { CodegenTableVO, CodegenPreviewVO } from '@/api/infra/codegen/types'

View File

@ -57,9 +57,6 @@
<Preview ref="previewRef" />
</template>
<script setup lang="ts" name="Codegen">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import download from '@/utils/download'
import * as CodegenApi from '@/api/infra/codegen'
import { CodegenTableVO } from '@/api/infra/codegen/types'

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -84,9 +84,7 @@
</template>
<script setup lang="ts" name="Config">
// import
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { FormExpose } from '@/components/Form'
// import
import * as ConfigApi from '@/api/infra/config'

View File

@ -1,6 +1,4 @@
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// 国际化
const { t } = useI18n()
// 表单校验

View File

@ -67,9 +67,7 @@
</template>
<script setup lang="ts" name="DataSourceConfig">
// import
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import { useMessage } from '@/hooks/web/useMessage'
import type { FormExpose } from '@/components/Form'
// import
import * as DataSourceConfiggApi from '@/api/infra/dataSourceConfig'

View File

@ -26,7 +26,7 @@
</template>
<script setup lang="ts" name="DbDoc">
import download from '@/utils/download'
import { useI18n } from '@/hooks/web/useI18n'
import * as DbDocApi from '@/api/infra/dbDoc'
const { t } = useI18n() //

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -160,9 +160,7 @@
<script setup lang="ts" name="FileConfig">
// import
import type { FormInstance } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
// import
import * as FileConfigApi from '@/api/infra/fileConfig'
import { rules, allSchemas } from './fileConfig.data'

View File

@ -1,5 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// CrudSchema

View File

@ -82,9 +82,6 @@
</XModal>
</template>
<script setup lang="ts" name="FileList">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { UploadInstance, UploadRawFile } from 'element-plus'
// import
import { allSchemas } from './fileList.data'

View File

@ -49,8 +49,7 @@
</template>
<script setup lang="ts" name="JobLog">
import dayjs from 'dayjs'
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import * as JobLogApi from '@/api/infra/jobLog'
import { allSchemas } from './jobLog.data'

View File

@ -129,9 +129,6 @@
</XModal>
</template>
<script setup lang="ts" name="Job">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { FormExpose } from '@/components/Form'
import * as JobApi from '@/api/infra/job'
import { rules, allSchemas } from './job.data'

View File

@ -1,7 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验
export const rules = reactive({

View File

@ -1,6 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// 国际化
const { t } = useI18n()
// CrudSchema

View File

@ -127,8 +127,7 @@
<script setup lang="ts" name="Redis">
import * as echarts from 'echarts'
import { DICT_TYPE } from '@/utils/dict'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import * as RedisApi from '@/api/infra/redis'
import { RedisKeyInfo, RedisMonitorInfoVO } from '@/api/infra/redis/types'

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -76,9 +76,6 @@
</XModal>
</template>
<script setup lang="ts" name="App">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { FormExpose } from '@/components/Form'
import { rules, allSchemas } from './app.data'
import * as AppApi from '@/api/pay/app'

View File

@ -75,9 +75,6 @@
</XModal>
</template>
<script setup lang="ts" name="Merchant">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { FormExpose } from '@/components/Form'
import { rules, allSchemas } from './merchant.data'
import * as MerchantApi from '@/api/pay/merchant'

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -42,8 +42,6 @@
</XModal>
</template>
<script setup lang="ts" name="Order">
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import { allSchemas } from './order.data'
import * as OrderApi from '@/api/pay/order'

View File

@ -1,7 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -34,8 +34,6 @@
</XModal>
</template>
<script setup lang="ts" name="Refund">
import { useI18n } from '@/hooks/web/useI18n'
import { useXTable } from '@/hooks/web/useXTable'
import { allSchemas } from './refund.data'
import * as RefundApi from '@/api/pay/refund'

View File

@ -1,6 +1,4 @@
import { useI18n } from '@/hooks/web/useI18n'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// CrudSchema

View File

@ -1,7 +1,5 @@
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -76,9 +76,6 @@
</template>
<script setup lang="ts" name="Dept">
import { handleTree, defaultProps } from '@/utils/tree'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import type { FormExpose } from '@/components/Form'
import { allSchemas, rules } from './dept.data'
import * as DeptApi from '@/api/system/dept'

View File

@ -1,7 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// 国际化
const { t } = useI18n()
// 表单校验

View File

@ -1,7 +1,4 @@
import { DICT_TYPE } from '@/utils/dict'
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

View File

@ -122,9 +122,6 @@
</div>
</template>
<script setup lang="ts" name="Dict">
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useXTable } from '@/hooks/web/useXTable'
import { VxeTableEvents } from 'vxe-table'
import type { FormExpose } from '@/components/Form'
import * as DictTypeSchemas from './dict.type'

View File

@ -1,7 +1,4 @@
import { required } from '@/utils/formRules'
import { useI18n } from '@/hooks/web/useI18n'
import { DICT_TYPE } from '@/utils/dict'
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验

Some files were not shown because too many files have changed in this diff Show More