Browse Source

chore: update deps (#3465)

* chore: update deps

* fix: eslint

* chore: update deps

* chore: stylelint v16

* fix: stylelint

* fix: typecheck

* chore: node v18.12.0

* fix: type

* fix: style

* chore: up vue 3.4.3

* chore: prettier format

---------

Co-authored-by: invalid w <wangjuesix@gmail.com>
pull/3500/merge
xingyu 3 years ago
committed by GitHub
parent
commit
626c54504e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .vscode/launch.json
  2. 32
      .vscode/settings.json
  3. 4
      index.html
  4. 16
      internal/eslint-config/package.json
  5. 23
      internal/stylelint-config/package.json
  6. 2
      internal/stylelint-config/src/index.ts
  7. 4
      internal/ts-config/package.json
  8. 30
      internal/vite-config/package.json
  9. 2
      mock/sys/menu.ts
  10. 115
      package.json
  11. 4
      packages/hooks/package.json
  12. 8
      packages/hooks/src/useRequest/types.ts
  13. 7045
      pnpm-lock.yaml
  14. 6
      src/components/CodeEditor/src/codemirror/codemirror.css
  15. 2
      src/components/Cropper/src/Cropper.vue
  16. 8
      src/components/Form/src/components/FormItem.vue
  17. 4
      src/components/Modal/src/components/ModalWrapper.vue
  18. 4
      src/components/Modal/src/index.less
  19. 8
      src/components/Table/src/components/settings/ColumnSetting.vue
  20. 4
      src/components/Upload/src/components/UploadModal.vue
  21. 6
      src/design/ant/popconfirm.less
  22. 8
      src/design/transition/fade.less
  23. 5
      src/design/transition/index.less
  24. 8
      src/design/transition/zoom.less
  25. 10
      src/hooks/setting/useMenuSetting.ts
  26. 4
      src/layouts/default/tabs/index.less
  27. 46
      src/utils/props.ts
  28. 8
      src/views/form-design/components/VFormDesign/components/CodeModal.vue
  29. 4
      src/views/form-design/components/VFormDesign/components/FormNodeOperate.vue
  30. 2
      src/views/form-design/components/VFormDesign/components/JsonModal.vue
  31. 12
      src/views/form-design/components/VFormDesign/index.vue
  32. 3
      src/views/form-design/components/VFormDesign/modules/FormComponentPanel.vue
  33. 3
      src/views/form-design/components/VFormDesign/modules/PropsPanel.vue
  34. 3
      src/views/form-design/components/VFormDesign/modules/Toolbar.vue
  35. 16
      src/views/form-design/components/VFormItem/index.vue
  36. 4
      src/views/form-design/components/VFormPreview/index.vue
  37. 2
      src/views/form-design/components/VFormPreview/useForm.vue
  38. 12
      src/views/sys/error-log/data.tsx
  39. 2
      src/views/sys/login/SessionTimeoutLogin.vue

2
.vscode/launch.json

@ -10,4 +10,4 @@
"sourceMaps": true "sourceMaps": true
} }
] ]
} }

32
.vscode/settings.json

@ -55,7 +55,14 @@
"**/yarn.lock": true "**/yarn.lock": true
}, },
"stylelint.enable": true, "stylelint.enable": true,
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], "stylelint.validate": [
"css",
"less",
"postcss",
"scss",
"vue",
"sass"
],
"path-intellisense.mappings": { "path-intellisense.mappings": {
"@/": "${workspaceRoot}/src" "@/": "${workspaceRoot}/src"
}, },
@ -84,25 +91,32 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true, "source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": true "source.fixAll.stylelint": "explicit"
}, },
"[vue]": { "[vue]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true, "source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": true "source.fixAll.stylelint": "explicit"
}, },
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"i18n-ally.localesPaths": ["src/locales/lang"], "i18n-ally.localesPaths": [
"src/locales/lang"
],
"i18n-ally.keystyle": "nested", "i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true, "i18n-ally.sortKeys": true,
"i18n-ally.namespace": true, "i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
"i18n-ally.enabledParsers": ["json"], "i18n-ally.enabledParsers": [
"json"
],
"i18n-ally.sourceLanguage": "en", "i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN", "i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"], "i18n-ally.enabledFrameworks": [
"vue",
"react"
],
"cSpell.words": [ "cSpell.words": [
"antd", "antd",
"antv", "antv",
@ -171,4 +185,4 @@
}, },
"terminal.integrated.scrollback": 10000, "terminal.integrated.scrollback": 10000,
"nuxt.isNuxtApp": false "nuxt.isNuxtApp": false
} }

4
index.html

@ -1,5 +1,5 @@
<!DOCTYPE html> <!doctype html>
<html lang="en" id="htmlRoot"> <html lang="zh" id="htmlRoot">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

16
internal/eslint-config/package.json

@ -36,14 +36,14 @@
"stub": "pnpm unbuild --stub" "stub": "pnpm unbuild --stub"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.3.0", "@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.3.0", "@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.46.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.28.0", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.19.2",
"vue-eslint-parser": "^9.3.1" "vue-eslint-parser": "^9.3.2"
} }
} }

23
internal/stylelint-config/package.json

@ -31,19 +31,18 @@
"stub": "pnpm unbuild --stub" "stub": "pnpm unbuild --stub"
}, },
"devDependencies": { "devDependencies": {
"postcss": "^8.4.24", "postcss": "^8.4.32",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"postcss-scss": "^4.0.6", "postcss-scss": "^4.0.9",
"prettier": "^2.8.8", "prettier": "^3.1.1",
"stylelint": "^15.10.1", "stylelint": "^16.1.0",
"stylelint-config-property-sort-order-smacss": "^9.1.0", "stylelint-config-property-sort-order-smacss": "^10.0.0",
"stylelint-config-recommended": "^13.0.0", "stylelint-config-recommended-scss": "^14.0.0",
"stylelint-config-recommended-scss": "^12.0.0", "stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^36.0.0",
"stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^12.0.0",
"stylelint-config-standard-scss": "^10.0.0", "stylelint-order": "^6.0.4",
"stylelint-order": "^6.0.3", "stylelint-prettier": "^5.0.0"
"stylelint-prettier": "^3.0.0"
} }
} }

2
internal/stylelint-config/src/index.ts

@ -22,6 +22,7 @@ export default {
}, },
], ],
rules: { rules: {
'prettier/prettier': true,
'media-feature-range-notation': null, 'media-feature-range-notation': null,
'selector-not-notation': null, 'selector-not-notation': null,
'import-notation': null, 'import-notation': null,
@ -58,7 +59,6 @@ export default {
}, },
], ],
'no-empty-source': null, 'no-empty-source': null,
'string-quotes': null,
'named-grid-areas-no-invalid': null, 'named-grid-areas-no-invalid': null,
'no-descending-specificity': null, 'no-descending-specificity': null,
'font-family-no-missing-generic-family-keyword': null, 'font-family-no-missing-generic-family-keyword': null,

4
internal/ts-config/package.json

@ -19,7 +19,7 @@
"node-server.json" "node-server.json"
], ],
"dependencies": { "dependencies": {
"@types/node": "^20.4.0", "@types/node": "^20.10.6",
"vite": "^4.4.0" "vite": "^4.5.1"
} }
} }

30
internal/vite-config/package.json

@ -31,28 +31,28 @@
"stub": "pnpm unbuild --stub" "stub": "pnpm unbuild --stub"
}, },
"dependencies": { "dependencies": {
"@ant-design/colors": "^7.0.0", "@ant-design/colors": "^7.0.1",
"vite": "^4.4.0" "vite": "^4.5.1"
}, },
"devDependencies": { "devDependencies": {
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.4",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.6.2",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.1.0",
"ant-design-vue": "^4.0.6", "ant-design-vue": "^4.0.8",
"dayjs": "^1.11.9", "dayjs": "^1.11.10",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"fs-extra": "^11.1.1", "fs-extra": "^11.2.0",
"less": "^4.1.3", "less": "^4.2.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pkg-types": "^1.0.3", "pkg-types": "^1.0.3",
"rollup-plugin-visualizer": "^5.9.2", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.63.6", "sass": "^1.69.6",
"unocss": "0.53.4", "unocss": "0.58.3",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^3.1.0", "vite-plugin-dts": "^3.7.0",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.1",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-purge-icons": "^0.9.2", "vite-plugin-purge-icons": "^0.10.0",
"vite-plugin-svg-icons": "^2.0.1" "vite-plugin-svg-icons": "^2.0.1"
} }
} }

2
mock/sys/menu.ts

