### mdp-Field #### 基本用法 ```vue ``` ```js data() { return { obj: '' } }, methods: { change(currentVal, oldVal) { this.obj = currentVal }, }, ``` #### 自定义 下列是 mdp-field 的插槽层次结构 ```js ├── ├── │ ├── │ │ ├── │ │ │ ├──
│ │ │ │ └── │ │ │ ├──
│ │ │ │ └── │ │ │ └──
│ │ ├── │ │ └── │ │ └──
│ │ └── │ │
│ │
│ └── │── ├── │ └── └── ``` 例子 ```js data() { return { obj: '' } } ``` ```vue ``` image-20240111190935618 image-20240111191052830 ### Attributes | 参数 | 说明 | 类型 | 可选值 | 默认值 | | ----------- | -------------------------- | -------------- | ------------------------------- | ------ | | disabled | css: pointer-events: none; | Boolean | - | false | | value | 文本框的内容 | String, Number | - | '' | | label | 标签字段 | String | - | '' | | placeholder | 占位符 | String | - | '' | | color | 背景色 | String | - | '' | | icon | 图标 | String | - | '' | | showStyle | 控制组件的布局 | String | x / 不是x的任意值 | x | | size | 设置头像的大小 | number/string | number / large / medium / small | small | ### Events | 事件名 | 说明 | 回调参数 | | ------ | -------------------------------------- | --------------------------------------------------------- | | change | 仅在输入框失去焦点或用户按下回车时触发 | (currentVal: string \|number , oldVal: string \| number ) |