perf: aotu components

This commit is contained in:
xingyu4j 2022-11-17 16:02:24 +08:00
parent 931a02a40b
commit daa9d01adf
30 changed files with 8 additions and 62 deletions

View File

@ -23,8 +23,6 @@ declare module '@vue/runtime-core' {
Echart: typeof import('./components/Echart/src/Echart.vue')['default']
Editor: typeof import('./components/Editor/src/Editor.vue')['default']
ElBacktop: typeof import('element-plus/es')['ElBacktop']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
@ -41,15 +39,22 @@ declare module '@vue/runtime-core' {
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']

View File

@ -7,23 +7,7 @@
* @LastEditTime:
-->
<script setup lang="ts">
import {
ElInput,
ElInputNumber,
ElDropdown,
ElDropdownMenu,
ElDropdownItem,
ElDialog,
ElTabs,
ElTabPane,
ElSelect,
ElOption,
ElForm,
ElFormItem,
ElRadioGroup,
ElRadioButton,
ElMessage
} from 'element-plus'
import { ElMessage } from 'element-plus'
import { ref, computed, onMounted, reactive, watch, PropType } from 'vue'
interface shortcutsType {
text: string

View File

@ -1,15 +1,6 @@
<script setup lang="ts">
import { cloneDeep } from 'lodash-es'
import { ref, computed, CSSProperties, toRef, watch } from 'vue'
import {
ElInput,
ElPopover,
ElDivider,
ElScrollbar,
ElTabs,
ElTabPane,
ElPagination
} from 'element-plus'
import { IconJson } from '@/components/Icon/src/data'
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined

View File

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

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Icon } from '@/components/Icon'
import { useFullscreen } from '@vueuse/core'
import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign'

View File

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

View File

@ -2,7 +2,6 @@
import { ElMessage } from 'element-plus'
import { ref, unref, computed, watch } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { ThemeSwitch } from '@/components/ThemeSwitch'
import { colorIsDark, lighten, hexToRGB } from '@/utils/color'
import { useCssVar } from '@vueuse/core'
import { useAppStore } from '@/store/modules/app'

View File

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

View File

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

View File

@ -1,7 +1,6 @@
<script setup lang="ts">
import { useTagsViewStore } from '@/store/modules/tagsView'
import { useAppStore } from '@/store/modules/app'
import { Footer } from '@/components/Footer'
import { computed } from 'vue'
const appStore = useAppStore()

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Error } from '@/components/Error'
import { useRouter } from 'vue-router'
const { push } = useRouter()

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Error } from '@/components/Error'
import { useRouter } from 'vue-router'
const { push } = useRouter()

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Error } from '@/components/Error'
import { useRouter } from 'vue-router'
const { push } = useRouter()

View File

@ -1,12 +1,9 @@
<script setup lang="ts">
import { useI18n } from '@/hooks/web/useI18n'
import { ref, reactive } from 'vue'
import { CountTo } from '@/components/CountTo'
import { formatTime } from '@/utils'
import { Echart } from '@/components/Echart'
import { EChartsOption } from 'echarts'
import { radarOption } from './echarts-data'
import { Highlight } from '@/components/Highlight'
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
import { set } from 'lodash-es'
import { useCache } from '@/hooks/web/useCache'

View File

@ -2,12 +2,9 @@
import { ref, reactive } from 'vue'
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { Echart } from '@/components/Echart'
import { useI18n } from '@/hooks/web/useI18n'
import { CountTo } from '@/components/CountTo'
import type { AnalysisTotalTypes } from './types'
import { useDesign } from '@/hooks/web/useDesign'
import { ElRow, ElCol, ElCard, ElSkeleton } from 'element-plus'
import { pieOptions, barOptions, lineOptions } from './echarts-data'
const { t } = useI18n()

View File

@ -1,7 +1,5 @@
<script setup lang="ts">
import { LoginForm, MobileForm, RegisterForm, QrCodeForm } from './components'
import { ThemeSwitch } from '@/components/ThemeSwitch'
import { LocaleDropdown } from '@/components/LocaleDropdown'
import { useI18n } from '@/hooks/web/useI18n'
import { underlineToHump } from '@/utils'
import { useAppStore } from '@/store/modules/app'

View File

@ -8,10 +8,8 @@ import { usePermissionStore } from '@/store/modules/permission'
import { useRouter } from 'vue-router'
import { useI18n } from '@/hooks/web/useI18n'
import { required } from '@/utils/formRules'
import { Icon } from '@/components/Icon'
import { LoginStateEnum, useLoginState, useFormValid } from './useLogin'
import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { Verify } from '@/components/Verifition'
import Cookies from 'js-cookie'
import { decrypt, encrypt } from '@/utils/jsencrypt'

View File

@ -3,7 +3,6 @@ import { computed, unref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useLoginState, LoginStateEnum } from './useLogin'
import LoginFormTitle from './LoginFormTitle.vue'
import { Qrcode } from '@/components/Qrcode'
import logoImg from '@/assets/imgs/logo.png'
const { t } = useI18n()

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Form } from '@/components/Form'
import { computed, reactive, ref, unref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useForm } from '@/hooks/web/useForm'

View File

@ -16,7 +16,6 @@
</el-form>
</template>
<script setup lang="ts">
import { InputPassword } from '@/components/InputPassword'
import { ElMessage, FormRules, FormInstance } from 'element-plus'
import { updateUserPwdApi } from '@/api/system/user/profile'
import { ref, reactive } from 'vue'

View File

@ -1,6 +1,5 @@
<script setup lang="ts">
import { ref, unref, onMounted } from 'vue'
import { ContentDetailWrap } from '@/components/ContentDetailWrap'
import { BasicInfoForm, CloumInfoForm, GenInfoForm } from './components'
import { getCodegenTableApi, updateCodegenTableApi } from '@/api/infra/codegen'
import { useRouter, useRoute } from 'vue-router'

View File

@ -2,7 +2,6 @@
import { PropType, reactive, watch } from 'vue'
import { required } from '@/utils/formRules'
import { CodegenTableVO } from '@/api/infra/codegen/types'
import { Form } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { FormSchema } from '@/types/form'

View File

@ -1,7 +1,6 @@
<script setup lang="ts">
import { onMounted, PropType, reactive, ref, watch } from 'vue'
import { required } from '@/utils/formRules'
import { Form } from '@/components/Form'
import { handleTree } from '@/utils/tree'
import { ElTreeSelect } from 'element-plus'
import { useForm } from '@/hooks/web/useForm'

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import * as DbDocApi from '@/api/infra/dbDoc'
import { onMounted, ref } from 'vue'
import download from '@/utils/download'

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import { ref } from 'vue'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/druid/index.html')

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { Crontab } from '@/components/Crontab'
import { ref, unref } from 'vue'
import * as JobApi from '@/api/infra/job'
import { JobVO } from '@/api/infra/job/types'

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import { ref } from 'vue'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/admin/applications')

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import { ref } from 'vue'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/doc.html')

View File

@ -248,8 +248,6 @@ import { onMounted, reactive, ref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { FormInstance } from 'element-plus'
import { Tooltip } from '@/components/Tooltip'
import { IconSelect } from '@/components/Icon'
import { VxeTableInstance } from 'vxe-table'
// import
import * as MenuApi from '@/api/system/menu'

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import { getAccessToken } from '@/utils/auth'
import { ref } from 'vue'
const BASE_URL = import.meta.env.VITE_BASE_URL