@ -267,4 +267,4 @@ export default [
return resultSuccess(menu); return resultSuccess(menu);
}, },
}, },
] as MockMethod[]; ] as unknown as MockMethod[];

115
package.json

@ -67,89 +67,88 @@
} }
}, },
"dependencies": { "dependencies": {
"@ant-design/icons-vue": "^6.1.0", "@ant-design/icons-vue": "^7.0.1",
"@iconify/iconify": "^3.1.1", "@iconify/iconify": "^3.1.1",
"@logicflow/core": "^1.2.9", "@logicflow/core": "^1.2.18",
"@logicflow/extension": "^1.2.9", "@logicflow/extension": "^1.2.19",
"@vben/hooks": "workspace:*", "@vben/hooks": "workspace:*",
"@vue/shared": "^3.3.4", "@vue/shared": "^3.4.3",
"@vueuse/core": "^10.2.1", "@vueuse/core": "^10.7.1",
"@vueuse/shared": "^10.2.1", "@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/core": "^3.0.2", "ant-design-vue": "^4.0.8",
"ant-design-vue": "^4.0.6", "axios": "^1.6.3",
"axios": "^1.4.0", "codemirror": "^5.65.16",
"codemirror": "^5.65.12", "cropperjs": "^1.6.1",
"cropperjs": "^1.5.13", "crypto-js": "^4.2.0",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"driver.js": "^1.3.0", "driver.js": "^1.3.1",
"echarts": "^5.4.2", "echarts": "^5.4.3",
"exceljs": "^4.3.0", "exceljs": "^4.4.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
"pinia": "2.1.4", "pinia": "2.1.7",
"pinia-plugin-persistedstate": "^3.2.0", "pinia-plugin-persistedstate": "^3.2.1",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"qs": "^6.11.2", "qs": "^6.11.2",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.1",
"tinymce": "^5.10.7", "tinymce": "^5.10.9",
"unocss": "0.53.4", "unocss": "0.58.3",
"vditor": "^3.9.4", "vditor": "^3.9.8",
"vue": "^3.3.4", "vue": "^3.4.3",
"vue-i18n": "^9.6.4", "vue-i18n": "^9.8.0",
"vue-json-pretty": "^2.2.4", "vue-json-pretty": "^2.3.0",
"vue-router": "^4.2.3", "vue-router": "^4.2.5",
"vue-types": "^5.1.0", "vue-types": "^5.1.1",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",
"vxe-table": "^4.4.5", "vxe-table": "^4.5.17",
"vxe-table-plugin-export-xlsx": "^3.0.4", "vxe-table-plugin-export-xlsx": "^3.1.0",
"xe-utils": "^3.5.11", "xe-utils": "^3.5.14",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.6.6", "@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^17.6.6", "@commitlint/config-conventional": "^18.4.3",
"@iconify/json": "^2.2.87", "@iconify/json": "^2.2.163",
"@purge-icons/generated": "^0.9.0", "@purge-icons/generated": "^0.10.0",
"@types/codemirror": "^5.60.8", "@types/codemirror": "^5.60.15",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.2.1",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.12",
"@types/mockjs": "^1.0.7", "@types/mockjs": "^1.0.10",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.3",
"@types/qrcode": "^1.5.1", "@types/qrcode": "^1.5.5",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.11",
"@types/showdown": "^2.0.1", "@types/showdown": "^2.0.6",
"@types/sortablejs": "^1.15.1", "@types/sortablejs": "^1.15.7",
"@vben/eslint-config": "workspace:*", "@vben/eslint-config": "workspace:*",
"@vben/stylelint-config": "workspace:*", "@vben/stylelint-config": "workspace:*",
"@vben/ts-config": "workspace:*", "@vben/ts-config": "workspace:*",
"@vben/types": "workspace:*", "@vben/types": "workspace:*",
"@vben/vite-config": "workspace:*", "@vben/vite-config": "workspace:*",
"@vue/compiler-sfc": "^3.3.4", "@vue/compiler-sfc": "^3.4.3",
"@vue/test-utils": "^2.4.0", "@vue/test-utils": "^2.4.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cz-git": "^1.6.1", "cz-git": "^1.8.0",
"czg": "^1.6.1", "czg": "^1.8.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"lint-staged": "13.2.3", "lint-staged": "15.2.0",
"prettier": "^2.8.8", "prettier": "^3.1.1",
"prettier-plugin-packagejson": "^2.4.6", "prettier-plugin-packagejson": "^2.4.8",
"rimraf": "^5.0.1", "rimraf": "^5.0.5",
"turbo": "^1.10.7", "turbo": "^1.11.2",
"typescript": "^5.2.2", "typescript": "^5.3.3",
"unbuild": "^1.2.1", "unbuild": "^2.0.0",
"vite": "^4.4.0", "vite": "^4.5.1",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vue-tsc": "^1.8.4" "vue-tsc": "^1.8.27"
}, },
"packageManager": "pnpm@8.1.0", "packageManager": "pnpm@8.10.0",
"engines": { "engines": {
"node": ">=16.15.1", "node": ">=18.12.0",
"pnpm": ">=8.1.0" "pnpm": ">=8.10.0"
} }
} }

4
packages/hooks/package.json

@ -29,9 +29,9 @@
"lint": "pnpm eslint ." "lint": "pnpm eslint ."
}, },
"dependencies": { "dependencies": {
"@vueuse/core": "^10.2.1", "@vueuse/core": "^10.7.1",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"vue": "^3.3.4" "vue": "^3.4.3"
}, },
"devDependencies": { "devDependencies": {
"@vben/types": "workspace:*" "@vben/types": "workspace:*"

8
packages/hooks/src/useRequest/types.ts

@ -94,10 +94,10 @@ export interface UseRequestOptions<TData, TParams extends any[]> {
export interface UseRequestPlugin<TData, TParams extends any[]> { export interface UseRequestPlugin<TData, TParams extends any[]> {
// eslint-disable-next-line prettier/prettier // eslint-disable-next-line prettier/prettier
(fetchInstance: Fetch<TData, TParams>, options: UseRequestOptions<TData, TParams>): PluginReturn< (
TData, fetchInstance: Fetch<TData, TParams>,
TParams options: UseRequestOptions<TData, TParams>,
>; ): PluginReturn<TData, TParams>;
onInit?: (options: UseRequestOptions<TData, TParams>) => Partial<FetchState<TData, TParams>>; onInit?: (options: UseRequestOptions<TData, TParams>) => Partial<FetchState<TData, TParams>>;
} }

7045
pnpm-lock.yaml

File diff suppressed because it is too large

6
src/components/CodeEditor/src/codemirror/codemirror.css

@ -70,7 +70,11 @@
font-family: arial; font-family: arial;
line-height: 0.3; line-height: 0.3;
color: #414141; color: #414141;
text-shadow: #f96 1px 1px 2px, #f96 -1px -1px 2px, #f96 1px -1px 2px, #f96 -1px 1px 2px; text-shadow:
#f96 1px 1px 2px,
#f96 -1px -1px 2px,
#f96 1px -1px 2px,
#f96 -1px 1px 2px;
cursor: pointer; cursor: pointer;
} }

2
src/components/Cropper/src/Cropper.vue

@ -16,7 +16,7 @@
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/shared'; import { useDebounceFn } from '@vueuse/core';
import { useAttrs } from '@vben/hooks'; import { useAttrs } from '@vben/hooks';
type Options = Cropper.Options; type Options = Cropper.Options;

8
src/components/Form/src/components/FormItem.vue

@ -385,8 +385,8 @@
return slot return slot
? getSlot(slots, slot, unref(getValues), opts) ? getSlot(slots, slot, unref(getValues), opts)
: render : render
? render(unref(getValues), opts) ? render(unref(getValues), opts)
: renderComponent(); : renderComponent();
}; };
const showSuffix = !!suffix; const showSuffix = !!suffix;
@ -437,8 +437,8 @@
return colSlot return colSlot
? getSlot(slots, colSlot, values, opts) ? getSlot(slots, colSlot, values, opts)
: renderColContent : renderColContent
? renderColContent(values, opts) ? renderColContent(values, opts)
: renderItem(); : renderItem();
}; };
return ( return (

4
src/components/Modal/src/components/ModalWrapper.vue

@ -141,8 +141,8 @@
realHeightRef.value = props.height realHeightRef.value = props.height
? props.height ? props.height
: realHeight.value > maxHeight : realHeight.value > maxHeight
? maxHeight ? maxHeight
: realHeight.value; : realHeight.value;
} }
emit('height-change', unref(realHeightRef)); emit('height-change', unref(realHeightRef));
} catch (error) { } catch (error) {

4
src/components/Modal/src/index.less

@ -58,7 +58,9 @@
&-content { &-content {
padding: 0 !important; padding: 0 !important;
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%); box-shadow:
0 4px 8px 0 rgb(0 0 0 / 20%),
0 6px 20px 0 rgb(0 0 0 / 19%);
} }
&-footer { &-footer {

8
src/components/Table/src/components/settings/ColumnSetting.vue

@ -541,14 +541,14 @@
typeof col.title === 'string' typeof col.title === 'string'
? col.title ? col.title
: col.customTitle === 'string' : col.customTitle === 'string'
? col.customTitle ? col.customTitle
: '', : '',
value: value:
typeof col.dataIndex === 'string' typeof col.dataIndex === 'string'
? col.dataIndex ? col.dataIndex
: col.title === 'string' : col.title === 'string'
? col.title ? col.title
: '', : '',
column: { column: {
defaultHidden: col.defaultHidden, defaultHidden: col.defaultHidden,
}, },

4
src/components/Upload/src/components/UploadModal.vue

@ -118,8 +118,8 @@
return isUploadingRef.value return isUploadingRef.value
? t('component.upload.uploading') ? t('component.upload.uploading')
: someError : someError
? t('component.upload.reUploadFailed') ? t('component.upload.reUploadFailed')
: t('component.upload.startUpload'); : t('component.upload.startUpload');
}); });
// 上传前校验 // 上传前校验

6
src/design/ant/popconfirm.less

@ -1,7 +1,7 @@
// 修复气泡确认框内的按钮在内容宽度不够换行的情况 // 修复气泡确认框内的按钮在内容宽度不够换行的情况
// 初始问题发现在 2.10.1 版本 固定列页面 http://ip:port/#/comp/table/fixedColumn // 初始问题发现在 2.10.1 版本 固定列页面 http://ip:port/#/comp/table/fixedColumn
.ant-popconfirm{ .ant-popconfirm {
&-buttons{ &-buttons {
white-space: nowrap; white-space: nowrap;
} }
} }

8
src/design/transition/fade.less

@ -43,7 +43,9 @@
// Speed: 1x // Speed: 1x
.fade-bottom-enter-active, .fade-bottom-enter-active,
.fade-bottom-leave-active { .fade-bottom-leave-active {
transition: opacity 0.25s, transform 0.3s; transition:
opacity 0.25s,
transform 0.3s;
} }
.fade-bottom-enter-from { .fade-bottom-enter-from {
@ -79,7 +81,9 @@
// Speed: 1x // Speed: 1x
.fade-top-enter-active, .fade-top-enter-active,
.fade-top-leave-active { .fade-top-leave-active {
transition: opacity 0.2s, transform 0.25s; transition:
opacity 0.2s,
transform 0.25s;
} }
.fade-top-enter-from { .fade-top-enter-from {

5
src/design/transition/index.less

@ -6,5 +6,8 @@
@import './zoom.less'; @import './zoom.less';
.collapse-transition { .collapse-transition {
transition: 0.2s height ease-in-out, 0.2s padding-top ease-in-out, 0.2s padding-bottom ease-in-out; transition:
0.2s height ease-in-out,
0.2s padding-top ease-in-out,
0.2s padding-bottom ease-in-out;
} }

8
src/design/transition/zoom.less

@ -1,7 +1,9 @@
// zoom-out // zoom-out
.zoom-out-enter-active, .zoom-out-enter-active,
.zoom-out-leave-active { .zoom-out-leave-active {
transition: opacity 0.1 ease-in-out, transform 0.15s ease-out; transition:
opacity 0.1 ease-in-out,
transform 0.15s ease-out;
} }
.zoom-out-enter-from, .zoom-out-enter-from,
@ -13,7 +15,9 @@
// zoom-fade // zoom-fade
.zoom-fade-enter-active, .zoom-fade-enter-active,
.zoom-fade-leave-active { .zoom-fade-leave-active {
transition: transform 0.2s, opacity 0.3s ease-out; transition:
transform 0.2s,
opacity 0.3s ease-out;
} }
.zoom-fade-enter-from { .zoom-fade-enter-from {

10
src/hooks/setting/useMenuSetting.ts

@ -105,8 +105,8 @@ export function useMenuSetting() {
return siderHidden return siderHidden
? 0 ? 0
: collapsedShowTitle : collapsedShowTitle
? SIDE_BAR_SHOW_TIT_MINI_WIDTH ? SIDE_BAR_SHOW_TIT_MINI_WIDTH
: SIDE_BAR_MINI_WIDTH; : SIDE_BAR_MINI_WIDTH;
}); });
const getCalcContentWidth = computed(() => { const getCalcContentWidth = computed(() => {
@ -114,9 +114,9 @@ export function useMenuSetting() {
unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden)) unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden))
? 0 ? 0
: unref(getIsMixSidebar) : unref(getIsMixSidebar)
? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) + ? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) +
(unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0) (unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
: unref(getRealWidth); : unref(getRealWidth);
return `calc(100% - ${unref(width)}px)`; return `calc(100% - ${unref(width)}px)`;
}); });

4
src/layouts/default/tabs/index.less

@ -25,7 +25,9 @@ html[data-theme='light'] {
} }
} }
.@{prefix-cls} { .@{prefix-cls} {
transition: margin 0.2s ease-in-out 0.6s, opacity 0.2s ease-in-out 0.6s; transition:
margin 0.2s ease-in-out 0.6s,
opacity 0.2s ease-in-out 0.6s;
} }
} }

46
src/utils/props.ts

@ -27,8 +27,8 @@ export type BuildPropOption<T, D extends BuildPropType<T, V, C>, R, V, C> = {
default?: R extends true default?: R extends true
? never ? never
: D extends Record<string, unknown> | Array<any> : D extends Record<string, unknown> | Array<any>
? () => D ? () => D
: (() => D) | D; : (() => D) | D;
validator?: ((val: any) => val is C) | ((val: any) => boolean); validator?: ((val: any) => val is C) | ((val: any) => boolean);
}; };
@ -36,8 +36,8 @@ type _BuildPropType<T, V, C> =
| (T extends PropWrapper<unknown> | (T extends PropWrapper<unknown>
? T[typeof wrapperKey] ? T[typeof wrapperKey]
: [V] extends [never] : [V] extends [never]
? ResolvePropTypeWithReadonly<T> ? ResolvePropTypeWithReadonly<T>
: never) : never)
| V | V
| C; | C;
export type BuildPropType<T, V, C> = _BuildPropType< export type BuildPropType<T, V, C> = _BuildPropType<
@ -52,8 +52,8 @@ type _BuildPropDefault<T, D> = [T] extends [
] ]
? D ? D
: D extends () => T : D extends () => T
? ReturnType<D> ? ReturnType<D>
: D; : D;
export type BuildPropDefault<T, D, R> = R extends true export type BuildPropDefault<T, D, R> = R extends true
? { readonly default?: undefined } ? { readonly default?: undefined }
@ -146,12 +146,12 @@ export const buildProps = <
[K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any> [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any>
? O[K] ? O[K]
: [O[K]] extends NativePropType : [O[K]] extends NativePropType
? O[K] ? O[K]
: O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C> : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C>
? D extends BuildPropType<T, V, C> ? D extends BuildPropType<T, V, C>
? BuildPropOption<T, D, R, V, C> ? BuildPropOption<T, D, R, V, C>
: never : never
: never; : never;
}, },
>( >(
props: O, props: O,
@ -162,17 +162,17 @@ export const buildProps = <
[K in keyof O]: O[K] extends { [propKey]: boolean } [K in keyof O]: O[K] extends { [propKey]: boolean }
? O[K] ? O[K]
: [O[K]] extends NativePropType : [O[K]] extends NativePropType
? O[K] ? O[K]
: O[K] extends BuildPropOption< : O[K] extends BuildPropOption<
infer T, infer T,
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
infer _D, infer _D,
infer R, infer R,
infer V, infer V,
infer C infer C
> >
? BuildPropReturn<T, O[K]['default'], R, V, C> ? BuildPropReturn<T, O[K]['default'], R, V, C>
: never; : never;
}; };
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>; export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>;

8
src/views/form-design/components/VFormDesign/components/CodeModal.vue

