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

el-table-transfer

v0.1.4

Published

基于element-ui 的表格穿梭框

Downloads

10

Readme

el-table-transfer

基于element-ui的表格穿梭框

version 0.1.2

增加插槽功能,可自定义列模板(左右两边的列模板都会变化)

version 0.1.3

添加禁用勾选功能,通过传递selectable参数(要求为Function类型)来进行判断是否可勾选

version 0.1.4

解决多余引入element字体文件问题

安装

npm install el-table-transfer

使用

main.js文件中引入插件并注册

import elTableTransfer from 'el-table-transfer'
Vue.use(elTableTransfer)

在项目中使用el-table-transfer

<template>
		<div id="app">
		<el-table-transfer
			leftTitle="总数据"
			rightTitle="已选数据"
			:columns='columns'
			:dataLeft="data1"
			:dataRight="data2"
		>
			<!-- 可以使用插槽获取到列信息和行信息,从而进行数据的处理 -->
			<template v-slot:default="{scope}">
				<div>
					<span v-if="scope.col.value === 'gender'">{{scope.row.gender === '男' ? '♂' : '♀'}}</span>
					<span v-else>{{scope.row[scope.col.value]}}</span>
				</div>
			</template>
		</el-table-transfer>
	</div>
</template>

<script>


export default {
	name: 'app',
	data() {
		return {
			columns: [
				{name: '姓名', value: 'name', width: '120px'},
				{name: '性别', value: 'gender', width: '120px'},
				{name: '年龄', value: 'age',},
			],
			data1: [
				{name: '张三', gender: '男', age: '18'},
				{name: '李四', gender: '男', age: '18'},
				{name: '王五', gender: '男', age: '18'},
				{name: '乙亥', gender: '男', age: '18'},
			],
			data2: [
				{name: '帕克', gender: '女', age: '18'},
				{name: '克里斯蒂娜', gender: '女', age: '18'},
			]
		}
	},
	// components: {
	// 	'el-table-transfer': elTableTransfer
	// }
}
</script>