-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Bug]: dslGenerate(schema, componentsMap); 包含无用代码 import { p, span } from 'undefined' #17
Comments
Title: 🐛 [Bug]: dslGenerate(schema, componentsMap); contains useless code import { p, span } from 'undefined' Environmentchrome Version18.17.0 Versionlatest Link to minimal reproductiondslGenerate(schema, componentsMap); Step to reproduceschema: componentsMap: What is expectedNo response What is actually happeningNo response Any additional comments (optional)No response |
Environment
chrome
Version
18.17.0
Version
latest
Link to minimal reproduction
dslGenerate(schema, componentsMap);
Step to reproduce
schema:
{
"state": {},
"methods": {},
"componentName": "Page",
"css": ".page-vvhvn {\n color: #666666;\n margin: 0 10px;\n margin-top: 30px;\n}\n.page-vvhvn p {\n margin: 20px 0;\n font-size: 16px;\n}\n.page-vvhvn .bold,\np span {\n font-weight: bold;\n}\n",
"props": {
"className": "page-vvhvn"
},
"lifeCycles": {},
"children": [
{
"componentName": "GlobalHeader",
"props": {
"title": "123"
},
"children": [
{
"componentName": "Text",
"props": {
"text": "次级导航头"
}
}
],
"id": "b46d2629"
},
{
"componentName": "p",
"props": {},
"children": "活动期间,下载并安装“APP”\n,进入APP首页后,找到活动入口,点击进入后即可参加活动,具体规则如下:",
"id": "5243c744"
},
{
"componentName": "div",
"props": {},
"id": "66643684",
"children": [
{
"componentName": "Text",
"props": {
"text": " 本次818理财节活动时间为 "
},
"id": "42252454"
},
{
"componentName": "Text",
"props": {
"text": " 2022年8月15日-2022年8月26日",
"className": "bold"
},
"id": "44f64635"
}
]
},
{
"componentName": "p",
"props": {},
"children": " 1.做任务获得积分红包赢取转盘抽奖,集满50分即可获得一次转盘抽奖机会。新用户请用注册手机号开户并使用开立的资金账号才能获取活动的积分红包,已完成任务的用户可直接领取对应积分红包,其中,邀请好友参与转盘活动,被邀请人需要满足之前未参与过该活动,才能获得对应积分。\n",
"id": "f96365f2"
},
{
"componentName": "p",
"props": {},
"children": "2.定时财富红包:每天登陆即领积分,时间段为9:00-9:30,13:00-13:30,每个时间段最多只能领取一次。财富值范围5-10分随机。\n",
"id": "7da56d45"
},
{
"componentName": "p",
"props": {},
"children": "3.奖励领取规则:抽中福利理财产品(6.18%收益凭证、6.66%报价回购)购买资格限当天使用,过期未使用则作废,产品可能提前售罄无法购买成功。抽中折扣优惠券无使用时间限制,其中“投顾福利折扣”可叠加使用,“申购一折”不可叠加,可重复使用;抽中答题赢幸运福袋、礼包机会在答对问题后三个工作日内联系所在营业部留下寄送地址,过期视为放弃领奖。\n",
"id": "26345235"
},
{
"componentName": "p",
"props": {},
"children": "*答题赢礼包内容为随机抽取,请以页面提示为准。",
"id": "53634d65"
}
],
"dataSource": {
"list": []
},
"utils": [],
"bridge": [],
"inputs": [],
"outputs": [],
"fileName": "Rule"
}
componentsMap:
[
{ componentName: 'a', main: 'components' },
{ componentName: 'button', main: 'components' },
{ componentName: 'form', main: 'components' },
{ componentName: 'h1,h2,h3,h4,h5,h6', main: 'components' },
{ componentName: 'Img', main: 'components' },
{ componentName: 'input', main: 'components' },
{ componentName: 'label', main: 'components' },
{ componentName: 'p', main: 'components' },
{ componentName: 'table', main: 'components' },
{ componentName: 'td', main: 'components' },
{ componentName: 'video', main: 'components' },
{ componentName: 'span', main: 'components' },
{
componentName: 'TinyForm',
package: '@opentiny/vue',
exportName: 'Form',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyFormItem',
package: '@opentiny/vue',
exportName: 'FormItem',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyButton',
package: '@opentiny/vue',
exportName: 'Button',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyInput',
package: '@opentiny/vue',
exportName: 'Button',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinySwitch',
package: '@opentiny/vue',
exportName: 'Switch',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyRadio',
package: '@opentiny/vue',
exportName: 'Radio',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyRow',
package: '@opentiny/vue',
exportName: 'Row',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyPopover',
package: '@opentiny/vue',
exportName: 'Popover',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyTooltip',
package: '@opentiny/vue',
exportName: 'Tooltip',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyTimeLine',
package: '@opentiny/vue',
exportName: 'TimeLine',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyTree',
package: '@opentiny/vue',
exportName: 'Tree',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyPopeditor',
package: '@opentiny/vue',
exportName: 'Popeditor',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyPager',
package: '@opentiny/vue',
exportName: 'Pager',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCol',
package: '@opentiny/vue',
exportName: 'Col',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyGrid',
package: '@opentiny/vue',
exportName: 'Grid',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinySelect',
package: '@opentiny/vue',
exportName: 'Select',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinySearch',
package: '@opentiny/vue',
exportName: 'Search',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCheckbox',
package: '@opentiny/vue',
exportName: 'Checkbox',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyDialogBox',
package: '@opentiny/vue',
exportName: 'DialogBox',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyTabs',
package: '@opentiny/vue',
exportName: 'Tabs',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyTabItem',
package: '@opentiny/vue',
exportName: 'TabItem',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCollapse',
package: '@opentiny/vue',
exportName: 'Collapse',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCollapseItem',
package: '@opentiny/vue',
exportName: 'CollapseItem',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCheckboxButton',
package: '@opentiny/vue',
exportName: 'CheckboxButton',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCheckboxGroup',
package: '@opentiny/vue',
exportName: 'CheckboxGroup',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCarousel',
package: '@opentiny/vue',
exportName: 'Carousel',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'TinyCarouselItem',
package: '@opentiny/vue',
exportName: 'CarouselItem',
destructuring: true,
version: '3.11.2'
},
{
componentName: 'ElButton',
package: 'element-plus',
exportName: 'ElButton',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'ElForm',
package: 'element-plus',
exportName: 'ElForm',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'ElFormItem',
package: 'element-plus',
exportName: 'ElFormItem',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'ElInput',
package: 'element-plus',
exportName: 'ElInput',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'ElTable',
package: 'element-plus',
exportName: 'ElTable',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'ElTableColumn',
package: 'element-plus',
exportName: 'ElTableColumn',
destructuring: undefined,
version: '2.4.2'
},
{
componentName: 'TinyBreadcrumb',
package: '@opentiny/vue',
exportName: 'Select',
destructuring: true,
version: ''
},
{
componentName: 'TinyBreadcrumbItem',
package: '@opentiny/vue',
exportName: 'BreadcrumbItem',
destructuring: true,
version: ''
},
{
componentName: 'TinyButtonGroup',
package: '@opentiny/vue',
exportName: 'ButtonGroup',
destructuring: true,
version: ''
},
{
componentName: 'MuHeader',
package: 'mumu2-ui',
exportName: 'Header',
destructuring: undefined,
version: '0.3.0'
},
{
componentName: 'mu-header',
package: 'mumu2-ui',
exportName: 'mu-header',
destructuring: undefined,
version: '0.1.0'
},
{
componentName: 'Header',
package: 'ms-ui-lib',
exportName: 'MsHeader',
destructuring: undefined,
version: '0.1.0'
},
{
componentName: 'MsHeader',
package: 'ms-ui-lib',
exportName: 'Header',
destructuring: undefined,
version: '0.8.4'
},
{
componentName: 'BigWheel',
package: 'ms-ui-lib',
exportName: 'BigWheel',
destructuring: undefined,
version: '0.8.8'
},
{
componentName: 'Marquee',
package: 'ms-ui-lib',
exportName: 'Marquee',
destructuring: undefined,
version: '0.8.1'
},
{
componentName: 'NineSquare',
package: 'ms-ui-lib',
exportName: 'NineSquare',
destructuring: undefined,
version: '0.8.2'
},
{
componentName: 'SlotMachine',
package: 'ms-ui-lib',
exportName: 'SlotMachine',
destructuring: undefined,
version: '0.8.2'
},
{
componentName: 'Launch',
package: 'ms-ui-lib',
exportName: 'MsLaunch',
destructuring: undefined,
version: '0.6.0'
},
{
componentName: 'ScoreTaskList',
package: 'ms-ui-lib',
exportName: 'ScoreTaskList',
destructuring: undefined,
version: '0.8.2'
},
{
componentName: 'MsLaunch',
package: 'ms-ui-lib',
exportName: 'Launch',
destructuring: undefined,
version: '0.8.1'
},
{
componentName: 'GlobalHeader',
package: 'ms-ui-lib',
exportName: 'GlobalHeader',
destructuring: undefined,
version: '0.8.2'
},
{
componentName: 'CredentialAward',
package: 'ms-ui-lib',
exportName: 'CredentialAward',
destructuring: undefined,
version: '0.8.1'
},
{
componentName: 'EtfHot',
package: 'ms-ui-lib',
exportName: 'EtfHot',
destructuring: undefined,
version: '0.8.2'
},
{ componentName: 'MyAward', main: 'views' },
{ componentName: 'Index', main: 'views' },
{ componentName: 'Rule', main: 'views' }
]
What is expected
No response
What is actually happening
No response
Any additional comments (optional)
No response
The text was updated successfully, but these errors were encountered: