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

el-input

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

el-input - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

17

cooking.conf.js

@@ -0,4 +1,16 @@

var path = require('path');
var cooking = require('cooking');
var webpack = require('webpack');
var registerPostHTMLPlugin = function () {
return {
defaults: [
require(path.join(process.env.ELEMENT_TOOLBOX, 'posthtml-bem'))(),
]
};
};
if (process.env.NODE_ENV === 'production') {
templatePath = './example/index.html';
}
cooking.set({

@@ -24,4 +36,9 @@ use: 'vue',

cooking.add('resolveLoader.root', [process.env.ELEMENT_TOOLBOX]);
cooking.add('posthtml', registerPostHTMLPlugin);
cooking.add('vue.loaders.html', 'vue-html-loader!posthtml-loader');
cooking.add('externals', {
vue: 'vue',
vue: 'Vue',
'vue-clickoutside': 'vue-clickoutside'

@@ -28,0 +45,0 @@ });

6

dist/index.js

@@ -72,3 +72,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

module.exports = "<div block=element-core-input :class=\"{\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n 'is-multiple': multiple\n }\"> <template v-if=multiple> <el-core-tag @remove=tags.$remove(tag) v-for=\"tag in tags\" :data=tag> </el-core-tag> </template> <input elem=original v-el:input v-model=model :type=\"type || 'text'\" :disabled=disabled :readonly=readonly :placeholder=placeholder :number=\"type === 'number'\" @blur=\"$dispatch('e-blur')\" @focus=handleFocus @keydown.down.prevent=\"$dispatch('e-press-down')\" @keydown.up.prevent=\"$dispatch('e-press-up')\" @keyup.enter=\"$dispatch('e-press-enter')\" @keydown.8=handleDelete @keydown.esc=\"$dispatch('e-press-esc')\"> <slot name=icon></slot> </div>";
module.exports = "<div :class=\"{\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n 'is-multiple': multiple\n }\" class=element-core-input> <template v-if=multiple> <el-core-tag @remove=tags.$remove(tag) v-for=\"tag in tags\" :data=tag> </el-core-tag> </template> <input v-el:input=\"\" v-model=model :type=\"type || 'text'\" :disabled=disabled :readonly=readonly :placeholder=placeholder :number=\"type === 'number'\" @blur=\"$dispatch('e-blur')\" @focus=handleFocus @keydown.down.prevent=\"$dispatch('e-press-down')\" @keydown.up.prevent=\"$dispatch('e-press-up')\" @keyup.enter=\"$dispatch('e-press-enter')\" @keydown.8=handleDelete @keydown.esc=\"$dispatch('e-press-esc')\" class=element-core-input__original> <slot name=icon></slot> </div>";

@@ -79,3 +79,3 @@ /***/ },

module.exports = "<button block=element-core-tag> <span v-text=data></span> <span elem=button v-if=_events.remove @click.stop=\"$dispatch('remove')\">&times;</span> </button>";
module.exports = "<button class=element-core-tag> <span v-text=data></span> <span v-if=_events.remove @click.stop=\"$dispatch('remove')\" class=element-core-tag__button>&times;</span> </button>";

@@ -86,3 +86,3 @@ /***/ },

module.exports = "<div block=element-input v-clickoutside=handleMouseLeave()> <span v-if=\"effect === 'special'\" :class=\"{ 'is-enter': editing || model }\" elem=placeholder @click=\"editing = true, $els.input.focus()\" v-text=placeholder> </span> <el-core-input :class=\"{\n 'is-active': show\n }\" @e-blur=\"editing = false\" :type=\"type || effect\" :model.sync=model class=input__original :disabled=disabled :number=\"effect === 'number'\" :placeholder=\"effect === 'special' ? '' : placeholder\" @e-focus=\"editing = true, show = true\"> </el-core-input> <ul v-show=show block=element-dropdown><li block=element-option :class=\"{'is-selected': item === model}\" v-for=\"item in suggestion | filterBy model\" v-text=item @click=\"model = item, show = false\"></li></ul> </div>";
module.exports = "<div v-clickoutside=handleMouseLeave() class=element-input> <span v-if=\"effect === 'special'\" :class=\"{ 'is-enter': editing || model }\" @click=\"editing = true, $els.input.focus()\" v-text=placeholder class=element-input__placeholder> </span> <el-core-input :class=\"{\n 'is-active': show\n }\" @e-blur=\"editing = false\" :type=\"type || effect\" :model.sync=model class=input__original :disabled=disabled :number=\"effect === 'number'\" :placeholder=\"effect === 'special' ? '' : placeholder\" @e-focus=\"editing = true, show = true\"> </el-core-input> <ul v-show=show class=element-dropdown><li :class=\"{'is-selected': item === model}\" v-for=\"item in suggestion | filterBy model\" v-text=item @click=\"model = item, show = false\" class=element-option></li></ul> </div>";

