Field

Arrange vertically and display current contents, status and other allowable operations.

Import

import { Field, FieldItem } from  'mand-mobile-next'

Vue.createApp().component(Field.name, Field)
Vue.createApp().component(FieldItem.name, FieldItem)

Code Examples

基本

区域标题

区域描述性文本,可根据具体场景配置

操作
提示文本
内容文本
次要信息
正文内容

这是子内容区域

内容禁用状态

区域页脚区域内容插槽

基础

Field

区域列表组合

基本
区域标题

区域描述性文本,可根据具体场景配置

操作
提示文本
内容文本
次要信息
正文内容

这是子内容区域

内容禁用状态

区域页脚区域内容插槽

API

Field Props

PropsDescriptionTypeDefaultNote
titletitleString--
briefdescriptionString--
disableddisable content operationBooleanfalse-
solidthe width of title is fixed or notBooleanfalse-
plainplain styleBooleanfalse-

When use disabled prop, its descendants can use injectto have access of Field ancestor.

export default {
  name: 'your-component',

  inject: {
    rootField: {
      from: 'rootField',
      default: () => ({})
    }
  },

  computed: {
    disabled() {
      return this.rootField.disabled
    }
  },
}

Field Slots

default

default content slot

header content slot

action

header action slot

footer content slot


FieldItem Props

PropsDescriptionTypeDefaultNote
titletitleString--
contentdescriptionString--
addonhelp info textString--
disableddisable item operationBooleanfalse-
arrowarrow indicatorBooleanfalse-
placeholderplaceholder textString--

FieldItem Events

@click(event)

click event when not disabled

FieldItem Slots

default

default content slot

left

left content slot

right content slot

children

extra children slot