@dpapejs/dpvue-ui
Advanced tools
Comparing version 1.0.20 to 1.0.21
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t={197:function(t){function e(){return e=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],i=["class","style","directives"],o=["on","nativeOn"],r=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,s){for(var a in s)if(t[a])if(-1!==n.indexOf(a))t[a]=e({},t[a],s[a]);else if(-1!==i.indexOf(a)){var c=t[a]instanceof Array?t[a]:[t[a]],u=s[a]instanceof Array?s[a]:[s[a]];t[a]=c.concat(u)}else if(-1!==o.indexOf(a))for(var d in s[a])if(t[a][d]){var l=t[a][d]instanceof Array?t[a][d]:[t[a][d]],p=s[a][d]instanceof Array?s[a][d]:[s[a][d]];t[a][d]=l.concat(p)}else t[a][d]=s[a][d];else if("hook"==a)for(var h in s[a])t[a][h]=t[a][h]?r(t[a][h],s[a][h]):s[a][h];else t[a]=s[a];else t[a]=s[a];return t}),{})}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};!function(){n.r(i),n.d(i,{default:function(){return m}});var t=n(197),e=n.n(t);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function r(t,e,n,i,o,r,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):o&&(c=a?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}var s=r({name:"dpInput",props:{value:{type:[String,Number],default:""},textarea:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},suffixIcon:{type:String,default:""},prefixIcon:{type:String,default:""},disableResize:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},methods:{setValue:function(t){var e=this.$attrs.type,n=t.target.value;this.$emit("input","number"===e?Number(n):n)}},computed:{listeners:function(){return Object.assign({},this.$listeners,{input:this.setValue})}},render:function(t){return t("div",{class:["dp-input",{suffix:this.suffixIcon||this.$scopedSlots.suffix,prefix:this.prefixIcon||this.$scopedSlots.prefix},{disabled:this.disabled}]},[this.textarea?t("textarea",e()([{class:["dp-input--inner textarea",{noresize:this.disableResize}]},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{domProps:{value:this.value}}])):t("input",e()([{domProps:{value:this.value},on:{input:this.setValue.bind(this)}},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{attrs:{autocomplete:this.autocomplete},class:"dp-input--inner"}])),this.suffixIcon||this.$scopedSlots.suffix?t("div",{class:"dp-input--suffix"},[this.$scopedSlots.suffix?this.$scopedSlots.suffix():t("i",{class:this.suffixIcon})]):void 0,this.prefixIcon||this.$scopedSlots.prefix?t("div",{class:"dp-input--prefix"},[this.$scopedSlots.prefix?this.$scopedSlots.prefix():t("i",{class:this.prefixIcon})]):void 0])}},undefined,undefined,!1,null,null,null);s.options.__file="src/modules/input/index.vue";var a=s.exports;function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=r({name:"dpSelect",components:{Input:a},props:{value:{type:[Boolean,String,Number],default:""},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},data:function(){return{dropdownStyle:{},dropdownFade:!1,arrowBottom:!1,scrollTarget:void 0,documentElement:void 0,tagName:"",zIndex:0}},computed:{name:function(){var t=this;if(""===this.value)return"";if(this.value&&0===this.options.length)return this.value;var e=this.options.find((function(e){return("object"!==o(e)?{name:e,value:e}:e).value===t.value}));return e?"string"==typeof e?e:e.name:""}},beforeDestroy:function(){this.$refs.dropdown&&document.body.removeChild(this.$refs.dropdown),this.removeEvent()},mounted:function(){this.init()},methods:{init:function(){var t=this.scrollTargetEl,e=t&&document.querySelector(t)?document.querySelector(t):document;this.documentElement=t?e:document.documentElement,this.scrollTarget=e;var n=this.$refs.dropdown;this.setDropdownDOMToBody(n),this.addEvent(),this.tagName=parseInt(1e3*Math.random())+Date.now()+"_dpselect"},addEvent:function(){window.addEventListener("resize",this.resetStyle,!1),this.scrollTarget.addEventListener("scroll",this.onScroll,!1),document.addEventListener("click",this.checkPopupContainer,!1)},removeEvent:function(){window.removeEventListener("resize",this.resetStyle,!1),this.scrollTarget.removeEventListener("scroll",this.onScroll,!1),document.removeEventListener("click",this.checkPopupContainer,!1)},onScroll:function(){this.dropdownFade=!1},resetStyle:function(){this.dropdownFade&&!this.disabled&&this.setDropdownStyle()},checkPopupContainer:function(t){this.dropdownFade&&(function(t,e){if(t&&"string"==typeof t.className&&t.className.indexOf(e)>=0)return t;for(var n=null,i=t.parentNode;i&&9!==i.nodeType;){if(i.className.indexOf(e)>=0){n=i;break}i=i.parentNode}return n}(t.target,this.tagName)||(this.dropdownFade=!1))},setDropdownDOMToBody:function(t){t&&document.body.appendChild(t)},setDropdownStyle:function(){var t=this.$refs.input;if(t){var e=t.getBoundingClientRect(),n=e.top,i=e.left,o=e.width,r=e.height,s=this.documentElement.clientHeight,a="".concat(i,"px"),c="".concat(n+r+10,"px"),u=this.$refs.dropdown.clientHeight,d=u+n>s;d&&(c="".concat(n-u-10,"px")),this.arrowBottom=d,this.dropdownStyle={left:a,top:c,minWidth:"".concat(o,"px")}}},fadeSelect:function(){var t,e,n=this;this.disabled||(this.dropdownFade?this.hideDropdown():(this.setDropdownStyle(),this.zIndex=(e=u(document.querySelectorAll(t?"".concat(t," *"):"*")).map((function(t){return+window.getComputedStyle(t).zIndex||0}))).length?Math.max.apply(Math,u(e))+1:0,this.$nextTick((function(){n.dropdownFade=!0}))))},hideDropdown:function(){this.dropdownFade=!1},chooseItem:function(t){t.disabled||(this.hideDropdown(),this.$emit("change",t),this.$emit("input",t.value))}},render:function(t){var n=this;return t("div",{class:["dp-select",{show:this.dropdownFade},this.tagName],ref:"input",on:{click:this.fadeSelect}},[t(a,e()([{},{attrs:this.$attrs},{attrs:{value:this.name,disabled:this.disabled,readonly:this.readonly,suffixIcon:"dp-icon-arrow-down dp-select__arrow"}}])),t("div",{class:["dp-select--dropdown",{fade:this.dropdownFade},this.tagName],ref:"dropdown",style:[this.dropdownStyle,{zIndex:this.zIndex}]},[t("div",{class:"dropdown",ref:"dropdownCtx"},[this.options.map((function(e){var i="object"!==o(e)?{name:e,value:e}:e;return t("div",{on:{click:n.chooseItem.bind(n,i)},class:["dp-select--dropdown__item",{active:n.value===i.value}]},[i.name])}))]),t("span",{class:["dp-select--dropdown__arrow",this.arrowBottom?"top":"bottom"]})])])}},undefined,undefined,!1,null,null,null);d.options.__file="src/modules/select/index.vue";var l=d.exports,p={name:"dpPagination",components:{DpSelect:l},model:{prop:"current",event:"input"},props:{total:{type:Number,default:0},pageSize:{type:Number,default:10},current:{type:Number,default:1},position:{type:String,default:"right"},size:{type:String,default:""},sizes:{type:Array,default:function(){return[10,20,30,40,50]}}},computed:{paging:function(){var t=0,e=5,n=this.maxPaging.length;n>5&&this.current>=5&&(e=(t=this.current-3)+5);var i=n-5;return t=i>0&&t>i?i:t,this.maxPaging.slice(t,e)},viewDoubleNext:function(){var t=this.maxPaging.length-5;return t>0&&this.current<t+3},viewDoublePrve:function(){return this.current>=5&&this.maxPaging.length>5}},data:function(){return{maxPaging:[],quicknextType:"",pageSizes:[]}},mounted:function(){this.init()},watch:{total:function(){this.setMaxPaging()},pageSize:function(){this.setMaxPaging()},sizes:function(){this.formatData()}},methods:{init:function(){this.setMaxPaging(),this.formatData()},clickNext:function(t){var e=this.maxPaging.length;if(this.current!==e){var n=this.current+t;n=n>e?e:n,this.changePageEvent(n)}},clickPrve:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(1!==this.current){var e=this.current-t;e=e<1?1:e,this.changePageEvent(e)}},changePageEvent:function(t){this.$emit("input",t),this.$emit("change",{page:t,pageSize:this.pageSize})},setMaxPaging:function(){var t=this.total%this.pageSize,e=parseInt(this.total/this.pageSize)+(0===t?0:1);this.maxPaging=Array.from({length:e}).map((function(t,e){return e+1}))},setQuicknextType:function(t){this.quicknextType=t||""},changePageSize:function(t){this.$emit("update:pageSize",t),this.$emit("change",{page:this.current,pageSize:t})},formatData:function(){this.pageSizes=this.sizes.map((function(t){return{name:"".concat(t,"条/页"),value:t}}))}},render:function(t){var e=this;return this.paging.length>0?t("div",{class:["dp-pagination",this.position]},[t("span",["共 ",this.total," 条"]),t("span",{class:["arrow",{disabled:1===this.current},this.size],on:{click:this.clickPrve.bind(this,1)}},[t("i",{class:"dp-icon-arrow-left"})]),this.viewDoublePrve?t("span",{class:["quicknext",this.size],on:{click:this.clickPrve.bind(this,5),mouseout:this.setQuicknextType.bind(this),mouseover:this.setQuicknextType.bind(this,"prve")}},[t("i",{class:"dp-icon-".concat("prve"===this.quicknextType?"double-arrow-left":"ellipsis")})]):void 0,t("div",{class:["dp-pagination--numbers",this.size]},[this.paging.map((function(n){return t("span",{on:{click:function(){e.current!==n&&e.changePageEvent(n)}},class:["value",{active:e.current===n}]},[n])}))]),this.viewDoubleNext?t("span",{class:["quicknext",this.size],on:{click:this.clickNext.bind(this,5),mouseout:this.setQuicknextType.bind(this),mouseover:this.setQuicknextType.bind(this,"next")}},[t("i",{class:"dp-icon-".concat("next"===this.quicknextType?"double-arrow-right":"ellipsis")})]):void 0,t("span",{class:["arrow",{disabled:this.current===this.maxPaging.length},this.size],on:{click:this.clickNext.bind(this,1)}},[t("i",{class:"dp-icon-arrow-right"})]),t(l,{attrs:{options:this.pageSizes,value:this.pageSize,readonly:!0,targetEl:this.target},class:[this.size,"dp-pagination__select"],on:{input:this.changePageSize.bind(this)}})]):void 0}},h=r(p,undefined,undefined,!1,null,null,null);h.options.__file="src/modules/pagination/index.vue";var f=h.exports;f.install=function(t){t.component(f.name,f)};var m=f}(),module.exports=i}(); | ||
!function(){"use strict";var t={197:function(t){function e(){return e=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],i=["class","style","directives"],o=["on","nativeOn"],s=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,r){for(var a in r)if(t[a])if(-1!==n.indexOf(a))t[a]=e({},t[a],r[a]);else if(-1!==i.indexOf(a)){var c=t[a]instanceof Array?t[a]:[t[a]],d=r[a]instanceof Array?r[a]:[r[a]];t[a]=c.concat(d)}else if(-1!==o.indexOf(a))for(var u in r[a])if(t[a][u]){var l=t[a][u]instanceof Array?t[a][u]:[t[a][u]],p=r[a][u]instanceof Array?r[a][u]:[r[a][u]];t[a][u]=l.concat(p)}else t[a][u]=r[a][u];else if("hook"==a)for(var h in r[a])t[a][h]=t[a][h]?s(t[a][h],r[a][h]):r[a][h];else t[a]=r[a];else t[a]=r[a];return t}),{})}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};!function(){n.r(i),n.d(i,{default:function(){return m}});var t=n(197),e=n.n(t);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e,n,i,o,s,r,a){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),s&&(d._scopeId="data-v-"+s),r?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},d._ssrRegister=c):o&&(c=a?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(d.functional){d._injectStyles=c;var u=d.render;d.render=function(t,e){return c.call(e),u(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:d}}var r=s({name:"dpInput",props:{value:{type:[String,Number],default:""},textarea:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},suffixIcon:{type:String,default:""},prefixIcon:{type:String,default:""},disableResize:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},methods:{setValue:function(t){var e=this.$attrs.type,n=t.target.value;this.$emit("input","number"===e?Number(n):n)}},computed:{listeners:function(){return Object.assign({},this.$listeners,{input:this.setValue})}},render:function(t){return t("div",{class:["dp-input",{suffix:this.suffixIcon||this.$scopedSlots.suffix,prefix:this.prefixIcon||this.$scopedSlots.prefix},{disabled:this.disabled}]},[this.textarea?t("textarea",e()([{class:["dp-input--inner textarea",{noresize:this.disableResize}]},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{domProps:{value:this.value}}])):t("input",e()([{domProps:{value:this.value},on:{input:this.setValue.bind(this)}},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{attrs:{autocomplete:this.autocomplete},class:"dp-input--inner"}])),this.suffixIcon||this.$scopedSlots.suffix?t("div",{class:"dp-input--suffix"},[this.$scopedSlots.suffix?this.$scopedSlots.suffix():t("i",{class:this.suffixIcon})]):void 0,this.prefixIcon||this.$scopedSlots.prefix?t("div",{class:"dp-input--prefix"},[this.$scopedSlots.prefix?this.$scopedSlots.prefix():t("i",{class:this.prefixIcon})]):void 0])}},undefined,undefined,!1,null,null,null);r.options.__file="src/modules/input/index.vue";var a=r.exports;function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function d(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=s({name:"dpSelect",components:{Input:a},props:{value:{type:[String,Number,Array],default:""},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1}},data:function(){return{dropdownStyle:{},dropdownFade:!1,arrowBottom:!1,scrollTarget:void 0,documentElement:void 0,tagName:"",zIndex:0,readonly:!0,showDropdown:!1}},computed:{name:function(){var t=this;if(""===this.value)return"";if(this.value&&0===this.options.length)return this.value;var e=this.options.find((function(e){return("object"!==o(e)?{name:e,value:e}:e).value===t.value}));return e?"string"==typeof e?e:e.name:""}},beforeDestroy:function(){this.$refs.dropdown&&document.body.removeChild(this.$refs.dropdown),this.removeEvent()},mounted:function(){this.init()},methods:{init:function(){var t=this.scrollTargetEl,e=t&&document.querySelector(t)?document.querySelector(t):document;this.documentElement=t?e:document.documentElement,this.scrollTarget=e;var n=this.$refs.dropdown;this.setDropdownDOMToBody(n),this.addEvent(),this.tagName=parseInt(1e3*Math.random())+Date.now()+"_dpselect"},addEvent:function(){window.addEventListener("resize",this.resetStyle,!1),this.scrollTarget.addEventListener("scroll",this.onScroll,!1),document.addEventListener("click",this.checkPopupContainer,!1)},removeEvent:function(){window.removeEventListener("resize",this.resetStyle,!1),this.scrollTarget.removeEventListener("scroll",this.onScroll,!1),document.removeEventListener("click",this.checkPopupContainer,!1)},onScroll:function(){this.dropdownFade=!1},resetStyle:function(){this.dropdownFade&&!this.disabled&&this.setDropdownStyle()},checkPopupContainer:function(t){this.dropdownFade&&(function(t,e){if(t&&"string"==typeof t.className&&t.className.indexOf(e)>=0)return t;for(var n=null,i=t.parentNode;i&&9!==i.nodeType;){if(i.className.indexOf(e)>=0){n=i;break}i=i.parentNode}return n}(t.target,this.tagName)||(this.dropdownFade=!1))},setDropdownDOMToBody:function(t){t&&document.body.appendChild(t)},setDropdownStyle:function(){var t=this.$refs.input;if(t){var e=t.getBoundingClientRect(),n=e.top,i=e.left,o=e.width,s=e.height,r=this.documentElement.clientHeight,a="".concat(i,"px"),c="".concat(n+s+10,"px"),d=this.$refs.dropdown.clientHeight,u=d+n>r;u&&(c="".concat(n-d-10,"px")),this.arrowBottom=u,this.dropdownStyle={left:a,top:c,minWidth:"".concat(o,"px")}}},fadeSelect:function(){var t,e,n=this;this.disabled||(this.dropdownFade?this.hideDropdown():(this.setDropdownStyle(),this.zIndex=(e=d(document.querySelectorAll(t?"".concat(t," *"):"*")).map((function(t){return+window.getComputedStyle(t).zIndex||0}))).length?Math.max.apply(Math,d(e))+1:0,this.$nextTick((function(){n.dropdownFade=!0}))))},hideDropdown:function(){this.dropdownFade=!1},chooseItem:function(t){t.disabled||(this.hideDropdown(),this.$emit("change",t),this.$emit("input",t.value))}},render:function(t){var n=this;return t("div",{class:["dp-select",{show:this.dropdownFade},this.tagName],ref:"input",on:{click:this.fadeSelect}},[t(a,e()([{},{attrs:this.$attrs},{attrs:{value:this.name,disabled:this.disabled,readonly:this.readonly,suffixIcon:"dp-icon-arrow-down dp-select__arrow"}}])),t("transition",e()([{attrs:{name:"dp-select--dropdown__fade"}},{on:{leave:function(){n.showDropdown=!1},"after-appear":function(){n.showDropdown=!0}}}]),[t("div",{class:["dp-select--dropdown",this.tagName],directives:[{name:"show",value:this.dropdownFade}],ref:"dropdown",style:[this.dropdownStyle,{zIndex:this.zIndex}]},[t("div",{class:["dropdown",{show:this.showDropdown}],ref:"dropdownCtx"},[this.options.map((function(e){var i="object"!==o(e)?{name:e,value:e}:e;return t("div",{on:{click:n.chooseItem.bind(n,i)},class:["dp-select--dropdown__item",{active:n.value===i.value}]},[n.$scopedSlots.item?n.$scopedSlots.item(i):i.name])}))]),t("span",{class:["dp-select--dropdown__arrow",this.arrowBottom?"top":"bottom"]})])])])}},undefined,undefined,!1,null,null,null);u.options.__file="src/modules/select/index.vue";var l=u.exports,p={name:"dpPagination",components:{DpSelect:l},model:{prop:"current",event:"input"},props:{total:{type:Number,default:0},pageSize:{type:Number,default:10},current:{type:Number,default:1},position:{type:String,default:"right"},size:{type:String,default:""},sizes:{type:Array,default:function(){return[10,20,30,40,50]}}},computed:{paging:function(){var t=0,e=5,n=this.maxPaging.length;n>5&&this.current>=5&&(e=(t=this.current-3)+5);var i=n-5;return t=i>0&&t>i?i:t,this.maxPaging.slice(t,e)},viewDoubleNext:function(){var t=this.maxPaging.length-5;return t>0&&this.current<t+3},viewDoublePrve:function(){return this.current>=5&&this.maxPaging.length>5}},data:function(){return{maxPaging:[],quicknextType:"",pageSizes:[]}},mounted:function(){this.init()},watch:{total:function(){this.setMaxPaging()},pageSize:function(){this.setMaxPaging()},sizes:function(){this.formatData()}},methods:{init:function(){this.setMaxPaging(),this.formatData()},clickNext:function(t){var e=this.maxPaging.length;if(this.current!==e){var n=this.current+t;n=n>e?e:n,this.changePageEvent(n)}},clickPrve:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(1!==this.current){var e=this.current-t;e=e<1?1:e,this.changePageEvent(e)}},changePageEvent:function(t){this.$emit("input",t),this.$emit("change",{page:t,pageSize:this.pageSize})},setMaxPaging:function(){var t=this.total%this.pageSize,e=parseInt(this.total/this.pageSize)+(0===t?0:1);this.maxPaging=Array.from({length:e}).map((function(t,e){return e+1}))},setQuicknextType:function(t){this.quicknextType=t||""},changePageSize:function(t){this.$emit("update:pageSize",t),this.$emit("change",{page:this.current,pageSize:t})},formatData:function(){this.pageSizes=this.sizes.map((function(t){return{name:"".concat(t,"条/页"),value:t}}))}},render:function(t){var e=this;return this.paging.length>0?t("div",{class:["dp-pagination",this.position]},[t("span",["共 ",this.total," 条"]),t("span",{class:["arrow",{disabled:1===this.current},this.size],on:{click:this.clickPrve.bind(this,1)}},[t("i",{class:"dp-icon-arrow-left"})]),this.viewDoublePrve?t("span",{class:["quicknext",this.size],on:{click:this.clickPrve.bind(this,5),mouseout:this.setQuicknextType.bind(this),mouseover:this.setQuicknextType.bind(this,"prve")}},[t("i",{class:"dp-icon-".concat("prve"===this.quicknextType?"double-arrow-left":"ellipsis")})]):void 0,t("div",{class:["dp-pagination--numbers",this.size]},[this.paging.map((function(n){return t("span",{on:{click:function(){e.current!==n&&e.changePageEvent(n)}},class:["value",{active:e.current===n}]},[n])}))]),this.viewDoubleNext?t("span",{class:["quicknext",this.size],on:{click:this.clickNext.bind(this,5),mouseout:this.setQuicknextType.bind(this),mouseover:this.setQuicknextType.bind(this,"next")}},[t("i",{class:"dp-icon-".concat("next"===this.quicknextType?"double-arrow-right":"ellipsis")})]):void 0,t("span",{class:["arrow",{disabled:this.current===this.maxPaging.length},this.size],on:{click:this.clickNext.bind(this,1)}},[t("i",{class:"dp-icon-arrow-right"})]),t(l,{attrs:{options:this.pageSizes,value:this.pageSize,readonly:!0,targetEl:this.target},class:[this.size,"dp-pagination__select"],on:{input:this.changePageSize.bind(this)}})]):void 0}},h=s(p,undefined,undefined,!1,null,null,null);h.options.__file="src/modules/pagination/index.vue";var f=h.exports;f.install=function(t){t.component(f.name,f)};var m=f}(),module.exports=i}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t={197:function(t){function e(){return e=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],o=["class","style","directives"],r=["on","nativeOn"],i=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,s){for(var a in s)if(t[a])if(-1!==n.indexOf(a))t[a]=e({},t[a],s[a]);else if(-1!==o.indexOf(a)){var d=t[a]instanceof Array?t[a]:[t[a]],l=s[a]instanceof Array?s[a]:[s[a]];t[a]=d.concat(l)}else if(-1!==r.indexOf(a))for(var u in s[a])if(t[a][u]){var c=t[a][u]instanceof Array?t[a][u]:[t[a][u]],p=s[a][u]instanceof Array?s[a][u]:[s[a][u]];t[a][u]=c.concat(p)}else t[a][u]=s[a][u];else if("hook"==a)for(var f in s[a])t[a][f]=t[a][f]?i(t[a][f],s[a][f]):s[a][f];else t[a]=s[a];else t[a]=s[a];return t}),{})}}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};!function(){n.r(o),n.d(o,{default:function(){return p}});var t=n(197),e=n.n(t);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e,n,o,r,i,s,a){var d,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=d):r&&(d=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(l.functional){l._injectStyles=d;var u=l.render;l.render=function(t,e){return d.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,d):[d]}return{exports:t,options:l}}var s=i({name:"dpInput",props:{value:{type:[String,Number],default:""},textarea:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},suffixIcon:{type:String,default:""},prefixIcon:{type:String,default:""},disableResize:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},methods:{setValue:function(t){var e=this.$attrs.type,n=t.target.value;this.$emit("input","number"===e?Number(n):n)}},computed:{listeners:function(){return Object.assign({},this.$listeners,{input:this.setValue})}},render:function(t){return t("div",{class:["dp-input",{suffix:this.suffixIcon||this.$scopedSlots.suffix,prefix:this.prefixIcon||this.$scopedSlots.prefix},{disabled:this.disabled}]},[this.textarea?t("textarea",e()([{class:["dp-input--inner textarea",{noresize:this.disableResize}]},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{domProps:{value:this.value}}])):t("input",e()([{domProps:{value:this.value},on:{input:this.setValue.bind(this)}},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{attrs:{autocomplete:this.autocomplete},class:"dp-input--inner"}])),this.suffixIcon||this.$scopedSlots.suffix?t("div",{class:"dp-input--suffix"},[this.$scopedSlots.suffix?this.$scopedSlots.suffix():t("i",{class:this.suffixIcon})]):void 0,this.prefixIcon||this.$scopedSlots.prefix?t("div",{class:"dp-input--prefix"},[this.$scopedSlots.prefix?this.$scopedSlots.prefix():t("i",{class:this.prefixIcon})]):void 0])}},undefined,undefined,!1,null,null,null);s.options.__file="src/modules/input/index.vue";var a=s.exports;function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function l(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=i({name:"dpSelect",components:{Input:a},props:{value:{type:[Boolean,String,Number],default:""},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},data:function(){return{dropdownStyle:{},dropdownFade:!1,arrowBottom:!1,scrollTarget:void 0,documentElement:void 0,tagName:"",zIndex:0}},computed:{name:function(){var t=this;if(""===this.value)return"";if(this.value&&0===this.options.length)return this.value;var e=this.options.find((function(e){return("object"!==r(e)?{name:e,value:e}:e).value===t.value}));return e?"string"==typeof e?e:e.name:""}},beforeDestroy:function(){this.$refs.dropdown&&document.body.removeChild(this.$refs.dropdown),this.removeEvent()},mounted:function(){this.init()},methods:{init:function(){var t=this.scrollTargetEl,e=t&&document.querySelector(t)?document.querySelector(t):document;this.documentElement=t?e:document.documentElement,this.scrollTarget=e;var n=this.$refs.dropdown;this.setDropdownDOMToBody(n),this.addEvent(),this.tagName=parseInt(1e3*Math.random())+Date.now()+"_dpselect"},addEvent:function(){window.addEventListener("resize",this.resetStyle,!1),this.scrollTarget.addEventListener("scroll",this.onScroll,!1),document.addEventListener("click",this.checkPopupContainer,!1)},removeEvent:function(){window.removeEventListener("resize",this.resetStyle,!1),this.scrollTarget.removeEventListener("scroll",this.onScroll,!1),document.removeEventListener("click",this.checkPopupContainer,!1)},onScroll:function(){this.dropdownFade=!1},resetStyle:function(){this.dropdownFade&&!this.disabled&&this.setDropdownStyle()},checkPopupContainer:function(t){this.dropdownFade&&(function(t,e){if(t&&"string"==typeof t.className&&t.className.indexOf(e)>=0)return t;for(var n=null,o=t.parentNode;o&&9!==o.nodeType;){if(o.className.indexOf(e)>=0){n=o;break}o=o.parentNode}return n}(t.target,this.tagName)||(this.dropdownFade=!1))},setDropdownDOMToBody:function(t){t&&document.body.appendChild(t)},setDropdownStyle:function(){var t=this.$refs.input;if(t){var e=t.getBoundingClientRect(),n=e.top,o=e.left,r=e.width,i=e.height,s=this.documentElement.clientHeight,a="".concat(o,"px"),d="".concat(n+i+10,"px"),l=this.$refs.dropdown.clientHeight,u=l+n>s;u&&(d="".concat(n-l-10,"px")),this.arrowBottom=u,this.dropdownStyle={left:a,top:d,minWidth:"".concat(r,"px")}}},fadeSelect:function(){var t,e,n=this;this.disabled||(this.dropdownFade?this.hideDropdown():(this.setDropdownStyle(),this.zIndex=(e=l(document.querySelectorAll(t?"".concat(t," *"):"*")).map((function(t){return+window.getComputedStyle(t).zIndex||0}))).length?Math.max.apply(Math,l(e))+1:0,this.$nextTick((function(){n.dropdownFade=!0}))))},hideDropdown:function(){this.dropdownFade=!1},chooseItem:function(t){t.disabled||(this.hideDropdown(),this.$emit("change",t),this.$emit("input",t.value))}},render:function(t){var n=this;return t("div",{class:["dp-select",{show:this.dropdownFade},this.tagName],ref:"input",on:{click:this.fadeSelect}},[t(a,e()([{},{attrs:this.$attrs},{attrs:{value:this.name,disabled:this.disabled,readonly:this.readonly,suffixIcon:"dp-icon-arrow-down dp-select__arrow"}}])),t("div",{class:["dp-select--dropdown",{fade:this.dropdownFade},this.tagName],ref:"dropdown",style:[this.dropdownStyle,{zIndex:this.zIndex}]},[t("div",{class:"dropdown",ref:"dropdownCtx"},[this.options.map((function(e){var o="object"!==r(e)?{name:e,value:e}:e;return t("div",{on:{click:n.chooseItem.bind(n,o)},class:["dp-select--dropdown__item",{active:n.value===o.value}]},[o.name])}))]),t("span",{class:["dp-select--dropdown__arrow",this.arrowBottom?"top":"bottom"]})])])}},undefined,undefined,!1,null,null,null);u.options.__file="src/modules/select/index.vue";var c=u.exports;c.install=function(t){t.component(c.name,c)};var p=c}(),module.exports=o}(); | ||
!function(){"use strict";var t={197:function(t){function e(){return e=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],o=["class","style","directives"],r=["on","nativeOn"],i=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,s){for(var a in s)if(t[a])if(-1!==n.indexOf(a))t[a]=e({},t[a],s[a]);else if(-1!==o.indexOf(a)){var d=t[a]instanceof Array?t[a]:[t[a]],l=s[a]instanceof Array?s[a]:[s[a]];t[a]=d.concat(l)}else if(-1!==r.indexOf(a))for(var u in s[a])if(t[a][u]){var c=t[a][u]instanceof Array?t[a][u]:[t[a][u]],p=s[a][u]instanceof Array?s[a][u]:[s[a][u]];t[a][u]=c.concat(p)}else t[a][u]=s[a][u];else if("hook"==a)for(var f in s[a])t[a][f]=t[a][f]?i(t[a][f],s[a][f]):s[a][f];else t[a]=s[a];else t[a]=s[a];return t}),{})}}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};!function(){n.r(o),n.d(o,{default:function(){return p}});var t=n(197),e=n.n(t);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e,n,o,r,i,s,a){var d,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=d):r&&(d=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(l.functional){l._injectStyles=d;var u=l.render;l.render=function(t,e){return d.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,d):[d]}return{exports:t,options:l}}var s=i({name:"dpInput",props:{value:{type:[String,Number],default:""},textarea:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},suffixIcon:{type:String,default:""},prefixIcon:{type:String,default:""},disableResize:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"}},methods:{setValue:function(t){var e=this.$attrs.type,n=t.target.value;this.$emit("input","number"===e?Number(n):n)}},computed:{listeners:function(){return Object.assign({},this.$listeners,{input:this.setValue})}},render:function(t){return t("div",{class:["dp-input",{suffix:this.suffixIcon||this.$scopedSlots.suffix,prefix:this.prefixIcon||this.$scopedSlots.prefix},{disabled:this.disabled}]},[this.textarea?t("textarea",e()([{class:["dp-input--inner textarea",{noresize:this.disableResize}]},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{domProps:{value:this.value}}])):t("input",e()([{domProps:{value:this.value},on:{input:this.setValue.bind(this)}},{attrs:this.$attrs},{attrs:{disabled:this.disabled}},{on:this.listeners},{attrs:{autocomplete:this.autocomplete},class:"dp-input--inner"}])),this.suffixIcon||this.$scopedSlots.suffix?t("div",{class:"dp-input--suffix"},[this.$scopedSlots.suffix?this.$scopedSlots.suffix():t("i",{class:this.suffixIcon})]):void 0,this.prefixIcon||this.$scopedSlots.prefix?t("div",{class:"dp-input--prefix"},[this.$scopedSlots.prefix?this.$scopedSlots.prefix():t("i",{class:this.prefixIcon})]):void 0])}},undefined,undefined,!1,null,null,null);s.options.__file="src/modules/input/index.vue";var a=s.exports;function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function l(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=i({name:"dpSelect",components:{Input:a},props:{value:{type:[String,Number,Array],default:""},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1}},data:function(){return{dropdownStyle:{},dropdownFade:!1,arrowBottom:!1,scrollTarget:void 0,documentElement:void 0,tagName:"",zIndex:0,readonly:!0,showDropdown:!1}},computed:{name:function(){var t=this;if(""===this.value)return"";if(this.value&&0===this.options.length)return this.value;var e=this.options.find((function(e){return("object"!==r(e)?{name:e,value:e}:e).value===t.value}));return e?"string"==typeof e?e:e.name:""}},beforeDestroy:function(){this.$refs.dropdown&&document.body.removeChild(this.$refs.dropdown),this.removeEvent()},mounted:function(){this.init()},methods:{init:function(){var t=this.scrollTargetEl,e=t&&document.querySelector(t)?document.querySelector(t):document;this.documentElement=t?e:document.documentElement,this.scrollTarget=e;var n=this.$refs.dropdown;this.setDropdownDOMToBody(n),this.addEvent(),this.tagName=parseInt(1e3*Math.random())+Date.now()+"_dpselect"},addEvent:function(){window.addEventListener("resize",this.resetStyle,!1),this.scrollTarget.addEventListener("scroll",this.onScroll,!1),document.addEventListener("click",this.checkPopupContainer,!1)},removeEvent:function(){window.removeEventListener("resize",this.resetStyle,!1),this.scrollTarget.removeEventListener("scroll",this.onScroll,!1),document.removeEventListener("click",this.checkPopupContainer,!1)},onScroll:function(){this.dropdownFade=!1},resetStyle:function(){this.dropdownFade&&!this.disabled&&this.setDropdownStyle()},checkPopupContainer:function(t){this.dropdownFade&&(function(t,e){if(t&&"string"==typeof t.className&&t.className.indexOf(e)>=0)return t;for(var n=null,o=t.parentNode;o&&9!==o.nodeType;){if(o.className.indexOf(e)>=0){n=o;break}o=o.parentNode}return n}(t.target,this.tagName)||(this.dropdownFade=!1))},setDropdownDOMToBody:function(t){t&&document.body.appendChild(t)},setDropdownStyle:function(){var t=this.$refs.input;if(t){var e=t.getBoundingClientRect(),n=e.top,o=e.left,r=e.width,i=e.height,s=this.documentElement.clientHeight,a="".concat(o,"px"),d="".concat(n+i+10,"px"),l=this.$refs.dropdown.clientHeight,u=l+n>s;u&&(d="".concat(n-l-10,"px")),this.arrowBottom=u,this.dropdownStyle={left:a,top:d,minWidth:"".concat(r,"px")}}},fadeSelect:function(){var t,e,n=this;this.disabled||(this.dropdownFade?this.hideDropdown():(this.setDropdownStyle(),this.zIndex=(e=l(document.querySelectorAll(t?"".concat(t," *"):"*")).map((function(t){return+window.getComputedStyle(t).zIndex||0}))).length?Math.max.apply(Math,l(e))+1:0,this.$nextTick((function(){n.dropdownFade=!0}))))},hideDropdown:function(){this.dropdownFade=!1},chooseItem:function(t){t.disabled||(this.hideDropdown(),this.$emit("change",t),this.$emit("input",t.value))}},render:function(t){var n=this;return t("div",{class:["dp-select",{show:this.dropdownFade},this.tagName],ref:"input",on:{click:this.fadeSelect}},[t(a,e()([{},{attrs:this.$attrs},{attrs:{value:this.name,disabled:this.disabled,readonly:this.readonly,suffixIcon:"dp-icon-arrow-down dp-select__arrow"}}])),t("transition",e()([{attrs:{name:"dp-select--dropdown__fade"}},{on:{leave:function(){n.showDropdown=!1},"after-appear":function(){n.showDropdown=!0}}}]),[t("div",{class:["dp-select--dropdown",this.tagName],directives:[{name:"show",value:this.dropdownFade}],ref:"dropdown",style:[this.dropdownStyle,{zIndex:this.zIndex}]},[t("div",{class:["dropdown",{show:this.showDropdown}],ref:"dropdownCtx"},[this.options.map((function(e){var o="object"!==r(e)?{name:e,value:e}:e;return t("div",{on:{click:n.chooseItem.bind(n,o)},class:["dp-select--dropdown__item",{active:n.value===o.value}]},[n.$scopedSlots.item?n.$scopedSlots.item(o):o.name])}))]),t("span",{class:["dp-select--dropdown__arrow",this.arrowBottom?"top":"bottom"]})])])])}},undefined,undefined,!1,null,null,null);u.options.__file="src/modules/select/index.vue";var c=u.exports;c.install=function(t){t.component(c.name,c)};var p=c}(),module.exports=o}(); |
{ | ||
"name": "@dpapejs/dpvue-ui", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "A Component Library for VueJs2.x", | ||
@@ -9,3 +9,5 @@ "main": "es/index.js", | ||
"build": "dpa build", | ||
"test": "jest" | ||
"test": "jest", | ||
"upload": "scp -r ./docs/src/.vuepress/dist/* root@43.154.138.254:/opt/dpapejs/nginx/html/ui/", | ||
"push": "cd docs && npm run build && cd ../ && npm run upload" | ||
}, | ||
@@ -25,2 +27,3 @@ "files": [ | ||
}, | ||
"homepage": "https://ui.dpapejs.cn/", | ||
"license": "Apache-2.0", | ||
@@ -27,0 +30,0 @@ "devDependencies": { |
@@ -38,3 +38,3 @@ import Vue from 'vue' | ||
export interface dpDialogBox { | ||
export interface DpDialogBox { | ||
/** Show a message box */ | ||
@@ -59,4 +59,4 @@ (message: string, title?: string, type?: string): Promise<void> | ||
/** Show a message box */ | ||
$dialogBox: dpDialogBox | ||
$dialogBox: DpDialogBox | ||
} | ||
} |
@@ -12,4 +12,5 @@ import Vue, { PluginObject } from 'vue' | ||
import { DpTooltip } from './tooltip' | ||
import { dpMessage } from './message' | ||
import { dpDialogBox } from './dialog-box' | ||
import { DpMessage } from './message' | ||
import { DpNotify } from './notify' | ||
import { DpDialogBox } from './dialog-box' | ||
@@ -100,12 +101,27 @@ /** The version of @dpapejs/dpvue-ui */ | ||
/** Swipe Component */ | ||
export class Swipe { } | ||
/** Pagination Component */ | ||
export class Pagination { } | ||
/** Popup Component */ | ||
export class Popup { } | ||
/** MnavBar Component */ | ||
export class MnavBar { } | ||
/** Message Fn */ | ||
export const Message: dpMessage | ||
export const Message: DpMessage | ||
/** Notify Fn */ | ||
export const Notify: DpNotify | ||
/** Toast Fn */ | ||
export const Toast: {} | ||
/** MdialogBox Fn */ | ||
export const MdialogBox: {} | ||
/** DialogBox Fn */ | ||
export const DialogBox: dpDialogBox | ||
export const DialogBox: DpDialogBox |
@@ -29,3 +29,3 @@ import Vue from 'vue' | ||
export interface dpMessage { | ||
export interface DpMessage { | ||
/** Show an info message */ | ||
@@ -65,4 +65,4 @@ (text: string): dpMessageComponent | ||
/** Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification. */ | ||
$message: dpMessage | ||
$message: DpMessage | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify 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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
499291
126
413
8