-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
2.1.1
Environment
2.1.1
Reproduction link
Steps to reproduce
https://2x.antdv.com/components/icon-cn参考Icon文档自定义 SVG 图标
What is expected?
无
What is actually happening?
我包的配置如下
{
"name": "testweb",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"serve": "vite preview"
},
"dependencies": {
"ant-design-vue": "^2.1.2",
"vue": "^3.0.5",
"vue-router": "^4.0.6",
"vuex": "^4.0.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.2.1",
"@vue/compiler-sfc": "^3.0.5",
"typescript": "^4.1.3",
"vite": "^2.1.5",
"vue-tsc": "^0.0.24"
}
}
import { defineComponent } from 'vue';
import Icon from '@ant-design/icons-vue';
import MessageSvg from 'path/to/message.svg'; // '*.svg' 文件的路径
export default defineComponent({
setup() {
return () => <Icon type={MessageSvg} />;
},
});
会提示错误Expected ">" but found "type"