Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-element-extends

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-element-extends - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

packages/editable/src/eventListening.js

7

package.json
{
"name": "vue-element-extends",
"version": "0.1.0",
"version": "0.1.1",
"description": "Extension component based on ElementUI 2.x",

@@ -9,2 +9,3 @@ "scripts": {

"lint": "vue-cli-service lint",
"test": "npm run lint",
"lib": "vue-cli-service build --target lib --name index --dest lib packages/index.js"

@@ -26,6 +27,2 @@ },

},
"peerDependencies": {
"element-ui": "^>=2.1.0",
"xe-utils": "^1.8.8"
},
"devDependencies": {

@@ -32,0 +29,0 @@ "@vue/cli-plugin-babel": "^3.4.0",

# vue-element-extends
[![npm version](https://img.shields.io/npm/v/vue-element-extends.svg?style=flat-square)](https://www.npmjs.org/package/vue-element-extends)
[![npm build](https://travis-ci.org/xuliangzhan/vue-element-extends.svg?branch=master)](https://travis-ci.org/xuliangzhan/vue-element-extends)
[![npm downloads](https://img.shields.io/npm/dm/vue-element-extends.svg?style=flat-square)](http://npm-stat.com/charts.html?package=vue-element-extends)
[![gzip size: JS](http://img.badgesize.io/https://unpkg.com/vue-element-extends/lib/index.umd.min.js?compression=gzip&label=gzip%20size:%20JS)](http://img.badgesize.io/https://unpkg.com/vue-element-extends/lib/index.umd.min.js?compression=gzip&label=gzip%20size:%20JS)
[![gzip size: CSS](http://img.badgesize.io/https://unpkg.com/vue-element-extends/lib/index.css?compression=gzip&label=gzip%20size:%20CSS)](http://img.badgesize.io/https://unpkg.com/vue-element-extends/lib/index.css?compression=gzip&label=gzip%20size:%20CSS)
[![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/xuliangzhan/vue-element-extends/blob/master/LICENSE)
* 功能点:

@@ -21,30 +28,16 @@ * 支持只读、单元格编辑、整行编辑

```javascript
```shell
npm install xe-utils vue-element-extends --save
```
[Using unpkg](https://unpkg.com/vue-element-extends/)
在 [unpkg](https://unpkg.com/vue-element-extends/) 和 [cdnjs](https://cdn.jsdelivr.net/npm/vue-element-extends/) 上获取
```HTML
<link rel="stylesheet" href="https://unpkg.com/vue-element-extends/lib/index.css">
<script src="https://unpkg.com/vue-element-extends/lib/index.umd.min.js"></script>
```
Using requirejs
### Import
```javascript
// require 配置
require.config({
paths: {
// ...,
'vue-element-extends': './vue-element-extends/lib/index.umd.min'
}
})
define(['vue', 'vue-element-extends'], function (Vue, VueElementExtends) {
Vue.use(VueElementExtends)
})
```
### ES6 Module import
```javascript
import Vue from 'vue'

@@ -56,6 +49,9 @@ import VueElementExtends from 'vue-element-extends'

// 或者直接将 packages/editable/src 中的 editable.vue 和 editable-column.vue 组件复制到自己项目中注册
```
## [Example](https://jsfiddle.net/xjq29w3d/)
## Example
[Run this demo on jsfiddle.net](https://jsfiddle.net/1yu8e37L/)
```html

@@ -67,13 +63,11 @@ <template>

<el-button @click="$refs.editable.clear()">清空</el-button>
<el-editable ref="editable" :data.sync="list">
<el-editable ref="editable" :data.sync="tableData">
<el-editable-column type="selection" width="55"></el-editable-column>
<el-editable-column type="index" width="55"></el-editable-column>
<el-editable-column prop="name" label="名字(只读)"></el-editable-column>
<el-editable-column prop="sex" label="性别" :edit-render="{name: 'ElSelect', options: sexList}"></el-editable-column>
<el-editable-column prop="age" label="年龄" :edit-render="{name: 'ElInputNumber', attrs: {min: 1, max: 200}}"></el-editable-column>
<el-editable-column prop="region" label="地区" :edit-render="{name: 'ElCascader', attrs: {options: regionList}}"></el-editable-column>
<el-editable-column prop="birthdate" label="出生日期" :edit-render="{name: 'ElDatePicker', attrs: {type: 'date', format: 'yyyy-MM-dd'}}"></el-editable-column>
<el-editable-column prop="date1" label="选择日期" :edit-render="{name: 'ElDatePicker', attrs: {type: 'datetime', format: 'yyyy-MM-dd hh:mm:ss'}}"></el-editable-column>
<el-editable-column prop="flag" label="是否生效" :edit-render="{name: 'ElSwitch'}"></el-editable-column>
<el-editable-column prop="remark" label="备注" :edit-render="{name: 'ElInput'}"></el-editable-column>
<el-editable-column prop="name" label="只读"></el-editable-column>
<el-editable-column prop="sex" label="下拉" :edit-render="{name: 'ElSelect', options: sexList}"></el-editable-column>
<el-editable-column prop="age" label="数值" :edit-render="{name: 'ElInputNumber'}"></el-editable-column>
<el-editable-column prop="date" label="日期" :edit-render="{name: 'ElDatePicker', attrs: {type: 'date', format: 'yyyy-MM-dd'}}"></el-editable-column>
<el-editable-column prop="flag" label="开关" :edit-render="{name: 'ElSwitch', type: 'visible'}"></el-editable-column>
<el-editable-column prop="remark" label="文本" :edit-render="{name: 'ElInput'}"></el-editable-column>
</el-editable>

@@ -87,46 +81,19 @@ </div>

return {
tableData: [{
date: 1551322088449,
name: '小徐',
sex: '1',
age: '26',
flag: false,
remark: '备注'
}],
sexList: [
{
label: '男',
value: '1'
'label': '男',
'value': '1'
},
{
label: '女',
value: '0'
'label': '女',
'value': '0'
}
],
regionList: [
{
value: 'gds',
label: '广东省',
children: [
{
value: 'szs',
label: '深圳市',
children: [
{
value: 'lgq',
label: '龙岗区'
},
{
value: 'nsq',
label: '南山区'
}
]
}
]
}
],
list: [
{
name: 'test11',
height: 176,
age: 26,
sex: '1',
region: null,
birthdate: new Date(1994, 0, 1),
date1: new Date(2019, 0, 1, 20, 0, 30),
remark: '备注1',
flag: false
}
]

@@ -137,3 +104,6 @@ }

</script>
```
```
## License
Copyright (c) 2017-present, Xu Liangzhan

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc