comp.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. import type { AppRouteModule } from '/@/router/types';
  2. import { getParentLayout, LAYOUT } from '/@/router/constant';
  3. import { t } from '/@/hooks/web/useI18n';
  4. const comp: AppRouteModule = {
  5. path: '/comp',
  6. name: 'Comp',
  7. component: LAYOUT,
  8. redirect: '/comp/basic',
  9. meta: {
  10. orderNo: 30,
  11. icon: 'ion:layers-outline',
  12. title: t('routes.demo.comp.comp'),
  13. },
  14. children: [
  15. {
  16. path: 'basic',
  17. name: 'BasicDemo',
  18. component: () => import('/@/views/demo/comp/button/index.vue'),
  19. meta: {
  20. title: t('routes.demo.comp.basic'),
  21. },
  22. },
  23. {
  24. path: 'form',
  25. name: 'FormDemo',
  26. redirect: '/comp/form/basic',
  27. component: getParentLayout('FormDemo'),
  28. meta: {
  29. // icon: 'mdi:form-select',
  30. title: t('routes.demo.form.form'),
  31. },
  32. children: [
  33. {
  34. path: 'basic',
  35. name: 'FormBasicDemo',
  36. component: () => import('/@/views/demo/form/index.vue'),
  37. meta: {
  38. title: t('routes.demo.form.basic'),
  39. },
  40. },
  41. {
  42. path: 'useForm',
  43. name: 'UseFormDemo',
  44. component: () => import('/@/views/demo/form/UseForm.vue'),
  45. meta: {
  46. title: t('routes.demo.form.useForm'),
  47. },
  48. },
  49. {
  50. path: 'refForm',
  51. name: 'RefFormDemo',
  52. component: () => import('/@/views/demo/form/RefForm.vue'),
  53. meta: {
  54. title: t('routes.demo.form.refForm'),
  55. },
  56. },
  57. {
  58. path: 'advancedForm',
  59. name: 'AdvancedFormDemo',
  60. component: () => import('/@/views/demo/form/AdvancedForm.vue'),
  61. meta: {
  62. title: t('routes.demo.form.advancedForm'),
  63. },
  64. },
  65. {
  66. path: 'ruleForm',
  67. name: 'RuleFormDemo',
  68. component: () => import('/@/views/demo/form/RuleForm.vue'),
  69. meta: {
  70. title: t('routes.demo.form.ruleForm'),
  71. },
  72. },
  73. {
  74. path: 'dynamicForm',
  75. name: 'DynamicFormDemo',
  76. component: () => import('/@/views/demo/form/DynamicForm.vue'),
  77. meta: {
  78. title: t('routes.demo.form.dynamicForm'),
  79. },
  80. },
  81. {
  82. path: 'customerForm',
  83. name: 'CustomerFormDemo',
  84. component: () => import('/@/views/demo/form/CustomerForm.vue'),
  85. meta: {
  86. title: t('routes.demo.form.customerForm'),
  87. },
  88. },
  89. {
  90. path: 'appendForm',
  91. name: 'appendFormDemo',
  92. component: () => import('/@/views/demo/form/AppendForm.vue'),
  93. meta: {
  94. title: t('routes.demo.form.appendForm'),
  95. },
  96. },
  97. {
  98. path: 'tabsForm',
  99. name: 'tabsFormDemo',
  100. component: () => import('/@/views/demo/form/TabsForm.vue'),
  101. meta: {
  102. title: t('routes.demo.form.tabsForm'),
  103. },
  104. },
  105. ],
  106. },
  107. {
  108. path: 'table',
  109. name: 'TableDemo',
  110. redirect: '/comp/table/basic',
  111. component: getParentLayout('TableDemo'),
  112. meta: {
  113. // icon: 'carbon:table-split',
  114. title: t('routes.demo.table.table'),
  115. },
  116. children: [
  117. {
  118. path: 'basic',
  119. name: 'TableBasicDemo',
  120. component: () => import('/@/views/demo/table/Basic.vue'),
  121. meta: {
  122. title: t('routes.demo.table.basic'),
  123. },
  124. },
  125. {
  126. path: 'treeTable',
  127. name: 'TreeTableDemo',
  128. component: () => import('/@/views/demo/table/TreeTable.vue'),
  129. meta: {
  130. title: t('routes.demo.table.treeTable'),
  131. },
  132. },
  133. {
  134. path: 'fetchTable',
  135. name: 'FetchTableDemo',
  136. component: () => import('/@/views/demo/table/FetchTable.vue'),
  137. meta: {
  138. title: t('routes.demo.table.fetchTable'),
  139. },
  140. },
  141. {
  142. path: 'fixedColumn',
  143. name: 'FixedColumnDemo',
  144. component: () => import('/@/views/demo/table/FixedColumn.vue'),
  145. meta: {
  146. title: t('routes.demo.table.fixedColumn'),
  147. },
  148. },
  149. {
  150. path: 'customerCell',
  151. name: 'CustomerCellDemo',
  152. component: () => import('/@/views/demo/table/CustomerCell.vue'),
  153. meta: {
  154. title: t('routes.demo.table.customerCell'),
  155. },
  156. },
  157. {
  158. path: 'formTable',
  159. name: 'FormTableDemo',
  160. component: () => import('/@/views/demo/table/FormTable.vue'),
  161. meta: {
  162. title: t('routes.demo.table.formTable'),
  163. },
  164. },
  165. {
  166. path: 'useTable',
  167. name: 'UseTableDemo',
  168. component: () => import('/@/views/demo/table/UseTable.vue'),
  169. meta: {
  170. title: t('routes.demo.table.useTable'),
  171. },
  172. },
  173. {
  174. path: 'refTable',
  175. name: 'RefTableDemo',
  176. component: () => import('/@/views/demo/table/RefTable.vue'),
  177. meta: {
  178. title: t('routes.demo.table.refTable'),
  179. },
  180. },
  181. {
  182. path: 'multipleHeader',
  183. name: 'MultipleHeaderDemo',
  184. component: () => import('/@/views/demo/table/MultipleHeader.vue'),
  185. meta: {
  186. title: t('routes.demo.table.multipleHeader'),
  187. },
  188. },
  189. {
  190. path: 'mergeHeader',
  191. name: 'MergeHeaderDemo',
  192. component: () => import('/@/views/demo/table/MergeHeader.vue'),
  193. meta: {
  194. title: t('routes.demo.table.mergeHeader'),
  195. },
  196. },
  197. {
  198. path: 'expandTable',
  199. name: 'ExpandTableDemo',
  200. component: () => import('/@/views/demo/table/ExpandTable.vue'),
  201. meta: {
  202. title: t('routes.demo.table.expandTable'),
  203. },
  204. },
  205. {
  206. path: 'fixedHeight',
  207. name: 'FixedHeightDemo',
  208. component: () => import('/@/views/demo/table/FixedHeight.vue'),
  209. meta: {
  210. title: t('routes.demo.table.fixedHeight'),
  211. },
  212. },
  213. {
  214. path: 'footerTable',
  215. name: 'FooterTableDemo',
  216. component: () => import('/@/views/demo/table/FooterTable.vue'),
  217. meta: {
  218. title: t('routes.demo.table.footerTable'),
  219. },
  220. },
  221. {
  222. path: 'editCellTable',
  223. name: 'EditCellTableDemo',
  224. component: () => import('/@/views/demo/table/EditCellTable.vue'),
  225. meta: {
  226. title: t('routes.demo.table.editCellTable'),
  227. },
  228. },
  229. {
  230. path: 'editRowTable',
  231. name: 'EditRowTableDemo',
  232. component: () => import('/@/views/demo/table/EditRowTable.vue'),
  233. meta: {
  234. title: t('routes.demo.table.editRowTable'),
  235. },
  236. },
  237. {
  238. path: 'authColumn',
  239. name: 'AuthColumnDemo',
  240. component: () => import('/@/views/demo/table/AuthColumn.vue'),
  241. meta: {
  242. title: t('routes.demo.table.authColumn'),
  243. },
  244. },
  245. {
  246. path: 'resizeParentHeightTable',
  247. name: 'ResizeParentHeightTable',
  248. component: () => import('/@/views/demo/table/ResizeParentHeightTable.vue'),
  249. meta: {
  250. title: t('routes.demo.table.resizeParentHeightTable'),
  251. },
  252. },
  253. ],
  254. },
  255. {
  256. path: 'transition',
  257. name: 'transitionDemo',
  258. component: () => import('/@/views/demo/comp/transition/index.vue'),
  259. meta: {
  260. title: t('routes.demo.comp.transition'),
  261. },
  262. },
  263. {
  264. path: 'cropper',
  265. name: 'CropperDemo',
  266. component: () => import('/@/views/demo/comp/cropper/index.vue'),
  267. meta: {
  268. title: t('routes.demo.comp.cropperImage'),
  269. },
  270. },
  271. {
  272. path: 'timestamp',
  273. name: 'TimeDemo',
  274. component: () => import('/@/views/demo/comp/time/index.vue'),
  275. meta: {
  276. title: t('routes.demo.comp.time'),
  277. },
  278. },
  279. {
  280. path: 'countTo',
  281. name: 'CountTo',
  282. component: () => import('/@/views/demo/comp/count-to/index.vue'),
  283. meta: {
  284. title: t('routes.demo.comp.countTo'),
  285. },
  286. },
  287. {
  288. path: 'tree',
  289. name: 'TreeDemo',
  290. redirect: '/comp/tree/basic',
  291. component: getParentLayout('TreeDemo'),
  292. meta: {
  293. // icon: 'clarity:tree-view-line',
  294. title: t('routes.demo.comp.tree'),
  295. },
  296. children: [
  297. {
  298. path: 'basic',
  299. name: 'BasicTreeDemo',
  300. component: () => import('/@/views/demo/tree/index.vue'),
  301. meta: {
  302. title: t('routes.demo.comp.treeBasic'),
  303. },
  304. },
  305. {
  306. path: 'editTree',
  307. name: 'EditTreeDemo',
  308. component: () => import('/@/views/demo/tree/EditTree.vue'),
  309. meta: {
  310. title: t('routes.demo.comp.editTree'),
  311. },
  312. },
  313. {
  314. path: 'actionTree',
  315. name: 'ActionTreeDemo',
  316. component: () => import('/@/views/demo/tree/ActionTree.vue'),
  317. meta: {
  318. title: t('routes.demo.comp.actionTree'),
  319. },
  320. },
  321. ],
  322. },
  323. {
  324. path: 'editor',
  325. name: 'EditorDemo',
  326. redirect: '/comp/editor/markdown',
  327. component: getParentLayout('EditorDemo'),
  328. meta: {
  329. // icon: 'carbon:table-split',
  330. title: t('routes.demo.editor.editor'),
  331. },
  332. children: [
  333. {
  334. path: 'json',
  335. component: () => import('/@/views/demo/editor/json/index.vue'),
  336. name: 'JsonEditorDemo',
  337. meta: {
  338. title: t('routes.demo.editor.jsonEditor'),
  339. },
  340. },
  341. {
  342. path: 'markdown',
  343. component: getParentLayout('MarkdownDemo'),
  344. name: 'MarkdownDemo',
  345. meta: {
  346. title: t('routes.demo.editor.markdown'),
  347. },
  348. redirect: '/comp/editor/markdown/index',
  349. children: [
  350. {
  351. path: 'index',
  352. name: 'MarkDownBasicDemo',
  353. component: () => import('/@/views/demo/editor/markdown/index.vue'),
  354. meta: {
  355. title: t('routes.demo.editor.tinymceBasic'),
  356. },
  357. },
  358. {
  359. path: 'editor',
  360. name: 'MarkDownFormDemo',
  361. component: () => import('/@/views/demo/editor/markdown/Editor.vue'),
  362. meta: {
  363. title: t('routes.demo.editor.tinymceForm'),
  364. },
  365. },
  366. ],
  367. },
  368. {
  369. path: 'tinymce',
  370. component: getParentLayout('TinymceDemo'),
  371. name: 'TinymceDemo',
  372. meta: {
  373. title: t('routes.demo.editor.tinymce'),
  374. },
  375. redirect: '/comp/editor/tinymce/index',
  376. children: [
  377. {
  378. path: 'index',
  379. name: 'TinymceBasicDemo',
  380. component: () => import('/@/views/demo/editor/tinymce/index.vue'),
  381. meta: {
  382. title: t('routes.demo.editor.tinymceBasic'),
  383. },
  384. },
  385. {
  386. path: 'editor',
  387. name: 'TinymceFormDemo',
  388. component: () => import('/@/views/demo/editor/tinymce/Editor.vue'),
  389. meta: {
  390. title: t('routes.demo.editor.tinymceForm'),
  391. },
  392. },
  393. ],
  394. },
  395. ],
  396. },
  397. {
  398. path: 'scroll',
  399. name: 'ScrollDemo',
  400. redirect: '/comp/scroll/basic',
  401. component: getParentLayout('ScrollDemo'),
  402. meta: {
  403. title: t('routes.demo.comp.scroll'),
  404. },
  405. children: [
  406. {
  407. path: 'basic',
  408. name: 'BasicScrollDemo',
  409. component: () => import('/@/views/demo/comp/scroll/index.vue'),
  410. meta: {
  411. title: t('routes.demo.comp.scrollBasic'),
  412. },
  413. },
  414. {
  415. path: 'action',
  416. name: 'ActionScrollDemo',
  417. component: () => import('/@/views/demo/comp/scroll/Action.vue'),
  418. meta: {
  419. title: t('routes.demo.comp.scrollAction'),
  420. },
  421. },
  422. {
  423. path: 'virtualScroll',
  424. name: 'VirtualScrollDemo',
  425. component: () => import('/@/views/demo/comp/scroll/VirtualScroll.vue'),
  426. meta: {
  427. title: t('routes.demo.comp.virtualScroll'),
  428. },
  429. },
  430. ],
  431. },
  432. {
  433. path: 'modal',
  434. name: 'ModalDemo',
  435. component: () => import('/@/views/demo/comp/modal/index.vue'),
  436. meta: {
  437. title: t('routes.demo.comp.modal'),
  438. },
  439. },
  440. {
  441. path: 'drawer',
  442. name: 'DrawerDemo',
  443. component: () => import('/@/views/demo/comp/drawer/index.vue'),
  444. meta: {
  445. title: t('routes.demo.comp.drawer'),
  446. },
  447. },
  448. {
  449. path: 'desc',
  450. name: 'DescDemo',
  451. component: () => import('/@/views/demo/comp/desc/index.vue'),
  452. meta: {
  453. title: t('routes.demo.comp.desc'),
  454. },
  455. },
  456. {
  457. path: 'lazy',
  458. name: 'LazyDemo',
  459. component: getParentLayout('LazyDemo'),
  460. redirect: '/comp/lazy/basic',
  461. meta: {
  462. title: t('routes.demo.comp.lazy'),
  463. },
  464. children: [
  465. {
  466. path: 'basic',
  467. name: 'BasicLazyDemo',
  468. component: () => import('/@/views/demo/comp/lazy/index.vue'),
  469. meta: {
  470. title: t('routes.demo.comp.lazyBasic'),
  471. },
  472. },
  473. {
  474. path: 'transition',
  475. name: 'BasicTransitionDemo',
  476. component: () => import('/@/views/demo/comp/lazy/Transition.vue'),
  477. meta: {
  478. title: t('routes.demo.comp.lazyTransition'),
  479. },
  480. },
  481. ],
  482. },
  483. {
  484. path: 'verify',
  485. name: 'VerifyDemo',
  486. component: getParentLayout('VerifyDemo'),
  487. redirect: '/comp/verify/drag',
  488. meta: {
  489. title: t('routes.demo.comp.verify'),
  490. },
  491. children: [
  492. {
  493. path: 'drag',
  494. name: 'VerifyDragDemo',
  495. component: () => import('/@/views/demo/comp/verify/index.vue'),
  496. meta: {
  497. title: t('routes.demo.comp.verifyDrag'),
  498. },
  499. },
  500. {
  501. path: 'rotate',
  502. name: 'VerifyRotateDemo',
  503. component: () => import('/@/views/demo/comp/verify/Rotate.vue'),
  504. meta: {
  505. title: t('routes.demo.comp.verifyRotate'),
  506. },
  507. },
  508. ],
  509. },
  510. //
  511. {
  512. path: 'qrcode',
  513. name: 'QrCodeDemo',
  514. component: () => import('/@/views/demo/comp/qrcode/index.vue'),
  515. meta: {
  516. title: t('routes.demo.comp.qrcode'),
  517. },
  518. },
  519. {
  520. path: 'strength-meter',
  521. name: 'StrengthMeterDemo',
  522. component: () => import('/@/views/demo/comp/strength-meter/index.vue'),
  523. meta: {
  524. title: t('routes.demo.comp.strength'),
  525. },
  526. },
  527. {
  528. path: 'upload',
  529. name: 'UploadDemo',
  530. component: () => import('/@/views/demo/comp/upload/index.vue'),
  531. meta: {
  532. title: t('routes.demo.comp.upload'),
  533. },
  534. },
  535. {
  536. path: 'loading',
  537. name: 'LoadingDemo',
  538. component: () => import('/@/views/demo/comp/loading/index.vue'),
  539. meta: {
  540. title: t('routes.demo.comp.loading'),
  541. },
  542. },
  543. {
  544. path: 'cardList',
  545. name: 'CardListDemo',
  546. component: () => import('/@/views/demo/comp/card-list/index.vue'),
  547. meta: {
  548. title: t('routes.demo.comp.cardList'),
  549. },
  550. },
  551. ],
  552. };
  553. export default comp;