mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-02 18:28:40 +08:00
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>
This commit is contained in:
parent
6fbb57621e
commit
626c54504e
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -10,4 +10,4 @@
|
||||
"sourceMaps": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
32
.vscode/settings.json
vendored
32
.vscode/settings.json
vendored
@ -55,7 +55,14 @@
|
||||
"**/yarn.lock": true
|
||||
},
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
|
||||
"stylelint.validate": [
|
||||
"css",
|
||||
"less",
|
||||
"postcss",
|
||||
"scss",
|
||||
"vue",
|
||||
"sass"
|
||||
],
|
||||
"path-intellisense.mappings": {
|
||||
"@/": "${workspaceRoot}/src"
|
||||
},
|
||||
@ -84,25 +91,32 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true,
|
||||
"source.fixAll.stylelint": true
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true,
|
||||
"source.fixAll.stylelint": true
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"i18n-ally.localesPaths": ["src/locales/lang"],
|
||||
"i18n-ally.localesPaths": [
|
||||
"src/locales/lang"
|
||||
],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"i18n-ally.sortKeys": true,
|
||||
"i18n-ally.namespace": true,
|
||||
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
|
||||
"i18n-ally.enabledParsers": ["json"],
|
||||
"i18n-ally.enabledParsers": [
|
||||
"json"
|
||||
],
|
||||
"i18n-ally.sourceLanguage": "en",
|
||||
"i18n-ally.displayLanguage": "zh-CN",
|
||||
"i18n-ally.enabledFrameworks": ["vue", "react"],
|
||||
"i18n-ally.enabledFrameworks": [
|
||||
"vue",
|
||||
"react"
|
||||
],
|
||||
"cSpell.words": [
|
||||
"antd",
|
||||
"antv",
|
||||
@ -171,4 +185,4 @@
|
||||
},
|
||||
"terminal.integrated.scrollback": 10000,
|
||||
"nuxt.isNuxtApp": false
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="htmlRoot">
|
||||
<!doctype html>
|
||||
<html lang="zh" id="htmlRoot">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
@ -36,14 +36,14 @@
|
||||
"stub": "pnpm unbuild --stub"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
||||
"@typescript-eslint/parser": "^6.3.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-import": "^2.28.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
||||
"@typescript-eslint/parser": "^6.17.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-prettier": "^5.1.2",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
"vue-eslint-parser": "^9.3.1"
|
||||
"eslint-plugin-vue": "^9.19.2",
|
||||
"vue-eslint-parser": "^9.3.2"
|
||||
}
|
||||
}
|
||||
|
@ -31,19 +31,18 @@
|
||||
"stub": "pnpm unbuild --stub"
|
||||
},
|
||||
"devDependencies": {
|
||||
"postcss": "^8.4.24",
|
||||
"postcss": "^8.4.32",
|
||||
"postcss-html": "^1.5.0",
|
||||
"postcss-less": "^6.0.0",
|
||||
"postcss-scss": "^4.0.6",
|
||||
"prettier": "^2.8.8",
|
||||
"stylelint": "^15.10.1",
|
||||
"stylelint-config-property-sort-order-smacss": "^9.1.0",
|
||||
"stylelint-config-recommended": "^13.0.0",
|
||||
"stylelint-config-recommended-scss": "^12.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.4.0",
|
||||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-config-standard-scss": "^10.0.0",
|
||||
"stylelint-order": "^6.0.3",
|
||||
"stylelint-prettier": "^3.0.0"
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.1.1",
|
||||
"stylelint": "^16.1.0",
|
||||
"stylelint-config-property-sort-order-smacss": "^10.0.0",
|
||||
"stylelint-config-recommended-scss": "^14.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard": "^36.0.0",
|
||||
"stylelint-config-standard-scss": "^12.0.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"stylelint-prettier": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ export default {
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'prettier/prettier': true,
|
||||
'media-feature-range-notation': null,
|
||||
'selector-not-notation': null,
|
||||
'import-notation': null,
|
||||
@ -58,7 +59,6 @@ export default {
|
||||
},
|
||||
],
|
||||
'no-empty-source': null,
|
||||
'string-quotes': null,
|
||||
'named-grid-areas-no-invalid': null,
|
||||
'no-descending-specificity': null,
|
||||
'font-family-no-missing-generic-family-keyword': null,
|
||||
|
@ -19,7 +19,7 @@
|
||||
"node-server.json"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/node": "^20.4.0",
|
||||
"vite": "^4.4.0"
|
||||
"@types/node": "^20.10.6",
|
||||
"vite": "^4.5.1"
|
||||
}
|
||||
}
|
||||
|
@ -31,28 +31,28 @@
|
||||
"stub": "pnpm unbuild --stub"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^7.0.0",
|
||||
"vite": "^4.4.0"
|
||||
"@ant-design/colors": "^7.0.1",
|
||||
"vite": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"ant-design-vue": "^4.0.6",
|
||||
"dayjs": "^1.11.9",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@vitejs/plugin-vue": "^4.6.2",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"ant-design-vue": "^4.0.8",
|
||||
"dayjs": "^1.11.10",
|
||||
"dotenv": "^16.3.1",
|
||||
"fs-extra": "^11.1.1",
|
||||
"less": "^4.1.3",
|
||||
"fs-extra": "^11.2.0",
|
||||
"less": "^4.2.0",
|
||||
"picocolors": "^1.0.0",
|
||||
"pkg-types": "^1.0.3",
|
||||
"rollup-plugin-visualizer": "^5.9.2",
|
||||
"sass": "^1.63.6",
|
||||
"unocss": "0.53.4",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.69.6",
|
||||
"unocss": "0.58.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-dts": "^3.1.0",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-dts": "^3.7.0",
|
||||
"vite-plugin-html": "^3.2.1",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
@ -267,4 +267,4 @@ export default [
|
||||
return resultSuccess(menu);
|
||||
},
|
||||
},
|
||||
] as MockMethod[];
|
||||
] as unknown as MockMethod[];
|
||||
|
115
package.json
115
package.json
@ -67,89 +67,88 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons-vue": "^6.1.0",
|
||||
"@ant-design/icons-vue": "^7.0.1",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@logicflow/core": "^1.2.9",
|
||||
"@logicflow/extension": "^1.2.9",
|
||||
"@logicflow/core": "^1.2.18",
|
||||
"@logicflow/extension": "^1.2.19",
|
||||
"@vben/hooks": "workspace:*",
|
||||
"@vue/shared": "^3.3.4",
|
||||
"@vueuse/core": "^10.2.1",
|
||||
"@vueuse/shared": "^10.2.1",
|
||||
"@zxcvbn-ts/core": "^3.0.2",
|
||||
"ant-design-vue": "^4.0.6",
|
||||
"axios": "^1.4.0",
|
||||
"codemirror": "^5.65.12",
|
||||
"cropperjs": "^1.5.13",
|
||||
"crypto-js": "^4.1.1",
|
||||
"@vue/shared": "^3.4.3",
|
||||
"@vueuse/core": "^10.7.1",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"ant-design-vue": "^4.0.8",
|
||||
"axios": "^1.6.3",
|
||||
"codemirror": "^5.65.16",
|
||||
"cropperjs": "^1.6.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.10",
|
||||
"driver.js": "^1.3.0",
|
||||
"echarts": "^5.4.2",
|
||||
"exceljs": "^4.3.0",
|
||||
"driver.js": "^1.3.1",
|
||||
"echarts": "^5.4.3",
|
||||
"exceljs": "^4.4.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-to-regexp": "^6.2.1",
|
||||
"pinia": "2.1.4",
|
||||
"pinia-plugin-persistedstate": "^3.2.0",
|
||||
"pinia": "2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"print-js": "^1.6.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.11.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"showdown": "^2.1.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"tinymce": "^5.10.7",
|
||||
"unocss": "0.53.4",
|
||||
"vditor": "^3.9.4",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.6.4",
|
||||
"vue-json-pretty": "^2.2.4",
|
||||
"vue-router": "^4.2.3",
|
||||
"vue-types": "^5.1.0",
|
||||
"sortablejs": "^1.15.1",
|
||||
"tinymce": "^5.10.9",
|
||||
"unocss": "0.58.3",
|
||||
"vditor": "^3.9.8",
|
||||
"vue": "^3.4.3",
|
||||
"vue-i18n": "^9.8.0",
|
||||
"vue-json-pretty": "^2.3.0",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue-types": "^5.1.1",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "^4.4.5",
|
||||
"vxe-table-plugin-export-xlsx": "^3.0.4",
|
||||
"xe-utils": "^3.5.11",
|
||||
"vxe-table": "^4.5.17",
|
||||
"vxe-table-plugin-export-xlsx": "^3.1.0",
|
||||
"xe-utils": "^3.5.14",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.6.6",
|
||||
"@commitlint/config-conventional": "^17.6.6",
|
||||
"@iconify/json": "^2.2.87",
|
||||
"@purge-icons/generated": "^0.9.0",
|
||||
"@types/codemirror": "^5.60.8",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/lodash-es": "^4.17.7",
|
||||
"@types/mockjs": "^1.0.7",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/qrcode": "^1.5.1",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/showdown": "^2.0.1",
|
||||
"@types/sortablejs": "^1.15.1",
|
||||
"@commitlint/cli": "^18.4.3",
|
||||
"@commitlint/config-conventional": "^18.4.3",
|
||||
"@iconify/json": "^2.2.163",
|
||||
"@purge-icons/generated": "^0.10.0",
|
||||
"@types/codemirror": "^5.60.15",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/mockjs": "^1.0.10",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.11",
|
||||
"@types/showdown": "^2.0.6",
|
||||
"@types/sortablejs": "^1.15.7",
|
||||
"@vben/eslint-config": "workspace:*",
|
||||
"@vben/stylelint-config": "workspace:*",
|
||||
"@vben/ts-config": "workspace:*",
|
||||
"@vben/types": "workspace:*",
|
||||
"@vben/vite-config": "workspace:*",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"@vue/test-utils": "^2.4.0",
|
||||
"@vue/compiler-sfc": "^3.4.3",
|
||||
"@vue/test-utils": "^2.4.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-git": "^1.6.1",
|
||||
"czg": "^1.6.1",
|
||||
"cz-git": "^1.8.0",
|
||||
"czg": "^1.8.0",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "13.2.3",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-packagejson": "^2.4.6",
|
||||
"rimraf": "^5.0.1",
|
||||
"turbo": "^1.10.7",
|
||||
"typescript": "^5.2.2",
|
||||
"unbuild": "^1.2.1",
|
||||
"vite": "^4.4.0",
|
||||
"lint-staged": "15.2.0",
|
||||
"prettier": "^3.1.1",
|
||||
"prettier-plugin-packagejson": "^2.4.8",
|
||||
"rimraf": "^5.0.5",
|
||||
"turbo": "^1.11.2",
|
||||
"typescript": "^5.3.3",
|
||||
"unbuild": "^2.0.0",
|
||||
"vite": "^4.5.1",
|
||||
"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": {
|
||||
"node": ">=16.15.1",
|
||||
"pnpm": ">=8.1.0"
|
||||
"node": ">=18.12.0",
|
||||
"pnpm": ">=8.10.0"
|
||||
}
|
||||
}
|
||||
|
@ -29,9 +29,9 @@
|
||||
"lint": "pnpm eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/core": "^10.2.1",
|
||||
"@vueuse/core": "^10.7.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"vue": "^3.3.4"
|
||||
"vue": "^3.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vben/types": "workspace:*"
|
||||
|
@ -94,10 +94,10 @@ export interface UseRequestOptions<TData, TParams extends any[]> {
|
||||
|
||||
export interface UseRequestPlugin<TData, TParams extends any[]> {
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
(fetchInstance: Fetch<TData, TParams>, options: UseRequestOptions<TData, TParams>): PluginReturn<
|
||||
TData,
|
||||
TParams
|
||||
>;
|
||||
(
|
||||
fetchInstance: Fetch<TData, TParams>,
|
||||
options: UseRequestOptions<TData, TParams>,
|
||||
): PluginReturn<TData, TParams>;
|
||||
onInit?: (options: UseRequestOptions<TData, TParams>) => Partial<FetchState<TData, TParams>>;
|
||||
}
|
||||
|
||||
|
7085
pnpm-lock.yaml
generated
7085
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,11 @@
|
||||
font-family: arial;
|
||||
line-height: 0.3;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
import Cropper from 'cropperjs';
|
||||
import 'cropperjs/dist/cropper.css';
|
||||
import { useDesign } from '@/hooks/web/useDesign';
|
||||
import { useDebounceFn } from '@vueuse/shared';
|
||||
import { useDebounceFn } from '@vueuse/core';
|
||||
import { useAttrs } from '@vben/hooks';
|
||||
|
||||
type Options = Cropper.Options;
|
||||
|
@ -385,8 +385,8 @@
|
||||
return slot
|
||||
? getSlot(slots, slot, unref(getValues), opts)
|
||||
: render
|
||||
? render(unref(getValues), opts)
|
||||
: renderComponent();
|
||||
? render(unref(getValues), opts)
|
||||
: renderComponent();
|
||||
};
|
||||
|
||||
const showSuffix = !!suffix;
|
||||
@ -437,8 +437,8 @@
|
||||
return colSlot
|
||||
? getSlot(slots, colSlot, values, opts)
|
||||
: renderColContent
|
||||
? renderColContent(values, opts)
|
||||
: renderItem();
|
||||
? renderColContent(values, opts)
|
||||
: renderItem();
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -141,8 +141,8 @@
|
||||
realHeightRef.value = props.height
|
||||
? props.height
|
||||
: realHeight.value > maxHeight
|
||||
? maxHeight
|
||||
: realHeight.value;
|
||||
? maxHeight
|
||||
: realHeight.value;
|
||||
}
|
||||
emit('height-change', unref(realHeightRef));
|
||||
} catch (error) {
|
||||
|
@ -58,7 +58,9 @@
|
||||
|
||||
&-content {
|
||||
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 {
|
||||
|
@ -541,14 +541,14 @@
|
||||
typeof col.title === 'string'
|
||||
? col.title
|
||||
: col.customTitle === 'string'
|
||||
? col.customTitle
|
||||
: '',
|
||||
? col.customTitle
|
||||
: '',
|
||||
value:
|
||||
typeof col.dataIndex === 'string'
|
||||
? col.dataIndex
|
||||
: col.title === 'string'
|
||||
? col.title
|
||||
: '',
|
||||
? col.title
|
||||
: '',
|
||||
column: {
|
||||
defaultHidden: col.defaultHidden,
|
||||
},
|
||||
|
@ -118,8 +118,8 @@
|
||||
return isUploadingRef.value
|
||||
? t('component.upload.uploading')
|
||||
: someError
|
||||
? t('component.upload.reUploadFailed')
|
||||
: t('component.upload.startUpload');
|
||||
? t('component.upload.reUploadFailed')
|
||||
: t('component.upload.startUpload');
|
||||
});
|
||||
|
||||
// 上传前校验
|
||||
|
@ -1,7 +1,7 @@
|
||||
// 修复气泡确认框内的按钮在内容宽度不够换行的情况
|
||||
// 初始问题发现在 2.10.1 版本 固定列页面 http://ip:port/#/comp/table/fixedColumn
|
||||
.ant-popconfirm{
|
||||
&-buttons{
|
||||
.ant-popconfirm {
|
||||
&-buttons {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,9 @@
|
||||
// Speed: 1x
|
||||
.fade-bottom-enter-active,
|
||||
.fade-bottom-leave-active {
|
||||
transition: opacity 0.25s, transform 0.3s;
|
||||
transition:
|
||||
opacity 0.25s,
|
||||
transform 0.3s;
|
||||
}
|
||||
|
||||
.fade-bottom-enter-from {
|
||||
@ -79,7 +81,9 @@
|
||||
// Speed: 1x
|
||||
.fade-top-enter-active,
|
||||
.fade-top-leave-active {
|
||||
transition: opacity 0.2s, transform 0.25s;
|
||||
transition:
|
||||
opacity 0.2s,
|
||||
transform 0.25s;
|
||||
}
|
||||
|
||||
.fade-top-enter-from {
|
||||
|
@ -6,5 +6,8 @@
|
||||
@import './zoom.less';
|
||||
|
||||
.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;
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
// zoom-out
|
||||
.zoom-out-enter-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,
|
||||
@ -13,7 +15,9 @@
|
||||
// zoom-fade
|
||||
.zoom-fade-enter-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 {
|
||||
|
@ -105,8 +105,8 @@ export function useMenuSetting() {
|
||||
return siderHidden
|
||||
? 0
|
||||
: collapsedShowTitle
|
||||
? SIDE_BAR_SHOW_TIT_MINI_WIDTH
|
||||
: SIDE_BAR_MINI_WIDTH;
|
||||
? SIDE_BAR_SHOW_TIT_MINI_WIDTH
|
||||
: SIDE_BAR_MINI_WIDTH;
|
||||
});
|
||||
|
||||
const getCalcContentWidth = computed(() => {
|
||||
@ -114,9 +114,9 @@ export function useMenuSetting() {
|
||||
unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden))
|
||||
? 0
|
||||
: unref(getIsMixSidebar)
|
||||
? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) +
|
||||
(unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
|
||||
: unref(getRealWidth);
|
||||
? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) +
|
||||
(unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
|
||||
: unref(getRealWidth);
|
||||
|
||||
return `calc(100% - ${unref(width)}px)`;
|
||||
});
|
||||
|
@ -25,7 +25,9 @@ html[data-theme='light'] {
|
||||
}
|
||||
}
|
||||
.@{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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,8 @@ export type BuildPropOption<T, D extends BuildPropType<T, V, C>, R, V, C> = {
|
||||
default?: R extends true
|
||||
? never
|
||||
: D extends Record<string, unknown> | Array<any>
|
||||
? () => D
|
||||
: (() => D) | D;
|
||||
? () => D
|
||||
: (() => D) | D;
|
||||
validator?: ((val: any) => val is C) | ((val: any) => boolean);
|
||||
};
|
||||
|
||||
@ -36,8 +36,8 @@ type _BuildPropType<T, V, C> =
|
||||
| (T extends PropWrapper<unknown>
|
||||
? T[typeof wrapperKey]
|
||||
: [V] extends [never]
|
||||
? ResolvePropTypeWithReadonly<T>
|
||||
: never)
|
||||
? ResolvePropTypeWithReadonly<T>
|
||||
: never)
|
||||
| V
|
||||
| C;
|
||||
export type BuildPropType<T, V, C> = _BuildPropType<
|
||||
@ -52,8 +52,8 @@ type _BuildPropDefault<T, D> = [T] extends [
|
||||
]
|
||||
? D
|
||||
: D extends () => T
|
||||
? ReturnType<D>
|
||||
: D;
|
||||
? ReturnType<D>
|
||||
: D;
|
||||
|
||||
export type BuildPropDefault<T, D, R> = R extends true
|
||||
? { readonly default?: undefined }
|
||||
@ -146,12 +146,12 @@ export const buildProps = <
|
||||
[K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any>
|
||||
? O[K]
|
||||
: [O[K]] extends NativePropType
|
||||
? O[K]
|
||||
: O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C>
|
||||
? D extends BuildPropType<T, V, C>
|
||||
? BuildPropOption<T, D, R, V, C>
|
||||
: never
|
||||
: never;
|
||||
? O[K]
|
||||
: O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C>
|
||||
? D extends BuildPropType<T, V, C>
|
||||
? BuildPropOption<T, D, R, V, C>
|
||||
: never
|
||||
: never;
|
||||
},
|
||||
>(
|
||||
props: O,
|
||||
@ -162,17 +162,17 @@ export const buildProps = <
|
||||
[K in keyof O]: O[K] extends { [propKey]: boolean }
|
||||
? O[K]
|
||||
: [O[K]] extends NativePropType
|
||||
? O[K]
|
||||
: O[K] extends BuildPropOption<
|
||||
infer T,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
infer _D,
|
||||
infer R,
|
||||
infer V,
|
||||
infer C
|
||||
>
|
||||
? BuildPropReturn<T, O[K]['default'], R, V, C>
|
||||
: never;
|
||||
? O[K]
|
||||
: O[K] extends BuildPropOption<
|
||||
infer T,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
infer _D,
|
||||
infer R,
|
||||
infer V,
|
||||
infer C
|
||||
>
|
||||
? BuildPropReturn<T, O[K]['default'], R, V, C>
|
||||
: never;
|
||||
};
|
||||
|
||||
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>;
|
||||
|
@ -66,11 +66,15 @@ export default {
|
||||
const showModal = (formConfig: IFormConfig) => {
|
||||
formConfig.schemas && formatRules(formConfig.schemas);
|
||||
state.visible = true;
|
||||
state.jsonData = formConfig;
|
||||
state.jsonData = formConfig as any;
|
||||
};
|
||||
|
||||
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 };
|
||||
|
@ -54,8 +54,8 @@
|
||||
schemas.length === 1
|
||||
? { component: '' }
|
||||
: schemas.length - 1 > index
|
||||
? schemas[index + 1]
|
||||
: schemas[index - 1];
|
||||
? schemas[index + 1]
|
||||
: schemas[index - 1];
|
||||
formDesignMethods.handleSetSelectItem(params);
|
||||
remove(schemas, index);
|
||||
return true;
|
||||
|
@ -43,7 +43,7 @@
|
||||
*/
|
||||
const showModal = (jsonData: IFormConfig) => {
|
||||
formatRules(jsonData.schemas);
|
||||
state.jsonData = jsonData;
|
||||
state.jsonData = jsonData as any;
|
||||
state.visible = true;
|
||||
};
|
||||
|
||||
|
@ -147,10 +147,10 @@
|
||||
item.componentProps = item.componentProps || {};
|
||||
item.itemProps = item.itemProps || {};
|
||||
});
|
||||
formConfig.value = config;
|
||||
formConfig.value = config as any;
|
||||
};
|
||||
// 获取历史记录,用于撤销和重构
|
||||
const historyReturn = useRefHistory(formConfig, {
|
||||
const historyReturn = useRefHistory(formConfig as any, {
|
||||
deep: true,
|
||||
capacity: 20,
|
||||
parse: (val: IFormConfig) => {
|
||||
@ -173,7 +173,7 @@
|
||||
* @param schema 当前选中的表单项
|
||||
*/
|
||||
const handleSetSelectItem = (schema: IVFormComponent) => {
|
||||
formConfig.value.currentItem = schema;
|
||||
formConfig.value.currentItem = schema as any;
|
||||
handleChangePropsTabs(
|
||||
schema.key ? (formConfig.value.activeKey! === 1 ? 2 : formConfig.value.activeKey!) : 1,
|
||||
);
|
||||
@ -210,7 +210,7 @@
|
||||
generateKey(formItem);
|
||||
if (!formConfig.value.currentItem?.key) {
|
||||
handleSetSelectItem(formItem);
|
||||
formConfig.value.schemas && formConfig.value.schemas.push(formItem);
|
||||
formConfig.value.schemas && formConfig.value.schemas.push(formItem as any);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -269,7 +269,7 @@
|
||||
});
|
||||
};
|
||||
if (formConfig.value.schemas) {
|
||||
traverse(formConfig.value.schemas);
|
||||
traverse(formConfig.value.schemas as any);
|
||||
}
|
||||
};
|
||||
|
||||
@ -316,7 +316,7 @@
|
||||
// provide('currentItem', formConfig.value.currentItem)
|
||||
|
||||
// 把表单配置项注入到子组件中,子组件可通过inject获取,获取到的数据为响应式
|
||||
provide<Ref<IFormConfig>>('formConfig', formConfig);
|
||||
provide<Ref<IFormConfig>>('formConfig', formConfig as any);
|
||||
|
||||
// 注入历史记录
|
||||
provide<UseRefHistoryReturn<any, any>>('historyReturn', historyReturn);
|
||||
|
@ -103,8 +103,7 @@
|
||||
.list-main {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
place-content: flex-start flex-start;
|
||||
|
||||
.layout-width {
|
||||
width: 100%;
|
||||
|
@ -66,8 +66,7 @@
|
||||
width: 100%;
|
||||
height: 85vh;
|
||||
margin-right: 10px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
overflow: hidden auto;
|
||||
}
|
||||
|
||||
.hint-box {
|
||||
|
@ -104,8 +104,7 @@
|
||||
|
||||
.operating-area {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
place-content: center space-between;
|
||||
height: @operating-area-height;
|
||||
padding: 0 12px;
|
||||
padding-left: 30px;
|
||||
|
@ -97,18 +97,18 @@
|
||||
labelCol = labelCol
|
||||
? labelCol
|
||||
: formConfig.layout === 'horizontal'
|
||||
? formConfig.labelLayout === 'flex'
|
||||
? { style: `width:${formConfig.labelWidth}px` }
|
||||
: formConfig.labelCol
|
||||
: {};
|
||||
? formConfig.labelLayout === 'flex'
|
||||
? { style: `width:${formConfig.labelWidth}px` }
|
||||
: formConfig.labelCol
|
||||
: {};
|
||||
|
||||
wrapperCol = wrapperCol
|
||||
? wrapperCol
|
||||
: formConfig.layout === 'horizontal'
|
||||
? formConfig.labelLayout === 'flex'
|
||||
? { style: 'width:auto;flex:1' }
|
||||
: formConfig.wrapperCol
|
||||
: {};
|
||||
? formConfig.labelLayout === 'flex'
|
||||
? { style: 'width:auto;flex:1' }
|
||||
: formConfig.wrapperCol
|
||||
: {};
|
||||
|
||||
const style =
|
||||
formConfig.layout === 'horizontal' && formConfig.labelLayout === 'flex'
|
||||
|
@ -14,7 +14,7 @@
|
||||
:width="900"
|
||||
>
|
||||
<VFormCreate
|
||||
:form-config="formConfig"
|
||||
:form-config="formConfig as any"
|
||||
v-model:fApi="fApi"
|
||||
v-model:formModel="formModel"
|
||||
@submit="onSubmit"
|
||||
@ -65,7 +65,7 @@
|
||||
const showModal = (jsonData: IFormConfig) => {
|
||||
// console.log('showModal-', jsonData);
|
||||
formatRules(jsonData.schemas);
|
||||
state.formConfig = jsonData;
|
||||
state.formConfig = jsonData as any;
|
||||
state.visible = true;
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
* @param jsonData
|
||||
*/
|
||||
const showModal = (jsonData: IFormConfig) => {
|
||||
state.formConfig = jsonData;
|
||||
state.formConfig = jsonData as any;
|
||||
state.visible = true;
|
||||
};
|
||||
|
||||
|
@ -16,12 +16,12 @@ export function getColumns(): BasicColumn[] {
|
||||
text === ErrorTypeEnum.VUE
|
||||
? 'green'
|
||||
: text === ErrorTypeEnum.RESOURCE
|
||||
? 'cyan'
|
||||
: text === ErrorTypeEnum.PROMISE
|
||||
? 'blue'
|
||||
: ErrorTypeEnum.AJAX
|
||||
? 'red'
|
||||
: 'purple';
|
||||
? 'cyan'
|
||||
: text === ErrorTypeEnum.PROMISE
|
||||
? 'blue'
|
||||
: ErrorTypeEnum.AJAX
|
||||
? 'red'
|
||||
: 'purple';
|
||||
return <Tag color={color}>{() => text}</Tag>;
|
||||
},
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<transition>
|
||||
<div :class="prefixCls">
|
||||
<div :class="prefixCls" v-if="true">
|
||||
<Login sessionTimeout />
|
||||
</div>
|
||||
</transition>
|
||||
|
Loading…
Reference in New Issue
Block a user