npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-basic-components

v1.0.53

Published

## Project setup ``` npm install ```

Downloads

250

Readme

vue-basic-components

version

version

vue 项目基础组件库(编辑表格、编辑表单、编辑上传表格、拖拽进度块)

安装

	npm install vue-basic-components

在 main.js 引入:

	import { TableForm, SelectPerson } from 'vue-basic-components/package/index'

	[TableForm, SelectPerson].forEach((component) => {
		Vue.component(component.name, component)
	})

介绍

可参考自研业务系统:企业信息管理、影像系统、目标责任制等的使用

1,TableEdit 组件支持分页

属性(refs调用)

componentDisabled:表格是否禁用

tableLoading:表格的加载展示

data:表格数据

selection:选中的行下标

props

title: 表格title

size:表格大小

required 表格titlt部位必填展示

fields:表格单行各个字段

columns:表格列对象、属性有label,type(支持text、input、select、date),pickerType(支持type为date),required,disabled,field,width,format(支持date),valueFormat(支持date),options(支持select)等

type:表格类型(支持selection、index)

addable:表格是否支持可添加

deletable:表格是否自带删除操作栏

sortable:表格是否支持行拖拽排序(属性componentDisabled为true时若禁用拖拽排序功能需要给组件实例加'not-sort'样式类)

actionColumnWidth:操作列宽

isPagination:是否展示分页(前端分页)

pageSize:当前页展示的行数(支持isPagination为true时)

isAddedTrigger:是否自定义添加表格行,若为true需要在父组件内定义@handleAdd事件接收

方法

@handleSort({ newIndex, oldIndex }) { ... }

@handleAdd() { ... }

@handleDelete(index, row) { ... }

示例
<table-edit
	:class="editing ? '' : 'not-sort'"
	style="margin: 10px 0"
	ref="companyTableEdit"
	title="董事/监事/高管"
	:required="true"
	type="index"
	@handleDelete="handleDelete"
	@handleSort="handleSort"
	:deletable="true"
	:sortable="true"
	:actionColumnWidth="200"
	:fields="fields"
	:columns="columns"
/>

Image text

Image text

Image text

2,TableForm 组件

属性(refs调用)

componentDisabled:表单是否禁用

props

data:表单数组对象

注:每个对象obj含有如下属性

obj.label--表单域显示label

obj.id--表单域字段

obj.value--表单域值:

obj.type--表单域类型,支持text、input、select、date

obj.pickerType--支持表单域类型为date

obj.disabled--表单域是否禁用

obj.require--表单域是否必填

obj.span--表单域宽,同el-col的span属

obj.actions--表单域操作项数组对象,每个对象属性含有

actions.type----操作项按钮类型同elementui的success、warning、danger、default、text等)

actions.text----操作项按钮文字

actions.visible----操作项是否展示

actions.size----操作项按钮尺寸

actions.click----操作项点击事件

actions.options----支持表单域类型为select

actions.format----支持表单域类型为date

actions.valueFormat----支持表单域类型为date

示例
<table-form ref="originTableForm" :data="originInfo" />

Image text

Image text

Image text

3,TableUpload 组件

属性(refs调用)

componentDisabled:表格是否禁用

tableLoading:表格的加载展示

selection:选中的行下标

props

fields:表格单行各个字段

columns:表格列对象、属性有label,field(文件名字段必须为fileName),click(row){}

type:表格类型(支持selection、index)

deletable:表格是否自带删除操作栏

actionColumnWidth:操作列宽

fileList:文件列表

方法

@handleDelete(file) { ... }

@handleDownload(file) { ... }

示例
<table-upload
	:deletable="true"
	type="index"
	@handleDelete="handleDelete"
	@handleDownload="handleDownload"
	:actionColumnWidth="200"
	:fileList="fileList"
	:fields="fields"
	:columns="columns"
/>

Image text

Image text

4,DragProgress 组件

props

progressVal:当前显示进度值

isDrag:是否可自定义拖拽

bgColor:进度条颜色

方法

@stop(percent) { ... }

示例
<drag-progress
	@stop="progress"
	:value="progressVal"
	:isDrag="true"
	bgColor="#409EFF"
/>

Image text

5,SelectPerson 组件

Image text

Image text

6,TableTransmitter 组件

Image text