@ -66,11 +66,15 @@ export default {
const showModal = (formConfig: IFormConfig) => { const showModal = (formConfig: IFormConfig) => {
formConfig.schemas && formatRules(formConfig.schemas); formConfig.schemas && formatRules(formConfig.schemas);
state.visible = true; state.visible = true;
state.jsonData = formConfig; state.jsonData = formConfig as any;
}; };
const editorVueJson = computed(() => { const editorVueJson = computed(() => {
return codeVueFront + JSON.stringify(removeAttrs(state.jsonData), null, '\t') + codeVueLast; return (
codeVueFront +
JSON.stringify(removeAttrs(state.jsonData as any), null, '\t') +
codeVueLast
);
}); });
return { ...toRefs(state), editorVueJson, showModal }; return { ...toRefs(state), editorVueJson, showModal };

4
src/views/form-design/components/VFormDesign/components/FormNodeOperate.vue

@ -54,8 +54,8 @@
schemas.length === 1 schemas.length === 1
? { component: '' } ? { component: '' }
: schemas.length - 1 > index : schemas.length - 1 > index
? schemas[index + 1] ? schemas[index + 1]
: schemas[index - 1]; : schemas[index - 1];
formDesignMethods.handleSetSelectItem(params); formDesignMethods.handleSetSelectItem(params);
remove(schemas, index); remove(schemas, index);
return true; return true;

2
src/views/form-design/components/VFormDesign/components/JsonModal.vue

@ -43,7 +43,7 @@
*/ */
const showModal = (jsonData: IFormConfig) => { const showModal = (jsonData: IFormConfig) => {
formatRules(jsonData.schemas); formatRules(jsonData.schemas);
state.jsonData = jsonData; state.jsonData = jsonData as any;
state.visible = true; state.visible = true;
}; };

12
src/views/form-design/components/VFormDesign/index.vue

@ -147,10 +147,10 @@
item.componentProps = item.componentProps || {}; item.componentProps = item.componentProps || {};
item.itemProps = item.itemProps || {}; item.itemProps = item.itemProps || {};
}); });
formConfig.value = config; formConfig.value = config as any;
}; };
// 获取历史记录,用于撤销和重构 // 获取历史记录,用于撤销和重构
const historyReturn = useRefHistory(formConfig, { const historyReturn = useRefHistory(formConfig as any, {
deep: true, deep: true,
capacity: 20, capacity: 20,
parse: (val: IFormConfig) => { parse: (val: IFormConfig) => {
@ -173,7 +173,7 @@
* @param schema 当前选中的表单项 * @param schema 当前选中的表单项
*/ */
const handleSetSelectItem = (schema: IVFormComponent) => { const handleSetSelectItem = (schema: IVFormComponent) => {
formConfig.value.currentItem = schema; formConfig.value.currentItem = schema as any;
handleChangePropsTabs( handleChangePropsTabs(
schema.key ? (formConfig.value.activeKey! === 1 ? 2 : formConfig.value.activeKey!) : 1, schema.key ? (formConfig.value.activeKey! === 1 ? 2 : formConfig.value.activeKey!) : 1,
); );
@ -210,7 +210,7 @@
generateKey(formItem); generateKey(formItem);
if (!formConfig.value.currentItem?.key) { if (!formConfig.value.currentItem?.key) {
handleSetSelectItem(formItem); handleSetSelectItem(formItem);
formConfig.value.schemas && formConfig.value.schemas.push(formItem); formConfig.value.schemas && formConfig.value.schemas.push(formItem as any);
return; return;
} }
@ -269,7 +269,7 @@
}); });
}; };
if (formConfig.value.schemas) { if (formConfig.value.schemas) {
traverse(formConfig.value.schemas); traverse(formConfig.value.schemas as any);
} }
}; };
@ -316,7 +316,7 @@
// provide('currentItem', formConfig.value.currentItem) // provide('currentItem', formConfig.value.currentItem)
// 把表单配置项注入到子组件中,子组件可通过inject获取,获取到的数据为响应式 // 把表单配置项注入到子组件中,子组件可通过inject获取,获取到的数据为响应式
provide<Ref<IFormConfig>>('formConfig', formConfig); provide<Ref<IFormConfig>>('formConfig', formConfig as any);
// 注入历史记录 // 注入历史记录
provide<UseRefHistoryReturn<any, any>>('historyReturn', historyReturn); provide<UseRefHistoryReturn<any, any>>('historyReturn', historyReturn);

3
src/views/form-design/components/VFormDesign/modules/FormComponentPanel.vue

