0.1.8 • Published 16 days ago

byt-ui v0.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
16 days ago

byt-ui

安装

yarn add byt-ui -S

全局引入

import BytUI from "byt-ui"
import 'byt-ui/lib/byt-ui.css'
Vue.use(BytUI)

按需引入公用方法 也可全局使用this.$byt

import {utils} from "byt-ui"

组件调用示例

  <byt-base-view
    :label-width="100"
    :search-list="searchList"
    :fetch="getTableData"
    :table-data="tableData"
    :columns="columns"
    :pagination="pagination"
    ref="baseView"
  >
    <template #btns>
      <el-button type="primary" icon="el-icon-plus">新增</el-button>
      <el-button type="primary" icon="el-icon-plus" @click="onClear">初始化表单</el-button>
    </template>

    <template #actions>
      <el-button type="text" icon="el-icon-edit">编辑</el-button>
      <el-button type="text" class="el-button-delete" icon="el-icon-delete">删除</el-button>
    </template>
  </byt-base-view>
export default {
  name: 'App',
  data(){
    return{
      searchList: [
        {
          label: '输入框',
          key: 'input',
          type: 'input',
          default:"abc"
        },
        {
          label: '下拉框',
          key: 'select',
          type: 'select',
          default:1,
          options:[
            {label:"a",value:1},
            {label:"b",value:2},
            {label:"c",value:3},
            {label:"d",value:4}
          ]
        },
        {
          label: '级联选择',
          key: 'cascader',
          type: 'cascader',
          default:"yizhi",
          options:[{
            value: 'zhinan',
            label: '指南',
            children: [{
              value: 'shejiyuanze',
              label: '设计原则',
              children: [{
                value: 'yizhi',
                label: '一致'
              }, {
                value: 'fankui',
                label: '反馈'
              }, {
                value: 'xiaolv',
                label: '效率'
              }, {
                value: 'kekong',
                label: '可控'
              }]
            }]
          }]
        },
        {
          label: '年月日',
          key: 'date',
          type: 'datepicker',
          default:moment().format("YYYY-MM-DD")
        },
        {
          label: '年月',
          key: 'month',
          type: 'datepicker',
          fields:"month",
          default:moment().format("YYYY-MM")
        },
        {
          label: '年',
          key: 'year',
          type: 'datepicker',
          fields:"year",
          default:moment().format("YYYY")
        },
        {
          label: '日期区间',
          key: 'daterange',
          type: 'daterange',
          default:["2023-06-05","2023-06-07"]
        }
      ],
      tableData: [],
      columns: [
        { label: '头像', slot: 'avatar', fixed: 'left' },
        { label: '用户名', key: 'username', fixed: 'left' },
        { label: '姓名', key: 'name' },
        { label: '手机号', key: 'phone' },
        { label: '昵称', key: 'nickname' },
        { label: '邮箱', key: 'email' },
        { label: '状态', slot: 'lockFlag' },
        { label: '创建时间', key: 'createTime' },
        { label: '操作', key: 'actions', slot: 'actions', width: 160, fixed: 'right' }
      ],
      loading: false,
      pagination: {
        total: 0
      }
    }
  }
}

npm 发布执行顺序

1. yarn lib
2. 修改package.json  version 版本号
3. npm publish

手动刷新淘宝镜像包:

https://npmmirror.com/sync/byt-ui

升级依赖包

yarn  upgrade byt-ui --latest

删除已发版本,非必要情况,不允许删除包,删除后24小时内无法上传

运行 npm unpublish 包名  --force 命令,即可从npm删除已发布的包。

1、npm unpublish 命令只能删除72小时以内发布的包

2、npm unpublish 删除的包,在24小时内不允许重复发布
0.1.8

16 days ago

0.1.7

16 days ago

0.1.6

16 days ago

0.1.5

16 days ago

0.1.4

17 days ago

0.1.2

19 days ago

0.1.3

19 days ago

0.1.0

27 days ago

0.1.1

27 days ago

0.0.20

8 months ago

0.0.18

10 months ago

0.0.19

8 months ago

0.0.17

11 months ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.16

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago