提交 1c716d9b 作者: 方治民

Merge branch '3.x' of https://gitlab.yiring.com/basic/basic-vue-admin into dev

...@@ -30,6 +30,7 @@ module.exports = { ...@@ -30,6 +30,7 @@ module.exports = {
'@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'off',
'vue/custom-event-name-casing': 'off', 'vue/custom-event-name-casing': 'off',
'no-use-before-define': 'off', 'no-use-before-define': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off', '@typescript-eslint/ban-types': 'off',
......
const fs = require('fs') const fs = require('node:fs')
const path = require('path') const path = require('node:path')
const { execSync } = require('child_process') const { execSync } = require('node:child_process')
const scopes = fs const scopes = fs
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true }) .readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
......
...@@ -57,17 +57,17 @@ ...@@ -57,17 +57,17 @@
"@ant-design/colors": "^7.0.0", "@ant-design/colors": "^7.0.0",
"@ant-design/icons-vue": "^6.1.0", "@ant-design/icons-vue": "^6.1.0",
"@iconify/iconify": "^3.1.0", "@iconify/iconify": "^3.1.0",
"@logicflow/core": "^1.2.1", "@logicflow/core": "^1.2.8",
"@logicflow/extension": "^1.2.1", "@logicflow/extension": "^1.2.8",
"@stomp/stompjs": "^7.0.0", "@stomp/stompjs": "^7.0.0",
"@vue/runtime-core": "^3.2.47", "@vue/runtime-core": "^3.3.4",
"@vue/shared": "^3.2.47", "@vue/shared": "^3.3.4",
"@vueuse/core": "^9.13.0", "@vueuse/core": "^10.1.2",
"@vueuse/shared": "^9.13.0", "@vueuse/shared": "^10.1.2",
"@zxcvbn-ts/core": "^2.2.1", "@zxcvbn-ts/core": "^2.2.1",
"ant-design-vue": "^3.2.16", "ant-design-vue": "^3.2.20",
"axios": "^0.26.1", "axios": "^0.26.1",
"codemirror": "^6.0.1", "codemirror": "^5.65.13",
"cropperjs": "^1.5.13", "cropperjs": "^1.5.13",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
...@@ -81,56 +81,55 @@ ...@@ -81,56 +81,55 @@
"nanoid": "^4.0.2", "nanoid": "^4.0.2",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
"pinia": "^2.0.33", "pinia": "^2.1.3",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.1", "qrcode": "^1.5.3",
"qs": "^6.11.1", "qs": "^6.11.2",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sockjs-client": "^1.6.1", "sockjs-client": "^1.6.1",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"tinymce": "^5.10.7", "tinymce": "^5.10.7",
"vditor": "^3.9.1", "vditor": "^3.9.3",
"vue": "^3.2.47", "vue": "^3.3.4",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"vue-json-pretty": "^2.2.4", "vue-json-pretty": "^2.2.4",
"vue-router": "^4.1.6", "vue-router": "^4.2.2",
"vue-types": "^5.0.2", "vue-types": "^5.0.3",
"vxe-table": "^4.3.11", "vxe-table": "^4.4.1",
"vxe-table-plugin-export-xlsx": "^3.0.4", "vxe-table-plugin-export-xlsx": "^3.0.4",
"xe-utils": "^3.5.7", "xe-utils": "^3.5.10",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^0.38.2", "@antfu/eslint-config": "^0.39.4",
"@commitlint/cli": "^17.5.1", "@commitlint/cli": "^17.6.5",
"@commitlint/config-conventional": "^17.4.4", "@commitlint/config-conventional": "^17.6.5",
"@iconify/json": "^2.2.43", "@iconify/json": "^2.2.72",
"@purge-icons/generated": "^0.9.0",
"@types/codemirror": "^5.60.7", "@types/codemirror": "^5.60.7",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.1",
"@types/inquirer": "^9.0.3", "@types/inquirer": "^9.0.3",
"@types/intro.js": "^5.1.1", "@types/intro.js": "^5.1.1",
"@types/lodash": "^4.14.192", "@types/lodash": "^4.14.195",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/mockjs": "^1.0.7", "@types/mockjs": "^1.0.7",
"@types/node": "^18.15.11", "@types/node": "^18.16.16",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/showdown": "^2.0.0", "@types/showdown": "^2.0.1",
"@types/sockjs-client": "^1.5.1", "@types/sockjs-client": "^1.5.1",
"@types/sortablejs": "^1.15.1", "@types/sortablejs": "^1.15.1",
"@types/stompjs": "^2.3.5", "@types/stompjs": "^2.3.5",
"@typescript-eslint/eslint-plugin": "^5.57.0", "@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.57.0", "@typescript-eslint/parser": "^5.59.8",
"@vitejs/plugin-legacy": "^4.0.2", "@vitejs/plugin-legacy": "^4.0.4",
"@vitejs/plugin-vue": "^4.1.0", "@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/compiler-dom": "^3.2.47", "@vue/compiler-dom": "^3.3.4",
"@vue/compiler-sfc": "^3.2.47", "@vue/compiler-sfc": "^3.3.4",
"@vue/test-utils": "^2.3.2", "@vue/test-utils": "^2.3.2",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
...@@ -139,53 +138,53 @@ ...@@ -139,53 +138,53 @@
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"cz-git": "^1.6.1", "cz-git": "^1.6.1",
"czg": "^1.6.1", "czg": "^1.6.1",
"dotenv": "^16.0.3", "dotenv": "^16.1.3",
"eslint": "^8.37.0", "eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.10.0", "eslint-plugin-vue": "^9.14.1",
"esno": "^0.16.3", "esno": "^0.16.3",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"inquirer": "^9.1.5", "inquirer": "^9.2.6",
"less": "^4.1.3", "less": "^4.1.3",
"lint-staged": "^13.2.0", "lint-staged": "^13.2.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pont-engine": "^1.5.7", "pont-engine": "^1.5.10",
"postcss": "^8.4.21", "postcss": "^8.4.24",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.7", "prettier": "^2.8.8",
"rimraf": "^4.4.1", "rimraf": "^5.0.1",
"rollup": "^2.79.1", "rollup": "^3.23.0",
"rollup-plugin-visualizer": "^5.9.0", "rollup-plugin-visualizer": "^5.9.0",
"sass": "^1.60.0", "sass": "^1.62.1",
"sort-package-json": "^2.4.1", "sort-package-json": "^2.4.1",
"stylelint": "^15.4.0", "stylelint": "^15.6.2",
"stylelint-config-recommended": "^11.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^32.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-order": "^6.0.3", "stylelint-order": "^6.0.3",
"terser": "^5.16.8", "terser": "^5.17.7",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.3", "typescript": "^4.9.5",
"unplugin-auto-import": "^0.15.2", "unplugin-auto-import": "^0.16.4",
"vite": "^4.2.1", "vite": "^4.3.9",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.0",
"vite-plugin-mkcert": "^1.14.0", "vite-plugin-mkcert": "^1.15.0",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.8",
"vite-plugin-purge-icons": "^0.9.2", "vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-pwa": "^0.14.7", "vite-plugin-pwa": "^0.16.1",
"vite-plugin-style-import": "^2.0.0", "vite-plugin-style-import": "^2.0.0",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-theme": "^0.8.6", "vite-plugin-theme": "^0.8.6",
"vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.8.10", "vite-plugin-windicss": "^1.9.0",
"vue-eslint-parser": "^9.1.1", "vue-eslint-parser": "^9.3.0",
"vue-tsc": "^1.2.0" "vue-tsc": "^1.6.5"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,6 +8,7 @@ const API_URL_PREFIX = '/api' ...@@ -8,6 +8,7 @@ const API_URL_PREFIX = '/api'
export default class BasicGenerator extends CodeGenerator { export default class BasicGenerator extends CodeGenerator {
isRequestBody(inter: Interface, paramsCode: string): boolean { isRequestBody(inter: Interface, paramsCode: string): boolean {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const prettier = require('prettier') const prettier = require('prettier')
const requestParams = inter.getRequestParams(this.surrounding) const requestParams = inter.getRequestParams(this.surrounding)
const code = prettier.format(paramsCode, { parser: 'typescript' }) const code = prettier.format(paramsCode, { parser: 'typescript' })
...@@ -23,6 +24,7 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -23,6 +24,7 @@ export default class BasicGenerator extends CodeGenerator {
let requestParams = inter.getRequestParams(this.surrounding) let requestParams = inter.getRequestParams(this.surrounding)
let bodyTypeDef = '' let bodyTypeDef = ''
// eslint-disable-next-line @typescript-eslint/no-require-imports
const prettier = require('prettier') const prettier = require('prettier')
if (prettier.format(paramsCode, { parser: 'typescript' }).includes('{}')) { if (prettier.format(paramsCode, { parser: 'typescript' }).includes('{}')) {
if (!requestParams.includes('form')) { if (!requestParams.includes('form')) {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import { useLocale } from '/@/locales/useLocale' import { useLocale } from '/@/locales/useLocale'
import 'dayjs/locale/zh-cn' import 'dayjs/locale/zh-cn'
// support Multi-language // support Multi-language
const { getAntdLocale } = useLocale() const { getAntdLocale } = useLocale()
......
import type { RouteMeta } from 'vue-router' import type { RouteMeta } from 'vue-router'
export interface RouteItem { export interface RouteItem {
path: string path: string
component: any component: any
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import AppSearchKeyItem from './AppSearchKeyItem.vue' import AppSearchKeyItem from './AppSearchKeyItem.vue'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
const { prefixCls } = useDesign('app-search-footer') const { prefixCls } = useDesign('app-search-footer')
const { t } = useI18n() const { t } = useI18n()
</script> </script>
......
<script lang="ts" setup> <script lang="ts" setup>
import { Icon } from '/@/components/Icon' import { Icon } from '/@/components/Icon'
defineProps({ defineProps({
icon: String, icon: String,
}) })
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import { SearchOutlined } from '@ant-design/icons-vue' import { SearchOutlined } from '@ant-design/icons-vue'
import AppSearchFooter from './AppSearchFooter.vue' import AppSearchFooter from './AppSearchFooter.vue'
import Icon from '/@/components/Icon' import Icon from '/@/components/Icon'
// @ts-expect-error // @ts-expect-error
import vClickOutside from '/@/directives/clickOutside' import vClickOutside from '/@/directives/clickOutside'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import { Button } from '/@/components/Button' import { Button } from '/@/components/Button'
import { isFunction } from '/@/utils/is' import { isFunction } from '/@/utils/is'
import { grid, useSlider } from './data' import { grid, useSlider } from './data'
// 组件接收参数 // 组件接收参数
const props = defineProps({ const props = defineProps({
// 请求API的参数 // 请求API的参数
......
import { ref } from 'vue' import { ref } from 'vue'
// 每行个数 // 每行个数
export const grid = ref(12) export const grid = ref(12)
// slider属性 // slider属性
......
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import { onClickOutside } from '@vueuse/core' import { onClickOutside } from '@vueuse/core'
const emit = defineEmits(['mounted', 'clickOutside']) const emit = defineEmits(['mounted', 'clickOutside'])
const wrap = ref<ElRef>(null) const wrap = ref<ElRef>(null)
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn' import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'
import CodeMirror from 'codemirror' import CodeMirror from 'codemirror'
import { MODE } from './../typing' import { MODE } from './../typing'
// css // css
import './codemirror.css' import './codemirror.css'
import 'codemirror/theme/idea.css' import 'codemirror/theme/idea.css'
import 'codemirror/theme/material-palenight.css' import 'codemirror/theme/material-palenight.css'
// modes // modes
import 'codemirror/mode/javascript/javascript' import 'codemirror/mode/javascript/javascript'
import 'codemirror/mode/css/css' import 'codemirror/mode/css/css'
......
...@@ -2,12 +2,14 @@ import CodeMirror from 'codemirror' ...@@ -2,12 +2,14 @@ import CodeMirror from 'codemirror'
import './codemirror.css' import './codemirror.css'
import 'codemirror/theme/idea.css' import 'codemirror/theme/idea.css'
import 'codemirror/theme/material-palenight.css' import 'codemirror/theme/material-palenight.css'
// import 'codemirror/addon/lint/lint.css'; // import 'codemirror/addon/lint/lint.css';
// modes // modes
import 'codemirror/mode/javascript/javascript' import 'codemirror/mode/javascript/javascript'
import 'codemirror/mode/css/css' import 'codemirror/mode/css/css'
import 'codemirror/mode/htmlmixed/htmlmixed' import 'codemirror/mode/htmlmixed/htmlmixed'
// addons // addons
// import 'codemirror/addon/edit/closebrackets'; // import 'codemirror/addon/edit/closebrackets';
// import 'codemirror/addon/edit/closetag'; // import 'codemirror/addon/edit/closetag';
......
...@@ -2,14 +2,17 @@ ...@@ -2,14 +2,17 @@
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { ref } from 'vue' import { ref } from 'vue'
import { isNil } from 'lodash-es' import { isNil } from 'lodash-es'
// component // component
import { Skeleton } from 'ant-design-vue' import { Skeleton } from 'ant-design-vue'
import { CollapseTransition } from '/@/components/Transition' import { CollapseTransition } from '/@/components/Transition'
import CollapseHeader from './CollapseHeader.vue' import CollapseHeader from './CollapseHeader.vue'
import { triggerWindowResize } from '/@/utils/event' import { triggerWindowResize as triggerWindowResizeFn } from '/@/utils/event'
// hook // hook
import { useTimeoutFn } from '/@/hooks/core/useTimeout' import { useTimeoutFn } from '/@/hooks/core/useTimeout'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
const props = defineProps({ const props = defineProps({
title: { type: String, default: '' }, title: { type: String, default: '' },
loading: { type: Boolean }, loading: { type: Boolean },
...@@ -43,7 +46,7 @@ ...@@ -43,7 +46,7 @@
show.value = isNil(val) ? !show.value : val show.value = isNil(val) ? !show.value : val
if (props.triggerWindowResize) { if (props.triggerWindowResize) {
// 200 milliseconds here is because the expansion has animation, // 200 milliseconds here is because the expansion has animation,
useTimeoutFn(triggerWindowResize, 200) useTimeoutFn(triggerWindowResizeFn, 200)
} }
} }
defineExpose({ defineExpose({
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import Icon from '/@/components/Icon' import Icon from '/@/components/Icon'
import { Divider, Menu } from 'ant-design-vue' import { Divider, Menu } from 'ant-design-vue'
import type { Axis, ContextMenuItem, ItemContentProps } from './typing' import type { Axis, ContextMenuItem, ItemContentProps } from './typing'
const prefixCls = 'context-menu' const prefixCls = 'context-menu'
const props = { const props = {
width: { type: Number, default: 156 }, width: { type: Number, default: 156 },
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import type { ButtonProps } from '/@/components/Button' import type { ButtonProps } from '/@/components/Button'
import Icon from '/@/components/Icon' import Icon from '/@/components/Icon'
const props = { const props = {
width: { type: [String, Number], default: '200px' }, width: { type: [String, Number], default: '200px' },
value: { type: String }, value: { type: String },
showBtn: { type: Boolean, default: true }, showBtn: { type: Boolean, default: true },
btnProps: { type: Object as PropType<ButtonProps> }, btnProps: { type: Object as PropType<ButtonProps> },
btnText: { type: String, default: '' }, btnText: { type: String, default: '' },
uploadApi: { type: Function as PropType<({ file: Blob, name: string }) => Promise<void>> }, uploadApi: { type: Function as PropType<(param: { file: Blob; name: string }) => Promise<void>> },
} }
export default defineComponent({ export default defineComponent({
name: 'CropperAvatar', name: 'CropperAvatar',
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
const { t } = useI18n() const { t } = useI18n()
const getClass = computed(() => [prefixCls]) const getClass = computed(() => [prefixCls])
const getWidth = computed(() => `${`${props.width}`.replace(/px/, '')}px`) const getWidth = computed(() => `${`${props.width}`.replace(/px/, '')}px`)
const getIconWidth = computed(() => `${parseInt(`${props.width}`.replace(/px/, '')) / 2}px`) const getIconWidth = computed(() => `${Number.parseInt(`${props.width}`.replace(/px/, '')) / 2}px`)
const getStyle = computed((): CSSProperties => ({ width: unref(getWidth) })) const getStyle = computed((): CSSProperties => ({ width: unref(getWidth) }))
const getImageWrapperStyle = computed( const getImageWrapperStyle = computed(
(): CSSProperties => ({ width: unref(getWidth), height: unref(getWidth) }), (): CSSProperties => ({ width: unref(getWidth), height: unref(getWidth) }),
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
import { isFunction } from '/@/utils/is' import { isFunction } from '/@/utils/is'
import { getSlot } from '/@/utils/helper/tsxHelper' import { getSlot } from '/@/utils/helper/tsxHelper'
import { useAttrs } from '/@/hooks/core/useAttrs' import { useAttrs } from '/@/hooks/core/useAttrs'
const props = { const props = {
useCollapse: { type: Boolean, default: true }, useCollapse: { type: Boolean, default: true },
title: { type: String, default: '' }, title: { type: String, default: '' },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import { footerProps } from '../props' import { footerProps } from '../props'
export default defineComponent({ export default defineComponent({
name: 'BasicDrawerFooter', name: 'BasicDrawerFooter',
props: { props: {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
export default defineComponent({ export default defineComponent({
name: 'BasicDrawerHeader', name: 'BasicDrawerHeader',
components: { BasicTitle, ArrowLeftOutlined }, components: { BasicTitle, ArrowLeftOutlined },
......
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
const { t } = useI18n() const { t } = useI18n()
export const footerProps = { export const footerProps = {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import * as XLSX from 'xlsx' import * as XLSX from 'xlsx'
import { dateUtil } from '/@/utils/dateUtil' import { dateUtil } from '/@/utils/dateUtil'
import type { ExcelData } from './typing' import type { ExcelData } from './typing'
export default defineComponent({ export default defineComponent({
name: 'ImportExcel', name: 'ImportExcel',
props: { props: {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
import FormAction from './components/FormAction.vue' import FormAction from './components/FormAction.vue'
import { dateItemType } from './helper' import { dateItemType } from './helper'
import { dateUtil } from '/@/utils/dateUtil' import { dateUtil } from '/@/utils/dateUtil'
// import { cloneDeep } from 'lodash-es'; // import { cloneDeep } from 'lodash-es';
import { deepMerge } from '/@/utils' import { deepMerge } from '/@/utils'
import { useFormValues } from './hooks/useFormValues' import { useFormValues } from './hooks/useFormValues'
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
import { useModalContext } from '/@/components/Modal' import { useModalContext } from '/@/components/Modal'
import { basicProps } from './props' import { basicProps } from './props'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
export default defineComponent({ export default defineComponent({
name: 'BasicForm', name: 'BasicForm',
components: { FormItem, Form, Row, FormAction }, components: { FormItem, Form, Row, FormAction },
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import { useRuleFormItem } from '/@/hooks/component/useFormItem' import { useRuleFormItem } from '/@/hooks/component/useFormItem'
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
interface Option { interface Option {
value: string value: string
label: string label: string
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { get, omit } from 'lodash-es' import { get, omit } from 'lodash-es'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
interface OptionsItem { interface OptionsItem {
label: string label: string
value: string | number | boolean value: string | number | boolean
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
interface OptionsItem { interface OptionsItem {
label: string label: string
value: string value: string
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import type { TransferDirection, TransferItem } from 'ant-design-vue/lib/transfer' import type { TransferDirection, TransferItem } from 'ant-design-vue/lib/transfer'
export default defineComponent({ export default defineComponent({
name: 'ApiTransfer', name: 'ApiTransfer',
components: { Transfer }, components: { Transfer },
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import { get } from 'lodash-es' import { get } from 'lodash-es'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
export default defineComponent({ export default defineComponent({
name: 'ApiTree', name: 'ApiTree',
components: { ATree: Tree, LoadingOutlined }, components: { ATree: Tree, LoadingOutlined },
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import { get } from 'lodash-es' import { get } from 'lodash-es'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { LoadingOutlined } from '@ant-design/icons-vue' import { LoadingOutlined } from '@ant-design/icons-vue'
export default defineComponent({ export default defineComponent({
name: 'ApiTreeSelect', name: 'ApiTreeSelect',
components: { ATreeSelect: TreeSelect, LoadingOutlined }, components: { ATreeSelect: TreeSelect, LoadingOutlined },
......
<script lang="ts"> <script lang="ts">
import type { ColEx } from '../types/index' import type { ColEx } from '../types/index'
// import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; // import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { computed, defineComponent } from 'vue' import { computed, defineComponent } from 'vue'
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
import { cloneDeep, upperFirst } from 'lodash-es' import { cloneDeep, upperFirst } from 'lodash-es'
import { useItemLabelWidth } from '../hooks/useLabelWidth' import { useItemLabelWidth } from '../hooks/useLabelWidth'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
export default defineComponent({ export default defineComponent({
name: 'BasicFormItem', name: 'BasicFormItem',
inheritAttrs: false, inheritAttrs: false,
......
...@@ -60,15 +60,15 @@ export default function ({ advanceState, emit, getProps, getSchema, formModel, d ...@@ -60,15 +60,15 @@ export default function ({ advanceState, emit, getProps, getSchema, formModel, d
const width = unref(realWidthRef) const width = unref(realWidthRef)
const mdWidth = const mdWidth =
parseInt(itemCol.md as string) || Number.parseInt(itemCol.md as string) ||
parseInt(itemCol.xs as string) || Number.parseInt(itemCol.xs as string) ||
parseInt(itemCol.sm as string) || Number.parseInt(itemCol.sm as string) ||
(itemCol.span as number) || (itemCol.span as number) ||
BASIC_COL_LEN BASIC_COL_LEN
const lgWidth = parseInt(itemCol.lg as string) || mdWidth const lgWidth = Number.parseInt(itemCol.lg as string) || mdWidth
const xlWidth = parseInt(itemCol.xl as string) || lgWidth const xlWidth = Number.parseInt(itemCol.xl as string) || lgWidth
const xxlWidth = parseInt(itemCol.xxl as string) || xlWidth const xxlWidth = Number.parseInt(itemCol.xxl as string) || xlWidth
if (width <= screenEnum.LG) { if (width <= screenEnum.LG) {
itemColSum += mdWidth itemColSum += mdWidth
} else if (width < screenEnum.XL) { } else if (width < screenEnum.XL) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import type { CSSProperties, PropType } from 'vue' import type { CSSProperties, PropType } from 'vue'
import { computed, defineComponent, nextTick, onMounted, ref, unref, watch } from 'vue' import { computed, defineComponent, nextTick, onMounted, ref, unref, watch } from 'vue'
import SvgIcon from './SvgIcon.vue' import SvgIcon from './SvgIcon.vue'
import Iconify from '@purge-icons/generated' import Iconify from '@iconify/iconify/dist/iconify'
import { isString } from '/@/utils/is' import { isString } from '/@/utils/is'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
const { size, color } = props const { size, color } = props
let fs = size let fs = size
if (isString(size)) { if (isString(size)) {
fs = parseInt(size, 10) fs = Number.parseInt(size, 10)
} }
return { return {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import { useRootSetting } from '/@/hooks/setting/useRootSetting' import { useRootSetting } from '/@/hooks/setting/useRootSetting'
import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated' import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'
import { getTheme } from './getTheme' import { getTheme } from './getTheme'
type Lang = 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' | undefined type Lang = 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' | undefined
export default defineComponent({ export default defineComponent({
inheritAttrs: false, inheritAttrs: false,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated' import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'
import { useRootSetting } from '/@/hooks/setting/useRootSetting' import { useRootSetting } from '/@/hooks/setting/useRootSetting'
import { getTheme } from './getTheme' import { getTheme } from './getTheme'
const props = defineProps({ const props = defineProps({
value: { type: String }, value: { type: String },
class: { type: String }, class: { type: String },
......
import type Vditor from 'vditor' import type Vditor from 'vditor'
export interface MarkDownActionType { export interface MarkDownActionType {
getVditor: () => Vditor getVditor: () => Vditor
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import { itemProps } from '../props' import { itemProps } from '../props'
import MenuItemContent from './MenuItemContent.vue' import MenuItemContent from './MenuItemContent.vue'
export default defineComponent({ export default defineComponent({
name: 'BasicMenuItem', name: 'BasicMenuItem',
components: { MenuItem: Menu.Item, MenuItemContent }, components: { MenuItem: Menu.Item, MenuItemContent },
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
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 { contentProps } from '../props' import { contentProps } from '../props'
const { t } = useI18n() const { t } = useI18n()
export default defineComponent({ export default defineComponent({
......
...@@ -6,6 +6,7 @@ import { ThemeEnum } from '/@/enums/appEnum' ...@@ -6,6 +6,7 @@ import { ThemeEnum } from '/@/enums/appEnum'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import type { MenuTheme } from 'ant-design-vue' import type { MenuTheme } from 'ant-design-vue'
import type { MenuMode } from 'ant-design-vue/lib/menu/src/interface' import type { MenuMode } from 'ant-design-vue/lib/menu/src/interface'
export const basicProps = { export const basicProps = {
items: { items: {
type: Array as PropType<Menu[]>, type: Array as PropType<Menu[]>,
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import { basicProps } from '../props' import { basicProps } from '../props'
export default defineComponent({ export default defineComponent({
name: 'BasicModalFooter', name: 'BasicModalFooter',
props: basicProps, props: basicProps,
......
import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes' import type { ButtonProps } from 'ant-design-vue/lib/button/buttonTypes'
import type { CSSProperties, ComputedRef, VNodeChild } from 'vue' import type { CSSProperties, ComputedRef, VNodeChild } from 'vue'
/** /**
* @description: 弹窗对外暴露的方法 * @description: 弹窗对外暴露的方法
*/ */
......
import { isString } from '/@/utils/is' import { isString } from '/@/utils/is'
import type { LogoType, RenderQrCodeParams } from './typing' import type { LogoType, RenderQrCodeParams } from './typing'
export function drawLogo({ canvas, logo }: RenderQrCodeParams) { export function drawLogo({ canvas, logo }: RenderQrCodeParams) {
if (!logo) { if (!logo) {
return new Promise((resolve) => { return new Promise((resolve) => {
......
// 参考 qr-code-with-logo 进行ts版本修改 // 参考 qr-code-with-logo 进行ts版本修改
import { toCanvas } from './toCanvas' import { toCanvas } from './toCanvas'
export * from './typing' export * from './typing'
export { toCanvas } export { toCanvas }
import { renderQrCode } from './drawCanvas' import { renderQrCode } from './drawCanvas'
import { drawLogo } from './drawLogo' import { drawLogo } from './drawLogo'
import type { RenderQrCodeParams } from './typing' import type { RenderQrCodeParams } from './typing'
export function toCanvas(options: RenderQrCodeParams) { export function toCanvas(options: RenderQrCodeParams) {
return renderQrCode(options) return renderQrCode(options)
.then(() => { .then(() => {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import { toObject } from './util' import { toObject } from './util'
import { computed, defineComponent, nextTick, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue' import { computed, defineComponent, nextTick, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'
import Bar from './bar' import Bar from './bar'
const { scrollbar } = componentSetting const { scrollbar } = componentSetting
export default defineComponent({ export default defineComponent({
......
import type { BarMap } from './types' import type { BarMap } from './types'
export const BAR_MAP: BarMap = { export const BAR_MAP: BarMap = {
vertical: { vertical: {
offset: 'offsetHeight', offset: 'offsetHeight',
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import { openWindow } from '/@/utils' import { openWindow } from '/@/utils'
import { useOpenKeys } from './useOpenKeys' import { useOpenKeys } from './useOpenKeys'
export default defineComponent({ export default defineComponent({
name: 'SimpleMenu', name: 'SimpleMenu',
components: { components: {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent' import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'
export default defineComponent({ export default defineComponent({
name: 'SimpleSubMenu', name: 'SimpleSubMenu',
components: { components: {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { createSimpleRootMenuContext } from './useSimpleMenuContext' import { createSimpleRootMenuContext } from './useSimpleMenuContext'
import mitt from '/@/utils/mitt' import mitt from '/@/utils/mitt'
export default defineComponent({ export default defineComponent({
name: 'Menu', name: 'Menu',
props: { props: {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { Tooltip } from 'ant-design-vue' import { Tooltip } from 'ant-design-vue'
import { useMenuItem } from './useMenu' import { useMenuItem } from './useMenu'
import { useSimpleRootMenuContext } from './useSimpleMenuContext' import { useSimpleRootMenuContext } from './useSimpleMenuContext'
export default defineComponent({ export default defineComponent({
name: 'MenuItem', name: 'MenuItem',
components: { Tooltip }, components: { Tooltip },
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
import { basicProps } from './props' import { basicProps } from './props'
import { isFunction } from '/@/utils/is' import { isFunction } from '/@/utils/is'
import { warn } from '/@/utils/log' import { warn } from '/@/utils/log'
export default defineComponent({ export default defineComponent({
components: { components: {
Table, Table,
......
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import { FormOutlined } from '@ant-design/icons-vue' import { FormOutlined } from '@ant-design/icons-vue'
export default defineComponent({ export default defineComponent({
name: 'EditTableHeaderIcon', name: 'EditTableHeaderIcon',
components: { FormOutlined }, components: { FormOutlined },
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import { createPlaceholderMessage } from './helper' import { createPlaceholderMessage } from './helper'
import { CellComponent } from './CellComponent' import { CellComponent } from './CellComponent'
import type { EditRecordRow } from './index' import type { EditRecordRow } from './index'
export default defineComponent({ export default defineComponent({
name: 'EditableCell', name: 'EditableCell',
components: { FormOutlined, CloseOutlined, CheckOutlined, CellComponent, Spin }, components: { FormOutlined, CloseOutlined, CheckOutlined, CellComponent, Spin },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import { ScrollContainer } from '/@/components/Container' import { ScrollContainer } from '/@/components/Container'
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 { useSortable } from '/@/hooks/web/useSortable'; // import { useSortable } from '/@/hooks/web/useSortable';
import { isFunction, isNullAndUnDef } from '/@/utils/is' import { isFunction, isNullAndUnDef } from '/@/utils/is'
import { getPopupContainer as getParentContainer } from '/@/utils' import { getPopupContainer as getParentContainer } from '/@/utils'
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
import type Sortable from 'sortablejs' import type Sortable from 'sortablejs'
import { useTableContext } from '../../hooks/useTableContext' import { useTableContext } from '../../hooks/useTableContext'
import type { BasicColumn, ColumnChangeParam } from '../../types/table' import type { BasicColumn, ColumnChangeParam } from '../../types/table'
interface State { interface State {
checkAll: boolean checkAll: boolean
isInit?: boolean isInit?: boolean
......
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes' import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'
import type { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip' import type { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip'
import type { RoleEnum } from '/@/enums/roleEnum' import type { RoleEnum } from '/@/enums/roleEnum'
export interface ActionItem extends ButtonProps { export interface ActionItem extends ButtonProps {
onClick?: Fn onClick?: Fn
label?: string label?: string
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
resStr = t('component.time.just') resStr = t('component.time.just')
// Less than or equal to 59 seconds // Less than or equal to 59 seconds
} else if (diff < ONE_MINUTES) { } else if (diff < ONE_MINUTES) {
resStr = parseInt(diff / ONE_SECONDS) + t('component.time.seconds') + dirStr resStr = Math.floor(diff / ONE_SECONDS) + t('component.time.seconds') + dirStr
// More than 59 seconds, less than or equal to 59 minutes and 59 seconds // More than 59 seconds, less than or equal to 59 minutes and 59 seconds
} else if (diff >= ONE_MINUTES && diff < ONE_HOUR) { } else if (diff >= ONE_MINUTES && diff < ONE_HOUR) {
resStr = Math.floor(diff / ONE_MINUTES) + t('component.time.minutes') + dirStr resStr = Math.floor(diff / ONE_MINUTES) + t('component.time.minutes') + dirStr
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
import 'tinymce/plugins/searchreplace' import 'tinymce/plugins/searchreplace'
import 'tinymce/plugins/spellchecker' import 'tinymce/plugins/spellchecker'
import 'tinymce/plugins/tabfocus' import 'tinymce/plugins/tabfocus'
// import 'tinymce/plugins/table'; // import 'tinymce/plugins/table';
import 'tinymce/plugins/template' import 'tinymce/plugins/template'
import 'tinymce/plugins/textpattern' import 'tinymce/plugins/textpattern'
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import type { CreateContextOptions } from '/@/components/ContextMenu' import type { CreateContextOptions } from '/@/components/ContextMenu'
import { treeEmits, treeProps } from './types/tree' import { treeEmits, treeProps } from './types/tree'
import { createBEM } from '/@/utils/bem' import { createBEM } from '/@/utils/bem'
export default defineComponent({ export default defineComponent({
name: 'BasicTree', name: 'BasicTree',
inheritAttrs: false, inheritAttrs: false,
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
children: 'children', children: 'children',
title: 'title', title: 'title',
key: 'key', key: 'key',
...fieldNames, ...(fieldNames as Recordable),
} }
}) })
const getBindValues = computed(() => { const getBindValues = computed(() => {
...@@ -226,7 +227,7 @@ ...@@ -226,7 +227,7 @@
treeDataRef.value = props.treeData as TreeItem[] treeDataRef.value = props.treeData as TreeItem[]
}) })
onMounted(() => { onMounted(() => {
const level = parseInt(props.defaultExpandLevel) const level = Number.parseInt(props.defaultExpandLevel as string)
if (level > 0) { if (level > 0) {
state.expandedKeys = filterByLevel(level) state.expandedKeys = filterByLevel(level)
} else if (props.defaultExpandAll) { } else if (props.defaultExpandAll) {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import { useDebounceFn } from '@vueuse/core' import { useDebounceFn } from '@vueuse/core'
import { createBEM } from '/@/utils/bem' import { createBEM } from '/@/utils/bem'
import { ToolbarEnum } from '../types/tree' import { ToolbarEnum } from '../types/tree'
const props = defineProps({ const props = defineProps({
helpMessage: { helpMessage: {
type: [String, Array] as PropType<string | string[]>, type: [String, Array] as PropType<string | string[]>,
......
...@@ -3,15 +3,18 @@ ...@@ -3,15 +3,18 @@
import { computed, defineComponent, reactive, ref, toRefs, unref } from 'vue' import { computed, defineComponent, reactive, ref, toRefs, unref } from 'vue'
import { Alert, Upload } from 'ant-design-vue' import { Alert, Upload } from 'ant-design-vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
// import { BasicTable, useTable } from '/@/components/Table'; // import { BasicTable, useTable } from '/@/components/Table';
// hooks // hooks
import { useUploadType } from './useUpload' import { useUploadType } from './useUpload'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
// types // types
import type { FileItem } from './typing' import type { FileItem } from './typing'
import { UploadResultStatus } from './typing' import { UploadResultStatus } from './typing'
import { basicProps } from './props' import { basicProps } from './props'
import { createActionColumn, createTableColumns } from './data' import { createActionColumn, createTableColumns } from './data'
// utils // utils
import { checkImgType, getBase64WithFile } from './helper' import { checkImgType, getBase64WithFile } from './helper'
import { buildUUID } from '/@/utils/uuid' import { buildUUID } from '/@/utils/uuid'
......
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, watch } from 'vue' import { defineComponent, ref, watch } from 'vue'
// import { BasicTable, useTable } from '/@/components/Table'; // import { BasicTable, useTable } from '/@/components/Table';
import FileList from './FileList.vue' import FileList from './FileList.vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
......
import type { Ref } from 'vue' import type { Ref } from 'vue'
import { computed, unref } from 'vue' import { computed, unref } from 'vue'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
const { t } = useI18n() const { t } = useI18n()
export function useUploadType({ export function useUploadType({
acceptRef, acceptRef,
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
const getActionStyleRef = computed(() => { const getActionStyleRef = computed(() => {
const { height, actionStyle } = props const { height, actionStyle } = props
const h = `${parseInt(height as string)}px` const h = `${Number.parseInt(height as string)}px`
return { return {
left: 0, left: 0,
width: h, width: h,
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
const getWrapStyleRef = computed(() => { const getWrapStyleRef = computed(() => {
const { height, width, circle, wrapStyle } = props const { height, width, circle, wrapStyle } = props
const h = parseInt(height as string) const h = Number.parseInt(height as string)
const w = `${parseInt(width as string)}px` const w = `${Number.parseInt(width as string)}px`
return { return {
width: w, width: w,
height: `${h}px`, height: `${h}px`,
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
const getBarStyleRef = computed(() => { const getBarStyleRef = computed(() => {
const { height, circle, barStyle } = props const { height, circle, barStyle } = props
const h = parseInt(height as string) const h = Number.parseInt(height as string)
return { return {
height: `${h}px`, height: `${h}px`,
borderRadius: circle ? `${h / 2}px 0 0 ${h / 2}px` : 0, borderRadius: circle ? `${h / 2}px 0 0 ${h / 2}px` : 0,
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
const getContentStyleRef = computed(() => { const getContentStyleRef = computed(() => {
const { height, width, contentStyle } = props const { height, width, contentStyle } = props
const h = `${parseInt(height as string)}px` const h = `${Number.parseInt(height as string)}px`
const w = `${parseInt(width as string)}px` const w = `${Number.parseInt(width as string)}px`
return { return {
height: h, height: h,
...@@ -110,15 +110,15 @@ ...@@ -110,15 +110,15 @@
const actionEl = unref(actionElRef) const actionEl = unref(actionElRef)
if (!actionEl) return if (!actionEl) return
emit('start', e) emit('start', e)
state.moveDistance = getEventPageX(e) - parseInt(actionEl.style.left.replace('px', ''), 10) state.moveDistance = getEventPageX(e) - Number.parseInt(actionEl.style.left.replace('px', ''), 10)
state.startTime = new Date().getTime() state.startTime = new Date().getTime()
state.isMoving = true state.isMoving = true
} }
function getOffset(el: HTMLDivElement) { function getOffset(el: HTMLDivElement) {
const actionWidth = parseInt(el.style.width) const actionWidth = Number.parseInt(el.style.width)
const { width } = props const { width } = props
const widthNum = parseInt(width as string) const widthNum = Number.parseInt(width as string)
const offset = widthNum - actionWidth - 6 const offset = widthNum - actionWidth - 6
return { offset, widthNum, actionWidth } return { offset, widthNum, actionWidth }
} }
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
} else { } else {
const contentEl = unref(contentElRef) const contentEl = unref(contentElRef)
if (contentEl) { if (contentEl) {
contentEl.style.width = `${parseInt(barEl.style.width)}px` contentEl.style.width = `${Number.parseInt(barEl.style.width)}px`
} }
} }
}, 0) }, 0)
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
const { imgWidth, height, maxDegree } = props const { imgWidth, height, maxDegree } = props
const { moveX } = data const { moveX } = data
const currentRotate = Math.ceil( const currentRotate = Math.ceil(
(moveX / (imgWidth! - parseInt(height as string))) * maxDegree! * unref(getFactorRef), (moveX / (imgWidth! - Number.parseInt(height as string))) * maxDegree! * unref(getFactorRef),
) )
state.currentRotate = currentRotate state.currentRotate = currentRotate
state.imgStyle = hackCss('transform', `rotateZ(${state.randomRotate - currentRotate}deg)`) state.imgStyle = hackCss('transform', `rotateZ(${state.randomRotate - currentRotate}deg)`)
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<img <img
src={src} src={src}
onLoad={handleImgOnLoad} onLoad={handleImgOnLoad}
width={parseInt(props.width as string)} width={Number.parseInt(props.width as string)}
class={imgCls} class={imgCls}
style={state.imgStyle} style={state.imgStyle}
onClick={() => { onClick={() => {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
function convertToUnit(str: string | number | null | undefined, unit = 'px'): string | undefined { function convertToUnit(str: string | number | null | undefined, unit = 'px'): string | undefined {
if (str == null || str === '') { if (str == null || str === '') {
return undefined return undefined
} else if (isNaN(+str!)) { } else if (Number.isNaN(+str!)) {
return String(str) return String(str)
} else { } else {
return `${Number(str)}${unit}` return `${Number(str)}${unit}`
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
}) })
const getBenchRef = computed(() => { const getBenchRef = computed(() => {
return parseInt(props.bench as string, 10) return Number.parseInt(props.bench as string, 10)
}) })
const getItemHeightRef = computed(() => { const getItemHeightRef = computed(() => {
return parseInt(props.itemHeight as string, 10) return Number.parseInt(props.itemHeight as string, 10)
}) })
const getFirstToRenderRef = computed(() => { const getFirstToRenderRef = computed(() => {
...@@ -99,7 +99,8 @@ ...@@ -99,7 +99,8 @@
if (!wrapEl) { if (!wrapEl) {
return 0 return 0
} }
const height = parseInt(props.height || 0, 10) || wrapEl.clientHeight // @ts-expect-error
const height = Number.parseInt(props.height || 0, 10) || wrapEl.clientHeight
return first + Math.ceil(height / unref(getItemHeightRef)) return first + Math.ceil(height / unref(getItemHeightRef))
} }
......
import type { Directive } from 'vue' import type { Directive } from 'vue'
import './index.less' import './index.less'
export interface RippleOptions { export interface RippleOptions {
event: string event: string
transition: number transition: number
...@@ -47,7 +48,7 @@ const RippleDirective: Directive & RippleProto = { ...@@ -47,7 +48,7 @@ const RippleDirective: Directive & RippleProto = {
} }
function rippler({ event, el, zIndex, background }: { event: EventType; el: HTMLElement } & RippleProto) { function rippler({ event, el, zIndex, background }: { event: EventType; el: HTMLElement } & RippleProto) {
const targetBorder = parseInt(getComputedStyle(el).borderWidth.replace('px', '')) const targetBorder = Number.parseInt(getComputedStyle(el).borderWidth.replace('px', ''))
const clientX = event.clientX || event.touches[0].clientX const clientX = event.clientX || event.touches[0].clientX
const clientY = event.clientY || event.touches[0].clientY const clientY = event.clientY || event.touches[0].clientY
...@@ -172,7 +173,7 @@ function rippler({ event, el, zIndex, background }: { event: EventType; el: HTML ...@@ -172,7 +173,7 @@ function rippler({ event, el, zIndex, background }: { event: EventType; el: HTML
function setProps(modifiers: Recordable, props: Recordable) { function setProps(modifiers: Recordable, props: Recordable) {
modifiers.forEach((item: Recordable) => { modifiers.forEach((item: Recordable) => {
if (isNaN(Number(item))) props.event = item if (Number.isNaN(Number(item))) props.event = item
else props.transition = item else props.transition = item
}) })
} }
......
import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue' import { getCurrentInstance, reactive, shallowRef, watchEffect } from 'vue'
import type { Ref } from 'vue' import type { Ref } from 'vue'
interface Params { interface Params {
excludeListeners?: boolean excludeListeners?: boolean
excludeKeys?: string[] excludeKeys?: string[]
......
import { getCurrentInstance, onUnmounted } from 'vue' import { getCurrentInstance, onUnmounted } from 'vue'
import { createContextMenu, destroyContextMenu } from '/@/components/ContextMenu' import { createContextMenu, destroyContextMenu } from '/@/components/ContextMenu'
import type { ContextMenuItem } from '/@/components/ContextMenu' import type { ContextMenuItem } from '/@/components/ContextMenu'
export type { ContextMenuItem } export type { ContextMenuItem }
export function useContextMenu(authRemove = true) { export function useContextMenu(authRemove = true) {
if (getCurrentInstance() && authRemove) { if (getCurrentInstance() && authRemove) {
......
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { isDef } from '/@/utils/is' import { isDef } from '/@/utils/is'
interface Options { interface Options {
target?: HTMLElement target?: HTMLElement
} }
......
import { useAppProviderContext } from '/@/components/Application' import { useAppProviderContext } from '/@/components/Application'
// import { computed } from 'vue'; // import { computed } from 'vue';
// import { lowerFirst } from 'lodash-es'; // import { lowerFirst } from 'lodash-es';
export function useDesign(scope: string) { export function useDesign(scope: string) {
......
...@@ -7,6 +7,7 @@ import { useUserStore } from '/@/store/modules/user' ...@@ -7,6 +7,7 @@ import { useUserStore } from '/@/store/modules/user'
import { useTabs } from './useTabs' import { useTabs } from './useTabs'
import { resetRouter, router } from '/@/router' import { resetRouter, router } from '/@/router'
// import { RootRoute } from '/@/router/routes'; // import { RootRoute } from '/@/router/routes';
import projectSetting from '/@/settings/projectSetting' import projectSetting from '/@/settings/projectSetting'
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent' import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'
import SessionTimeoutLogin from '/@/views/sys/login/SessionTimeoutLogin.vue' import SessionTimeoutLogin from '/@/views/sys/login/SessionTimeoutLogin.vue'
export default defineComponent({ export default defineComponent({
name: 'LayoutFeatures', name: 'LayoutFeatures',
components: { components: {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
import { useFullscreen } from '@vueuse/core' import { useFullscreen } from '@vueuse/core'
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue' import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue'
export default defineComponent({ export default defineComponent({
name: 'FullScreen', name: 'FullScreen',
components: { FullscreenExitOutlined, FullscreenOutlined, Tooltip }, components: { FullscreenExitOutlined, FullscreenOutlined, Tooltip },
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import { useUserStore } from '/@/store/modules/user' import { useUserStore } from '/@/store/modules/user'
import { useLockStore } from '/@/store/modules/lock' import { useLockStore } from '/@/store/modules/lock'
import headerImg from '/@/assets/images/header.jpg' import headerImg from '/@/assets/images/header.jpg'
export default defineComponent({ export default defineComponent({
name: 'LockModal', name: 'LockModal',
components: { BasicModal, BasicForm }, components: { BasicModal, BasicForm },
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import { Avatar, List, Tag, Typography } from 'ant-design-vue' import { Avatar, List, Tag, Typography } from 'ant-design-vue'
import { isNumber } from '/@/utils/is' import { isNumber } from '/@/utils/is'
export default defineComponent({ export default defineComponent({
components: { components: {
[Avatar.name]: Avatar, [Avatar.name]: Avatar,
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { openWindow } from '/@/utils' import { openWindow } from '/@/utils'
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent' import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'
type MenuEvent = 'logout' | 'doc' | 'lock' type MenuEvent = 'logout' | 'doc' | 'lock'
export default defineComponent({ export default defineComponent({
name: 'UserDropdown', name: 'UserDropdown',
......
...@@ -242,7 +242,7 @@ export default defineComponent({ ...@@ -242,7 +242,7 @@ export default defineComponent({
event={HandlerEnum.LOCK_TIME} event={HandlerEnum.LOCK_TIME}
defaultValue={unref(getLockTime)} defaultValue={unref(getLockTime)}
formatter={(value: string) => { formatter={(value: string) => {
return parseInt(value) === 0 return Number.parseInt(value) === 0
? `0(${t('layout.setting.notAutoScreenLock')})` ? `0(${t('layout.setting.notAutoScreenLock')})`
: `${value}${t('layout.setting.minute')}` : `${value}${t('layout.setting.minute')}`
}} }}
...@@ -255,7 +255,7 @@ export default defineComponent({ ...@@ -255,7 +255,7 @@ export default defineComponent({
event={HandlerEnum.MENU_WIDTH} event={HandlerEnum.MENU_WIDTH}
disabled={!unref(getShowMenuRef)} disabled={!unref(getShowMenuRef)}
defaultValue={unref(getMenuWidth)} defaultValue={unref(getMenuWidth)}
formatter={(value: string) => `${parseInt(value)}px`} formatter={(value: string) => `${Number.parseInt(value)}px`}
/> />
</> </>
) )
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import type { menuTypeList } from '../enum' import type { menuTypeList } from '../enum'
export default defineComponent({ export default defineComponent({
name: 'MenuTypePicker', name: 'MenuTypePicker',
components: { Tooltip }, components: { Tooltip },
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
import DragBar from './DragBar.vue' import DragBar from './DragBar.vue'
export default defineComponent({ export default defineComponent({
name: 'LayoutSideBar', name: 'LayoutSideBar',
components: { Sider: Layout.Sider, LayoutMenu, DragBar, LayoutTrigger }, components: { Sider: Layout.Sider, LayoutMenu, DragBar, LayoutTrigger },
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import { useAppInject } from '/@/hooks/web/useAppInject' import { useAppInject } from '/@/hooks/web/useAppInject'
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting' import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
export default defineComponent({ export default defineComponent({
name: 'SiderWrapper', name: 'SiderWrapper',
components: { Sider, Drawer, MixSider }, components: { Sider, Drawer, MixSider },
......
...@@ -83,6 +83,7 @@ export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, mix = fals ...@@ -83,6 +83,7 @@ export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, mix = fals
function handleMouseMove(ele: HTMLElement, wrap: HTMLElement, clientX: number) { function handleMouseMove(ele: HTMLElement, wrap: HTMLElement, clientX: number) {
document.onmousemove = function (innerE) { document.onmousemove = function (innerE) {
let iT = (ele as any).left + (innerE.clientX - clientX) let iT = (ele as any).left + (innerE.clientX - clientX)
// @ts-expect-error
innerE = innerE || window.event innerE = innerE || window.event
const maxT = 800 const maxT = 800
const minT = unref(getMiniWidthNumber) const minT = unref(getMiniWidthNumber)
...@@ -101,7 +102,7 @@ export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, mix = fals ...@@ -101,7 +102,7 @@ export function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, mix = fals
document.onmousemove = null document.onmousemove = null
document.onmouseup = null document.onmouseup = null
wrap.style.transition = 'width 0.2s' wrap.style.transition = 'width 0.2s'
const width = parseInt(wrap.style.width) const width = Number.parseInt(wrap.style.width)
if (!mix) { if (!mix) {
const miniWidth = unref(getMiniWidthNumber) const miniWidth = unref(getMiniWidthNumber)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting' import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting'
import { getTransitionName } from './transition' import { getTransitionName } from './transition'
import { useMultipleTabStore } from '/@/store/modules/multipleTab' import { useMultipleTabStore } from '/@/store/modules/multipleTab'
export default defineComponent({ export default defineComponent({
name: 'PageLayout', name: 'PageLayout',
components: { FrameLayout }, components: { FrameLayout },
......
...@@ -2,6 +2,7 @@ import 'virtual:windi-base.css' ...@@ -2,6 +2,7 @@ import 'virtual:windi-base.css'
import 'virtual:windi-components.css' import 'virtual:windi-components.css'
import '/@/design/index.less' import '/@/design/index.less'
import 'virtual:windi-utilities.css' import 'virtual:windi-utilities.css'
// Register icon sprite // Register icon sprite
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'
import { createApp } from 'vue' import { createApp } from 'vue'
......
...@@ -42,7 +42,7 @@ export function hexToRGB(hex: string) { ...@@ -42,7 +42,7 @@ export function hexToRGB(hex: string) {
} }
const sColorChange: number[] = [] const sColorChange: number[] = []
for (let i = 1; i < 7; i += 2) { for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt(`0x${sHex.slice(i, i + 2)}`)) sColorChange.push(Number.parseInt(`0x${sHex.slice(i, i + 2)}`))
} }
return `RGB(${sColorChange.join(',')})` return `RGB(${sColorChange.join(',')})`
} }
...@@ -96,7 +96,7 @@ export function lighten(color: string, amount: number) { ...@@ -96,7 +96,7 @@ export function lighten(color: string, amount: number) {
* @returns {string} The processed part of the color * @returns {string} The processed part of the color
*/ */
function addLight(color: string, amount: number) { function addLight(color: string, amount: number) {
const cc = parseInt(color, 16) + amount const cc = Number.parseInt(color, 16) + amount
const c = cc > 255 ? 255 : cc const c = cc > 255 ? 255 : cc
return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}` return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`
} }
...@@ -142,7 +142,7 @@ export function calculateBestTextColor(hexColor: string) { ...@@ -142,7 +142,7 @@ export function calculateBestTextColor(hexColor: string) {
* @returns {string} The processed part of the color * @returns {string} The processed part of the color
*/ */
function subtractLight(color: string, amount: number) { function subtractLight(color: string, amount: number) {
const cc = parseInt(color, 16) - amount const cc = Number.parseInt(color, 16) - amount
const c = cc < 0 ? 0 : cc const c = cc < 0 ? 0 : cc
return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}` return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`
} }
...@@ -169,6 +169,7 @@ export function useRafThrottle<T extends FunctionArgs>(fn: T): T { ...@@ -169,6 +169,7 @@ export function useRafThrottle<T extends FunctionArgs>(fn: T): T {
locked = true locked = true
window.requestAnimationFrame(() => { window.requestAnimationFrame(() => {
// @ts-expect-error // @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-invalid-this
fn.apply(this, args) fn.apply(this, args)
locked = false locked = false
}) })
......
import type { AxiosError, AxiosInstance } from 'axios' import type { AxiosError, AxiosInstance } from 'axios'
/** /**
* 请求重试机制 * 请求重试机制
*/ */
......
import type { ErrorMessageMode } from '/#/axios' import type { ErrorMessageMode } from '/#/axios'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { useI18n } from '/@/hooks/web/useI18n' import { useI18n } from '/@/hooks/web/useI18n'
// import router from '/@/router'; // import router from '/@/router';
// import { PageEnum } from '/@/enums/pageEnum'; // import { PageEnum } from '/@/enums/pageEnum';
import { useUserStoreWithOut } from '/@/store/modules/user' import { useUserStoreWithOut } from '/@/store/modules/user'
......
...@@ -11,6 +11,16 @@ const PROXY_LIST = [ ...@@ -11,6 +11,16 @@ const PROXY_LIST = [
// ['http://192.168.0.100:18100', `https://oss.app.yiring.com`], // ['http://192.168.0.100:18100', `https://oss.app.yiring.com`],
] ]
// 监测是否为开发环境
// FIXED: 使用 try catch 的方式来判断是否为开发环境,因为在 Webview/RenderJS 中无法使用 import.meta.env
function isDevEnv() {
try {
return import.meta.env.MODE === 'development'
} catch (_) {
return false
}
}
/** /**
* 将内部地址(内网)转换成代理/预览地址(公网) * 将内部地址(内网)转换成代理/预览地址(公网)
* @param url 内网地址 * @param url 内网地址
...@@ -28,7 +38,7 @@ export function getExtranetUrl(url: string): string { ...@@ -28,7 +38,7 @@ export function getExtranetUrl(url: string): string {
/** /**
* 将代理/预览地址(公网)转换成内部地址(内网) * 将代理/预览地址(公网)转换成内部地址(内网)
* eg: 主要用于解决内网文件上传后预览,但是实际上传存储时还是内网地址的问题 * eg: 主要用于解决内网文件上传后预览,但是实际上传存储时还是内网地址的问题
* @param url 代理/公网地址 * @param url 包含代理/公网地址的内容
*/ */
export function getIntranetUrl(url: string): string { export function getIntranetUrl(url: string): string {
let uri = url let uri = url
...@@ -46,13 +56,22 @@ export function getIntranetUrl(url: string): string { ...@@ -46,13 +56,22 @@ export function getIntranetUrl(url: string): string {
* @returns 替换本地链接后的数据结果 * @returns 替换本地链接后的数据结果
*/ */
export function handleResponseResource<T>(body: T, options: Recordable) { export function handleResponseResource<T>(body: T, options: Recordable) {
if (options.apiUrl.includes('proxy.yiring.com') && typeof body === 'object') { for (const [intranet, extranet] of PROXY_LIST) {
let text = JSON.stringify(body) // 当需要处理内外网资源地址映射时,进行内容处理
const isIntranet = options.apiUrl.includes(intranet)
const isExtranet = isDevEnv() ? true : options.apiUrl.includes(extranet)
if (isIntranet || isExtranet) {
const isString = typeof body === 'string'
const isObject = typeof body === 'object'
// 处理内网地址的预览问题 // 处理有效数据
text = getExtranetUrl(text) if (isString || isObject) {
let text = isString ? body : JSON.stringify(body)
return JSON.parse(text) as T // 说明: 如果接口地址是内网,就需要将外网链接转换成内网链接,如果是外网接口地址,则需要将内网地址转换成外网链接,来保证无论内外网访问平台资源都是正常的
text = isExtranet ? getExtranetUrl(text) : getIntranetUrl(text)
return (isString ? text : JSON.parse(text)) as T
}
}
} }
return body return body
......
...@@ -33,7 +33,7 @@ export interface Indexable<T> { ...@@ -33,7 +33,7 @@ export interface Indexable<T> {
export type Hash<T> = Indexable<T> export type Hash<T> = Indexable<T>
export type TimeoutHandle = ReturnType<typeof global.setTimeout> export type TimeoutHandle = ReturnType<typeof setTimeout>
export type ComponentSize = 'large' | 'medium' | 'small' | 'mini' export type ComponentSize = 'large' | 'medium' | 'small' | 'mini'
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
import { fireErrorApi } from '/@/api/demo/error' import { fireErrorApi } from '/@/api/demo/error'
import { getColumns } from './data' import { getColumns } from './data'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
const rowInfo = ref<ErrorLogInfo>() const rowInfo = ref<ErrorLogInfo>()
const imgList = ref<string[]>([]) const imgList = ref<string[]>([])
const { t } = useI18n() const { t } = useI18n()
......
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'FrameBlank', name: 'FrameBlank',
}) })
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
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 { useLocaleStore } from '/@/store/modules/locale' import { useLocaleStore } from '/@/store/modules/locale'
defineProps({ defineProps({
sessionTimeout: { sessionTimeout: {
type: Boolean, type: Boolean,
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
import { useUserStore } from '/@/store/modules/user' import { useUserStore } from '/@/store/modules/user'
import { LoginStateEnum, useFormRules, useFormValid, useLoginState } from './useLogin' import { LoginStateEnum, useFormRules, useFormValid, useLoginState } from './useLogin'
import { useDesign } from '/@/hooks/web/useDesign' import { useDesign } from '/@/hooks/web/useDesign'
// import { onKeyStroke } from '@vueuse/core'; // import { onKeyStroke } from '@vueuse/core';
const ACol = Col const ACol = Col
......
...@@ -51,6 +51,7 @@ declare global { ...@@ -51,6 +51,7 @@ declare global {
const toRaw: typeof import('vue')['toRaw'] const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef'] const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs'] const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef'] const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref'] const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs'] const useAttrs: typeof import('vue')['useAttrs']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论