@ -103,8 +103,7 @@
.list-main { .list-main {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; place-content: flex-start flex-start;
justify-content: flex-start;
.layout-width { .layout-width {
width: 100%; width: 100%;

3
src/views/form-design/components/VFormDesign/modules/PropsPanel.vue

@ -66,8 +66,7 @@
width: 100%; width: 100%;
height: 85vh; height: 85vh;
margin-right: 10px; margin-right: 10px;
overflow-x: hidden; overflow: hidden auto;
overflow-y: auto;
} }
.hint-box { .hint-box {

3
src/views/form-design/components/VFormDesign/modules/Toolbar.vue

@ -104,8 +104,7 @@
.operating-area { .operating-area {
display: flex; display: flex;
align-content: center; place-content: center space-between;
justify-content: space-between;
height: @operating-area-height; height: @operating-area-height;
padding: 0 12px; padding: 0 12px;
padding-left: 30px; padding-left: 30px;

16
src/views/form-design/components/VFormItem/index.vue

@ -97,18 +97,18 @@
labelCol = labelCol labelCol = labelCol
? labelCol ? labelCol
: formConfig.layout === 'horizontal' : formConfig.layout === 'horizontal'
? formConfig.labelLayout === 'flex' ? formConfig.labelLayout === 'flex'
? { style: `width:${formConfig.labelWidth}px` } ? { style: `width:${formConfig.labelWidth}px` }
: formConfig.labelCol : formConfig.labelCol
: {}; : {};
wrapperCol = wrapperCol wrapperCol = wrapperCol
? wrapperCol ? wrapperCol
: formConfig.layout === 'horizontal' : formConfig.layout === 'horizontal'
? formConfig.labelLayout === 'flex' ? formConfig.labelLayout === 'flex'
? { style: 'width:auto;flex:1' } ? { style: 'width:auto;flex:1' }
: formConfig.wrapperCol : formConfig.wrapperCol
: {}; : {};
const style = const style =
formConfig.layout === 'horizontal' && formConfig.labelLayout === 'flex' formConfig.layout === 'horizontal' && formConfig.labelLayout === 'flex'

4
src/views/form-design/components/VFormPreview/index.vue

@ -14,7 +14,7 @@
:width="900" :width="900"
> >
<VFormCreate <VFormCreate
:form-config="formConfig" :form-config="formConfig as any"
v-model:fApi="fApi" v-model:fApi="fApi"
v-model:formModel="formModel" v-model:formModel="formModel"
@submit="onSubmit" @submit="onSubmit"
@ -65,7 +65,7 @@
const showModal = (jsonData: IFormConfig) => { const showModal = (jsonData: IFormConfig) => {
// console.log('showModal-', jsonData); // console.log('showModal-', jsonData);
formatRules(jsonData.schemas); formatRules(jsonData.schemas);
state.formConfig = jsonData; state.formConfig = jsonData as any;
state.visible = true; state.visible = true;
}; };

2
src/views/form-design/components/VFormPreview/useForm.vue

@ -48,7 +48,7 @@
* @param jsonData * @param jsonData
*/ */
const showModal = (jsonData: IFormConfig) => { const showModal = (jsonData: IFormConfig) => {
state.formConfig = jsonData; state.formConfig = jsonData as any;
state.visible = true; state.visible = true;
}; };

12
src/views/sys/error-log/data.tsx

@ -16,12 +16,12 @@ export function getColumns(): BasicColumn[] {
text === ErrorTypeEnum.VUE text === ErrorTypeEnum.VUE
? 'green' ? 'green'
: text === ErrorTypeEnum.RESOURCE : text === ErrorTypeEnum.RESOURCE
? 'cyan' ? 'cyan'
: text === ErrorTypeEnum.PROMISE : text === ErrorTypeEnum.PROMISE
? 'blue' ? 'blue'
: ErrorTypeEnum.AJAX : ErrorTypeEnum.AJAX
? 'red' ? 'red'
: 'purple'; : 'purple';
return <Tag color={color}>{() => text}</Tag>; return <Tag color={color}>{() => text}</Tag>;
}, },
}, },

2
src/views/sys/login/SessionTimeoutLogin.vue

@ -1,6 +1,6 @@
<template> <template>
<transition> <transition>
<div :class="prefixCls"> <div :class="prefixCls" v-if="true">
<Login sessionTimeout /> <Login sessionTimeout />
</div> </div>
</transition> </transition>

Loading…
Cancel
Save