vue的el时哪一个缩写_一个vue.js组件,可自动完成缩写/缩写

vue的el时哪一个缩写

缩写-自动完成 (Abbreviation-Autocomplete)

A vue.js component that autocompletes abbreviations/acronyms by description rather than the abbreviation text.

一个vue.js组件,可通过描述而不是缩写文本自动完成缩写/缩写。

道具 (Props)

数据 (data)

The autocomplete options

自动完成选项

The options are an array of objects in the form

选项是形式的对象数组

{
  a: "Abbreviation or Acronym",
  d: "Definition or Description"
}

e.g.

例如

[
  {
    a: "ATL",
    d: "Hartsfield–Jackson Atlanta International Airport"
  },
  {
    a: "LAX",
    d: "Los Angeles International Airport"
  }
]
限制(可选) (limit(Optional))

The autocomplete results limit Infinity by default

默认情况下,自动完成结果会限制Infinity

min-input-length(可选) (min-input-length(Optional))

The minimum number of characters typed before autocomplete results are displayed 1 by default

默认情况下,显示自动完成结果之前键入的最少字符数1

(Example)

JS (JS)
const autocomplete = new Vue({
  el: '#app',
  data: {
    abbreviations: [
      {
        a: 'AF',
        d: 'Afghanistan'
      },
      {
        a: 'AL',
        d: 'Albania'
      },
      {
        a: 'DZ',
        d: 'Algeria'
      },
      {
        a: 'AS',
        d: 'American Samoa'
      },
      {
        a: 'AD',
        d: 'Andorra'
      },
      {
        a: 'AO',
        d: 'Angola'
      },
      {
        a: 'AI',
        d: 'Anguilla'
      },
      {
        a: 'AQ',
        d: 'Antarctica'
      },
      {
        a: 'AG',
        d: 'Antigua and Barbuda'
      },
      {
        a: 'AR',
        d: 'Argentina'
      },
      {
        a: 'AM',
        d: 'Armenia'
      },
      {
        a: 'AW',
        d: 'Aruba'
      },
      {
        a: 'AU',
        d: 'Australia'
      },
      {
        a: 'AT',
        d: 'Austria'
      },
      {
        a: 'AZ',
        d: 'Azerbaijan'
      }
    ]
  }
})
HTML (HTML)
<abbreviation-autocomplete :data="abbreviations" :limit="10" :min-input-length="2"></abbreviation-autocomplete>

翻译自: https://vuejsexamples.com/a-vue-js-component-that-autocompletes-abbreviations-acronyms/

vue的el时哪一个缩写

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值