可高亮相应的关键字
import { H3HighLight } from '@lateinos/awesome-ui'; export default { components: { H3HighLight, }, };
<template> <div> <p style="margin: 0;">关键字: {{highLightKey}}</p> <h3-high-light style="margin: 0 8px;" v-for="(item, index) in options" :key="item" :highLightKey="highLightKey" :highLightColor="index % 2 === 0 ? 'red' : ''" :content="item" /> <!-- :needTitle="true" --> </div> </template> <script> export default { data () { return { highLightKey: '选项', options: ['选项1','选项2选项选项','选项3选项选','选项4','选项5','选项6','选项7','选项8', '选项9', '选项10'] } } } </script>
← Dropdown 基础下拉 ListView 列表、虚拟列表 →