@sensorskit/vue-on-delete
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.VueOnDelete=n():e.VueOnDelete=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/lib/",t(t.s=0)}([function(e,n,t){"use strict";t.r(n);var r=function(e,n){var t=e.split(""),r=n.split(""),o=null,u=null;if(e===n||e.length<n.length)return!1;if(e.indexOf(n)>=0)return!0;for(var i=0;i<r.length;i++)if(r[i]!==t[i]){o=i;break}for(var l=1;l<=r.length;l++)if(r[r.length-l]!==t[t.length-l]){u=r.length-l;break}return u-o<0};var o={},u=[],i=function(){for(var e,n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];(e=console).error.apply(e,["[vue-on-delete]"].concat(function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}(t)))},l=function(e,n,t){return e.addEventListener(n,t,!1),{el:e,destroy:function(){return e.removeEventListener(n,t,!1)}}},f=function(e,n,t){if("function"==typeof n.value){c(e);var o=null,f=null;u.push(l(e,"focus",function(){o=e.value}),l(e,"input",function(){f=e.value,r(o,f)&&n.value(),o=f}))}else i("指令需要传入一个函数!")},c=function(e){if(u.length)for(var n=u.length-1;n>=0;){var t=u[n];t.el===e&&(t.destroy(),u.splice(n,1)),n-=1}},a=function(e,n){n.value!==n.oldValue&&f(e,n)};o.install=function(e,n){var t=n&&n.directive?n.directive:"on-delete";e.directive(t,{bind:f,update:a,unbind:c})},console.log(o);n.default=o}])}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.VueOnDelete=n():e.VueOnDelete=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/lib/",t(t.s=0)}([function(e,n,t){"use strict";t.r(n);var r=function(e,n){var t=e.split(""),r=n.split(""),o=null,u=null;if(e===n||e.length<n.length)return!1;if(e.indexOf(n)>=0)return!0;for(var i=0;i<r.length;i++)if(r[i]!==t[i]){o=i;break}for(var l=1;l<=r.length;l++)if(r[r.length-l]!==t[t.length-l]){u=r.length-l;break}return u-o<0};var o={},u=[],i=function(){for(var e,n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];(e=console).error.apply(e,["[vue-on-delete]"].concat(function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}(t)))},l=function(e,n,t){return e.addEventListener(n,t,!1),{el:e,destroy:function(){return e.removeEventListener(n,t,!1)}}},f=function(e,n,t){if("function"==typeof n.value){c(e);var o=null,f=null,a=!1;u.push(l(e,"focus",function(){o=e.value}),l(e,"input",function(){a||(f=e.value,r(o,f)&&n.value(),o=f)}),l(e,"compositionstart",function(){a=!0}),l(e,"compositionend",function(){a=!1}))}else i("指令需要传入一个函数!")},c=function(e){if(u.length)for(var n=u.length-1;n>=0;){var t=u[n];t.el===e&&(t.destroy(),u.splice(n,1)),n-=1}},a=function(e,n){n.value!==n.oldValue&&f(e,n)};o.install=function(e,n){var t=n&&n.directive?n.directive:"on-delete";e.directive(t,{bind:f,update:a,unbind:c})};n.default=o}])}); |
{ | ||
"name": "@sensorskit/vue-on-delete", | ||
"description": "vue custom directive of delete binding", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "newraina <newraina@users.noreply.github.com>", | ||
@@ -14,3 +14,3 @@ "main": "lib/vue-on-delete.js", | ||
"build:example": "webpack --config webpack.example.js", | ||
"publish": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"deploy": "npm run build:example && gh-pages -d dist", | ||
@@ -17,0 +17,0 @@ "test": "jest", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
313000