perf: auto import vue element-plus

pull/2/head
xingyu 2023-01-18 12:34:52 +08:00
parent 85c4d1fb03
commit 8e03c57bf4
58 changed files with 50 additions and 142 deletions

View File

@ -1,9 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'
import { isDark } from '@/utils/is' import { isDark } from '@/utils/is'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { ConfigGlobal } from '@/components/ConfigGlobal'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -1,9 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { provide, computed, watch, onMounted } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { ElConfigProvider } from 'element-plus'
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { useWindowSize } from '@vueuse/core'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { setCssVar } from '@/utils' import { setCssVar } from '@/utils'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,9 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElCard } from 'element-plus'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { ref, onMounted } from 'vue'
import { Sticky } from '@/components/Sticky'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() const { t } = useI18n()

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { reactive, computed, watch, onMounted, unref, toRef, PropType } from 'vue' import { PropType } from 'vue'
import { isNumber } from '@/utils/is' import { isNumber } from '@/utils/is'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,19 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { import { ElMessage } from 'element-plus'
ElInput, import { PropType } from 'vue'
ElInputNumber,
ElDialog,
ElTabs,
ElTabPane,
ElSelect,
ElOption,
ElForm,
ElFormItem,
ElRadioGroup,
ElRadioButton,
ElMessage
} from 'element-plus'
import { ref, computed, onMounted, reactive, watch, PropType } from 'vue'
interface shortcutsType { interface shortcutsType {
text: string text: string
value: string value: string

View File

@ -116,11 +116,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { dataURLtoBlob } from '@/utils/filt' import { dataURLtoBlob } from '@/utils/filt'
import { ref } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { ElUpload, ElAvatar, ElTooltip, ElSpace } from 'element-plus'
import { Dialog } from '@/components/Dialog'
import { CropperImage } from '@/components/Cropper'
import type { CropendResult, Cropper } from './types' import type { CropendResult, Cropper } from './types'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'

View File

@ -11,20 +11,10 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { CSSProperties, PropType } from 'vue'
computed,
CSSProperties,
onMounted,
onUnmounted,
PropType,
ref,
unref,
useAttrs
} from 'vue'
import Cropper from 'cropperjs' import Cropper from 'cropperjs'
import 'cropperjs/dist/cropper.css' import 'cropperjs/dist/cropper.css'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useDebounceFn } from '@vueuse/core'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
type Options = Cropper.Options type Options = Cropper.Options

View File

@ -15,7 +15,6 @@
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { ref, watch, watchEffect } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import CopperModal from './CopperModal.vue' import CopperModal from './CopperModal.vue'

View File

@ -1,9 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { PropType } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { ElCollapseTransition, ElDescriptions, ElDescriptionsItem, ElTooltip } from 'element-plus'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { ref, unref, PropType, computed, useAttrs, useSlots } from 'vue'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { DescriptionsSchema } from '@/types/descriptions' import { DescriptionsSchema } from '@/types/descriptions'

View File

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElDialog, ElScrollbar } from 'element-plus'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'
import { isNumber } from '@/utils/is' import { isNumber } from '@/utils/is'
const slots = useSlots() const slots = useSlots()

View File

@ -4,7 +4,7 @@ import echarts from '@/plugins/echarts'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import 'echarts-wordcloud' import 'echarts-wordcloud'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { computed, PropType, ref, unref, watch, onMounted, onBeforeUnmount, onActivated } from 'vue' import { PropType } from 'vue'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onBeforeUnmount, computed, PropType, unref, nextTick, ref, watch, shallowRef } from 'vue' import { PropType } from 'vue'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { IDomEditor, IEditorConfig, i18nChangeLanguage } from '@wangeditor/editor' import { IDomEditor, IEditorConfig, i18nChangeLanguage } from '@wangeditor/editor'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { isNumber } from '@/utils/is' import { isNumber } from '@/utils/is'

View File

