$ui/components/my-at-input

'@'人输入框组件

Source:
Author:
  • huangjiping

Members

(inner) props

Source:
Properties:
Name Type Attributes Description
value string <optional>

v-model绑定的值

tagClassName string <optional>

'@标签'的类名, 默认'tag-span'

popoverProps object <optional>

popover的参数, 同el-popover

type string <optional>

表单类型,input(默认) / textarea

rows number <optional>

行数,在type为textarea时有效

size string <optional>

medium, small, mini

placeholder string <optional>

placeholder

属性参数

(inner) slots

Source:
Properties:
Name Type Description
popover string

弹窗显示的内容 (放置用户列表)

插槽

Methods

(inner) getData() → {object|string|string|string}

Source:

获取数据

Returns:
  • total

    Type
    object
  • total.html 输入框内html

    Type
    string
  • total.text 输入框内纯文本

    Type
    string
  • total.data 绑定数据

    Type
    string

(inner) setData() → {object}

Source:

设置绑定数据

Returns:

data 设置数据格式为 {[id]: {name: '', data: {...}}, ...}

Type
object

(inner) tagInsert()

Source:

插入标签调用函数

(inner) togglePopover()

Source:

手动设置弹窗开关

Events

on-popToggle

Source:

输入框内容改变事件

Parameters:
Name Type Description
输入框内容 string
输入框内容(纯文本) string
绑定的数据 object

on-popToggle

Source:

弹框切换时事件

Parameters:
Name Type Description
真为打开假为关闭 boolean

on-tagEdit

Source:

标签内容改变事件

Parameters:
Name Type Description
‘@’后面的编辑内容 string