lowcode-engine 官网 demo 设计态变成渲染态了

kyxcudwk  于 9个月前  发布在  其他
关注(0)|答案(5)|浏览(147)
  1. 打开 https://lowcode-engine.cn/demo/demo-general/index.html
  2. 点击查询
  3. 查询按钮没了
  4. 预期:查询按钮不变,右边属性面板展示相关配置
ws51t4hk

ws51t4hk1#

把你用的schema贴一下,那个是存在你本地的,点击设计器左下角 ... 可以看到

ws51t4hk

ws51t4hk2#

把你用的schema贴一下,那个是存在你本地的,点击设计器左下角 ... 可以看到
@JackLian

  1. {
  2. "version": "1.0.0",
  3. "componentsMap": [
  4. {
  5. "package": "@alifd/next",
  6. "version": "1.25.23",
  7. "exportName": "Input",
  8. "main": "",
  9. "destructuring": true,
  10. "subName": "",
  11. "componentName": "Input"
  12. },
  13. {
  14. "package": "@alifd/next",
  15. "version": "1.25.23",
  16. "exportName": "Form",
  17. "main": "",
  18. "destructuring": true,
  19. "subName": "Item",
  20. "componentName": "Form.Item"
  21. },
  22. {
  23. "package": "@alifd/next",
  24. "version": "1.25.23",
  25. "exportName": "Input",
  26. "main": "",
  27. "destructuring": true,
  28. "subName": "Password",
  29. "componentName": "Input.Password"
  30. },
  31. {
  32. "package": "@alifd/next",
  33. "version": "1.25.23",
  34. "exportName": "Form",
  35. "main": "",
  36. "destructuring": true,
  37. "subName": "Submit",
  38. "componentName": "Form.Submit"
  39. },
  40. {
  41. "package": "@alifd/next",
  42. "version": "1.25.23",
  43. "exportName": "Form",
  44. "main": "",
  45. "destructuring": true,
  46. "subName": "Reset",
  47. "componentName": "Form.Reset"
  48. },
  49. {
  50. "package": "@alifd/next",
  51. "version": "1.25.23",
  52. "exportName": "Form",
  53. "main": "",
  54. "destructuring": true,
  55. "subName": "",
  56. "componentName": "Form"
  57. },
  58. {
  59. "package": "@alifd/fusion-ui",
  60. "version": "2.0.2",
  61. "exportName": "ProTable",
  62. "main": "lib/index.js",
  63. "destructuring": true,
  64. "subName": "",
  65. "componentName": "ProTable"
  66. },
  67. {
  68. "package": "@alifd/layout",
  69. "version": "2.4.1",
  70. "exportName": "Cell",
  71. "main": "lib/index.js",
  72. "destructuring": true,
  73. "subName": "",
  74. "componentName": "FDCell"
  75. },
  76. {
  77. "package": "@alifd/layout",
  78. "version": "2.4.1",
  79. "exportName": "Block",
  80. "main": "lib/index.js",
  81. "destructuring": true,
  82. "subName": "",
  83. "componentName": "FDBlock"
  84. },
  85. {
  86. "package": "@alifd/layout",
  87. "version": "2.4.1",
  88. "exportName": "Section",
  89. "main": "lib/index.js",
  90. "destructuring": true,
  91. "subName": "",
  92. "componentName": "FDSection"
  93. },
  94. {
  95. "package": "@alifd/layout",
  96. "version": "2.4.1",
  97. "exportName": "Page",
  98. "main": "lib/index.js",
  99. "destructuring": true,
  100. "componentName": "FDPage"
  101. },
  102. {
  103. "devMode": "lowCode",
  104. "componentName": "Page"
  105. }
  106. ],
  107. "componentsTree": [
  108. {
  109. "componentName": "Page",
  110. "id": "node_dockcviv8fo1",
  111. "props": {
  112. "ref": "outerView",
  113. "style": {
  114. "height": "100%"
  115. }
  116. },
  117. "docId": "doclaqkk3b9",
  118. "fileName": "/",
  119. "dataSource": {
  120. "list": [
  121. {
  122. "type": "fetch",
  123. "isInit": true,
  124. "options": {
  125. "params": {
  126. "q": {
  127. "type": "JSExpression",
  128. "value": "this.state.text"
  129. }
  130. },
  131. "method": "GET",
  132. "isCors": true,
  133. "timeout": 5000,
  134. "headers": {},
  135. "uri": "mock/info.json"
  136. },
  137. "id": "info",
  138. "shouldFetch": {
  139. "type": "JSFunction",
  140. "value": "function() { \n console.log('should fetch.....');\n return true; \n}"
  141. }
  142. },
  143. {
  144. "type": "fetch",
  145. "isInit": true,
  146. "options": {
  147. "params": {},
  148. "method": "GET",
  149. "isCors": true,
  150. "timeout": 5000,
  151. "headers": {},
  152. "uri": "mock/info.json"
  153. },
  154. "id": "info1",
  155. "shouldFetch": {
  156. "type": "JSFunction",
  157. "value": "function() { \n console.log('should fetch.....');\n return true; \n}"
  158. }
  159. }
  160. ]
  161. },
  162. "state": {
  163. "text": {
  164. "type": "JSExpression",
  165. "value": "\"outer\""
  166. },
  167. "isShowDialog": {
  168. "type": "JSExpression",
  169. "value": "false"
  170. }
  171. },
  172. "css": "body {\n font-size: 12px;\n}\n\n.button {\n width: 100px;\n color: #ff00ff\n}",
  173. "lifeCycles": {
  174. "componentDidMount": {
  175. "type": "JSFunction",
  176. "value": "function componentDidMount() {\n console.log('did mount');\n}",
  177. "source": "function componentDidMount() {\n console.log('did mount');\n}"
  178. },
  179. "componentWillUnmount": {
  180. "type": "JSFunction",
  181. "value": "function componentWillUnmount() {\n console.log('will unmount');\n}",
  182. "source": "function componentWillUnmount() {\n console.log('will unmount');\n}"
  183. }
  184. },
  185. "methods": {
  186. "testFunc": {
  187. "type": "JSFunction",
  188. "value": "function testFunc(a) {\n console.log('test func', a);\n}",
  189. "source": "function testFunc(a) {\n console.log('test func', a);\n}"
  190. },
  191. "onClick": {
  192. "type": "JSFunction",
  193. "value": "function onClick() {\n this.setState({\n isShowDialog: true\n });\n}",
  194. "source": "function onClick() {\n this.setState({\n isShowDialog: true\n });\n}"
  195. },
  196. "closeDialog": {
  197. "type": "JSFunction",
  198. "value": "function closeDialog() {\n this.setState({\n isShowDialog: false\n });\n}",
  199. "source": "function closeDialog() {\n this.setState({\n isShowDialog: false\n });\n}"
  200. },
  201. "getHelloWorldText": {
  202. "type": "JSFunction",
  203. "value": "function getHelloWorldText() {\n return this.i18n('i18n-jwg27yo4');\n}",
  204. "source": "function getHelloWorldText() {\n return this.i18n('i18n-jwg27yo4');\n}"
  205. },
  206. "getHelloWorldText2": {
  207. "type": "JSFunction",
  208. "value": "function getHelloWorldText2() {\n return this.i18n('i18n-jwg27yo3', {\n name: '絮黎'\n });\n}",
  209. "source": "function getHelloWorldText2() {\n return this.i18n('i18n-jwg27yo3', {\n name: '絮黎'\n });\n}"
  210. },
  211. "onTestConstantsButtonClicked": {
  212. "type": "JSFunction",
  213. "value": "function onTestConstantsButtonClicked() {\n console.log('constants.ConstantA:', this.constants.ConstantA);\n console.log('constants.ConstantB:', this.constants.ConstantB);\n}",
  214. "source": "function onTestConstantsButtonClicked() {\n console.log('constants.ConstantA:', this.constants.ConstantA);\n console.log('constants.ConstantB:', this.constants.ConstantB);\n}"
  215. },
  216. "onTestUtilsButtonClicked": {
  217. "type": "JSFunction",
  218. "value": "function onTestUtilsButtonClicked() {\n this.utils.demoUtil('param1', 'param2');\n}",
  219. "source": "function onTestUtilsButtonClicked() {\n this.utils.demoUtil('param1', 'param2');\n}"
  220. }
  221. },
  222. "originCode": "class LowcodeComponent extends Component {\n state = {\n \"text\": \"outer\",\n \"isShowDialog\": false\n }\n componentDidMount() {\n console.log('did mount');\n }\n componentWillUnmount() {\n console.log('will unmount');\n }\n testFunc(a) {\n console.log('test func', a);\n }\n onClick() {\n this.setState({\n isShowDialog: true\n });\n }\n closeDialog() {\n this.setState({\n isShowDialog: false\n });\n }\n getHelloWorldText() {\n return this.i18n('i18n-jwg27yo4');\n }\n getHelloWorldText2() {\n return this.i18n('i18n-jwg27yo3', {\n name: '絮黎',\n });\n }\n onTestConstantsButtonClicked() {\n console.log('constants.ConstantA:', this.constants.ConstantA);\n console.log('constants.ConstantB:', this.constants.ConstantB);\n\t}\n\tonTestUtilsButtonClicked(){\n this.utils.demoUtil('param1', 'param2');\n\t}\n}",
  223. "hidden": false,
  224. "title": "",
  225. "isLocked": false,
  226. "condition": true,
  227. "conditionGroup": "",
  228. "children": [
  229. {
  230. "componentName": "Form",
  231. "id": "node_oclivic1ti1d",
  232. "props": {
  233. "labelCol": {
  234. "span": 2
  235. },
  236. "wrapperCol": {
  237. "span": 14
  238. },
  239. "labelAlign": "left",
  240. "__events": {
  241. "eventDataList": [
  242. {
  243. "type": "componentEvent",
  244. "name": "onSubmit",
  245. "relatedEventName": "onClick"
  246. }
  247. ],
  248. "eventList": [
  249. {
  250. "name": "saveField",
  251. "disabled": false
  252. },
  253. {
  254. "name": "onSubmit",
  255. "disabled": true
  256. },
  257. {
  258. "name": "onChange",
  259. "disabled": false
  260. }
  261. ]
  262. },
  263. "onSubmit": {
  264. "type": "JSFunction",
  265. "value": "function(){return this.onClick.apply(this,Array.prototype.slice.call(arguments).concat([])) }"
  266. }
  267. },
  268. "hidden": false,
  269. "title": "",
  270. "isLocked": false,
  271. "condition": true,
  272. "conditionGroup": "",
  273. "children": [
  274. {
  275. "componentName": "Form.Item",
  276. "id": "node_oclivic1ti1e",
  277. "props": {
  278. "label": "Email: ",
  279. "required": true
  280. },
  281. "hidden": false,
  282. "title": "",
  283. "isLocked": false,
  284. "condition": true,
  285. "conditionGroup": "",
  286. "children": [
  287. {
  288. "componentName": "Input",
  289. "id": "node_oclivic1ti1f",
  290. "props": {
  291. "name": "email",
  292. "size": "medium",
  293. "placeholder": "用户名"
  294. },
  295. "hidden": false,
  296. "title": "",
  297. "isLocked": false,
  298. "condition": true,
  299. "conditionGroup": ""
  300. }
  301. ]
  302. },
  303. {
  304. "componentName": "Form.Item",
  305. "id": "node_oclivic1ti1g",
  306. "props": {
  307. "label": "Password: ",
  308. "required": true
  309. },
  310. "hidden": false,
  311. "title": "",
  312. "isLocked": false,
  313. "condition": true,
  314. "conditionGroup": "",
  315. "children": [
  316. {
  317. "componentName": "Input.Password",
  318. "id": "node_oclivic1ti1h",
  319. "props": {
  320. "name": "password",
  321. "placeholder": "请输入密码",
  322. "size": "medium"
  323. },
  324. "hidden": false,
  325. "title": "",
  326. "isLocked": false,
  327. "condition": true,
  328. "conditionGroup": ""
  329. }
  330. ]
  331. },
  332. {
  333. "componentName": "Form.Item",
  334. "id": "node_oclivic1ti1i",
  335. "props": {
  336. "label": "\b"
  337. },
  338. "hidden": false,
  339. "title": "",
  340. "isLocked": false,
  341. "condition": true,
  342. "conditionGroup": "",
  343. "children": [
  344. {
  345. "componentName": "Form.Submit",
  346. "id": "node_oclivic1ti1j",
  347. "props": {
  348. "type": "primary",
  349. "validate": true,
  350. "children": "Submit"
  351. },
  352. "hidden": false,
  353. "title": "",
  354. "isLocked": false,
  355. "condition": true,
  356. "conditionGroup": ""
  357. },
  358. {
  359. "componentName": "Form.Reset",
  360. "id": "node_oclivic1ti1k",
  361. "props": {
  362. "style": {
  363. "marginLeft": 10
  364. },
  365. "children": "Reset"
  366. },
  367. "hidden": false,
  368. "title": "",
  369. "isLocked": false,
  370. "condition": true,
  371. "conditionGroup": ""
  372. }
  373. ]
  374. }
  375. ]
  376. },
  377. {
  378. "componentName": "FDPage",
  379. "id": "node_oclfjpfqjy5",
  380. "props": {
  381. "contentProps": {
  382. "style": {
  383. "background": "rgba(255,255,255,0)"
  384. }
  385. },
  386. "ref": "fdpage-bb43fbb0"
  387. },
  388. "title": "页面",
  389. "hidden": false,
  390. "isLocked": false,
  391. "condition": true,
  392. "conditionGroup": "",
  393. "children": [
  394. {
  395. "componentName": "FDSection",
  396. "id": "node_oclivibrn919",
  397. "props": {},
  398. "title": "区域",
  399. "hidden": false,
  400. "isLocked": false,
  401. "condition": true,
  402. "conditionGroup": "",
  403. "children": [
  404. {
  405. "componentName": "FDBlock",
  406. "id": "node_oclivibrn91a",
  407. "props": {
  408. "span": 12
  409. },
  410. "title": "区块",
  411. "hidden": false,
  412. "isLocked": false,
  413. "condition": true,
  414. "conditionGroup": "",
  415. "children": [
  416. {
  417. "componentName": "FDCell",
  418. "id": "node_oclivibrn91b",
  419. "props": {},
  420. "title": "容器",
  421. "hidden": false,
  422. "isLocked": false,
  423. "condition": true,
  424. "conditionGroup": "",
  425. "children": [
  426. {
  427. "componentName": "ProTable",
  428. "id": "node_oclivic9k01u",
  429. "props": {
  430. "dataSource": [
  431. {
  432. "id": "id-2f5DdE2b-0",
  433. "date": "2013-06-12",
  434. "percent": 1.862,
  435. "documentAmount": 2022,
  436. "currency": "CNY",
  437. "company": "支付宝科技有限公司"
  438. },
  439. {
  440. "id": "id-2f5DdE2b-1",
  441. "date": "2013-06-12",
  442. "percent": 1.862,
  443. "documentAmount": 2022,
  444. "currency": "CNY",
  445. "company": "支付宝科技有限公司"
  446. }
  447. ],
  448. "actionColumnButtons": {
  449. "dataSource": [
  450. {
  451. "children": "查看",
  452. "type": "primary"
  453. },
  454. {
  455. "children": "编辑",
  456. "type": "primary",
  457. "disabled": true
  458. },
  459. {
  460. "children": "删除",
  461. "type": "primary"
  462. }
  463. ],
  464. "text": true,
  465. "visibleButtonCount": 3
  466. },
  467. "actionBarButtons": {
  468. "dataSource": [
  469. {
  470. "type": "primary",
  471. "children": "操作一"
  472. },
  473. {
  474. "type": "normal",
  475. "children": "操作二"
  476. }
  477. ],
  478. "visibleButtonCount": 3
  479. },
  480. "paginationProps": {
  481. "pageSize": 5,
  482. "current": 1,
  483. "hidden": false,
  484. "total": 100
  485. },
  486. "settingButtons": true,
  487. "columns": [
  488. {
  489. "title": "公司",
  490. "dataIndex": "company",
  491. "width": 160,
  492. "formatType": "link",
  493. "searchable": true
  494. },
  495. {
  496. "title": "单据金额",
  497. "dataIndex": "documentAmount",
  498. "formatType": "money"
  499. },
  500. {
  501. "title": "币种",
  502. "dataIndex": "currency",
  503. "formatType": "currency",
  504. "filters": [
  505. {
  506. "label": "CNY",
  507. "value": "CNY"
  508. },
  509. {
  510. "label": "USD",
  511. "value": "USD"
  512. },
  513. {
  514. "label": "JPY",
  515. "value": "JPY"
  516. },
  517. {
  518. "label": "HKD",
  519. "value": "HKD"
  520. }
  521. ],
  522. "filterMode": "multiple",
  523. "explanation": "提示信息",
  524. "width": 110
  525. },
  526. {
  527. "title": "完成进度",
  528. "dataIndex": "percent",
  529. "formatType": "progress"
  530. },
  531. {
  532. "title": "到账日期",
  533. "dataIndex": "date",
  534. "formatType": "date"
  535. }
  536. ],
  537. "primaryKey": "id",
  538. "actionColumnProps": {
  539. "title": "操作"
  540. },
  541. "indexColumn": false,
  542. "hasBorder": false,
  543. "isZebra": false,
  544. "fixedHeader": false,
  545. "ref": "protable-344adc1e"
  546. },
  547. "hidden": false,
  548. "title": "",
  549. "isLocked": false,
  550. "condition": true,
  551. "conditionGroup": "",
  552. "loopArgs": [
  553. "",
  554. ""
  555. ]
  556. }
  557. ]
  558. }
  559. ]
  560. }
  561. ]
  562. }
  563. ]
  564. }
  565. ]
  566. }
  567. ],
  568. "i18n": {
  569. "zh-CN": {
  570. "i18n-jwg27yo4": "你好 ",
  571. "i18n-jwg27yo3": "{name} 博士"
  572. },
  573. "en-US": {
  574. "i18n-jwg27yo4": "Hello ",
  575. "i18n-jwg27yo3": "Doctor {name}"
  576. }
  577. }
  578. }
展开查看全部
huus2vyu

huus2vyu3#

无法复现,你录个屏看一下吧

zwghvu4y

zwghvu4y4#

无法复现,你录个屏看一下吧

已复现,我们查一下

waxmsbnn

waxmsbnn5#

@eternalsky 组件不可见的原因,跟这里 ghost 的配置有关系。

另外,点击两次提交按钮,按钮会刷新 iframe,这个问题也需要处理一下。

相关问题