comp.ts 14 KB

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