@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
const props = defineProps({ const props = defineProps({

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, unref, ref, watch, nextTick } from 'vue'
import { ElIcon } from 'element-plus'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import Iconify from '@purge-icons/generated' import Iconify from '@purge-icons/generated'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElImageViewer } from 'element-plus' import { PropType } from 'vue'
import { computed, ref, PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
const props = defineProps({ const props = defineProps({

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { PropType } from 'vue' import { PropType } from 'vue'
import { Highlight } from '@/components/Highlight'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { TipSchema } from '@/types/infoTip' import { TipSchema } from '@/types/infoTip'

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, unref, computed, watch } from 'vue'
import { ElInput } from 'element-plus'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useConfigGlobal } from '@/hooks/web/useConfigGlobal' import { useConfigGlobal } from '@/hooks/web/useConfigGlobal'
import { zxcvbn } from '@zxcvbn-ts/core' import { zxcvbn } from '@zxcvbn-ts/core'

View File

@ -1,8 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form } from '@/components/Form' import { PropType } from 'vue'
import { PropType, computed, unref, ref } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { ElButton } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useForm } from '@/hooks/web/useForm' import { useForm } from '@/hooks/web/useForm'
import { findIndex } from '@/utils' import { findIndex } from '@/utils'

View File

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { ref, onMounted, onActivated, shallowRef } from 'vue'
import { useEventListener, useWindowSize, isClient } from '@vueuse/core'
import type { CSSProperties } from 'vue' import type { CSSProperties } from 'vue'
const props = defineProps({ const props = defineProps({
// (px) // (px)

View File

@ -33,11 +33,10 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="UploadFile"> <script setup lang="ts" name="UploadFile">
import { PropType, ref } from 'vue' import { PropType } from 'vue'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
import { ElUpload, UploadInstance, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
const message = useMessage() // const message = useMessage() //
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])

View File

@ -51,9 +51,7 @@
</template> </template>
<script setup lang="ts" name="UploadImg"> <script setup lang="ts" name="UploadImg">
import { ref } from 'vue'
import type { UploadProps } from 'element-plus' import type { UploadProps } from 'element-plus'
import { ElUpload, ElNotification, ElImageViewer } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { generateUUID } from '@/utils' import { generateUUID } from '@/utils'
@ -111,17 +109,8 @@ const beforeUpload: UploadProps['beforeUpload'] = (rawFile) => {
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize const imgSize = rawFile.size / 1024 / 1024 < props.fileSize
const imgType = props.fileType const imgType = props.fileType
if (!imgType.includes(rawFile.type as FileTypes)) if (!imgType.includes(rawFile.type as FileTypes))
ElNotification({ message.notifyWarning('上传图片不符合所需的格式!')
title: '温馨提示', if (!imgSize) message.notifyWarning(`上传图片大小不能超过 ${props.fileSize}M`)
message: '上传图片不符合所需的格式!',
type: 'warning'
})
if (!imgSize)
ElNotification({
title: '温馨提示',
message: `上传图片大小不能超过 ${props.fileSize}M`,
type: 'warning'
})
return imgType.includes(rawFile.type as FileTypes) && imgSize return imgType.includes(rawFile.type as FileTypes) && imgSize
} }
@ -133,11 +122,7 @@ const uploadSuccess: UploadProps['onSuccess'] = (res: any): void => {
// //
const uploadError = () => { const uploadError = () => {
ElNotification({ message.notifyError('图片上传失败,请您重新上传!')
title: '温馨提示',
message: '图片上传失败,请您重新上传!',
type: 'error'
})
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

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

View File

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { computed, useAttrs, PropType } from 'vue'
const props = defineProps({ const props = defineProps({
modelValue: propTypes.bool.def(false), modelValue: propTypes.bool.def(false),

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { computed, useAttrs, PropType } from 'vue'
const props = defineProps({ const props = defineProps({
modelValue: propTypes.bool.def(false), modelValue: propTypes.bool.def(false),

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { computed, useAttrs, useSlots } from 'vue'
import { ElScrollbar } from 'element-plus' import { ElScrollbar } from 'element-plus'
const slots = useSlots() const slots = useSlots()

View File

@ -6,7 +6,7 @@
</VxeGrid> </VxeGrid>
</template> </template>
<script lang="ts" setup name="XTable"> <script lang="ts" setup name="XTable">
import { computed, PropType, ref, unref, useAttrs, watch } from 'vue' import { PropType } from 'vue'
import { SizeType, VxeGridInstance } from 'vxe-table' import { SizeType, VxeGridInstance } from 'vxe-table'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,5 +1,3 @@
import { ref, unref } from 'vue'
export interface ScrollToParams { export interface ScrollToParams {
el: HTMLElement el: HTMLElement
to: number to: number

View File

@ -1,5 +1,4 @@
import { ConfigGlobalTypes } from '@/types/configGlobal' import { ConfigGlobalTypes } from '@/types/configGlobal'
import { inject } from 'vue'
export const useConfigGlobal = () => { export const useConfigGlobal = () => {
const configGlobal = inject('configGlobal', {}) as ConfigGlobalTypes const configGlobal = inject('configGlobal', {}) as ConfigGlobalTypes

View File

@ -1,5 +1,4 @@
import mitt from 'mitt' import mitt from 'mitt'
import { onBeforeUnmount } from 'vue'
interface Option { interface Option {
name: string // 事件名称 name: string // 事件名称

View File

@ -1,6 +1,5 @@
import type { Form, FormExpose } from '@/components/Form' import type { Form, FormExpose } from '@/components/Form'
import type { ElForm } from 'element-plus' import type { ElForm } from 'element-plus'
import { ref, unref, nextTick } from 'vue'
import type { FormProps } from '@/components/Form/src/types' import type { FormProps } from '@/components/Form/src/types'
import { FormSchema, FormSetPropsType } from '@/types/form' import { FormSchema, FormSetPropsType } from '@/types/form'

View File

@ -1,8 +1,6 @@
import { nextTick, unref } from 'vue'
import type { NProgressOptions } from 'nprogress' import type { NProgressOptions } from 'nprogress'
import NProgress from 'nprogress' import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import { useCssVar } from '@vueuse/core'
const primaryColor = useCssVar('--el-color-primary', document.documentElement) const primaryColor = useCssVar('--el-color-primary', document.documentElement)

View File

@ -1,5 +1,4 @@
import { useTimeAgo as useTimeAgoCore, UseTimeAgoMessages } from '@vueuse/core' import { useTimeAgo as useTimeAgoCore, UseTimeAgoMessages } from '@vueuse/core'
import { computed, unref } from 'vue'
import { useLocaleStoreWithOut } from '@/store/modules/locale' import { useLocaleStoreWithOut } from '@/store/modules/locale'
const TIME_AGO_MESSAGE_MAP: { const TIME_AGO_MESSAGE_MAP: {

View File

@ -1,4 +1,3 @@
import { reactive } from 'vue'
import { import {
FormItemRenderOptions, FormItemRenderOptions,
VxeColumnPropTypes, VxeColumnPropTypes,

View File

@ -1,4 +1,3 @@
import { ref, unref } from 'vue'
import { XTableProps } from '@/components/XTable/src/type' import { XTableProps } from '@/components/XTable/src/type'
export interface tableMethod { export interface tableMethod {

View File

@ -2,7 +2,6 @@
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { Footer } from '@/layout/components/Footer' import { Footer } from '@/layout/components/Footer'
import { computed } from 'vue'
const appStore = useAppStore() const appStore = useAppStore()

View File

@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, unref } from 'vue'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus' import { PropType } from 'vue'
import { PropType, ref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { contextMenuSchema } from '@/types/contextMenu' import { contextMenuSchema } from '@/types/contextMenu'
import type { ElDropdown } from 'element-plus'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { computed } from 'vue'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, unref } from 'vue'
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus'
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { useLocale } from '@/hooks/web/useLocale' import { useLocale } from '@/hooks/web/useLocale'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'

View File

@ -1,10 +1,9 @@
<script lang="tsx"> <script lang="tsx">
import { computed, defineComponent, unref, PropType } from 'vue' import { PropType } from 'vue'
import { ElMenu, ElScrollbar } from 'element-plus' import { ElMenu, ElScrollbar } from 'element-plus'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { useRenderMenuItem } from './components/useRenderMenuItem' import { useRenderMenuItem } from './components/useRenderMenuItem'
import { useRouter } from 'vue-router'
import { isUrl } from '@/utils/is' import { isUrl } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { LayoutType } from '@/types/layout' import { LayoutType } from '@/types/layout'

View File

@ -1,5 +1,4 @@
import type { RouteMeta } from 'vue-router' import type { RouteMeta } from 'vue-router'
import { ref, unref } from 'vue'
import { findPath } from '@/utils/tree' import { findPath } from '@/utils/tree'
type OnlyOneChildType = AppRouteRecordRaw & { noShowingChildren?: boolean } type OnlyOneChildType = AppRouteRecordRaw & { noShowingChildren?: boolean }

View File

@ -1,7 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { ElTabs, ElTabPane, ElPopover, ElBadge } from 'element-plus'
const activeName = ref('notice') const activeName = ref('notice')
const noticeList = ref([ const noticeList = ref([

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElDrawer, ElDivider, ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { ref, unref, computed, watch } from 'vue'
import { useCssVar, useClipboard } from '@vueuse/core' import { useCssVar, useClipboard } from '@vueuse/core'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { PropType, watch, unref, ref } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref, watch } from 'vue'
import { ElSwitch, ElInput } from 'element-plus'
import { setCssVar } from '@/utils' import { setCssVar } from '@/utils'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { computed } from 'vue'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'

View File

@ -1,12 +1,10 @@
<script lang="tsx"> <script lang="tsx">
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { computed, unref, defineComponent, watch, ref, onMounted } from 'vue'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { ElScrollbar } from 'element-plus' import { ElScrollbar } from 'element-plus'
import { Icon } from '@/components/Icon' import { Icon } from '@/components/Icon'
import { Menu } from '@/layout/components/Menu' import { Menu } from '@/layout/components/Menu'
import { useRouter } from 'vue-router'
import { pathResolve } from '@/utils/routerHelper' import { pathResolve } from '@/utils/routerHelper'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { filterMenusPath, initTabMap, tabPathMap } from './helper' import { filterMenusPath, initTabMap, tabPathMap } from './helper'

View File

@ -2,7 +2,6 @@ import { getAllParentPath } from '@/layout/components/Menu/src/helper'
import type { RouteMeta } from 'vue-router' import type { RouteMeta } from 'vue-router'
import { isUrl } from '@/utils/is' import { isUrl } from '@/utils/is'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { reactive } from 'vue'
export type TabMapTypes = { export type TabMapTypes = {
[key: string]: string[] [key: string]: string[]

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, watch, computed, unref, ref, nextTick } from 'vue'
import { useRouter } from 'vue-router'
import type { RouteLocationNormalizedLoaded, RouterLinkProps } from 'vue-router' import type { RouteLocationNormalizedLoaded, RouterLinkProps } from 'vue-router'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
@ -9,7 +7,6 @@ import { useI18n } from '@/hooks/web/useI18n'
import { filterAffixTags } from './helper' import { filterAffixTags } from './helper'
import { ContextMenu, ContextMenuExpose } from '@/layout/components/ContextMenu' import { ContextMenu, ContextMenuExpose } from '@/layout/components/ContextMenu'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useTemplateRefsList } from '@vueuse/core'
import { ElScrollbar } from 'element-plus' import { ElScrollbar } from 'element-plus'
import { useScrollTo } from '@/hooks/event/useScrollTo' import { useScrollTo } from '@/hooks/event/useScrollTo'

View File

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { ElSwitch } from 'element-plus'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'

View File

@ -1,8 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElDropdown, ElDropdownMenu, ElDropdownItem, ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useRouter } from 'vue-router'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import avatarImg from '@/assets/imgs/avatar.gif' import avatarImg from '@/assets/imgs/avatar.gif'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'

View File

@ -1,4 +1,4 @@
import { App, unref } from 'vue' import { App } from 'vue'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import './renderer' import './renderer'
import { i18n } from '@/plugins/vueI18n' import { i18n } from '@/plugins/vueI18n'

View File

@ -21,17 +21,44 @@ declare module '@vue/runtime-core' {
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard'] ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDivider: typeof import('element-plus/es')['ElDivider'] ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink'] ElLink: typeof import('element-plus/es')['ElLink']
ElOption: typeof import('element-plus/es')['ElOption']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTransfer: typeof import('element-plus/es')['ElTransfer']
ElTree: typeof import('element-plus/es')['ElTree']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
Error: typeof import('./../components/Error/src/Error.vue')['default'] Error: typeof import('./../components/Error/src/Error.vue')['default']
Form: typeof import('./../components/Form/src/Form.vue')['default'] Form: typeof import('./../components/Form/src/Form.vue')['default']
Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default'] Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default']

View File

@ -1,5 +1,3 @@
// import type { Plugin } from 'vue'
/** /**
* *
* @param component * @param component

View File

@ -11,9 +11,8 @@
<XButton type="danger" :title="t('common.reset')" @click="init()" /> <XButton type="danger" :title="t('common.reset')" @click="init()" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive, onMounted, unref, ref } from 'vue'
import type { FormRules } from 'element-plus' import type { FormRules } from 'element-plus'
import { ElMessage, ElRadioGroup, ElRadio } from 'element-plus' import { ElMessage } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { FormSchema } from '@/types/form' import { FormSchema } from '@/types/form'
import type { FormExpose } from '@/components/Form' import type { FormExpose } from '@/components/Form'

View File

@ -1,4 +1,3 @@
import { reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'

View File

@ -21,7 +21,6 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useRouter, useRoute } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { BasicInfoForm, CloumInfoForm } from './components' import { BasicInfoForm, CloumInfoForm } from './components'