🐛 [Bug]: 无法加载第三方组件
Closed this issue · 13 comments
w990752800 commented
Environment
dev
Version
20
Version
latest
Link to minimal reproduction
{
"id": 1,
"version": "4.1.2",
"name": {
"zh_CN": "antdv按钮"
},
"component": "AntdVButton",
"icon": "button",
"description": "常用的操作按钮",
"doc_url": "",
"screenshot": "",
"tags": "",
"keywords": "",
"dev_mode": "proCode",
"npm": {
"package": "ant-design-vue",
"version": "4.1.2",
"script": "https://unpkg.com/ant-design-vue@4.1.2/dist/antd.esm.js",
"css": "https://unpkg.com/ant-design-vue@4.1.2/dist/reset.css",
"dependencies": null,
"destructuring": true,
"exportName": "AButton"
},
"group": "基础组件",
"category": "ant-design-vue",
"configure": {
"loop": true,
"condition": true,
"styles": true,
"isContainer": false,
"isModal": false,
"isPopper": false,
"nestingRule": {
"childWhitelist": "",
"parentWhitelist": "",
"descendantBlacklist": "",
"ancestorWhitelist": ""
},
"isNullNode": false,
"isLayout": false,
"rootSelector": "",
"shortcuts": {
"properties": [
"type",
"size"
]
},
"contextMenu": {
"actions": [
"copy",
"remove",
"insert",
"updateAttr",
"bindEevent",
"createBlock"
],
"disable": []
},
"invalidity": [
""
],
"clickCapture": true,
"framework": "Vue"
},
"schema": {
"properties": [
{
"name": "0",
"label": {
"zh_CN": "基础属性"
},
"content": [
{
"property": "size",
"label": {
"text": {
"zh_CN": "size"
}
},
"description": {
"zh_CN": "尺寸"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"defaultValue": "default",
"widget": {
"component": "MetaSelect",
"props": {
"options": [
{
"label": "large",
"value": "large"
},
{
"label": "default",
"value": "default"
},
{
"label": "small",
"value": "small"
}
]
}
}
},
{
"property": "type",
"label": {
"text": {
"zh_CN": "type"
}
},
"description": {
"zh_CN": "类型"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaInput",
"props": {}
}
},
{
"property": "plain",
"label": {
"text": {
"zh_CN": "plain"
}
},
"description": {
"zh_CN": "是否为朴素按钮"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "text",
"label": {
"text": {
"zh_CN": "text"
}
},
"description": {
"zh_CN": "是否为文字按钮"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "bg",
"label": {
"text": {
"zh_CN": "bg"
}
},
"description": {
"zh_CN": "是否显示文字按钮背景颜色"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "link",
"label": {
"text": {
"zh_CN": "link"
}
},
"description": {
"zh_CN": "是否为链接按钮"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "round",
"label": {
"text": {
"zh_CN": "round"
}
},
"description": {
"zh_CN": "是否为圆角按钮"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "circle",
"label": {
"text": {
"zh_CN": "circle"
}
},
"description": {
"zh_CN": "是否为圆形按钮"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "loading",
"label": {
"text": {
"zh_CN": "loading"
}
},
"description": {
"zh_CN": "是否为加载中状态"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
},
{
"property": "disabled",
"label": {
"text": {
"zh_CN": "disabled"
}
},
"description": {
"zh_CN": "是否禁用"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"defaultValue": false,
"type": "boolean",
"widget": {
"component": "MetaSwitch",
"props": {}
},
"device": []
}
],
"description": {
"zh_CN": ""
}
}
],
"events": {},
"slots": {
"default": {
"label": {
"zh_CN": "default"
},
"description": {
"zh_CN": "自定义默认内容"
}
},
"loading": {
"label": {
"zh_CN": "loading"
},
"description": {
"zh_CN": "自定义加载中组件"
}
}
}
},
"snippets": [
{
"name": {
"zh_CN": "按钮"
},
"icon": "button",
"screenshot": "",
"snippetName": "AButton",
"schema": {
"children": [
{
"componentName": "Text",
"props": {
"text": "按钮文本"
}
}
]
}
}
]
}
Step to reproduce
第三方组件导入
What is expected
No response
What is actually happening
No response
What is your project name
最新项目
Any additional comments (optional)
No response
Issues-translate-bot commented
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]:
w990752800 commented
yaoyun8 commented
@w990752800 组件名称未对应
snippetName要对应组件componentName
yaoyun8 commented
w990752800 commented
不会报错了,但是没有正确加载 antdv 的 按钮
Issues-translate-bot commented
Bot detected the issue body's language is not English, translate it automatically.
No error will be reported, but the button of antdv is not loaded correctly.
w990752800 commented
你用我上面的json试一试
Issues-translate-bot commented
Bot detected the issue body's language is not English, translate it automatically.
You can try it with my json above
w990752800 commented
w990752800 commented
w990752800 commented
Issues-translate-bot commented
yaoyun8 commented
@w990752800 这个包没有这个导出名称,改为Button