@calibur/sakura
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}({0:function(e,t,r){"use strict";function o(e,t,r,o,n,i,s,a){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):n&&(c=a?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}r.d(t,"a",(function(){return o}))},36:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-field"},[r("div",{staticClass:"v-field__before",class:{"v-field__before--line":e.beforeLine,"v-field__before--has":e.hasBefore}},[e._t("before")],2),e._v(" "),r("div",{staticClass:"v-field__main"},[e.showClose&&e.score?r("div",{staticClass:"v-field__cancel",on:{click:e.clear}},[r("i",{staticClass:"bili-font ic_input_close"})]):e._e(),e._v(" "),r("div",{staticClass:"v-field__input",class:{"v-field__input--error":e.showError,"v-field__input--close":e.showClose}},["checkbox"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.score)?e._i(e.score,null)>-1:e.score},on:{change:function(t){var r=e.score,o=t.target,n=!!o.checked;if(Array.isArray(r)){var i=e._i(r,null);o.checked?i<0&&(e.score=r.concat([null])):i>-1&&(e.score=r.slice(0,i).concat(r.slice(i+1)))}else e.score=n}}},"input",e.inputAttr,!1)):"radio"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"radio"},domProps:{checked:e._q(e.score,null)},on:{change:function(t){e.score=null}}},"input",e.inputAttr,!1)):e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:e.inputAttr.type},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"input",e.inputAttr,!1)):r("div",{staticClass:"v-field__textarea"},[e.isAutoSize?r("div",{class:{"v-field__textarea--auto":e.isAutoSize}},[e.isAutoSize?r("pre",{style:e.preShimStyle,domProps:{textContent:e._s(e.score)}}):e._e(),e._v(" "),r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1))]):r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{rows:e.minRow},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1)),e._v(" "),e.counter?r("div",{staticClass:"v-field__counter",domProps:{textContent:e._s(e.maxLen?e.score.length+"/"+e.maxLen:e.score.length)}}):e._e()])])]),e._v(" "),r("div",{staticClass:"v-field__after",class:{"v-field__after--line":e.afterLine,"v-field__after--has":e.hasAfter}},[e._t("after")],2)])};o._withStripped=!0;r(51);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s={name:"VField",props:{value:{type:String,required:!0},attr:{type:Object,default:function(){return{type:"text",placeholder:"请输入"}}},minRow:{type:Number,default:1},maxRow:{type:Number,default:1},maxLen:{type:Number,default:0},close:{type:Boolean,default:!0},counter:{type:Boolean,default:!1},beforeLine:{type:Boolean,default:!1},afterLine:{type:Boolean,default:!1},error:{type:Number,default:0}},data:function(){return{score:this.value,showError:!!this.error}},computed:{hasBefore:function(){return!!this.$slots.before},hasAfter:function(){return!!this.$slots.after},showClose:function(){return this.close&&this.isInput},inputAttr:function(){return this.maxLen?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this.attr,{maxLength:this.maxLen}):this.attr},isInput:function(){return 1===this.minRow&&1===this.maxRow},isAutoSize:function(){return this.maxRow>this.minRow||0===this.maxRow},preShimStyle:function(){var e={};return this.maxRow&&(e["-webkit-line-clamp"]=this.maxRow),this.minRow>1&&(e["min-height"]="".concat(20*this.minRow,"px")),e}},watch:{value:function(e){this.showError=!1,this.score=e},score:function(e){this.showError=!1,this.$emit("input",e.trim())},error:function(e){this.showError=!!e}},methods:{clear:function(){this.score=""}}},a=r(0),c=Object(a.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/field/field.vue";var u=c.exports;t.default=u},51:function(e,t,r){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}({0:function(e,t,r){"use strict";function o(e,t,r,o,n,i,s,a){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):n&&(c=a?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}r.d(t,"a",(function(){return o}))},36:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-field"},[r("div",{staticClass:"v-field__before",class:{"v-field__before--line":e.beforeLine,"v-field__before--has":e.hasBefore}},[e._t("before")],2),e._v(" "),r("div",{staticClass:"v-field__main"},[e.showClose&&e.score?r("div",{staticClass:"v-field__cancel",on:{click:e.clear}},[r("i",{staticClass:"bili-font ic_input_close"})]):e._e(),e._v(" "),r("div",{staticClass:"v-field__input",class:{"v-field__input--error":e.showError,"v-field__input--close":e.showClose}},["checkbox"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.score)?e._i(e.score,null)>-1:e.score},on:{change:function(t){var r=e.score,o=t.target,n=!!o.checked;if(Array.isArray(r)){var i=e._i(r,null);o.checked?i<0&&(e.score=r.concat([null])):i>-1&&(e.score=r.slice(0,i).concat(r.slice(i+1)))}else e.score=n}}},"input",e.inputAttr,!1)):"radio"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"radio"},domProps:{checked:e._q(e.score,null)},on:{change:function(t){e.score=null}}},"input",e.inputAttr,!1)):e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:e.inputAttr.type},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"input",e.inputAttr,!1)):r("div",{staticClass:"v-field__textarea"},[e.isAutoSize?r("div",{class:{"v-field__textarea--auto":e.isAutoSize}},[e.isAutoSize?r("pre",{style:e.preShimStyle,domProps:{textContent:e._s(e.score)}}):e._e(),e._v(" "),r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1))]):r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{rows:e.minRow},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1)),e._v(" "),e.counter?r("div",{staticClass:"v-field__counter",domProps:{textContent:e._s(e.maxLen?e.score.length+"/"+e.maxLen:e.score.length)}}):e._e()])])]),e._v(" "),r("div",{staticClass:"v-field__after",class:{"v-field__after--line":e.afterLine,"v-field__after--has":e.hasAfter}},[e._t("after")],2)])};o._withStripped=!0;r(51);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s={name:"VField",props:{value:{type:String,required:!0},attr:{type:Object,default:function(){return{type:"text",placeholder:"请输入"}}},minRow:{type:Number,default:1},maxRow:{type:Number,default:1},maxLen:{type:Number,default:0},placeholder:{type:String,default:"请输入"},close:{type:Boolean,default:!0},counter:{type:Boolean,default:!1},beforeLine:{type:Boolean,default:!1},afterLine:{type:Boolean,default:!1},error:{type:Number,default:0}},data:function(){return{score:this.value,showError:!!this.error}},computed:{hasBefore:function(){return!!this.$slots.before},hasAfter:function(){return!!this.$slots.after},showClose:function(){return this.close&&this.isInput},inputAttr:function(){var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({placeholder:this.placeholder},this.attr);return this.maxLen&&(e.maxLength=this.maxLen),e},isInput:function(){return 1===this.minRow&&1===this.maxRow},isAutoSize:function(){return this.maxRow>this.minRow||0===this.maxRow},preShimStyle:function(){var e={};return this.maxRow&&(e["-webkit-line-clamp"]=this.maxRow),this.minRow>1&&(e["min-height"]="".concat(20*this.minRow,"px")),e}},watch:{value:function(e){this.showError=!1,this.score=e},score:function(e){this.showError=!1,this.$emit("input",e.trim())},error:function(e){this.showError=!!e}},methods:{clear:function(){this.score=""}}},a=r(0),c=Object(a.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/field/field.vue";var u=c.exports;t.default=u},51:function(e,t,r){}})})); |
{ | ||
"name": "@calibur/sakura", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "bilibili h5 vue components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
780175