@@ -89,0 +89,0 @@ /***/ },

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue-clickoutside")):"function"==typeof define&&define.amd?define("ElSelect",["vue-clickoutside"],t):"object"==typeof exports?exports.ElSelect=t(require("vue-clickoutside")):e.ElSelect=t(e["vue-clickoutside"])}(this,function(e){return function(e){function t(n){if(o[n])return o[n].exports;var s=o[n]={exports:{},id:n,loaded:!1};return e[n].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var o={};return t.m=e,t.c=o,t.p="/dist/",t(0)}([function(e,t,o){"use strict";var n=o(6);e.exports={ElInput:n,install:function(e){e.component(n.name,n)}}},function(e,t){e.exports="<div block=element-core-input :class=\"{\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n 'is-multiple': multiple\n }\"> <template v-if=multiple> <el-core-tag @remove=tags.$remove(tag) v-for=\"tag in tags\" :data=tag> </el-core-tag> </template> <input elem=original v-el:input v-model=model :type=\"type || 'text'\" :disabled=disabled :readonly=readonly :placeholder=placeholder :number=\"type === 'number'\" @blur=\"$dispatch('e-blur')\" @focus=handleFocus @keydown.down.prevent=\"$dispatch('e-press-down')\" @keydown.up.prevent=\"$dispatch('e-press-up')\" @keyup.enter=\"$dispatch('e-press-enter')\" @keydown.8=handleDelete @keydown.esc=\"$dispatch('e-press-esc')\"> <slot name=icon></slot> </div>"},function(e,t){e.exports="<button block=element-core-tag> <span v-text=data></span> <span elem=button v-if=_events.remove @click.stop=\"$dispatch('remove')\">&times;</span> </button>"},function(e,t){e.exports='<div block=element-input v-clickoutside=handleMouseLeave()> <span v-if="effect === \'special\'" :class="{ \'is-enter\': editing || model }" elem=placeholder @click="editing = true, $els.input.focus()" v-text=placeholder> </span> <el-core-input :class="{\n \'is-active\': show\n }" @e-blur="editing = false" :type="type || effect" :model.sync=model class=input__original :disabled=disabled :number="effect === \'number\'" :placeholder="effect === \'special\' ? \'\' : placeholder" @e-focus="editing = true, show = true"> </el-core-input> <ul v-show=show block=element-dropdown><li block=element-option :class="{\'is-selected\': item === model}" v-for="item in suggestion | filterBy model" v-text=item @click="model = item, show = false"></li></ul> </div>'},function(e,t,o){var n,s;n=o(7),s=o(1),e.exports=n||{},e.exports.__esModule&&(e.exports=e.exports["default"]),s&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=s)},function(e,t,o){var n,s;n=o(8),s=o(2),e.exports=n||{},e.exports.__esModule&&(e.exports=e.exports["default"]),s&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=s)},function(e,t,o){var n,s;n=o(9),s=o(3),e.exports=n||{},e.exports.__esModule&&(e.exports=e.exports["default"]),s&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=s)},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(5),l=n(s);t["default"]={name:"ElCoreInput",components:{ElCoreTag:l["default"]},props:{placeholder:String,disabled:Boolean,readonly:Boolean,multiple:Boolean,tags:Array,model:[String,null],type:String},methods:{handleFocus:function(){this.readonly||this.$els.input.select(),this.$dispatch("e-focus")},handleDelete:function(){this.model&&0!==this.model.trim().length||this.$dispatch("e-press-delete")}}}},function(e,t){"use strict";e.exports={name:"ElCoreTag",props:{data:[String,Number]}}},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(10),l=n(s),i=o(4),r=n(i);t["default"]={name:"el-input",components:{ElCoreInput:r["default"]},props:{placeholder:String,model:{required:!0,twoAway:!0},suggestion:{type:Array,"default":function(){return[]}},type:String,disabled:Boolean,cache:Boolean,effect:{type:String,"default":"text",validator:function(e){return["text","number","special"].indexOf(e)>-1}}},directives:{clickoutside:l["default"]},data:function(){return{show:!1,editing:!1}},methods:{handleMouseLeave:function(){this.show=!1,this.model&&this.suggestion.indexOf(this.model)<0&&this.cache&&this.suggestion.push(this.model)}}}},function(t,o){t.exports=e}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue-clickoutside")):"function"==typeof define&&define.amd?define("ElSelect",["vue-clickoutside"],t):"object"==typeof exports?exports.ElSelect=t(require("vue-clickoutside")):e.ElSelect=t(e["vue-clickoutside"])}(this,function(e){return function(e){function t(s){if(o[s])return o[s].exports;var n=o[s]={exports:{},id:s,loaded:!1};return e[s].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="/dist/",t(0)}([function(e,t,o){"use strict";var s=o(6);e.exports={ElInput:s,install:function(e){e.component(s.name,s)}}},function(e,t){e.exports="<div :class=\"{\n 'is-disabled': disabled,\n 'is-readonly': readonly,\n 'is-multiple': multiple\n }\" class=element-core-input> <template v-if=multiple> <el-core-tag @remove=tags.$remove(tag) v-for=\"tag in tags\" :data=tag> </el-core-tag> </template> <input v-el:input=\"\" v-model=model :type=\"type || 'text'\" :disabled=disabled :readonly=readonly :placeholder=placeholder :number=\"type === 'number'\" @blur=\"$dispatch('e-blur')\" @focus=handleFocus @keydown.down.prevent=\"$dispatch('e-press-down')\" @keydown.up.prevent=\"$dispatch('e-press-up')\" @keyup.enter=\"$dispatch('e-press-enter')\" @keydown.8=handleDelete @keydown.esc=\"$dispatch('e-press-esc')\" class=element-core-input__original> <slot name=icon></slot> </div>"},function(e,t){e.exports="<button class=element-core-tag> <span v-text=data></span> <span v-if=_events.remove @click.stop=\"$dispatch('remove')\" class=element-core-tag__button>&times;</span> </button>"},function(e,t){e.exports='<div v-clickoutside=handleMouseLeave() class=element-input> <span v-if="effect === \'special\'" :class="{ \'is-enter\': editing || model }" @click="editing = true, $els.input.focus()" v-text=placeholder class=element-input__placeholder> </span> <el-core-input :class="{\n \'is-active\': show\n }" @e-blur="editing = false" :type="type || effect" :model.sync=model class=input__original :disabled=disabled :number="effect === \'number\'" :placeholder="effect === \'special\' ? \'\' : placeholder" @e-focus="editing = true, show = true"> </el-core-input> <ul v-show=show class=element-dropdown><li :class="{\'is-selected\': item === model}" v-for="item in suggestion | filterBy model" v-text=item @click="model = item, show = false" class=element-option></li></ul> </div>'},function(e,t,o){var s,n;s=o(7),n=o(1),e.exports=s||{},e.exports.__esModule&&(e.exports=e.exports["default"]),n&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=n)},function(e,t,o){var s,n;s=o(8),n=o(2),e.exports=s||{},e.exports.__esModule&&(e.exports=e.exports["default"]),n&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=n)},function(e,t,o){var s,n;s=o(9),n=o(3),e.exports=s||{},e.exports.__esModule&&(e.exports=e.exports["default"]),n&&(("function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports).template=n)},function(e,t,o){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=o(5),l=s(n);t["default"]={name:"ElCoreInput",components:{ElCoreTag:l["default"]},props:{placeholder:String,disabled:Boolean,readonly:Boolean,multiple:Boolean,tags:Array,model:[String,null],type:String},methods:{handleFocus:function(){this.readonly||this.$els.input.select(),this.$dispatch("e-focus")},handleDelete:function(){this.model&&0!==this.model.trim().length||this.$dispatch("e-press-delete")}}}},function(e,t){"use strict";e.exports={name:"ElCoreTag",props:{data:[String,Number]}}},function(e,t,o){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=o(10),l=s(n),i=o(4),r=s(i);t["default"]={name:"el-input",components:{ElCoreInput:r["default"]},props:{placeholder:String,model:{required:!0,twoAway:!0},suggestion:{type:Array,"default":function(){return[]}},type:String,disabled:Boolean,cache:Boolean,effect:{type:String,"default":"text",validator:function(e){return["text","number","special"].indexOf(e)>-1}}},directives:{clickoutside:l["default"]},data:function(){return{show:!1,editing:!1}},methods:{handleMouseLeave:function(){this.show=!1,this.model&&this.suggestion.indexOf(this.model)<0&&this.cache&&this.suggestion.push(this.model)}}}},function(t,o){t.exports=e}])});
{
"name": "el-input",
"version": "0.1.0",
"version": "0.1.1",
"description": "A input component for Vue.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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