mand-mobile/components/field
xuxiaoyan 162bcc9f1e fix(field): update icon & content style 2018-10-15 15:27:16 +08:00
..
demo fix: code clean up 2018-09-28 15:37:15 +08:00
test Initial commit 2018-03-26 16:04:04 +08:00
README.en-US.md fix: code clean up 2018-09-28 15:37:15 +08:00
README.md fix: code clean up 2018-09-28 15:37:15 +08:00
component.js feat(code clean up): 2018-09-24 15:48:57 +08:00
index.vue feat(field, field-item): code refactor 2018-09-20 16:09:24 +08:00
item.vue fix(field): update icon & content style 2018-10-15 15:27:16 +08:00

README.en-US.md

title preview
Field https://didi.github.io/mand-mobile/examples/#/field

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

Import

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

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

Code Examples

API

Field Props

Props Description Type Default Note
title title String - -
brief description String - -
disabled disable content operation Boolean false -
solid the width of title is fixed or not Boolean false -
plain plain style Boolean false -

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

header content slot

action

header action slot

footer content slot


FieldItem Props

Props Description Type Default Note
title title String - -
brief description String - -
addon help info text String - -
disabled disable item operation Boolean false -
arrow arrow indicator Boolean false -

FieldItem Events

@click(event)

click event when not disabled

FieldItem Slots

default

default content slot

left

left content slot

right

right content slot

children

extra children slot