any-level.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <div class="m-4">
  3. <p>Select any level of options (Single selection)</p>
  4. <el-cascader :options="options" :props="props1" clearable />
  5. </div>
  6. <div class="m-4">
  7. <p>Select any level of options (Multiple selection)</p>
  8. <el-cascader :options="options" :props="props2" clearable />
  9. </div>
  10. </template>
  11. <script lang="ts" setup>
  12. const props1 = {
  13. checkStrictly: true,
  14. }
  15. const props2 = {
  16. multiple: true,
  17. checkStrictly: true,
  18. }
  19. const options = [
  20. {
  21. value: 'guide',
  22. label: 'Guide',
  23. children: [
  24. {
  25. value: 'disciplines',
  26. label: 'Disciplines',
  27. children: [
  28. {
  29. value: 'consistency',
  30. label: 'Consistency',
  31. },
  32. {
  33. value: 'feedback',
  34. label: 'Feedback',
  35. },
  36. {
  37. value: 'efficiency',
  38. label: 'Efficiency',
  39. },
  40. {
  41. value: 'controllability',
  42. label: 'Controllability',
  43. },
  44. ],
  45. },
  46. {
  47. value: 'navigation',
  48. label: 'Navigation',
  49. children: [
  50. {
  51. value: 'side nav',
  52. label: 'Side Navigation',
  53. },
  54. {
  55. value: 'top nav',
  56. label: 'Top Navigation',
  57. },
  58. ],
  59. },
  60. ],
  61. },
  62. {
  63. value: 'component',
  64. label: 'Component',
  65. children: [
  66. {
  67. value: 'basic',
  68. label: 'Basic',
  69. children: [
  70. {
  71. value: 'layout',
  72. label: 'Layout',
  73. },
  74. {
  75. value: 'color',
  76. label: 'Color',
  77. },
  78. {
  79. value: 'typography',
  80. label: 'Typography',
  81. },
  82. {
  83. value: 'icon',
  84. label: 'Icon',
  85. },
  86. {
  87. value: 'button',
  88. label: 'Button',
  89. },
  90. ],
  91. },
  92. {
  93. value: 'form',
  94. label: 'Form',
  95. children: [
  96. {
  97. value: 'radio',
  98. label: 'Radio',
  99. },
  100. {
  101. value: 'checkbox',
  102. label: 'Checkbox',
  103. },
  104. {
  105. value: 'input',
  106. label: 'Input',
  107. },
  108. {
  109. value: 'input-number',
  110. label: 'InputNumber',
  111. },
  112. {
  113. value: 'select',
  114. label: 'Select',
  115. },
  116. {
  117. value: 'cascader',
  118. label: 'Cascader',
  119. },
  120. {
  121. value: 'switch',
  122. label: 'Switch',
  123. },
  124. {
  125. value: 'slider',
  126. label: 'Slider',
  127. },
  128. {
  129. value: 'time-picker',
  130. label: 'TimePicker',
  131. },
  132. {
  133. value: 'date-picker',
  134. label: 'DatePicker',
  135. },
  136. {
  137. value: 'datetime-picker',
  138. label: 'DateTimePicker',
  139. },
  140. {
  141. value: 'upload',
  142. label: 'Upload',
  143. },
  144. {
  145. value: 'rate',
  146. label: 'Rate',
  147. },
  148. {
  149. value: 'form',
  150. label: 'Form',
  151. },
  152. ],
  153. },
  154. {
  155. value: 'data',
  156. label: 'Data',
  157. children: [
  158. {
  159. value: 'table',
  160. label: 'Table',
  161. },
  162. {
  163. value: 'tag',
  164. label: 'Tag',
  165. },
  166. {
  167. value: 'progress',
  168. label: 'Progress',
  169. },
  170. {
  171. value: 'tree',
  172. label: 'Tree',
  173. },
  174. {
  175. value: 'pagination',
  176. label: 'Pagination',
  177. },
  178. {
  179. value: 'badge',
  180. label: 'Badge',
  181. },
  182. ],
  183. },
  184. {
  185. value: 'notice',
  186. label: 'Notice',
  187. children: [
  188. {
  189. value: 'alert',
  190. label: 'Alert',
  191. },
  192. {
  193. value: 'loading',
  194. label: 'Loading',
  195. },
  196. {
  197. value: 'message',
  198. label: 'Message',
  199. },
  200. {
  201. value: 'message-box',
  202. label: 'MessageBox',
  203. },
  204. {
  205. value: 'notification',
  206. label: 'Notification',
  207. },
  208. ],
  209. },
  210. {
  211. value: 'navigation',
  212. label: 'Navigation',
  213. children: [
  214. {
  215. value: 'menu',
  216. label: 'Menu',
  217. },
  218. {
  219. value: 'tabs',
  220. label: 'Tabs',
  221. },
  222. {
  223. value: 'breadcrumb',
  224. label: 'Breadcrumb',
  225. },
  226. {
  227. value: 'dropdown',
  228. label: 'Dropdown',
  229. },
  230. {
  231. value: 'steps',
  232. label: 'Steps',
  233. },
  234. ],
  235. },
  236. {
  237. value: 'others',
  238. label: 'Others',
  239. children: [
  240. {
  241. value: 'dialog',
  242. label: 'Dialog',
  243. },
  244. {
  245. value: 'tooltip',
  246. label: 'Tooltip',
  247. },
  248. {
  249. value: 'popover',
  250. label: 'Popover',
  251. },
  252. {
  253. value: 'card',
  254. label: 'Card',
  255. },
  256. {
  257. value: 'carousel',
  258. label: 'Carousel',
  259. },
  260. {
  261. value: 'collapse',
  262. label: 'Collapse',
  263. },
  264. ],
  265. },
  266. ],
  267. },
  268. {
  269. value: 'resource',
  270. label: 'Resource',
  271. children: [
  272. {
  273. value: 'axure',
  274. label: 'Axure Components',
  275. },
  276. {
  277. value: 'sketch',
  278. label: 'Sketch Templates',
  279. },
  280. {
  281. value: 'docs',
  282. label: 'Design Documentation',
  283. },
  284. ],
  285. },
  286. ]
  287. </script>