You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR(vue-tsc) Type 'T' does not satisfy the constraint 'Record<string, any>'.
FILE /Users/liaoym/Desktop/work/316-frontend-phone/node_modules/ant-design-vue/es/_util/type.d.ts:60:44
Version
4.0.8
Environment
vue3.3.6
Reproduction link
https://antdv.com/docs/vue/introduce-cn
Steps to reproduce
<script setup lang="ts"> import { ref, computed, createVNode } from 'vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { Modal } from 'ant-design-vue'; const showConfirm = () => { Modal.confirm({ title: 'Do you Want to delete these items?', icon: createVNode(ExclamationCircleOutlined), content: createVNode('div', { style: 'color:red;' }, 'Some descriptions'), onOk() { console.log('OK'); }, onCancel() { console.log('Cancel'); }, class: 'test', }); }; </script>What is expected?
希望代码运行成功不报错
What is actually happening?
代码启动报错(tsc)
Property 'zoom' of type 'Zoom | readonly NonNullable<Zoom | undefined>[] | ((string & {}) | Globals | "normal" | "reset")[] | { value: Zoom | readonly NonNullable<Zoom | undefined>[] | ((string & {}) | ... 2 more ... | "reset")[] | undefined; skip_check: boolean; multi_value?: boolean | undefined; } | undefined' is not assignable to 'string' index type 'CSSInterpolation'.
FILE /xxx/node_modules/ant-design-vue/es/_util/cssinjs/hooks/useStyleRegister/index.d.ts:28:18
26 | export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation | Keyframes;
27 | export type CSSOthersObject = Record<string, CSSInterpolation>;
ERROR(vue-tsc) Type 'T' does not satisfy the constraint 'Record<string, any>'.
FILE /Users/liaoym/Desktop/work/316-frontend-phone/node_modules/ant-design-vue/es/_util/type.d.ts:60:44
58 | default: T;
59 | };
[vue-tsc] Found 826 errors. Watching for file changes.
package.json文件
{
"devDependencies": {
"@types/crypto-js": "^4.1.3",
"@types/js-cookie": "^3.0.5",
"@types/lodash": "^4.14.201",
"@types/node": "^20.8.7",
"@types/qs": "^6.9.10",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@vant/auto-import-resolver": "^1.0.2",
"@vitejs/plugin-vue": "^4.4.0",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.17.0",
"less": "^4.2.0",
"plop": "^4.0.0",
"postcss": "^8.4.31",
"postcss-preset-env": "^9.2.0",
"postcss-px-to-viewport": "^1.1.1",
"postcss-pxtorem": "^6.0.0",
"prettier": "^3.1.1",
"rollup-plugin-visualizer": "^5.10.0",
"sass": "^1.69.4",
"stylelint": "^15.11.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vue-tsc": "^1.8.19"
},
"dependencies": {
"@imengyu/vue3-context-menu": "^1.3.5",
"ant-design-vue": "4.x",
"axios": "^1.5.1",
"crypto-js": "^4.1.1",
"echarts": "^5.4.3",
"js-cookie": "^3.0.5",
"jsencrypt": "^3.3.2",
"lodash-es": "^4.17.21",
"num-tofixed": "^1.0.3",
"pinia": "^2.1.7",
"qs": "^6.11.2",
"tailwindcss": "^3.3.5",
"vant": "^4.7.2",
"vue": "^3.3.6",
"vue-router": "^4.2.5",
"vuedraggable": "^4.1.0"
}
}
The text was updated successfully, but these errors were encountered: