1.0.16 • Published 6 years ago

ldj-vue-dynamic-component v1.0.16

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Desc

This is a wrapper component for iview. to make it easy to use.

Install

npm i ldj-vue-dynamic-component

Dependency:

  • vue
  • iview

Func

  • bfButton
  • bfTabs
  • bfForm
  • bfPage
  • bfTable
  • bfModal
  • bfPage

Usage

//import
import bfutils from 'ldj-vue-dynamic-component'

// vue
    <component v-for="item in cmplist" :is="item.cmp" :dataI="item.dataI" :emitI="item.emitI" :styleI="item.styleI"></component>
// javascript
    data () {
        return {
            cmplist: [
              {
                cmp: bfutils.bfButton,
                dataI: {
                  text: 'dsii',
                  itemType: 'info'
                },
                emitI: {
                  click () {
                  }
                }
              },
              {
                cmp: bfutils.bfModal,
                dataI: {
                  title: 'title',
                  model: {
                    fullscreen: false,
                    show: true,
                    draggable: false
                  },
                  itemList: [
                    {
                      cmp: bfutils.bfTabs,
                      dataI: {
                        itemList: [
                          {
                            label: 'tab1',
                            itemList: [
                              {
                                cmp: bfutils.bfTable,
                                styleI: {
                                  tableBody: {
                                    marginBottom: '10px'
                                  }
                                },
                                dataI: {
                                  tableHeader: [
                                    {
                                      cmp: bfutils.bfButton,
                                      dataI: {
                                        text: 'dsii'
                                      },
                                      emitI: {
                                        click () {
                                          alert('sfiji')
                                        }
                                      }
                                    }
                                  ],
                                  tableFooter: [
                                    {
                                      cmp: bfutils.bfPage,
                                      dataI: {
                                        total: 100,
                                        'prev-text': 'prev',
                                        'next-text': 'next'
                                      }
                                    }
                                  ],
                                  tableColumn: [
                                    {
                                      title: 'sjfids',
                                      key: 'name'
                                    },
                                    {
                                      title: 'agsfe',
                                      key: 'age'
                                    }
                                  ],
                                  tableData: [
                                    {
                                      name: 'fjsijfi',
                                      age: 'sfjisfjiji'
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          {
                            label: 'tab2',
                            itemList: [
                              {
                                cmp: bfutils.bfButton,
                                dataI: {
                                  text: 'sifji'
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
        }
    }
        
1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago