0.1.15 • Published 6 years ago

babyeye-ui v0.1.15

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

babyeye-ui

常用组件

Button 按钮

Attribute

参数说明类型可选值默认值
size尺寸Stringsmall/medium/largemedium
plain朴素按钮Boolean-false
italic斜体按钮Boolean-false
round圆角按钮Boolean-false
disabled禁用Boolean-false

examples

<be-button size="large" italic>斜体大按钮</be-button>
<be-button plain round disabled>朴素圆角禁用按钮</be-button>

MessageBox 弹框

Options

参数说明类型可选值默认值说明
title标题String--如果不配置 title 属性,则为空
message内容String/Array--如果显示一条信息传字符串,如果显示多条信息传数组
icon图标Stringeyecheck/eyeposition/foutlamp/fusion/sensitivity/stecheck-
btnItalic按钮是否斜体Boolean-false
size尺寸Stringlarge/-如果设置 size 为 large,则显示为大弹框,否则是普通弹框

Dialog 对话框

Options

参数说明类型可选值默认值说明
title标题String--如果不配置 title 属性,则为空
message内容String/Array--如果显示一条信息传字符串,如果显示多条信息传数组
icon图标Stringeyecheck/eyeposition/foutlamp/fusion/sensitivity/stecheck-
btnItalic按钮是否斜体Boolean-false
size尺寸Stringlarge/-如果设置 size 为 large,则显示为大弹框,否则是普通弹框
isVisible是否显示Boolean-true由父组件的属性控制是否显示,需在v-bind的时候加上sync修饰符

Slot

参数说明
默认默认Slot会插入内容区域
footerfooter Slot会插入底部区域

Table 展示型表格

Options

column

Type: Array Default: [] Normal: columnItem, columnItem, ...

columnItem: { labelString: 显示在表格中的表头, propString: 数据在data数组中dataItem中的属性名, widthString: 可选,固定表格宽度,css宽度值格式字符串 } Example: {label: '姓名', prop: 'name', width: '300px'}, {label: '学号', prop: 'stuid'}

data

Type: Array Default: [] Normal: dataItem, dataItem, ...

dataItem: { idString: 唯一标识符,推荐填写否则Vue报错, ...(自行添加的数据,未登记在columnItem中的属性名将不被显示) } Example: {id: 1, name: '李狗蛋', stuid: '9527'}, {id: 2, name: '王二傻', stuid: '9528'}

small

Type: Boolean Default: false

小表格样式

noline

Type: Boolean Default: false

无线表格样式

border

Type: Boolean Default: false

包边表格样式

Notice

该组件的调用方式是全局方法。

在 vue 文件中

<template>
  <be-button @click="open">点击打开 Message Box</el-button>
</template>

<script>
  export default {
    methods: {
      open() {
        this.$alert({
          title: '我是标题',
          icon: 'fourlamp',
          message: '已检查完左眼,请换右眼',
          btnItalic: true,
          size: 'large'
        }).then(() => {
          	// callback
        })
      }
    }
  }
</script>

在 js 文件中调用

import { MessageBox } from 'babyeye-ui'

MessageBox.alert({
  title: '我是标题',
  icon: 'fourlamp',
  message: '已检查完左眼,请换右眼',
  btnItalic: true,
  size: 'large'
}).then(() => {
    // callback
})

此外,还添加了关闭 MessageBox 的方法

MessageBox.close()

调用此方法即可立即关闭 MessageBox

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago