# 多项 ```html Leaf Only Cascade Show Path Hover Trigger Filterable ``` ```js function genOptions (depth = 3, iterator = 1, prefix = '') { const length = 12 const options = [] for (let i = 1; i <= length; ++i) { if (iterator === 1) { options.push({ value: `v-${i}`, label: `l-${i}`, disabled: i % 5 === 0, children: genOptions(depth, iterator + 1, '' + i) }) } else if (iterator === depth) { options.push({ value: `v-${prefix}-${i}`, label: `l-${prefix}-${i}`, disabled: i % 5 === 0 }) } else { options.push({ value: `v-${prefix}-${i}`, label: `l-${prefix}-${i}`, disabled: i % 5 === 0, children: genOptions(depth, iterator + 1, `${prefix}-${i}`) }) } } return options } export default { data () { return { leafOnly: true, cascade: true, showPath: true, hoverTrigger: false, value: null, filterable: false, options: genOptions() } } } ```