简体   繁体   English

角形材料切屑字段,可从其余输入的文本中切出切屑

[英]angular material chips field to make a chip from remaining entered text

I am using angular material md-chips field. 我正在使用角材料md-chips字段。 The chips are currently formed only after I hit one of the the md-seperator-keys . 目前只有在我按下md-seperator-keys之一时才形成筹码。

But when the focus is out of the chips filed, the remaining entered text must automatically form a chip. 但是,当焦点不在提交的筹码中时,其余输入的文本必须自动形成筹码。 How to achieve this? 如何实现呢?

<md-chips monitor-input-focus ng-model="formData[fieldDef.identifier]"
          md-separator-keys="chipKeys"
          name="inputField"
          style="margin-bottom:8px;">
      <md-chip-template>
          {{$chip}}
      </md-chip-template>
</md-chips>

Try the md-chips attribute and the md-add-on-blur for creating this behaviour. 尝试使用md-chips属性和md-add-on-blur创建此行为。

See here: https://material.angularjs.org/latest/demo/chips 看到这里: https : //material.angularjs.org/latest/demo/chips

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM