UNPKG

fast-element-ui

Version:

Vue项目快速开发组件框架,使用element-ui为基础库二次封装构建。

1 lines 13.3 kB
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.FastElementUI=n():t.FastElementUI=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=134)}([,,,function(t,n,e){var r=e(47);t.exports=function(t,n,e){var o=null==t?void 0:r(t,n);return void 0===o?e:o}},function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var r=function(t){0}},,function(t,n){t.exports=function(t){return null==t}},function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(12),o=e(14),u=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var i=t[n];u.call(t,n)&&o(i,e)&&(void 0!==e||n in t)||r(t,n,e)}},function(t,n){t.exports=function(t,n){return function(e){return t(n(e))}}},,,function(t,n,e){var r=e(29);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},,function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){(function(n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||Function("return this")()}).call(this,e(96))},function(t,n,e){var r=e(7);t.exports=function(){if(!arguments.length)return[];var t=arguments[0];return r(t)?t:[t]}},,function(t,n,e){var r=e(8),o=e(12);t.exports=function(t,n,e,u){var i=!e;e||(e={});for(var c=-1,a=n.length;++c<a;){var f=n[c],l=u?u(e[f],t[f],f,e,t):void 0;void 0===l&&(l=t[f]),i?o(e,f,l):r(e,f,l)}return e}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},,function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},,function(t,n,e){var r=e(80),o=e(81),u=e(82),i=e(16),c=e(18),a=e(85),f=e(86),l=e(87),s=f((function(t,n){var e={};if(null==t)return e;var f=!1;n=r(n,(function(n){return n=i(n,t),f||(f=n.length>1),n})),c(t,l(t),e),f&&(e=o(e,7,a));for(var s=n.length;s--;)u(e,n[s]);return e}));t.exports=s},function(t,n,e){var r=e(21);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},,,function(t,n){t.exports=function(t){return t}},function(t,n,e){var r=e(30),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]}},,,,,,,,,,,,function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},,function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports={}},function(t,n,e){"use strict";var r=e(15),o=e(97).f,u=e(98),i=e(45),c=e(89),a=e(65),f=e(44),l=function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n};t.exports=function(t,n){var e,s,p,d,v,h,y,b,m=t.target,x=t.global,g=t.stat,_=t.proto,w=x?r:g?r[m]:(r[m]||{}).prototype,j=x?i:i[m]||(i[m]={}),O=j.prototype;for(p in n)e=!u(x?p:m+(g?".":"#")+p,t.forced)&&w&&f(w,p),v=j[p],e&&(h=t.noTargetGet?(b=o(w,p))&&b.value:w[p]),d=e&&h?h:n[p],e&&typeof v==typeof d||(y=t.bind&&e?c(d,r):t.wrap&&e?l(d):_&&"function"==typeof d?c(Function.call,d):d,(t.sham||d&&d.sham||v&&v.sham)&&a(y,"sham",!0),j[p]=y,_&&(f(i,s=m+"Prototype")||a(i,s,{}),i[s][p]=d,t.real&&O&&!O[p]&&a(O,p,d)))}},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]}},,,,,,,,,,,,,,,,,,function(t,n,e){var r=e(24),o=e(69),u=e(68);t.exports=r?function(t,n,e){return o.f(t,n,u(1,e))}:function(t,n,e){return t[n]=e,t}},,function(t,n,e){var r=e(42);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(24),o=e(77),u=e(67),i=e(72),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(u(t),n=i(n,!0),u(e),o)try{return c(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},,function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(42);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(9)(Object.getPrototypeOf,Object);t.exports=r},function(t,n,e){var r=e(19),o=e(73),u=e(25),i=Function.prototype,c=Object.prototype,a=i.toString,f=c.hasOwnProperty,l=a.call(Object);t.exports=function(t){if(!u(t)||"[object Object]"!=r(t))return!1;var n=o(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&a.call(e)==l}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(91),o=e(75);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(24),o=e(21),u=e(93);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},,function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}},function(t,n){t.exports=function(t){return t}},function(t,n,e){var r=e(16),o=e(83),u=e(84),i=e(28);t.exports=function(t,n){return n=r(n,t),null==(t=u(t,n))||delete t[i(o(n))]}},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n){t.exports=function(t){return t}},function(t,n,e){var r=e(74);t.exports=function(t){return r(t)?void 0:t}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}},function(t,n,e){"use strict";function r(t,n,e,r,o,u,i,c){var a,f="function"==typeof t?t.options:t;if(n&&(f.render=n,f.staticRenderFns=e,f._compiled=!0),r&&(f.functional=!0),u&&(f._scopeId="data-v-"+u),i?(a=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(i)},f._ssrRegister=a):o&&(a=c?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(f.functional){f._injectStyles=a;var l=f.render;f.render=function(t,n){return a.call(n),l(t,n)}}else{var s=f.beforeCreate;f.beforeCreate=s?[].concat(s,a):[a]}return{exports:t,options:f}}e.d(n,"a",(function(){return r}))},function(t,n,e){var r=e(78);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},,function(t,n,e){var r=e(21),o=e(71),u="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?u.call(t,""):Object(t)}:Object},,function(t,n,e){var r=e(15),o=e(42),u=r.document,i=o(u)&&o(u.createElement);t.exports=function(t){return i?u.createElement(t):{}}},,function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,u=o&&!r.call({1:2},1);n.f=u?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(24),o=e(95),u=e(68),i=e(76),c=e(72),a=e(44),f=e(77),l=Object.getOwnPropertyDescriptor;n.f=r?l:function(t,n){if(t=i(t),n=c(n,!0),f)try{return l(t,n)}catch(t){}if(a(t,n))return u(!o.f.call(t,n),t[n])}},function(t,n,e){var r=e(21),o=/#|\.prototype\./,u=function(t,n){var e=c[i(t)];return e==f||e!=a&&("function"==typeof n?r(n):!!n)},i=u.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=u.data={},a=u.NATIVE="N",f=u.POLYFILL="P";t.exports=u},,,,,,,,function(t,n,e){t.exports=e(145)},,,,,,,,,function(t,n){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";e.r(n);var r=e(4),o=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",t._l(t.rowsData,(function(n,r){return e("el-row",{key:r,style:t.border?t.rowsData.length-1===r?"border: 1px solid #E0E0E0;":"border: 1px solid #E0E0E0;border-bottom: 0px;":"",attrs:{gutter:t.gutter}},t._l(n,(function(r,o){return e("el-col",{key:r.name,style:t.border&&n.length>1&&n.length-1!==o?"border-right: 1px solid #E0E0E0;":"",attrs:{span:t.baseSpanNum/t.columns*r.span}},[e("el-form-item",{class:r.itemCtCls,attrs:{label:r.label+t.colonText,prop:r.name,"label-width":r.labelWidth,required:r.required,rules:r.rules,error:r.error,"show-message":r.showMessage,"inline-message":r.inlineMessage,size:r.size},scopedSlots:t._u([r.hasOwnProperty("labelHtml")?{key:"label",fn:function(){return[e("label",{domProps:{innerHTML:t._s(r.labelHtml+t.colonText)}})]},proxy:!0}:null,t._isRenderErrorSlot(r)?{key:"error",fn:function(n){var e=n.error;return[t._v("\n "+t._s(t._renderErrorHtml(r.slotNode.error,e))+"\n "),t._t("default")]}}:null],null,!0)},[t._v(" "),t._v(" "),e(t.getComponent(r.type),t._b({tag:"component",model:{value:t.model[r.name],callback:function(n){t.$set(t.model,r.name,n)},expression:"model[col.name]"}},"component",t.getComponentProps(r),!1))],1)],1)})),1)})),1)};o._withStripped=!0;var u=e(106),i=e.n(u),c=e(6),a=e.n(c),f=e(3),l=e.n(f),s=e(23),p=e.n(s),d={name:"FastFormLayout",props:{colon:{type:Boolean,default:!1},columns:{type:Number,default:4},border:{type:Boolean,default:!0},detail:{type:Array,default:function(){return[]}},model:{type:Object,default:function(){return{}}}},data:function(){return this.desc="表单布局,是一种专门用于管理表单中输入字段的布局",this.baseSpanNum=24,this.gutter=10,{}},computed:{colonText:function(){return this.colon?":":""},rowsData:function(){for(var t=[],n=0,e=this.detail.length;n<e;n++){var r=[this.detail[n]],o=i()(this.detail[n].span);if(o>=this.columns)t.push(r);else{for(var u=n+1,c=this.detail.length;u<c;u++)if(o+=i()(this.detail[u].span),r.push(this.detail[u]),o>=this.columns){n=u;break}if(t.push(r),r.length===e||r[r.length-1].name===this.detail[this.detail.length-1].name)break}}return t}},methods:{_isRenderErrorSlot:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!a()(l()(t,"slotNode.error"))},_renderErrorHtml:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.$slots.default=t(this.$createElement,n)},getComponent:function(t){return"fast-".concat(t)},getComponentProps:function(t){return p()(t,["value","span","name","label","type","labelHtml","rules","labelWidth","required","error","showMessage","inlineMessage","size","show-message","inline-message"])}}},v=e(88),h=Object(v.a)(d,o,[],!1,null,null,null);h.options.__file="packages/form-layout/form.vue";var y=h.exports;y.install=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(Object(r.a)(y.name+"----install----"),n&&n.length>0)for(var e=0;e<n.length;e++)t.use(n[e]);t.component(y.name,y)};n.default=y},,,,,,,,,,,function(t,n,e){var r=e(146);t.exports=r},function(t,n,e){e(147);var r=e(45);t.exports=r.parseInt},function(t,n,e){var r=e(46),o=e(148);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(t,n,e){var r=e(15),o=e(149).trim,u=e(115),i=r.parseInt,c=/^[+-]?0[Xx]/,a=8!==i(u+"08")||22!==i(u+"0x16");t.exports=a?function(t,n){var e=o(String(t));return i(e,n>>>0||(c.test(e)?16:10))}:i},function(t,n,e){var r=e(75),o="["+e(115)+"]",u=RegExp("^"+o+o+"*"),i=RegExp(o+o+"*$"),c=function(t){return function(n){var e=String(r(n));return 1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(i,"")),e}};t.exports={start:c(1),end:c(2),trim:c(3)}}]).default}));