diff --git a/dist/el-data-table.esm.js b/dist/el-data-table.esm.js index 8396925e..29ffb0c0 100644 --- a/dist/el-data-table.esm.js +++ b/dist/el-data-table.esm.js @@ -416,11 +416,13 @@ var component = {render: function(){var _vm=this;var _h=_vm.$createElement;var _ // query 有可能值为 0 var params = Object.keys(query) - .filter(function (key) { - var k = query[key].trim(); + .filter(function (k) { return k !== '' && k !== null && k !== undefined }) - .reduce(function (params, k) { return (params += "&" + k + "=" + (encodeURI(query[k]))); }, ''); + .reduce( + function (params, k) { return (params += "&" + k + "=" + (encodeURI(query[k].toString().trim()))); }, + '' + ); url += params; @@ -491,6 +493,7 @@ var component = {render: function(){var _vm=this;var _h=_vm.$createElement;var _ this.query = Object.assign({}, data, customQuery); }, onResetSearch: function onResetSearch() { + // reset后, form里的值会变成 undefined, 在下一次查询会赋值给query this.$refs.searchForm.resetFields(); this.query = {}; diff --git a/dist/el-data-table.min.js b/dist/el-data-table.min.js index ea0bebdf..38dadc1f 100644 --- a/dist/el-data-table.min.js +++ b/dist/el-data-table.min.js @@ -1 +1 @@ -var ElDataTable=function(e,t){"use strict";function i(e){i.installed||(i.installed=!0,e.component("ElDataTable",n))}t=t&&t.hasOwnProperty("default")?t.default:t,function(){if("undefined"!=typeof document){var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style"),i=".el-data-table .ms-tree-space { position: relative; top: 1px; display: inline-block; font-style: normal; font-weight: 400; line-height: 1; width: 18px; height: 14px; } .el-data-table .ms-tree-space::before { content: ''; } .el-data-table .tree-ctrl { position: relative; cursor: pointer; color: #2196f3; } @-moz-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @-webkit-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @-o-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } ";t.type="text/css",t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i)),e.appendChild(t)}}();var n={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"el-data-table"},[e.searchForm.length>0?i("el-form-renderer",{ref:"searchForm",attrs:{inline:"",content:e.searchForm}},[e._t("search"),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),i("el-button",{attrs:{size:"small"},on:{click:e.onResetSearch}},[e._v("重置")])],1)],2):e._e(),e._v(" "),e.hasNew||e.hasDelete||e.headerButtons.length>0?i("el-form",[i("el-form-item",[e.hasNew?i("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onDefaultNew}},[e._v("新增")]):e._e(),e._v(" "),e._l(e.headerButtons,function(t,n){return"show"in t&&!t.show(e.selected)?e._e():i("el-button",e._b({key:n,attrs:{disabled:"disabled"in t&&t.disabled(e.selected),size:"small"},on:{click:function(i){t.atClick(e.selected)}}},"el-button",t,!1),[e._v(e._s(t.text))])}),e._v(" "),e.hasSelect&&e.hasDelete?i("el-button",{attrs:{type:"danger",size:"small",disabled:e.single?!e.selected.length||e.selected.length>1:!e.selected.length},on:{click:function(t){e.onDefaultDelete(t)}}},[e._v("删除")]):e._e()],2)],1):e._e(),e._v(" "),i("el-table",e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.data,"row-style":e.showRow},on:{"selection-change":e.handleSelectionChange}},"el-table",e.tableAttrs,!1),[e.isTree?[e.hasSelect?[i("el-table-column",e._b({key:"selection-key"},"el-table-column",e.columns[0],!1)),e._v(" "),i("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?i("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?i("span",{staticClass:"tree-ctrl",on:{click:function(i){e.toggleExpanded(t.$index)}}},[t.row._expanded?i("i",{staticClass:"el-icon-minus"}):i("i",{staticClass:"el-icon-plus"})]):e._e(),e._v(" "+e._s(t.row[e.columns[1].prop])+" ")]}}])},"el-table-column",e.columns[1],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t&&1!==t}),function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]:[i("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?i("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?i("span",{staticClass:"tree-ctrl",on:{click:function(i){e.toggleExpanded(t.$index)}}},[t.row._expanded?i("i",{staticClass:"el-icon-minus"}):i("i",{staticClass:"el-icon-plus"})]):e._e(),e._v(" "+e._s(t.row[e.columns[0].prop])+" ")]}}])},"el-table-column",e.columns[0],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t}),function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]]:e._l(e.columns,function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))}),e._v(" "),e.hasOperation?i("el-table-column",e._b({attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.isTree&&e.hasNew?i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(i){e.onDefaultNew(t.row)}}},[e._v("新增")]):e._e(),e._v(" "),e.hasEdit?i("el-button",{attrs:{size:"small"},on:{click:function(i){e.onDefaultEdit(t.row)}}},[e._v(" 修改 ")]):e._e(),e._v(" "),e.hasView?i("el-button",{attrs:{type:"info",size:"small"},on:{click:function(i){e.onDefaultView(t.row)}}},[e._v(" 查看 ")]):e._e(),e._v(" "),e._l(e.extraButtons,function(n,a){return"show"in n&&!n.show(t.row)?e._e():i("el-button",e._b({key:a,attrs:{size:"small"},on:{click:function(e){n.atClick(t.row)}}},"el-button",n,!1),[e._v(" "+e._s(n.text)+" ")])}),e._v(" "),!e.hasSelect&&e.hasDelete&&e.canDelete(t.row)?i("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(i){e.onDefaultDelete(t.row)}}},[e._v(" 删除 ")]):e._e()]}}])},"el-table-column",e.operationAttrs,!1)):e._e(),e._v(" "),e._t("default")],2),e._v(" "),e.hasPagination?i("el-pagination",{staticStyle:{"text-align":"right",padding:"10px 0"},attrs:{"current-page":e.page,"page-sizes":e.paginationSizes,"page-size":e.size,total:e.total,layout:e.paginationLayout},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e(),e._v(" "),e.hasDialog?i("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("el-form-renderer",e._b({ref:"dialogForm",attrs:{content:e.form,disabled:e.isView}},"el-form-renderer",e.formAttrs,!1),[e._t("form")],2),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.isView,expression:"!isView"}],attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"small"},on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],attrs:{type:"primary",size:"small"},on:{click:e.confirm}},[e._v("确 定")])],1)],1):e._e()],1)},staticRenderFns:[],name:"ElDataTable",props:{url:{type:String,default:""},id:{type:String,default:"id"},firstPage:{type:Number,default:1},dataPath:{type:String,default:"payload.content"},totalPath:{type:String,default:"payload.totalElements"},columns:{type:Array,default:function(){return[]}},searchForm:{type:Array,default:function(){return[]}},single:{type:Boolean,default:!1},hasOperation:{type:Boolean,default:!0},extraButtons:{type:Array,default:function(){return[]}},headerButtons:{type:Array,default:function(){return[]}},hasNew:{type:Boolean,default:!0},hasEdit:{type:Boolean,default:!0},hasView:{type:Boolean,default:!1},hasDelete:{type:Boolean,default:!0},canDelete:{type:Function,default:function(){return!0}},onNew:{type:Function},onEdit:{type:Function},onDelete:{type:Function},hasPagination:{type:Boolean,default:!0},paginationLayout:{type:String,default:"total, sizes, prev, pager, next, jumper"},paginationSizes:{type:Array,default:function(){return[10,20,30,40,50]}},paginationSize:{type:Number,default:10},noPaginationSize:{type:Number,default:999},isTree:{type:Boolean,default:!1},treeChildKey:{type:String,default:"children"},treeParentKey:{type:String,default:"parentId"},treeParentValue:{type:String,default:"id"},expandAll:{type:Boolean,default:!1},tableAttrs:{type:Object,default:function(){return{}}},operationAttrs:{type:Object,default:function(){return{width:"",fixed:"right"}}},hasDialog:{type:Boolean,default:!0},dialogNewTitle:{type:String,default:"新增"},dialogEditTitle:{type:String,default:"修改"},dialogViewTitle:{type:String,default:"查看"},form:{type:Array,default:function(){return[]}},formAttrs:{type:Object,default:function(){return{}}},extraParams:{type:Object},beforeConfirm:{type:Function,default:function(){return!0}},customQuery:{type:Object,default:function(){return{}}}},data:function(){return{data:[],query:{},hasSelect:this.columns.length&&"selection"==this.columns[0].type,size:this.paginationSize||this.paginationSizes[0],page:this.firstPage,total:0,loading:!1,selected:[],dialogTitle:this.dialogNewTitle,dialogVisible:!1,isNew:!0,isEdit:!1,isView:!1,confirmLoading:!1,row:{},initCustomQuery:JSON.stringify(this.customQuery)}},mounted:function(){this.getList()},watch:{query:function(e,t){this.page=this.firstPage,this.getList()},url:function(e,t){this.page=this.firstPage,this.getList()},dialogVisible:function(e,t){var i=this;e||(this.isNew=!1,this.isEdit=!1,this.isView=!1,this.confirmLoading=!1,this.$refs.dialogForm.resetFields(),this.form.forEach(function(e){"select"===e.$type&&e.$el&&e.$el.multiple&&i.$refs.dialogForm.updateValue({id:e.$id,value:[]})}))}},methods:{getList:function(){var e=this,i=this.url,n=Object.assign({},this.query,this.customQuery),a=this.hasPagination?this.size:this.noPaginationSize;if(!i)return void console.warn("DataTable: url 为空, 不发送请求");i.indexOf("?")>-1?i+="&":i+="?",i+="page="+this.page+"&size="+a,i+=Object.keys(n).filter(function(e){var t=n[e].trim();return""!==t&&null!==t&&void 0!==t}).reduce(function(e,t){return e+="&"+t+"="+encodeURI(n[t])},""),this.loading=!0,this.$axios.get(i).then(function(i){var n=i.data,a=[];e.hasPagination?(a=t(n,e.dataPath)||[],e.total=t(n,e.totalPath)):a=t(n,"payload.content")||t(n,"payload")||[],e.data=a,e.isTree&&(e.data=e.tree2Array(a,e.expandAll)),e.loading=!1,e.$emit("update",a,n)}).catch(function(t){e.$emit("error",t),e.loading=!1})},handleSizeChange:function(e){this.size!==e&&(this.size=e,this.getList())},handleCurrentChange:function(e){this.page!==e&&(this.page=e,this.getList())},handleSelectionChange:function(e){this.selected=e,this.$emit("selection-change",e)},onSearch:function(){var e=this.$refs.searchForm.getFormValue(),t=this.customQuery;this.query=Object.assign({},e,t)},onResetSearch:function(){this.$refs.searchForm.resetFields(),this.query={},this.$emit("reset"),this.$emit("update:customQuery",Object.assign(this.customQuery,JSON.parse(this.initCustomQuery)))},onDefaultNew:function(e){if(void 0===e&&(e={}),this.onNew)return this.onNew(e);this.$emit("new",e),this.row=e,this.isNew=!0,this.isEdit=!1,this.isView=!1,this.dialogTitle=this.dialogNewTitle,this.dialogVisible=!0},onDefaultView:function(e){var t=this;if(this.onView)return this.onView(e);this.$emit("view",e),this.row=e,this.isView=!0,this.isNew=!1,this.isEdit=!1,this.dialogTitle=this.dialogViewTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(i){var n=e[i.$id];t.$refs.dialogForm.updateValue({id:i.$id,value:n})})})},onDefaultEdit:function(e){var t=this;if(this.onEdit)return this.onEdit(e);this.$emit("edit",e),this.row=e,this.isEdit=!0,this.isNew=!1,this.isView=!1,this.dialogTitle=this.dialogEditTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(i){var n=e[i.$id];t.$refs.dialogForm.updateValue({id:i.$id,value:n})})})},cancel:function(){this.dialogVisible=!1},confirm:function(){var e=this;this.beforeConfirm()&&this.$refs.dialogForm.validate(function(t){if(!t)return!1;if(e.isView)return void e.cancel();var i=Object.assign({},e.$refs.dialogForm.getFormValue(),e.extraParams),n="post",a=e.url+"";e.isEdit&&(n="put",a+="/"+e.row[e.id]),e.isTree&&(e.isNew?i[e.treeParentKey]=e.row[e.treeParentValue]:e.isEdit&&(i[e.treeParentKey]=e.row[e.treeParentKey])),e.confirmLoading=!0,e.$axios[n](a,i).then(function(t){e.getList(),e.showMessage(!0),e.cancel()}).catch(function(t){e.confirmLoading=!1})})},onDefaultDelete:function(e){var t=this;if(this.onDelete)return this.onDelete(e);this.$confirm("确认删除吗","提示",{type:"warning",beforeClose:function(i,n,a){"confirm"==i?(n.confirmButtonLoading=!0,t.hasSelect?t.$axios.delete(t.url+"/"+t.selected.map(function(e){return e[t.id]}).toString()).then(function(e){n.confirmButtonLoading=!1,a(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1}):t.$axios.delete(t.url+"/"+e[t.id]).then(function(e){n.confirmButtonLoading=!1,a(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1})):a()}}).catch(function(e){})},tree2Array:function(e,t,i,n){var a=this;void 0===i&&(i=null),void 0===n&&(n=null);var o=[];return e.forEach(function(e){void 0===e._expanded&&a.$set(e,"_expanded",t);var l=0;if(void 0!==n&&null!==n&&(l=n+1),a.$set(e,"_level",l),i&&a.$set(e,"parent",i),o.push(e),e[a.treeChildKey]&&e[a.treeChildKey].length>0){var s=a.tree2Array(e[a.treeChildKey],t,e,l);o=o.concat(s)}}),o},showRow:function(e){var t=!e.row.parent||e.row.parent._expanded&&e.row.parent._show;return e.row._show=t,t?"animation:treeTableShow 1s-webkit-animation:treeTableShow 1s":"display:none"},toggleExpanded:function(e){var t=this.data[e];t._expanded=!t._expanded},iconShow:function(e,t){return t[this.treeChildKey]&&t[this.treeChildKey].length>0},showMessage:function(e){void 0===e&&(e=!0),e?this.$message({type:"success",message:"操作成功"}):this.$message({type:"error",message:"操作失败"})}}},a={install:i},o=null;return"undefined"!=typeof window?o=window.Vue:"undefined"!=typeof global&&(o=global.Vue),o&&o.use(a),e.install=i,e.default=n,e}({},_get); +var ElDataTable=function(e,t){"use strict";function i(e){i.installed||(i.installed=!0,e.component("ElDataTable",n))}t=t&&t.hasOwnProperty("default")?t.default:t,function(){if("undefined"!=typeof document){var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style"),i=".el-data-table .ms-tree-space { position: relative; top: 1px; display: inline-block; font-style: normal; font-weight: 400; line-height: 1; width: 18px; height: 14px; } .el-data-table .ms-tree-space::before { content: ''; } .el-data-table .tree-ctrl { position: relative; cursor: pointer; color: #2196f3; } @-moz-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @-webkit-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @-o-keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } @keyframes treeTableShow { from { opacity: 0; } to { opacity: 1; } } ";t.type="text/css",t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i)),e.appendChild(t)}}();var n={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"el-data-table"},[e.searchForm.length>0?i("el-form-renderer",{ref:"searchForm",attrs:{inline:"",content:e.searchForm}},[e._t("search"),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),i("el-button",{attrs:{size:"small"},on:{click:e.onResetSearch}},[e._v("重置")])],1)],2):e._e(),e._v(" "),e.hasNew||e.hasDelete||e.headerButtons.length>0?i("el-form",[i("el-form-item",[e.hasNew?i("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onDefaultNew}},[e._v("新增")]):e._e(),e._v(" "),e._l(e.headerButtons,function(t,n){return"show"in t&&!t.show(e.selected)?e._e():i("el-button",e._b({key:n,attrs:{disabled:"disabled"in t&&t.disabled(e.selected),size:"small"},on:{click:function(i){t.atClick(e.selected)}}},"el-button",t,!1),[e._v(e._s(t.text))])}),e._v(" "),e.hasSelect&&e.hasDelete?i("el-button",{attrs:{type:"danger",size:"small",disabled:e.single?!e.selected.length||e.selected.length>1:!e.selected.length},on:{click:function(t){e.onDefaultDelete(t)}}},[e._v("删除")]):e._e()],2)],1):e._e(),e._v(" "),i("el-table",e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.data,"row-style":e.showRow},on:{"selection-change":e.handleSelectionChange}},"el-table",e.tableAttrs,!1),[e.isTree?[e.hasSelect?[i("el-table-column",e._b({key:"selection-key"},"el-table-column",e.columns[0],!1)),e._v(" "),i("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?i("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?i("span",{staticClass:"tree-ctrl",on:{click:function(i){e.toggleExpanded(t.$index)}}},[t.row._expanded?i("i",{staticClass:"el-icon-minus"}):i("i",{staticClass:"el-icon-plus"})]):e._e(),e._v(" "+e._s(t.row[e.columns[1].prop])+" ")]}}])},"el-table-column",e.columns[1],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t&&1!==t}),function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]:[i("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?i("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?i("span",{staticClass:"tree-ctrl",on:{click:function(i){e.toggleExpanded(t.$index)}}},[t.row._expanded?i("i",{staticClass:"el-icon-minus"}):i("i",{staticClass:"el-icon-plus"})]):e._e(),e._v(" "+e._s(t.row[e.columns[0].prop])+" ")]}}])},"el-table-column",e.columns[0],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t}),function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]]:e._l(e.columns,function(t){return i("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))}),e._v(" "),e.hasOperation?i("el-table-column",e._b({attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.isTree&&e.hasNew?i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(i){e.onDefaultNew(t.row)}}},[e._v("新增")]):e._e(),e._v(" "),e.hasEdit?i("el-button",{attrs:{size:"small"},on:{click:function(i){e.onDefaultEdit(t.row)}}},[e._v(" 修改 ")]):e._e(),e._v(" "),e.hasView?i("el-button",{attrs:{type:"info",size:"small"},on:{click:function(i){e.onDefaultView(t.row)}}},[e._v(" 查看 ")]):e._e(),e._v(" "),e._l(e.extraButtons,function(n,a){return"show"in n&&!n.show(t.row)?e._e():i("el-button",e._b({key:a,attrs:{size:"small"},on:{click:function(e){n.atClick(t.row)}}},"el-button",n,!1),[e._v(" "+e._s(n.text)+" ")])}),e._v(" "),!e.hasSelect&&e.hasDelete&&e.canDelete(t.row)?i("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(i){e.onDefaultDelete(t.row)}}},[e._v(" 删除 ")]):e._e()]}}])},"el-table-column",e.operationAttrs,!1)):e._e(),e._v(" "),e._t("default")],2),e._v(" "),e.hasPagination?i("el-pagination",{staticStyle:{"text-align":"right",padding:"10px 0"},attrs:{"current-page":e.page,"page-sizes":e.paginationSizes,"page-size":e.size,total:e.total,layout:e.paginationLayout},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e(),e._v(" "),e.hasDialog?i("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("el-form-renderer",e._b({ref:"dialogForm",attrs:{content:e.form,disabled:e.isView}},"el-form-renderer",e.formAttrs,!1),[e._t("form")],2),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.isView,expression:"!isView"}],attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"small"},on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],attrs:{type:"primary",size:"small"},on:{click:e.confirm}},[e._v("确 定")])],1)],1):e._e()],1)},staticRenderFns:[],name:"ElDataTable",props:{url:{type:String,default:""},id:{type:String,default:"id"},firstPage:{type:Number,default:1},dataPath:{type:String,default:"payload.content"},totalPath:{type:String,default:"payload.totalElements"},columns:{type:Array,default:function(){return[]}},searchForm:{type:Array,default:function(){return[]}},single:{type:Boolean,default:!1},hasOperation:{type:Boolean,default:!0},extraButtons:{type:Array,default:function(){return[]}},headerButtons:{type:Array,default:function(){return[]}},hasNew:{type:Boolean,default:!0},hasEdit:{type:Boolean,default:!0},hasView:{type:Boolean,default:!1},hasDelete:{type:Boolean,default:!0},canDelete:{type:Function,default:function(){return!0}},onNew:{type:Function},onEdit:{type:Function},onDelete:{type:Function},hasPagination:{type:Boolean,default:!0},paginationLayout:{type:String,default:"total, sizes, prev, pager, next, jumper"},paginationSizes:{type:Array,default:function(){return[10,20,30,40,50]}},paginationSize:{type:Number,default:10},noPaginationSize:{type:Number,default:999},isTree:{type:Boolean,default:!1},treeChildKey:{type:String,default:"children"},treeParentKey:{type:String,default:"parentId"},treeParentValue:{type:String,default:"id"},expandAll:{type:Boolean,default:!1},tableAttrs:{type:Object,default:function(){return{}}},operationAttrs:{type:Object,default:function(){return{width:"",fixed:"right"}}},hasDialog:{type:Boolean,default:!0},dialogNewTitle:{type:String,default:"新增"},dialogEditTitle:{type:String,default:"修改"},dialogViewTitle:{type:String,default:"查看"},form:{type:Array,default:function(){return[]}},formAttrs:{type:Object,default:function(){return{}}},extraParams:{type:Object},beforeConfirm:{type:Function,default:function(){return!0}},customQuery:{type:Object,default:function(){return{}}}},data:function(){return{data:[],query:{},hasSelect:this.columns.length&&"selection"==this.columns[0].type,size:this.paginationSize||this.paginationSizes[0],page:this.firstPage,total:0,loading:!1,selected:[],dialogTitle:this.dialogNewTitle,dialogVisible:!1,isNew:!0,isEdit:!1,isView:!1,confirmLoading:!1,row:{},initCustomQuery:JSON.stringify(this.customQuery)}},mounted:function(){this.getList()},watch:{query:function(e,t){this.page=this.firstPage,this.getList()},url:function(e,t){this.page=this.firstPage,this.getList()},dialogVisible:function(e,t){var i=this;e||(this.isNew=!1,this.isEdit=!1,this.isView=!1,this.confirmLoading=!1,this.$refs.dialogForm.resetFields(),this.form.forEach(function(e){"select"===e.$type&&e.$el&&e.$el.multiple&&i.$refs.dialogForm.updateValue({id:e.$id,value:[]})}))}},methods:{getList:function(){var e=this,i=this.url,n=Object.assign({},this.query,this.customQuery),a=this.hasPagination?this.size:this.noPaginationSize;if(!i)return void console.warn("DataTable: url 为空, 不发送请求");i.indexOf("?")>-1?i+="&":i+="?",i+="page="+this.page+"&size="+a,i+=Object.keys(n).filter(function(e){return""!==e&&null!==e&&void 0!==e}).reduce(function(e,t){return e+="&"+t+"="+encodeURI(n[t].toString().trim())},""),this.loading=!0,this.$axios.get(i).then(function(i){var n=i.data,a=[];e.hasPagination?(a=t(n,e.dataPath)||[],e.total=t(n,e.totalPath)):a=t(n,"payload.content")||t(n,"payload")||[],e.data=a,e.isTree&&(e.data=e.tree2Array(a,e.expandAll)),e.loading=!1,e.$emit("update",a,n)}).catch(function(t){e.$emit("error",t),e.loading=!1})},handleSizeChange:function(e){this.size!==e&&(this.size=e,this.getList())},handleCurrentChange:function(e){this.page!==e&&(this.page=e,this.getList())},handleSelectionChange:function(e){this.selected=e,this.$emit("selection-change",e)},onSearch:function(){var e=this.$refs.searchForm.getFormValue(),t=this.customQuery;this.query=Object.assign({},e,t)},onResetSearch:function(){this.$refs.searchForm.resetFields(),this.query={},this.$emit("reset"),this.$emit("update:customQuery",Object.assign(this.customQuery,JSON.parse(this.initCustomQuery)))},onDefaultNew:function(e){if(void 0===e&&(e={}),this.onNew)return this.onNew(e);this.$emit("new",e),this.row=e,this.isNew=!0,this.isEdit=!1,this.isView=!1,this.dialogTitle=this.dialogNewTitle,this.dialogVisible=!0},onDefaultView:function(e){var t=this;if(this.onView)return this.onView(e);this.$emit("view",e),this.row=e,this.isView=!0,this.isNew=!1,this.isEdit=!1,this.dialogTitle=this.dialogViewTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(i){var n=e[i.$id];t.$refs.dialogForm.updateValue({id:i.$id,value:n})})})},onDefaultEdit:function(e){var t=this;if(this.onEdit)return this.onEdit(e);this.$emit("edit",e),this.row=e,this.isEdit=!0,this.isNew=!1,this.isView=!1,this.dialogTitle=this.dialogEditTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(i){var n=e[i.$id];t.$refs.dialogForm.updateValue({id:i.$id,value:n})})})},cancel:function(){this.dialogVisible=!1},confirm:function(){var e=this;this.beforeConfirm()&&this.$refs.dialogForm.validate(function(t){if(!t)return!1;if(e.isView)return void e.cancel();var i=Object.assign({},e.$refs.dialogForm.getFormValue(),e.extraParams),n="post",a=e.url+"";e.isEdit&&(n="put",a+="/"+e.row[e.id]),e.isTree&&(e.isNew?i[e.treeParentKey]=e.row[e.treeParentValue]:e.isEdit&&(i[e.treeParentKey]=e.row[e.treeParentKey])),e.confirmLoading=!0,e.$axios[n](a,i).then(function(t){e.getList(),e.showMessage(!0),e.cancel()}).catch(function(t){e.confirmLoading=!1})})},onDefaultDelete:function(e){var t=this;if(this.onDelete)return this.onDelete(e);this.$confirm("确认删除吗","提示",{type:"warning",beforeClose:function(i,n,a){"confirm"==i?(n.confirmButtonLoading=!0,t.hasSelect?t.$axios.delete(t.url+"/"+t.selected.map(function(e){return e[t.id]}).toString()).then(function(e){n.confirmButtonLoading=!1,a(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1}):t.$axios.delete(t.url+"/"+e[t.id]).then(function(e){n.confirmButtonLoading=!1,a(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1})):a()}}).catch(function(e){})},tree2Array:function(e,t,i,n){var a=this;void 0===i&&(i=null),void 0===n&&(n=null);var o=[];return e.forEach(function(e){void 0===e._expanded&&a.$set(e,"_expanded",t);var l=0;if(void 0!==n&&null!==n&&(l=n+1),a.$set(e,"_level",l),i&&a.$set(e,"parent",i),o.push(e),e[a.treeChildKey]&&e[a.treeChildKey].length>0){var s=a.tree2Array(e[a.treeChildKey],t,e,l);o=o.concat(s)}}),o},showRow:function(e){var t=!e.row.parent||e.row.parent._expanded&&e.row.parent._show;return e.row._show=t,t?"animation:treeTableShow 1s-webkit-animation:treeTableShow 1s":"display:none"},toggleExpanded:function(e){var t=this.data[e];t._expanded=!t._expanded},iconShow:function(e,t){return t[this.treeChildKey]&&t[this.treeChildKey].length>0},showMessage:function(e){void 0===e&&(e=!0),e?this.$message({type:"success",message:"操作成功"}):this.$message({type:"error",message:"操作失败"})}}},a={install:i},o=null;return"undefined"!=typeof window?o=window.Vue:"undefined"!=typeof global&&(o=global.Vue),o&&o.use(a),e.install=i,e.default=n,e}({},_get); diff --git a/dist/el-data-table.umd.js b/dist/el-data-table.umd.js index 63b3cef6..50aec20e 100644 --- a/dist/el-data-table.umd.js +++ b/dist/el-data-table.umd.js @@ -422,11 +422,13 @@ // query 有可能值为 0 var params = Object.keys(query) - .filter(function (key) { - var k = query[key].trim(); + .filter(function (k) { return k !== '' && k !== null && k !== undefined }) - .reduce(function (params, k) { return (params += "&" + k + "=" + (encodeURI(query[k]))); }, ''); + .reduce( + function (params, k) { return (params += "&" + k + "=" + (encodeURI(query[k].toString().trim()))); }, + '' + ); url += params; @@ -497,6 +499,7 @@ this.query = Object.assign({}, data, customQuery); }, onResetSearch: function onResetSearch() { + // reset后, form里的值会变成 undefined, 在下一次查询会赋值给query this.$refs.searchForm.resetFields(); this.query = {}; diff --git a/docs/build/bundle.2e06ea66.js b/docs/build/bundle.c365fc0d.js similarity index 99% rename from docs/build/bundle.2e06ea66.js rename to docs/build/bundle.c365fc0d.js index e098eaa1..76e1a255 100644 --- a/docs/build/bundle.2e06ea66.js +++ b/docs/build/bundle.c365fc0d.js @@ -34,7 +34,7 @@ var n=r(242),i=r(243),a=r(244);function kMaxLength(){return Buffer.TYPED_ARRAY_S * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(isBuffer(e)||function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isBuffer(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(396);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t){const r="https://github.com/vue-styleguidist/vue-styleguidist/";e.exports={HOMEPAGE:r,BUGS:r+"/issues",DOCS_CONFIG:r+"blob/master/docs/Configuration.md",DOCS_COMPONENTS:r+"blob/master/docs/Components.md",DOCS_WEBPACK:r+"blob/master/docs/Webpack.md",DOCS_DOCUMENTING:r+"blob/master/docs/Documenting.md",DOCS_THIRDPARTIES:""}},function(e,t,r){"use strict";var n=r(437),i=r.n(n);t.a={name:"ElDataTable",props:{url:{type:String,default:""},id:{type:String,default:"id"},firstPage:{type:Number,default:1},dataPath:{type:String,default:"payload.content"},totalPath:{type:String,default:"payload.totalElements"},columns:{type:Array,default:function _default(){return[]}},searchForm:{type:Array,default:function _default(){return[]}},single:{type:Boolean,default:!1},hasOperation:{type:Boolean,default:!0},extraButtons:{type:Array,default:function _default(){return[]}},headerButtons:{type:Array,default:function _default(){return[]}},hasNew:{type:Boolean,default:!0},hasEdit:{type:Boolean,default:!0},hasView:{type:Boolean,default:!1},hasDelete:{type:Boolean,default:!0},canDelete:{type:Function,default:function _default(){return!0}},onNew:{type:Function},onEdit:{type:Function},onDelete:{type:Function},hasPagination:{type:Boolean,default:!0},paginationLayout:{type:String,default:"total, sizes, prev, pager, next, jumper"},paginationSizes:{type:Array,default:function _default(){return[10,20,30,40,50]}},paginationSize:{type:Number,default:10},noPaginationSize:{type:Number,default:999},isTree:{type:Boolean,default:!1},treeChildKey:{type:String,default:"children"},treeParentKey:{type:String,default:"parentId"},treeParentValue:{type:String,default:"id"},expandAll:{type:Boolean,default:!1},tableAttrs:{type:Object,default:function _default(){return{}}},operationAttrs:{type:Object,default:function _default(){return{width:"",fixed:"right"}}},hasDialog:{type:Boolean,default:!0},dialogNewTitle:{type:String,default:"新增"},dialogEditTitle:{type:String,default:"修改"},dialogViewTitle:{type:String,default:"查看"},form:{type:Array,default:function _default(){return[]}},formAttrs:{type:Object,default:function _default(){return{}}},extraParams:{type:Object},beforeConfirm:{type:Function,default:function _default(){return!0}},customQuery:{type:Object,default:function _default(){return{}}}},data:function data(){return{data:[],query:{},hasSelect:this.columns.length&&"selection"==this.columns[0].type,size:this.paginationSize||this.paginationSizes[0],page:this.firstPage,total:0,loading:!1,selected:[],dialogTitle:this.dialogNewTitle,dialogVisible:!1,isNew:!0,isEdit:!1,isView:!1,confirmLoading:!1,row:{},initCustomQuery:JSON.stringify(this.customQuery)}},mounted:function mounted(){this.getList()},watch:{query:function query(e,t){this.page=this.firstPage,this.getList()},url:function url(e,t){this.page=this.firstPage,this.getList()},dialogVisible:function dialogVisible(e,t){var r=this;e||(this.isNew=!1,this.isEdit=!1,this.isView=!1,this.confirmLoading=!1,this.$refs.dialogForm.resetFields(),this.form.forEach(function(e){"select"===e.$type&&e.$el&&e.$el.multiple&&r.$refs.dialogForm.updateValue({id:e.$id,value:[]})}))}},methods:{getList:function getList(){var e=this,t=this.url,r=Object.assign({},this.query,this.customQuery),n=this.hasPagination?this.size:this.noPaginationSize;t?(t.indexOf("?")>-1?t+="&":t+="?",t+="page="+this.page+"&size="+n,t+=Object.keys(r).filter(function(e){var t=r[e].trim();return""!==t&&null!==t&&void 0!==t}).reduce(function(e,t){return e+"&"+t+"="+encodeURI(r[t])},""),this.loading=!0,this.$axios.get(t).then(function(t){var r=t.data,n=[];e.hasPagination?(n=i()(r,e.dataPath)||[],e.total=i()(r,e.totalPath)):n=i()(r,"payload.content")||i()(r,"payload")||[],e.data=n,e.isTree&&(e.data=e.tree2Array(n,e.expandAll)),e.loading=!1,e.$emit("update",n,r)}).catch(function(t){e.$emit("error",t),e.loading=!1})):console.warn("DataTable: url 为空, 不发送请求")},handleSizeChange:function handleSizeChange(e){this.size!==e&&(this.size=e,this.getList())},handleCurrentChange:function handleCurrentChange(e){this.page!==e&&(this.page=e,this.getList())},handleSelectionChange:function handleSelectionChange(e){this.selected=e,this.$emit("selection-change",e)},onSearch:function onSearch(){var e=this.$refs.searchForm.getFormValue(),t=this.customQuery;this.query=Object.assign({},e,t)},onResetSearch:function onResetSearch(){this.$refs.searchForm.resetFields(),this.query={},this.$emit("reset"),this.$emit("update:customQuery",Object.assign(this.customQuery,JSON.parse(this.initCustomQuery)))},onDefaultNew:function onDefaultNew(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.onNew)return this.onNew(e);this.$emit("new",e),this.row=e,this.isNew=!0,this.isEdit=!1,this.isView=!1,this.dialogTitle=this.dialogNewTitle,this.dialogVisible=!0},onDefaultView:function onDefaultView(e){var t=this;if(this.onView)return this.onView(e);this.$emit("view",e),this.row=e,this.isView=!0,this.isNew=!1,this.isEdit=!1,this.dialogTitle=this.dialogViewTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(r){var n=e[r.$id];t.$refs.dialogForm.updateValue({id:r.$id,value:n})})})},onDefaultEdit:function onDefaultEdit(e){var t=this;if(this.onEdit)return this.onEdit(e);this.$emit("edit",e),this.row=e,this.isEdit=!0,this.isNew=!1,this.isView=!1,this.dialogTitle=this.dialogEditTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(r){var n=e[r.$id];t.$refs.dialogForm.updateValue({id:r.$id,value:n})})})},cancel:function cancel(){this.dialogVisible=!1},confirm:function confirm(){var e=this;this.beforeConfirm()&&this.$refs.dialogForm.validate(function(t){if(!t)return!1;if(e.isView)e.cancel();else{var r=Object.assign({},e.$refs.dialogForm.getFormValue(),e.extraParams),n="post",i=e.url+"";e.isEdit&&(n="put",i+="/"+e.row[e.id]),e.isTree&&(e.isNew?r[e.treeParentKey]=e.row[e.treeParentValue]:e.isEdit&&(r[e.treeParentKey]=e.row[e.treeParentKey])),e.confirmLoading=!0,e.$axios[n](i,r).then(function(t){e.getList(),e.showMessage(!0),e.cancel()}).catch(function(t){e.confirmLoading=!1})}})},onDefaultDelete:function onDefaultDelete(e){var t=this;if(this.onDelete)return this.onDelete(e);this.$confirm("确认删除吗","提示",{type:"warning",beforeClose:function beforeClose(r,n,i){"confirm"==r?(n.confirmButtonLoading=!0,t.hasSelect?t.$axios.delete(t.url+"/"+t.selected.map(function(e){return e[t.id]}).toString()).then(function(e){n.confirmButtonLoading=!1,i(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1}):t.$axios.delete(t.url+"/"+e[t.id]).then(function(e){n.confirmButtonLoading=!1,i(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1})):i()}}).catch(function(e){})},tree2Array:function tree2Array(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=[];return e.forEach(function(e){void 0===e._expanded&&r.$set(e,"_expanded",t);var o=0;if(void 0!==i&&null!==i&&(o=i+1),r.$set(e,"_level",o),n&&r.$set(e,"parent",n),a.push(e),e[r.treeChildKey]&&e[r.treeChildKey].length>0){var s=r.tree2Array(e[r.treeChildKey],t,e,o);a=a.concat(s)}}),a},showRow:function showRow(e){var t=!e.row.parent||e.row.parent._expanded&&e.row.parent._show;return e.row._show=t,t?"animation:treeTableShow 1s-webkit-animation:treeTableShow 1s":"display:none"},toggleExpanded:function toggleExpanded(e){var t=this.data[e];t._expanded=!t._expanded},iconShow:function iconShow(e,t){return t[this.treeChildKey]&&t[this.treeChildKey].length>0},showMessage:function showMessage(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.$message({type:"success",message:"操作成功"}):this.$message({type:"error",message:"操作失败"})}}}},function(e,t,r){var n,i,a={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=n.apply(this,arguments)),i}),s=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),u=null,l=0,c=[],p=r(236);function addStylesToDom(e,t){for(var r=0;r=0&&c.splice(t,1)}function createStyleElement(e){var t=document.createElement("style");return e.attrs.type="text/css",addAttrs(t,e.attrs),insertStyleElement(e,t),t}function addAttrs(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function addStyle(e,t){var r,n,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=l++;r=u||(u=createStyleElement(t)),n=applyToSingletonTag.bind(null,r,o,!1),i=applyToSingletonTag.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function createLinkElement(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",addAttrs(t,e.attrs),insertStyleElement(e,t),t}(t),n=function updateLink(e,t,r){var n=r.css,i=r.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(n=p(n));i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}.bind(null,r,t),i=function(){removeStyleElement(r),r.href&&URL.revokeObjectURL(r.href)}):(r=createStyleElement(t),n=function applyToTag(e,t){var r=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),i=function(){removeStyleElement(r)});return n(e),function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=listToStyles(e,t);return addStylesToDom(r,t),function update(e){for(var n=[],i=0;i=t||r<0||v&&e-m>=p}function timerExpired(){var e=i();if(shouldInvoke(e))return trailingEdge(e);d=setTimeout(timerExpired,function remainingWait(e){var r=t-(e-h);return v?u(r,p-(e-m)):r}(e))}function trailingEdge(e){return d=void 0,y&&l?invokeFunc(e):(l=c=void 0,f)}function debounced(){var e=i(),r=shouldInvoke(e);if(l=arguments,c=this,h=e,r){if(void 0===d)return function leadingEdge(e){return m=e,d=setTimeout(timerExpired,t),g?invokeFunc(e):f}(h);if(v)return d=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===d&&(d=setTimeout(timerExpired,t)),f}return t=a(t)||0,n(r)&&(g=!!r.leading,p=(v="maxWait"in r)?s(a(r.maxWait)||0,t):p,y="trailing"in r?!!r.trailing:y),debounced.cancel=function cancel(){void 0!==d&&clearTimeout(d),m=0,l=h=c=d=void 0},debounced.flush=function flush(){return void 0===d?f:trailingEdge(i())},debounced}},function(e,t,r){e.exports=r(116)},function(e,t,r){"use strict";r(117),r(123);var n=_interopRequireDefault(r(157)),i=_interopRequireDefault(r(166));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=0,o=function render(){var e=r(430),t="rsg-root";document.getElementById("app")&&(console.warn("The use of 'app' element id in the template is deprecated. Please, update your template file to use 'rsg-root' as the container id."),t="app"),n.default.render((0,i.default)(e,a),document.getElementById(t))};window.addEventListener("hashchange",o),window.addEventListener("hashchange",function scrollToOrigin(){0===window.location.hash.indexOf("#!/")&&window.scrollTo(0,0)}),o()},function(e,t,r){"use strict";r(118),r(119),r(121)},function(e,t){!function(){var e=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^\(\s\/]*)\s*/;function _name(){var t,r;return this===Function||this===Function.prototype.constructor?r="Function":this!==Function.prototype&&(r=(t=(""+this).match(e))&&t[1]),r||""}var t=!("name"in Function.prototype&&"name"in function x(){}),r="function"==typeof Object.defineProperty&&function(){var e;try{Object.defineProperty(Function.prototype,"_xyz",{get:function(){return"blah"},configurable:!0}),e="blah"===Function.prototype._xyz,delete Function.prototype._xyz}catch(t){e=!1}return e}(),n="function"==typeof Object.prototype.__defineGetter__&&function(){var e;try{Function.prototype.__defineGetter__("_abc",function(){return"foo"}),e="foo"===Function.prototype._abc,delete Function.prototype._abc}catch(t){e=!1}return e}();Function.prototype._name=_name,t&&(r?Object.defineProperty(Function.prototype,"name",{get:function(){var e=_name.call(this);return this!==Function.prototype&&Object.defineProperty(this,"name",{value:e,configurable:!0}),e},configurable:!0}):n&&Function.prototype.__defineGetter__("name",function(){var e=_name.call(this);return this!==Function.prototype&&this.__defineGetter__("name",function(){return e}),e}))}()},function(e,t,r){"use strict";r(120).polyfill()},function(e,t,r){"use strict";function assign(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n-1?t+="&":t+="?",t+="page="+this.page+"&size="+n,t+=Object.keys(r).filter(function(e){return""!==e&&null!==e&&void 0!==e}).reduce(function(e,t){return e+"&"+t+"="+encodeURI(r[t].toString().trim())},""),this.loading=!0,this.$axios.get(t).then(function(t){var r=t.data,n=[];e.hasPagination?(n=i()(r,e.dataPath)||[],e.total=i()(r,e.totalPath)):n=i()(r,"payload.content")||i()(r,"payload")||[],e.data=n,e.isTree&&(e.data=e.tree2Array(n,e.expandAll)),e.loading=!1,e.$emit("update",n,r)}).catch(function(t){e.$emit("error",t),e.loading=!1})):console.warn("DataTable: url 为空, 不发送请求")},handleSizeChange:function handleSizeChange(e){this.size!==e&&(this.size=e,this.getList())},handleCurrentChange:function handleCurrentChange(e){this.page!==e&&(this.page=e,this.getList())},handleSelectionChange:function handleSelectionChange(e){this.selected=e,this.$emit("selection-change",e)},onSearch:function onSearch(){var e=this.$refs.searchForm.getFormValue(),t=this.customQuery;this.query=Object.assign({},e,t)},onResetSearch:function onResetSearch(){this.$refs.searchForm.resetFields(),this.query={},this.$emit("reset"),this.$emit("update:customQuery",Object.assign(this.customQuery,JSON.parse(this.initCustomQuery)))},onDefaultNew:function onDefaultNew(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.onNew)return this.onNew(e);this.$emit("new",e),this.row=e,this.isNew=!0,this.isEdit=!1,this.isView=!1,this.dialogTitle=this.dialogNewTitle,this.dialogVisible=!0},onDefaultView:function onDefaultView(e){var t=this;if(this.onView)return this.onView(e);this.$emit("view",e),this.row=e,this.isView=!0,this.isNew=!1,this.isEdit=!1,this.dialogTitle=this.dialogViewTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(r){var n=e[r.$id];t.$refs.dialogForm.updateValue({id:r.$id,value:n})})})},onDefaultEdit:function onDefaultEdit(e){var t=this;if(this.onEdit)return this.onEdit(e);this.$emit("edit",e),this.row=e,this.isEdit=!0,this.isNew=!1,this.isView=!1,this.dialogTitle=this.dialogEditTitle,this.dialogVisible=!0,this.$nextTick(function(){t.form.forEach(function(r){var n=e[r.$id];t.$refs.dialogForm.updateValue({id:r.$id,value:n})})})},cancel:function cancel(){this.dialogVisible=!1},confirm:function confirm(){var e=this;this.beforeConfirm()&&this.$refs.dialogForm.validate(function(t){if(!t)return!1;if(e.isView)e.cancel();else{var r=Object.assign({},e.$refs.dialogForm.getFormValue(),e.extraParams),n="post",i=e.url+"";e.isEdit&&(n="put",i+="/"+e.row[e.id]),e.isTree&&(e.isNew?r[e.treeParentKey]=e.row[e.treeParentValue]:e.isEdit&&(r[e.treeParentKey]=e.row[e.treeParentKey])),e.confirmLoading=!0,e.$axios[n](i,r).then(function(t){e.getList(),e.showMessage(!0),e.cancel()}).catch(function(t){e.confirmLoading=!1})}})},onDefaultDelete:function onDefaultDelete(e){var t=this;if(this.onDelete)return this.onDelete(e);this.$confirm("确认删除吗","提示",{type:"warning",beforeClose:function beforeClose(r,n,i){"confirm"==r?(n.confirmButtonLoading=!0,t.hasSelect?t.$axios.delete(t.url+"/"+t.selected.map(function(e){return e[t.id]}).toString()).then(function(e){n.confirmButtonLoading=!1,i(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1}):t.$axios.delete(t.url+"/"+e[t.id]).then(function(e){n.confirmButtonLoading=!1,i(),t.showMessage(!0),t.getList()}).catch(function(e){n.confirmButtonLoading=!1})):i()}}).catch(function(e){})},tree2Array:function tree2Array(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=[];return e.forEach(function(e){void 0===e._expanded&&r.$set(e,"_expanded",t);var o=0;if(void 0!==i&&null!==i&&(o=i+1),r.$set(e,"_level",o),n&&r.$set(e,"parent",n),a.push(e),e[r.treeChildKey]&&e[r.treeChildKey].length>0){var s=r.tree2Array(e[r.treeChildKey],t,e,o);a=a.concat(s)}}),a},showRow:function showRow(e){var t=!e.row.parent||e.row.parent._expanded&&e.row.parent._show;return e.row._show=t,t?"animation:treeTableShow 1s-webkit-animation:treeTableShow 1s":"display:none"},toggleExpanded:function toggleExpanded(e){var t=this.data[e];t._expanded=!t._expanded},iconShow:function iconShow(e,t){return t[this.treeChildKey]&&t[this.treeChildKey].length>0},showMessage:function showMessage(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.$message({type:"success",message:"操作成功"}):this.$message({type:"error",message:"操作失败"})}}}},function(e,t,r){var n,i,a={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=n.apply(this,arguments)),i}),s=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),u=null,l=0,c=[],p=r(236);function addStylesToDom(e,t){for(var r=0;r=0&&c.splice(t,1)}function createStyleElement(e){var t=document.createElement("style");return e.attrs.type="text/css",addAttrs(t,e.attrs),insertStyleElement(e,t),t}function addAttrs(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function addStyle(e,t){var r,n,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=l++;r=u||(u=createStyleElement(t)),n=applyToSingletonTag.bind(null,r,o,!1),i=applyToSingletonTag.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function createLinkElement(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",addAttrs(t,e.attrs),insertStyleElement(e,t),t}(t),n=function updateLink(e,t,r){var n=r.css,i=r.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(n=p(n));i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}.bind(null,r,t),i=function(){removeStyleElement(r),r.href&&URL.revokeObjectURL(r.href)}):(r=createStyleElement(t),n=function applyToTag(e,t){var r=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),i=function(){removeStyleElement(r)});return n(e),function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=listToStyles(e,t);return addStylesToDom(r,t),function update(e){for(var n=[],i=0;i=t||r<0||v&&e-m>=p}function timerExpired(){var e=i();if(shouldInvoke(e))return trailingEdge(e);d=setTimeout(timerExpired,function remainingWait(e){var r=t-(e-h);return v?u(r,p-(e-m)):r}(e))}function trailingEdge(e){return d=void 0,y&&l?invokeFunc(e):(l=c=void 0,f)}function debounced(){var e=i(),r=shouldInvoke(e);if(l=arguments,c=this,h=e,r){if(void 0===d)return function leadingEdge(e){return m=e,d=setTimeout(timerExpired,t),g?invokeFunc(e):f}(h);if(v)return d=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===d&&(d=setTimeout(timerExpired,t)),f}return t=a(t)||0,n(r)&&(g=!!r.leading,p=(v="maxWait"in r)?s(a(r.maxWait)||0,t):p,y="trailing"in r?!!r.trailing:y),debounced.cancel=function cancel(){void 0!==d&&clearTimeout(d),m=0,l=h=c=d=void 0},debounced.flush=function flush(){return void 0===d?f:trailingEdge(i())},debounced}},function(e,t,r){e.exports=r(116)},function(e,t,r){"use strict";r(117),r(123);var n=_interopRequireDefault(r(157)),i=_interopRequireDefault(r(166));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=0,o=function render(){var e=r(430),t="rsg-root";document.getElementById("app")&&(console.warn("The use of 'app' element id in the template is deprecated. Please, update your template file to use 'rsg-root' as the container id."),t="app"),n.default.render((0,i.default)(e,a),document.getElementById(t))};window.addEventListener("hashchange",o),window.addEventListener("hashchange",function scrollToOrigin(){0===window.location.hash.indexOf("#!/")&&window.scrollTo(0,0)}),o()},function(e,t,r){"use strict";r(118),r(119),r(121)},function(e,t){!function(){var e=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^\(\s\/]*)\s*/;function _name(){var t,r;return this===Function||this===Function.prototype.constructor?r="Function":this!==Function.prototype&&(r=(t=(""+this).match(e))&&t[1]),r||""}var t=!("name"in Function.prototype&&"name"in function x(){}),r="function"==typeof Object.defineProperty&&function(){var e;try{Object.defineProperty(Function.prototype,"_xyz",{get:function(){return"blah"},configurable:!0}),e="blah"===Function.prototype._xyz,delete Function.prototype._xyz}catch(t){e=!1}return e}(),n="function"==typeof Object.prototype.__defineGetter__&&function(){var e;try{Function.prototype.__defineGetter__("_abc",function(){return"foo"}),e="foo"===Function.prototype._abc,delete Function.prototype._abc}catch(t){e=!1}return e}();Function.prototype._name=_name,t&&(r?Object.defineProperty(Function.prototype,"name",{get:function(){var e=_name.call(this);return this!==Function.prototype&&Object.defineProperty(this,"name",{value:e,configurable:!0}),e},configurable:!0}):n&&Function.prototype.__defineGetter__("name",function(){var e=_name.call(this);return this!==Function.prototype&&this.__defineGetter__("name",function(){return e}),e}))}()},function(e,t,r){"use strict";r(120).polyfill()},function(e,t,r){"use strict";function assign(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n/,function(e,t){return{type:"function",ctor:this.parent,name:e[1],string:this.name(".prototype.")+e[1]+"()"}}),this.use(/^\s*([\w$.]+)\s*:\s*function\s*\(([^)]+)/,function(e,t){return{type:"method",ctor:this.parent,name:e[1],string:this.name(".prototype.")+e[1]+"()"}}),this.use(/^\s*([\w$.]+)\s*:\s*([^\n;]+)/,function(e,t){return{type:"property",ctor:this.parent,name:e[1],value:trim(e[2]),string:this.name(".")+e[1]}}),this.use(/^\s*(get|set)\s*([\w$.]+)\s*\(([^)]+)/,function(e,t){return{type:"property",ctor:this.parent,name:e[2],string:this.name(".prototype.")+e[2]}}),this.use(/^\s*([\w$.]+)\s*\.\s*([\w$]+)\s*=\s*function\s*\(([^)]+)/,function(e,t){return{type:"method",receiver:e[1],name:e[2],params:(e[3]||"").split(/[, ]+/),string:e[1]+"."+e[2]+"()"}}),this.use(/^\s*([\w$.]+)\s*\.\s*([\w$]+)\s*=\s*([^\n;]+)/,function(e,t){return{type:"property",receiver:e[1],name:e[2],value:trim(e[3]),string:e[1]+"."+e[2]}}),this.use(/^\s*(?:const|let|var)\s+([\w$]+)\s*=\s*([^\n;]+)/,function(e,t){return{type:"declaration",name:e[1],value:trim(e[2]),string:e[1]}})},e.exports=function(e,t,r){return new Parser(e,t,r).parse()},e.exports.Parser=Parser},function(e,t,r){"use strict";var n=r(386);e.exports=function BlockComment(e,t){this.type=t.type,this.range=t.range,this.loc=t.loc,this.raw=t.value,this.value=n.stripStars(this.raw)}},function(e,t,r){"use strict";var n=e.exports;n.toPrefixRegex=function(e){var t="("+e.join("|")+")";return new RegExp("^"+t)},n.trimRight=function(e){return e.replace(/\s+$/,"")},n.stripStars=function(e){return e=(e=e.replace(/^[ \t]/gm,"")).replace(/^[ \t]*\*[ \t]?/gm,""),n.trimRight(e)},e.exports=n},function(e,t,r){"use strict";e.exports=function LineComment(e,t){this.type=t.type,this.range=t.range,this.loc=t.loc,this.raw=t.value,this.value=this.raw.trim()}},function(e,t,r){"use strict";function scoper(e,t){var r=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e=e.replace(r,function(e,r,n){return r.match(/^\s*(@media|@keyframes|to|from|@font-face)/)?r+n:(r.match(/:scope/)&&(r=r.replace(/([^\s]*):scope/,function(e,t){return""===t?"> *":"> "+t})),(r=(r=r.trim()+" ").replace(/ /g,t+" "))+n)})}Object.defineProperty(t,"__esModule",{value:!0}),function init(){var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e),e.sheet.insertRule("body { visibility: hidden; }",0)}(),t.default=function process(){var e=document.body.querySelectorAll("style[scoped]");if(0!==e.length){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.dataset.cssscoper="true";var n="",i=void 0;for(i=0;i=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(s,["className"]);return i.default.createElement("div",{className:t.root},i.default.createElement("div",n({className:(0,o.default)(t.preview,p)},f,{"data-preview":r}),a),i.default.createElement("div",{className:t.controls},i.default.createElement("div",{className:t.tabs},u),i.default.createElement("div",{className:t.toolbar},c)),i.default.createElement("div",{className:t.tab},l))}PlaygroundRenderer.propTypes={classes:a.default.object.isRequired,name:a.default.string.isRequired,preview:a.default.node.isRequired,previewProps:a.default.object.isRequired,tabButtons:a.default.node.isRequired,tabBody:a.default.node.isRequired,toolbar:a.default.node.isRequired},t.default=(0,s.default)(u)(PlaygroundRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExamplesRenderer=ExamplesRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ExamplesRenderer(e){var t=e.classes,r=e.children;return n.default.createElement("article",{className:t.root},r)}ExamplesRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.node},t.default=(0,a.default)(function styles(){return{root:{}}})(ExamplesRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(393);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Components;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(394)),o=_interopRequireDefault(r(403));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Components(e){var t=e.components,r=e.depth;return n.default.createElement(o.default,null,t.map(function(e){return n.default.createElement(a.default,{key:e.filepath,component:e,depth:r})}))}Components.propTypes={components:i.default.array.isRequired,depth:i.default.number.isRequired}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(395);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t0?o.default.createElement(u.default,{examples:_,name:s}):o.default.createElement(g,{name:s}),tabButtons:o.default.createElement(f.default,{name:"docsTabButtons",active:e,props:n({},i,{onClick:this.handleTabChange})}),tabBody:o.default.createElement(f.default,{name:"docsTabs",active:e,onlyActive:!0,props:i})}):null}}]),ReactComponent}();v.propTypes={component:s.default.object.isRequired,depth:s.default.number.isRequired},v.contextTypes={config:s.default.object.isRequired,displayMode:s.default.string},t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["slotName","slotProps","children","id","level","name","nameParent","collection"]),y=r.navigation,b=(0,u.getUrlNavigation)(y,{level:f,sections:g.sections,components:g.components,nameParent:h,name:d,slug:p,anchor:!0});return i.default.createElement(s.default,n({toolbar:i.default.createElement(o.default,{name:a,props:l}),id:p,href:b},v),c)}SectionHeading.propTypes={children:a.default.node,id:a.default.string.isRequired,name:a.default.string.isRequired,nameParent:a.default.string.isRequired,level:a.default.number.isRequired,slotName:a.default.string.isRequired,slotProps:a.default.object.isRequired,depth:a.default.number.isRequired,deprecated:a.default.bool,collection:a.default.object},SectionHeading.contextTypes={config:a.default.object}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(5)),o=_interopRequireDefault(r(59)),s=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function SectionHeadingRenderer(e){var t=e.classes,r=e.children,i=e.toolbar,s=e.id,u=e.href,l=e.depth,c=e.deprecated,p=Math.min(6,l),f=(0,a.default)(t.sectionName,function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},t.isDeprecated,c));return n.default.createElement("div",{className:t.wrapper},n.default.createElement(o.default,{level:p,id:s},n.default.createElement("a",{href:u,className:f},r)),n.default.createElement("div",{className:t.toolbar},i))}SectionHeadingRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.node,toolbar:i.default.node,id:i.default.string.isRequired,href:i.default.string.isRequired,depth:i.default.number.isRequired,deprecated:i.default.bool},t.default=(0,s.default)(function styles(e){var t=e.color;return{wrapper:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:e.space[1]},toolbar:{marginLeft:"auto"},sectionName:{"&:hover, &:active":{isolate:!1,textDecoration:"underline",cursor:"pointer"}},isDeprecated:{textDecoration:"line-through",color:t.light}}})(SectionHeadingRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactComponentRenderer=ReactComponentRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(399)),o=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ReactComponentRenderer(e){var t=e.classes,r=e.name,i=e.heading,o=e.pathLine,s=e.description,u=e.docs,l=e.examples,c=e.tabButtons,p=e.tabBody;return n.default.createElement("div",{className:t.root,id:r+"-container"},n.default.createElement("header",{className:t.header},i,o&&n.default.createElement(a.default,null,o)),(s||u)&&n.default.createElement("div",{className:t.docs},s,u),c&&n.default.createElement("div",{className:t.tabs},n.default.createElement("div",{className:t.tabButtons},c),p),l)}ReactComponentRenderer.propTypes={classes:i.default.object.isRequired,name:i.default.string.isRequired,heading:i.default.node.isRequired,filepath:i.default.string,pathLine:i.default.string,tabButtons:i.default.node,tabBody:i.default.node,description:i.default.node,docs:i.default.node,examples:i.default.node,isolated:i.default.bool},t.default=(0,o.default)(function styles(e){var t=e.color,r=e.fontSize,n=e.space;return{root:{marginBottom:n[6]},header:{marginBottom:n[3]},tabs:{marginBottom:n[3]},tabButtons:{marginBottom:n[2]},docs:{color:t.base,fontSize:r.text}}})(ReactComponentRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(400);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styles=void 0,t.PathlineRenderer=PathlineRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(401)),o=_interopRequireDefault(r(402)),s=_interopRequireDefault(r(103)),u=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=t.styles=function styles(e){var t=e.space,r=e.fontFamily,n=e.fontSize,i=e.color;return{pathline:{fontFamily:r.monospace,fontSize:n.small,color:i.light},copyButton:{marginLeft:t[0]}}};function PathlineRenderer(e){var t=e.classes,r=e.children;return n.default.createElement("div",{className:t.pathline},r,n.default.createElement(s.default,{small:!0,className:t.copyButton,onClick:function onClick(){return(0,a.default)(r)},title:"Copy to clipboard"},n.default.createElement(o.default,null)))}PathlineRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.string},t.default=(0,u.default)(l)(PathlineRenderer)},function(e,t){e.exports=function clipboardCopy(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre";var r=document.createElement("iframe");r.sandbox="allow-same-origin",document.body.appendChild(r);var n=r.contentWindow;n.document.body.appendChild(t);var i=n.getSelection();i||(n=window,i=n.getSelection(),document.body.appendChild(t));var a=n.document.createRange();i.removeAllRanges(),a.selectNode(t),i.addRange(a);var o=!1;try{o=n.document.execCommand("copy")}catch(e){}return i.removeAllRanges(),n.document.body.removeChild(t),document.body.removeChild(r),o?Promise.resolve():Promise.reject()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t-1&&(t=t.replace(t.slice(t.indexOf("?id")),""));var r=t.split("/"),i=parseInt(r[1],10);return{targetName:decodeURIComponent(r[0]),targetIndex:(0,n.default)(i)?void 0:i}}return{}};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(422))},function(e,t,r){var n=r(423);e.exports=function isNaN(e){return n(e)&&e!=+e}},function(e,t,r){var n=r(12),i=r(10),a="[object Number]";e.exports=function isNumber(e){return"number"==typeof e||i(e)&&n(e)==a}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function getIdParam(){var e=location.href,t=new RegExp("[\\?&]id=([^&#]*)").exec(e);return null==t?null:t[1]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function globalizeComponents(e){e.forEach(function(e){e.components&&e.components.forEach(n.default),e.sections&&globalizeComponents(e.sections)})};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(426))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function globalizeComponent(e){var t=e.props.displayName;if(!e.name)return;var r=e.module.default||e.module;n.default.component(t,r)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(68))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0;var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(function(e){return n({},e,{components:(0,i.default)(e.components||[],t,r+1,e.name),sections:processSections(e.sections||[],t,r+1,e.name),nameParent:a,level:r})})};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(428))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(function(e){var a=n({},e,{name:e.props.displayName,level:r,nameParent:i,props:n({},e.props,{examples:[].concat(_toConsumableArray(e.props.examples||[]),_toConsumableArray(e.props.example||[]))})});return delete a.props.example,a.props.examples=function processExamples(e,t){return e.map(function(e){return"code"===e.type&&(e.vuex=t),e})}(a.props.examples,t),a})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function processMixins(e){e.forEach(function(e){e.default?globalizeMixin(e.default):globalizeMixin(e)})};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(68));function globalizeMixin(e){n.default.mixin(e)}},function(e,t,r){e.exports={config:{title:"El Data Table Style Guide",showCode:!0,showUsage:!0,showSidebar:!0,previewDelay:500,theme:{},navigation:!1,styles:{},compilerConfig:{objectAssign:"Object.assign"},editorConfig:{theme:"base16-light",mode:"jsx",lineWrapping:!0,smartIndent:!1,matchBrackets:!0,viewportMargin:1/0,lineNumbers:!1},ribbon:{url:"https://github.com/FEMessage/el-data-table"}},welcomeScreen:!1,patterns:void 0,sections:[{name:void 0,description:void 0,slug:"",sections:[],filepath:void 0,components:[{filepath:"src/el-data-table.vue",slug:"eldatatable",pathLine:"src/el-data-table.vue",module:r(431),props:r(439),hasExamples:!1,metadata:{}}],content:void 0}],vuex:void 0,renderRootJsx:void 0,mixins:[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(112),i=r(438);var a=function injectStyle(e){r(432)},o=r(436)(n.a,i.a,!1,a,null,null);t.default=o.exports},function(e,t,r){var n=r(433);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(434)("2f611534",n,!0,{})},function(e,t,r){(e.exports=r(71)(!1)).push([e.i,'.el-data-table .ms-tree-space{position:relative;top:1px;display:inline-block;font-style:normal;font-weight:400;line-height:1;width:18px;height:14px}.el-data-table .ms-tree-space:before{content:""}.el-data-table .tree-ctrl{position:relative;cursor:pointer;color:#2196f3}@keyframes treeTableShow{0%{opacity:0}to{opacity:1}}',""])},function(e,t,r){var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=r(435),a={},o=n&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,l=!1,c=function(){},p=null,f="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function addStylesToDom(e){for(var t=0;tr.parts.length&&(n.parts.length=r.parts.length)}else{var o=[];for(i=0;i-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(T||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var O=memoize(function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(p,function(e,r,n,i){t.push(n?i.replace(f,"$1"):r||e)}),t});function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var B=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==s}e.exports=function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}}).call(t,r(3))},function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"el-data-table"},[e.searchForm.length>0?r("el-form-renderer",{ref:"searchForm",attrs:{inline:"",content:e.searchForm}},[e._t("search"),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),r("el-button",{attrs:{size:"small"},on:{click:e.onResetSearch}},[e._v("重置")])],1)],2):e._e(),e._v(" "),e.hasNew||e.hasDelete||e.headerButtons.length>0?r("el-form",[r("el-form-item",[e.hasNew?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onDefaultNew}},[e._v("新增")]):e._e(),e._v(" "),e._l(e.headerButtons,function(t,n){return"show"in t&&!t.show(e.selected)?e._e():r("el-button",e._b({key:n,attrs:{disabled:"disabled"in t&&t.disabled(e.selected),size:"small"},on:{click:function(r){t.atClick(e.selected)}}},"el-button",t,!1),[e._v(e._s(t.text))])}),e._v(" "),e.hasSelect&&e.hasDelete?r("el-button",{attrs:{type:"danger",size:"small",disabled:e.single?!e.selected.length||e.selected.length>1:!e.selected.length},on:{click:function(t){e.onDefaultDelete(t)}}},[e._v("删除")]):e._e()],2)],1):e._e(),e._v(" "),r("el-table",e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.data,"row-style":e.showRow},on:{"selection-change":e.handleSelectionChange}},"el-table",e.tableAttrs,!1),[e.isTree?[e.hasSelect?[r("el-table-column",e._b({key:"selection-key"},"el-table-column",e.columns[0],!1)),e._v(" "),r("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?r("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?r("span",{staticClass:"tree-ctrl",on:{click:function(r){e.toggleExpanded(t.$index)}}},[t.row._expanded?r("i",{staticClass:"el-icon-minus"}):r("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(t.row[e.columns[1].prop])+"\n ")]}}])},"el-table-column",e.columns[1],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t&&1!==t}),function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]:[r("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?r("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?r("span",{staticClass:"tree-ctrl",on:{click:function(r){e.toggleExpanded(t.$index)}}},[t.row._expanded?r("i",{staticClass:"el-icon-minus"}):r("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(t.row[e.columns[0].prop])+"\n ")]}}])},"el-table-column",e.columns[0],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t}),function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]]:e._l(e.columns,function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))}),e._v(" "),e.hasOperation?r("el-table-column",e._b({attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.isTree&&e.hasNew?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(r){e.onDefaultNew(t.row)}}},[e._v("新增")]):e._e(),e._v(" "),e.hasEdit?r("el-button",{attrs:{size:"small"},on:{click:function(r){e.onDefaultEdit(t.row)}}},[e._v("\n 修改\n ")]):e._e(),e._v(" "),e.hasView?r("el-button",{attrs:{type:"info",size:"small"},on:{click:function(r){e.onDefaultView(t.row)}}},[e._v("\n 查看\n ")]):e._e(),e._v(" "),e._l(e.extraButtons,function(n,i){return"show"in n&&!n.show(t.row)?e._e():r("el-button",e._b({key:i,attrs:{size:"small"},on:{click:function(e){n.atClick(t.row)}}},"el-button",n,!1),[e._v("\n "+e._s(n.text)+"\n ")])}),e._v(" "),!e.hasSelect&&e.hasDelete&&e.canDelete(t.row)?r("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(r){e.onDefaultDelete(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])},"el-table-column",e.operationAttrs,!1)):e._e(),e._v(" "),e._t("default")],2),e._v(" "),e.hasPagination?r("el-pagination",{staticStyle:{"text-align":"right",padding:"10px 0"},attrs:{"current-page":e.page,"page-sizes":e.paginationSizes,"page-size":e.size,total:e.total,layout:e.paginationLayout},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e(),e._v(" "),e.hasDialog?r("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("el-form-renderer",e._b({ref:"dialogForm",attrs:{content:e.form,disabled:e.isView}},"el-form-renderer",e.formAttrs,!1),[e._t("form")],2),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:!e.isView,expression:"!isView"}],attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small"},on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),r("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],attrs:{type:"primary",size:"small"},on:{click:e.confirm}},[e._v("确 定")])],1)],1):e._e()],1)},staticRenderFns:[]};t.a=n},function(e,t,r){e.exports={description:"",methods:[],displayName:"ElDataTable",props:[{type:{name:"func"},required:"",defaultValue:{value:"default() { return true; }",func:!0},tags:{},comment:"/**\n * 在新增/修改弹窗 点击确认时调用,返回false则不会继续执行confirm逻辑\n */",description:"在新增/修改弹窗 点击确认时调用,返回false则不会继续执行confirm逻辑",name:"beforeConfirm"},{type:{name:"func"},required:"",defaultValue:{value:"default() { return true; }",func:!0},tags:{},comment:"/**\n * 某行数据是否可以删除, 返回true表示可以, 控制的是单选时单行的删除按钮\n */",description:"某行数据是否可以删除, 返回true表示可以, 控制的是单选时单行的删除按钮",name:"canDelete"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/table#table-column-attributes"}]},comment:"/**\n * 列属性设置, 详情见element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/table#table-column-attributes\n */",description:"列属性设置, 详情见element-ui官网",name:"columns"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{},comment:"/**\n * 外部的注入额外的查询参数, 键值对形式\n */",description:"外部的注入额外的查询参数, 键值对形式",name:"customQuery"},{type:{name:"string"},required:"",defaultValue:{value:'"payload.content"',func:!1},tags:{},comment:"/**\n * 渲染组件的分页数据在接口返回的数据中的路径, 嵌套对象使用.表示即可\n */",description:"渲染组件的分页数据在接口返回的数据中的路径, 嵌套对象使用.表示即可",name:"dataPath"},{type:{name:"string"},required:"",defaultValue:{value:'"修改"',func:!1},tags:{},comment:"/**\n * 修改弹窗的标题\n */",description:"修改弹窗的标题",name:"dialogEditTitle"},{type:{name:"string"},required:"",defaultValue:{value:'"新增"',func:!1},tags:{},comment:"/**\n * 新增弹窗的标题\n */",description:"新增弹窗的标题",name:"dialogNewTitle"},{type:{name:"string"},required:"",defaultValue:{value:'"查看"',func:!1},tags:{},comment:"",description:"",name:"dialogViewTitle"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 树形结构相关: 是否展开所有节点\n */",description:"树形结构相关: 是否展开所有节点",name:"expandAll"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{},comment:"/**\n * 操作列的自定义按钮, 渲染的是element-ui的button, 支持属性\n * type: '', text: '', atClick: row => {}, show: row => {返回true时显示}\n */",description:"操作列的自定义按钮, 渲染的是element-ui的button, 支持属性\ntype: '', text: '', atClick: row => {}, show: row => {返回true时显示}",name:"extraButtons"},{type:{name:"object"},required:"",tags:{},comment:"/**\n * 新增/修改提交时注入额外的参数\n */",description:"新增/修改提交时注入额外的参数",name:"extraParams"},{type:{name:"number"},required:"",defaultValue:{value:"1",func:!1},tags:{},comment:"/**\n * 分页请求的第一页的值(有的接口0是第一页)\n */",description:"分页请求的第一页的值(有的接口0是第一页)",name:"firstPage"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md"}]},comment:"/**\n * 弹窗表单, 用于新增与修改, 详情配置参考el-form-renderer\n * @link https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md\n */",description:"弹窗表单, 用于新增与修改, 详情配置参考el-form-renderer",name:"form"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/form#form-attributes"}]},comment:"/**\n * 弹窗表单属性设置, 详情配置参考element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/form#form-attributes\n */",description:"弹窗表单属性设置, 详情配置参考element-ui官网",name:"formAttrs"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * table头部是否有删除按钮(该按钮要多选时才会出现)\n */",description:"table头部是否有删除按钮(该按钮要多选时才会出现)",name:"hasDelete"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有弹窗, 用于不需要弹窗时想减少DOM渲染的场景\n */",description:"是否有弹窗, 用于不需要弹窗时想减少DOM渲染的场景",name:"hasDialog"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有编辑按钮\n */",description:"是否有编辑按钮",name:"hasEdit"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有新增按钮\n */",description:"是否有新增按钮",name:"hasNew"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有操作列\n */",description:"是否有操作列",name:"hasOperation"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否分页\n */",description:"是否分页",name:"hasPagination"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 是否有查看按钮\n */",description:"是否有查看按钮",name:"hasView"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{},comment:"/**\n * 头部的自定义按钮, 渲染的是element-ui的button, 支持属性\n * type: '', text: '', atClick: row => {}, show: row => {返回true时显示}, disabled: selected => {返回true时禁用}\n */",description:"头部的自定义按钮, 渲染的是element-ui的button, 支持属性\ntype: '', text: '', atClick: row => {}, show: row => {返回true时显示}, disabled: selected => {返回true时禁用}",name:"headerButtons"},{type:{name:"string"},required:"",defaultValue:{value:'"id"',func:!1},tags:{},comment:"/**\n * 主键,默认值 id,\n * 修改/删除时会用到,请求会根据定义的属性值获取主键,即row[this.id]\n */",description:"主键,默认值 id,\n修改/删除时会用到,请求会根据定义的属性值获取主键,即row[this.id]",name:"id"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 要渲染的数据是否是树形结构\n */",description:"要渲染的数据是否是树形结构",name:"isTree"},{type:{name:"number"},required:"",defaultValue:{value:"999",func:!1},tags:{},comment:"/**\n * 不分页时的size的大小\n */",description:"不分页时的size的大小",name:"noPaginationSize"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击删除按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击删除按钮时的方法, 当默认新增方法不满足需求时使用",name:"onDelete"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击修改按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击修改按钮时的方法, 当默认新增方法不满足需求时使用",name:"onEdit"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击新增按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击新增按钮时的方法, 当默认新增方法不满足需求时使用",name:"onNew"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return { width: '', fixed: 'right' }; }",func:!0},tags:{},comment:"/**\n * 操作列属性\n */",description:"操作列属性",name:"operationAttrs"},{type:{name:"string"},required:"",defaultValue:{value:'"total, sizes, prev, pager, next, jumper"',func:!1},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的子组件布局,子组件名用逗号分隔,对应element-ui pagination的layout属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的子组件布局,子组件名用逗号分隔,对应element-ui pagination的layout属性",name:"paginationLayout"},{type:{name:"number"},required:"",defaultValue:{value:"10",func:!1},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的每页显示个数选择器默认选项,对应element-ui pagination的page-size属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的每页显示个数选择器默认选项,对应element-ui pagination的page-size属性",name:"paginationSize"},{type:{name:"array"},required:"",defaultValue:{value:"() => [10, 20, 30, 40, 50]",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的每页显示个数选择器的选项设置,对应element-ui pagination的page-sizes属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的每页显示个数选择器的选项设置,对应element-ui pagination的page-sizes属性",name:"paginationSizes"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md"}]},comment:"/**\n * 查询字段渲染, 配置参考el-form-renderer\n * @link https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md\n */",description:"查询字段渲染, 配置参考el-form-renderer",name:"searchForm"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 单选, 适用场景: 不可以批量删除\n */",description:"单选, 适用场景: 不可以批量删除",name:"single"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/table#table-attributes"}]},comment:"/**\n * element table 属性设置, 详情配置参考element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/table#table-attributes\n */",description:"element table 属性设置, 详情配置参考element-ui官网",name:"tableAttrs"},{type:{name:"string"},required:"",defaultValue:{value:'"payload.totalElements"',func:!1},tags:{},comment:"/**\n * 分页数据的总数在接口返回的数据中的路径, 嵌套对象使用.表示即可\n */",description:"分页数据的总数在接口返回的数据中的路径, 嵌套对象使用.表示即可",name:"totalPath"},{type:{name:"string"},required:"",defaultValue:{value:'"children"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 子节点的字段名\n */",description:"树形结构相关: 子节点的字段名",name:"treeChildKey"},{type:{name:"string"},required:"",defaultValue:{value:'"parentId"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 父节点的字段名\n */",description:"树形结构相关: 父节点的字段名",name:"treeParentKey"},{type:{name:"string"},required:"",defaultValue:{value:'"id"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 父节点字段值的来源字段。\n * 新增/修改时会用到, 例如, 在id为2的节点新增子节点, 则子节点的parentId为2, 也即parentId的值来源于字段id, 故treeParentValue为id\n */",description:"树形结构相关: 父节点字段值的来源字段。\n新增/修改时会用到, 例如, 在id为2的节点新增子节点, 则子节点的parentId为2, 也即parentId的值来源于字段id, 故treeParentValue为id",name:"treeParentValue"},{type:{name:"string"},required:"",defaultValue:{value:'""',func:!1},tags:{},comment:"/**\n * 请求url, 如果为空, 则不会发送请求\n */",description:"请求url, 如果为空, 则不会发送请求",name:"url"}],comment:"",tags:{},events:{edit:{description:"点击修改 触发edit事件",type:void 0,properties:void 0,comment:"/**\n * 点击修改 触发edit事件\n * @event edit\n */"},view:{description:"点击查看 触发view事件",type:void 0,properties:void 0,comment:"/**\n * 点击查看 触发view事件\n * @event view\n */"},new:{description:"点击新增 触发new事件",type:void 0,properties:void 0,comment:"/**\n * 点击新增 触发new事件\n * @event new\n */"},reset:{description:"按下重置按钮后触发,\n另外, 当customQuery.sync时, 会重置customQuery",type:void 0,properties:void 0,comment:"/**\n * 按下重置按钮后触发,\n * 另外, 当customQuery.sync时, 会重置customQuery\n * @event reset\n */"},"selection-change":{description:"多选启用时生效, 返回(selected)已选中行的数组",type:void 0,properties:void 0,comment:"/**\n * 多选启用时生效, 返回(selected)已选中行的数组\n * @event selection-change\n */"},error:{description:"请求数据失败,返回err对象",type:void 0,properties:void 0,comment:"/**\n * 请求数据失败,返回err对象\n * @event error\n */"},update:{description:"请求返回, 数据更新后触发, 返回(data, resp) data是渲染table的数据, resp是请求返回的完整response",type:void 0,properties:void 0,comment:"/**\n * 请求返回, 数据更新后触发, 返回(data, resp) data是渲染table的数据, resp是请求返回的完整response\n * @event update\n */"}},slots:{search:{description:"额外的搜索内容, 当searchForm不满足需求时可以使用"},default:{description:"自定义操作列, 当extraButtons不满足需求时可以使用"},form:{description:"额外的弹窗表单内容, 当form不满足需求时可以使用"}},examples:[]}}]); \ No newline at end of file + */var n=r(382),i={configurable:"boolean",enumerable:"boolean",writable:"boolean"};e.exports=function isDataDescriptor(e,t){if("object"!==n(e))return!1;if("string"==typeof t)return void 0!==Object.getOwnPropertyDescriptor(e,t);if(!("value"in e||"writable"in e))return!1;for(var r in e)if("value"!==r&&i.hasOwnProperty(r)&&n(e[r])!==i[r]&&void 0!==e[r])return!1;return!0}},function(e,t,r){var n=r(109),i=Object.prototype.toString;e.exports=function kindOf(e){if(void 0===e)return"undefined";if(null===e)return"null";if(!0===e||!1===e||e instanceof Boolean)return"boolean";if("string"==typeof e||e instanceof String)return"string";if("number"==typeof e||e instanceof Number)return"number";if("function"==typeof e||e instanceof Function)return"function";if(void 0!==Array.isArray&&Array.isArray(e))return"array";if(e instanceof RegExp)return"regexp";if(e instanceof Date)return"date";var t=i.call(e);return"[object RegExp]"===t?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":n(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"}},function(e,t,r){"use strict";var n=r(384);e.exports=function Context(e,t){var r=t.range[1],i=t.loc.end.line,a=e.slice(r),o=a.length,s=0,u=0,l=null;for(this.context={},this.value="",this.line=null;++s/,function(e,t){return{type:"function",ctor:this.parent,name:e[1],string:this.name(".prototype.")+e[1]+"()"}}),this.use(/^\s*([\w$.]+)\s*:\s*function\s*\(([^)]+)/,function(e,t){return{type:"method",ctor:this.parent,name:e[1],string:this.name(".prototype.")+e[1]+"()"}}),this.use(/^\s*([\w$.]+)\s*:\s*([^\n;]+)/,function(e,t){return{type:"property",ctor:this.parent,name:e[1],value:trim(e[2]),string:this.name(".")+e[1]}}),this.use(/^\s*(get|set)\s*([\w$.]+)\s*\(([^)]+)/,function(e,t){return{type:"property",ctor:this.parent,name:e[2],string:this.name(".prototype.")+e[2]}}),this.use(/^\s*([\w$.]+)\s*\.\s*([\w$]+)\s*=\s*function\s*\(([^)]+)/,function(e,t){return{type:"method",receiver:e[1],name:e[2],params:(e[3]||"").split(/[, ]+/),string:e[1]+"."+e[2]+"()"}}),this.use(/^\s*([\w$.]+)\s*\.\s*([\w$]+)\s*=\s*([^\n;]+)/,function(e,t){return{type:"property",receiver:e[1],name:e[2],value:trim(e[3]),string:e[1]+"."+e[2]}}),this.use(/^\s*(?:const|let|var)\s+([\w$]+)\s*=\s*([^\n;]+)/,function(e,t){return{type:"declaration",name:e[1],value:trim(e[2]),string:e[1]}})},e.exports=function(e,t,r){return new Parser(e,t,r).parse()},e.exports.Parser=Parser},function(e,t,r){"use strict";var n=r(386);e.exports=function BlockComment(e,t){this.type=t.type,this.range=t.range,this.loc=t.loc,this.raw=t.value,this.value=n.stripStars(this.raw)}},function(e,t,r){"use strict";var n=e.exports;n.toPrefixRegex=function(e){var t="("+e.join("|")+")";return new RegExp("^"+t)},n.trimRight=function(e){return e.replace(/\s+$/,"")},n.stripStars=function(e){return e=(e=e.replace(/^[ \t]/gm,"")).replace(/^[ \t]*\*[ \t]?/gm,""),n.trimRight(e)},e.exports=n},function(e,t,r){"use strict";e.exports=function LineComment(e,t){this.type=t.type,this.range=t.range,this.loc=t.loc,this.raw=t.value,this.value=this.raw.trim()}},function(e,t,r){"use strict";function scoper(e,t){var r=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e=e.replace(r,function(e,r,n){return r.match(/^\s*(@media|@keyframes|to|from|@font-face)/)?r+n:(r.match(/:scope/)&&(r=r.replace(/([^\s]*):scope/,function(e,t){return""===t?"> *":"> "+t})),(r=(r=r.trim()+" ").replace(/ /g,t+" "))+n)})}Object.defineProperty(t,"__esModule",{value:!0}),function init(){var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e),e.sheet.insertRule("body { visibility: hidden; }",0)}(),t.default=function process(){var e=document.body.querySelectorAll("style[scoped]");if(0!==e.length){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.dataset.cssscoper="true";var n="",i=void 0;for(i=0;i=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(s,["className"]);return i.default.createElement("div",{className:t.root},i.default.createElement("div",n({className:(0,o.default)(t.preview,p)},f,{"data-preview":r}),a),i.default.createElement("div",{className:t.controls},i.default.createElement("div",{className:t.tabs},u),i.default.createElement("div",{className:t.toolbar},c)),i.default.createElement("div",{className:t.tab},l))}PlaygroundRenderer.propTypes={classes:a.default.object.isRequired,name:a.default.string.isRequired,preview:a.default.node.isRequired,previewProps:a.default.object.isRequired,tabButtons:a.default.node.isRequired,tabBody:a.default.node.isRequired,toolbar:a.default.node.isRequired},t.default=(0,s.default)(u)(PlaygroundRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExamplesRenderer=ExamplesRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ExamplesRenderer(e){var t=e.classes,r=e.children;return n.default.createElement("article",{className:t.root},r)}ExamplesRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.node},t.default=(0,a.default)(function styles(){return{root:{}}})(ExamplesRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(393);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Components;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(394)),o=_interopRequireDefault(r(403));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Components(e){var t=e.components,r=e.depth;return n.default.createElement(o.default,null,t.map(function(e){return n.default.createElement(a.default,{key:e.filepath,component:e,depth:r})}))}Components.propTypes={components:i.default.array.isRequired,depth:i.default.number.isRequired}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(395);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t0?o.default.createElement(u.default,{examples:_,name:s}):o.default.createElement(g,{name:s}),tabButtons:o.default.createElement(f.default,{name:"docsTabButtons",active:e,props:n({},i,{onClick:this.handleTabChange})}),tabBody:o.default.createElement(f.default,{name:"docsTabs",active:e,onlyActive:!0,props:i})}):null}}]),ReactComponent}();v.propTypes={component:s.default.object.isRequired,depth:s.default.number.isRequired},v.contextTypes={config:s.default.object.isRequired,displayMode:s.default.string},t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["slotName","slotProps","children","id","level","name","nameParent","collection"]),y=r.navigation,b=(0,u.getUrlNavigation)(y,{level:f,sections:g.sections,components:g.components,nameParent:h,name:d,slug:p,anchor:!0});return i.default.createElement(s.default,n({toolbar:i.default.createElement(o.default,{name:a,props:l}),id:p,href:b},v),c)}SectionHeading.propTypes={children:a.default.node,id:a.default.string.isRequired,name:a.default.string.isRequired,nameParent:a.default.string.isRequired,level:a.default.number.isRequired,slotName:a.default.string.isRequired,slotProps:a.default.object.isRequired,depth:a.default.number.isRequired,deprecated:a.default.bool,collection:a.default.object},SectionHeading.contextTypes={config:a.default.object}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(5)),o=_interopRequireDefault(r(59)),s=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function SectionHeadingRenderer(e){var t=e.classes,r=e.children,i=e.toolbar,s=e.id,u=e.href,l=e.depth,c=e.deprecated,p=Math.min(6,l),f=(0,a.default)(t.sectionName,function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},t.isDeprecated,c));return n.default.createElement("div",{className:t.wrapper},n.default.createElement(o.default,{level:p,id:s},n.default.createElement("a",{href:u,className:f},r)),n.default.createElement("div",{className:t.toolbar},i))}SectionHeadingRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.node,toolbar:i.default.node,id:i.default.string.isRequired,href:i.default.string.isRequired,depth:i.default.number.isRequired,deprecated:i.default.bool},t.default=(0,s.default)(function styles(e){var t=e.color;return{wrapper:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:e.space[1]},toolbar:{marginLeft:"auto"},sectionName:{"&:hover, &:active":{isolate:!1,textDecoration:"underline",cursor:"pointer"}},isDeprecated:{textDecoration:"line-through",color:t.light}}})(SectionHeadingRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactComponentRenderer=ReactComponentRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(399)),o=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ReactComponentRenderer(e){var t=e.classes,r=e.name,i=e.heading,o=e.pathLine,s=e.description,u=e.docs,l=e.examples,c=e.tabButtons,p=e.tabBody;return n.default.createElement("div",{className:t.root,id:r+"-container"},n.default.createElement("header",{className:t.header},i,o&&n.default.createElement(a.default,null,o)),(s||u)&&n.default.createElement("div",{className:t.docs},s,u),c&&n.default.createElement("div",{className:t.tabs},n.default.createElement("div",{className:t.tabButtons},c),p),l)}ReactComponentRenderer.propTypes={classes:i.default.object.isRequired,name:i.default.string.isRequired,heading:i.default.node.isRequired,filepath:i.default.string,pathLine:i.default.string,tabButtons:i.default.node,tabBody:i.default.node,description:i.default.node,docs:i.default.node,examples:i.default.node,isolated:i.default.bool},t.default=(0,o.default)(function styles(e){var t=e.color,r=e.fontSize,n=e.space;return{root:{marginBottom:n[6]},header:{marginBottom:n[3]},tabs:{marginBottom:n[3]},tabButtons:{marginBottom:n[2]},docs:{color:t.base,fontSize:r.text}}})(ReactComponentRenderer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(400);Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styles=void 0,t.PathlineRenderer=PathlineRenderer;var n=_interopRequireDefault(r(0)),i=_interopRequireDefault(r(1)),a=_interopRequireDefault(r(401)),o=_interopRequireDefault(r(402)),s=_interopRequireDefault(r(103)),u=_interopRequireDefault(r(2));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=t.styles=function styles(e){var t=e.space,r=e.fontFamily,n=e.fontSize,i=e.color;return{pathline:{fontFamily:r.monospace,fontSize:n.small,color:i.light},copyButton:{marginLeft:t[0]}}};function PathlineRenderer(e){var t=e.classes,r=e.children;return n.default.createElement("div",{className:t.pathline},r,n.default.createElement(s.default,{small:!0,className:t.copyButton,onClick:function onClick(){return(0,a.default)(r)},title:"Copy to clipboard"},n.default.createElement(o.default,null)))}PathlineRenderer.propTypes={classes:i.default.object.isRequired,children:i.default.string},t.default=(0,u.default)(l)(PathlineRenderer)},function(e,t){e.exports=function clipboardCopy(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre";var r=document.createElement("iframe");r.sandbox="allow-same-origin",document.body.appendChild(r);var n=r.contentWindow;n.document.body.appendChild(t);var i=n.getSelection();i||(n=window,i=n.getSelection(),document.body.appendChild(t));var a=n.document.createRange();i.removeAllRanges(),a.selectNode(t),i.addRange(a);var o=!1;try{o=n.document.execCommand("copy")}catch(e){}return i.removeAllRanges(),n.document.body.removeChild(t),document.body.removeChild(r),o?Promise.resolve():Promise.reject()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t-1&&(t=t.replace(t.slice(t.indexOf("?id")),""));var r=t.split("/"),i=parseInt(r[1],10);return{targetName:decodeURIComponent(r[0]),targetIndex:(0,n.default)(i)?void 0:i}}return{}};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(422))},function(e,t,r){var n=r(423);e.exports=function isNaN(e){return n(e)&&e!=+e}},function(e,t,r){var n=r(12),i=r(10),a="[object Number]";e.exports=function isNumber(e){return"number"==typeof e||i(e)&&n(e)==a}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function getIdParam(){var e=location.href,t=new RegExp("[\\?&]id=([^&#]*)").exec(e);return null==t?null:t[1]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function globalizeComponents(e){e.forEach(function(e){e.components&&e.components.forEach(n.default),e.sections&&globalizeComponents(e.sections)})};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(426))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function globalizeComponent(e){var t=e.props.displayName;if(!e.name)return;var r=e.module.default||e.module;n.default.component(t,r)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(68))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0;var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(function(e){return n({},e,{components:(0,i.default)(e.components||[],t,r+1,e.name),sections:processSections(e.sections||[],t,r+1,e.name),nameParent:a,level:r})})};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(428))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(function(e){var a=n({},e,{name:e.props.displayName,level:r,nameParent:i,props:n({},e.props,{examples:[].concat(_toConsumableArray(e.props.examples||[]),_toConsumableArray(e.props.example||[]))})});return delete a.props.example,a.props.examples=function processExamples(e,t){return e.map(function(e){return"code"===e.type&&(e.vuex=t),e})}(a.props.examples,t),a})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function processMixins(e){e.forEach(function(e){e.default?globalizeMixin(e.default):globalizeMixin(e)})};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(68));function globalizeMixin(e){n.default.mixin(e)}},function(e,t,r){e.exports={config:{title:"El Data Table Style Guide",showCode:!0,showUsage:!0,showSidebar:!0,previewDelay:500,theme:{},navigation:!1,styles:{},compilerConfig:{objectAssign:"Object.assign"},editorConfig:{theme:"base16-light",mode:"jsx",lineWrapping:!0,smartIndent:!1,matchBrackets:!0,viewportMargin:1/0,lineNumbers:!1},ribbon:{url:"https://github.com/FEMessage/el-data-table"}},welcomeScreen:!1,patterns:void 0,sections:[{name:void 0,description:void 0,slug:"",sections:[],filepath:void 0,components:[{filepath:"src/el-data-table.vue",slug:"eldatatable",pathLine:"src/el-data-table.vue",module:r(431),props:r(439),hasExamples:!1,metadata:{}}],content:void 0}],vuex:void 0,renderRootJsx:void 0,mixins:[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(112),i=r(438);var a=function injectStyle(e){r(432)},o=r(436)(n.a,i.a,!1,a,null,null);t.default=o.exports},function(e,t,r){var n=r(433);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r(434)("9fd276ba",n,!0,{})},function(e,t,r){(e.exports=r(71)(!1)).push([e.i,'.el-data-table .ms-tree-space{position:relative;top:1px;display:inline-block;font-style:normal;font-weight:400;line-height:1;width:18px;height:14px}.el-data-table .ms-tree-space:before{content:""}.el-data-table .tree-ctrl{position:relative;cursor:pointer;color:#2196f3}@keyframes treeTableShow{0%{opacity:0}to{opacity:1}}',""])},function(e,t,r){var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=r(435),a={},o=n&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,l=!1,c=function(){},p=null,f="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function addStylesToDom(e){for(var t=0;tr.parts.length&&(n.parts.length=r.parts.length)}else{var o=[];for(i=0;i-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(T||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var O=memoize(function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(p,function(e,r,n,i){t.push(n?i.replace(f,"$1"):r||e)}),t});function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var B=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==s}e.exports=function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}}).call(t,r(3))},function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"el-data-table"},[e.searchForm.length>0?r("el-form-renderer",{ref:"searchForm",attrs:{inline:"",content:e.searchForm}},[e._t("search"),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),r("el-button",{attrs:{size:"small"},on:{click:e.onResetSearch}},[e._v("重置")])],1)],2):e._e(),e._v(" "),e.hasNew||e.hasDelete||e.headerButtons.length>0?r("el-form",[r("el-form-item",[e.hasNew?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onDefaultNew}},[e._v("新增")]):e._e(),e._v(" "),e._l(e.headerButtons,function(t,n){return"show"in t&&!t.show(e.selected)?e._e():r("el-button",e._b({key:n,attrs:{disabled:"disabled"in t&&t.disabled(e.selected),size:"small"},on:{click:function(r){t.atClick(e.selected)}}},"el-button",t,!1),[e._v(e._s(t.text))])}),e._v(" "),e.hasSelect&&e.hasDelete?r("el-button",{attrs:{type:"danger",size:"small",disabled:e.single?!e.selected.length||e.selected.length>1:!e.selected.length},on:{click:function(t){e.onDefaultDelete(t)}}},[e._v("删除")]):e._e()],2)],1):e._e(),e._v(" "),r("el-table",e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.data,"row-style":e.showRow},on:{"selection-change":e.handleSelectionChange}},"el-table",e.tableAttrs,!1),[e.isTree?[e.hasSelect?[r("el-table-column",e._b({key:"selection-key"},"el-table-column",e.columns[0],!1)),e._v(" "),r("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?r("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?r("span",{staticClass:"tree-ctrl",on:{click:function(r){e.toggleExpanded(t.$index)}}},[t.row._expanded?r("i",{staticClass:"el-icon-minus"}):r("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(t.row[e.columns[1].prop])+"\n ")]}}])},"el-table-column",e.columns[1],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t&&1!==t}),function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]:[r("el-table-column",e._b({key:"tree-ctrl",scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(t){return e.isTree?r("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.isTree&&e.iconShow(t.$index,t.row)?r("span",{staticClass:"tree-ctrl",on:{click:function(r){e.toggleExpanded(t.$index)}}},[t.row._expanded?r("i",{staticClass:"el-icon-minus"}):r("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(t.row[e.columns[0].prop])+"\n ")]}}])},"el-table-column",e.columns[0],!1)),e._v(" "),e._l(e.columns.filter(function(e,t){return 0!==t}),function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))})]]:e._l(e.columns,function(t){return r("el-table-column",e._b({key:t.prop},"el-table-column",t,!1))}),e._v(" "),e.hasOperation?r("el-table-column",e._b({attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.isTree&&e.hasNew?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(r){e.onDefaultNew(t.row)}}},[e._v("新增")]):e._e(),e._v(" "),e.hasEdit?r("el-button",{attrs:{size:"small"},on:{click:function(r){e.onDefaultEdit(t.row)}}},[e._v("\n 修改\n ")]):e._e(),e._v(" "),e.hasView?r("el-button",{attrs:{type:"info",size:"small"},on:{click:function(r){e.onDefaultView(t.row)}}},[e._v("\n 查看\n ")]):e._e(),e._v(" "),e._l(e.extraButtons,function(n,i){return"show"in n&&!n.show(t.row)?e._e():r("el-button",e._b({key:i,attrs:{size:"small"},on:{click:function(e){n.atClick(t.row)}}},"el-button",n,!1),[e._v("\n "+e._s(n.text)+"\n ")])}),e._v(" "),!e.hasSelect&&e.hasDelete&&e.canDelete(t.row)?r("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(r){e.onDefaultDelete(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])},"el-table-column",e.operationAttrs,!1)):e._e(),e._v(" "),e._t("default")],2),e._v(" "),e.hasPagination?r("el-pagination",{staticStyle:{"text-align":"right",padding:"10px 0"},attrs:{"current-page":e.page,"page-sizes":e.paginationSizes,"page-size":e.size,total:e.total,layout:e.paginationLayout},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e(),e._v(" "),e.hasDialog?r("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("el-form-renderer",e._b({ref:"dialogForm",attrs:{content:e.form,disabled:e.isView}},"el-form-renderer",e.formAttrs,!1),[e._t("form")],2),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:!e.isView,expression:"!isView"}],attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small"},on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),r("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],attrs:{type:"primary",size:"small"},on:{click:e.confirm}},[e._v("确 定")])],1)],1):e._e()],1)},staticRenderFns:[]};t.a=n},function(e,t,r){e.exports={description:"",methods:[],displayName:"ElDataTable",props:[{type:{name:"func"},required:"",defaultValue:{value:"default() { return true; }",func:!0},tags:{},comment:"/**\n * 在新增/修改弹窗 点击确认时调用,返回false则不会继续执行confirm逻辑\n */",description:"在新增/修改弹窗 点击确认时调用,返回false则不会继续执行confirm逻辑",name:"beforeConfirm"},{type:{name:"func"},required:"",defaultValue:{value:"default() { return true; }",func:!0},tags:{},comment:"/**\n * 某行数据是否可以删除, 返回true表示可以, 控制的是单选时单行的删除按钮\n */",description:"某行数据是否可以删除, 返回true表示可以, 控制的是单选时单行的删除按钮",name:"canDelete"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/table#table-column-attributes"}]},comment:"/**\n * 列属性设置, 详情见element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/table#table-column-attributes\n */",description:"列属性设置, 详情见element-ui官网",name:"columns"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{},comment:"/**\n * 外部的注入额外的查询参数, 键值对形式\n */",description:"外部的注入额外的查询参数, 键值对形式",name:"customQuery"},{type:{name:"string"},required:"",defaultValue:{value:'"payload.content"',func:!1},tags:{},comment:"/**\n * 渲染组件的分页数据在接口返回的数据中的路径, 嵌套对象使用.表示即可\n */",description:"渲染组件的分页数据在接口返回的数据中的路径, 嵌套对象使用.表示即可",name:"dataPath"},{type:{name:"string"},required:"",defaultValue:{value:'"修改"',func:!1},tags:{},comment:"/**\n * 修改弹窗的标题\n */",description:"修改弹窗的标题",name:"dialogEditTitle"},{type:{name:"string"},required:"",defaultValue:{value:'"新增"',func:!1},tags:{},comment:"/**\n * 新增弹窗的标题\n */",description:"新增弹窗的标题",name:"dialogNewTitle"},{type:{name:"string"},required:"",defaultValue:{value:'"查看"',func:!1},tags:{},comment:"",description:"",name:"dialogViewTitle"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 树形结构相关: 是否展开所有节点\n */",description:"树形结构相关: 是否展开所有节点",name:"expandAll"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{},comment:"/**\n * 操作列的自定义按钮, 渲染的是element-ui的button, 支持属性\n * type: '', text: '', atClick: row => {}, show: row => {返回true时显示}\n */",description:"操作列的自定义按钮, 渲染的是element-ui的button, 支持属性\ntype: '', text: '', atClick: row => {}, show: row => {返回true时显示}",name:"extraButtons"},{type:{name:"object"},required:"",tags:{},comment:"/**\n * 新增/修改提交时注入额外的参数\n */",description:"新增/修改提交时注入额外的参数",name:"extraParams"},{type:{name:"number"},required:"",defaultValue:{value:"1",func:!1},tags:{},comment:"/**\n * 分页请求的第一页的值(有的接口0是第一页)\n */",description:"分页请求的第一页的值(有的接口0是第一页)",name:"firstPage"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md"}]},comment:"/**\n * 弹窗表单, 用于新增与修改, 详情配置参考el-form-renderer\n * @link https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md\n */",description:"弹窗表单, 用于新增与修改, 详情配置参考el-form-renderer",name:"form"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/form#form-attributes"}]},comment:"/**\n * 弹窗表单属性设置, 详情配置参考element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/form#form-attributes\n */",description:"弹窗表单属性设置, 详情配置参考element-ui官网",name:"formAttrs"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * table头部是否有删除按钮(该按钮要多选时才会出现)\n */",description:"table头部是否有删除按钮(该按钮要多选时才会出现)",name:"hasDelete"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有弹窗, 用于不需要弹窗时想减少DOM渲染的场景\n */",description:"是否有弹窗, 用于不需要弹窗时想减少DOM渲染的场景",name:"hasDialog"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有编辑按钮\n */",description:"是否有编辑按钮",name:"hasEdit"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有新增按钮\n */",description:"是否有新增按钮",name:"hasNew"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否有操作列\n */",description:"是否有操作列",name:"hasOperation"},{type:{name:"boolean"},required:"",defaultValue:{value:"true",func:!1},tags:{},comment:"/**\n * 是否分页\n */",description:"是否分页",name:"hasPagination"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 是否有查看按钮\n */",description:"是否有查看按钮",name:"hasView"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{},comment:"/**\n * 头部的自定义按钮, 渲染的是element-ui的button, 支持属性\n * type: '', text: '', atClick: row => {}, show: row => {返回true时显示}, disabled: selected => {返回true时禁用}\n */",description:"头部的自定义按钮, 渲染的是element-ui的button, 支持属性\ntype: '', text: '', atClick: row => {}, show: row => {返回true时显示}, disabled: selected => {返回true时禁用}",name:"headerButtons"},{type:{name:"string"},required:"",defaultValue:{value:'"id"',func:!1},tags:{},comment:"/**\n * 主键,默认值 id,\n * 修改/删除时会用到,请求会根据定义的属性值获取主键,即row[this.id]\n */",description:"主键,默认值 id,\n修改/删除时会用到,请求会根据定义的属性值获取主键,即row[this.id]",name:"id"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 要渲染的数据是否是树形结构\n */",description:"要渲染的数据是否是树形结构",name:"isTree"},{type:{name:"number"},required:"",defaultValue:{value:"999",func:!1},tags:{},comment:"/**\n * 不分页时的size的大小\n */",description:"不分页时的size的大小",name:"noPaginationSize"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击删除按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击删除按钮时的方法, 当默认新增方法不满足需求时使用",name:"onDelete"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击修改按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击修改按钮时的方法, 当默认新增方法不满足需求时使用",name:"onEdit"},{type:{name:"func"},required:"",tags:{},comment:"/**\n * 点击新增按钮时的方法, 当默认新增方法不满足需求时使用\n */",description:"点击新增按钮时的方法, 当默认新增方法不满足需求时使用",name:"onNew"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return { width: '', fixed: 'right' }; }",func:!0},tags:{},comment:"/**\n * 操作列属性\n */",description:"操作列属性",name:"operationAttrs"},{type:{name:"string"},required:"",defaultValue:{value:'"total, sizes, prev, pager, next, jumper"',func:!1},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的子组件布局,子组件名用逗号分隔,对应element-ui pagination的layout属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的子组件布局,子组件名用逗号分隔,对应element-ui pagination的layout属性",name:"paginationLayout"},{type:{name:"number"},required:"",defaultValue:{value:"10",func:!1},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的每页显示个数选择器默认选项,对应element-ui pagination的page-size属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的每页显示个数选择器默认选项,对应element-ui pagination的page-size属性",name:"paginationSize"},{type:{name:"array"},required:"",defaultValue:{value:"() => [10, 20, 30, 40, 50]",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/pagination"}]},comment:"/**\n * 分页组件的每页显示个数选择器的选项设置,对应element-ui pagination的page-sizes属性\n * @link http://element.eleme.io/#/zh-CN/component/pagination\n */",description:"分页组件的每页显示个数选择器的选项设置,对应element-ui pagination的page-sizes属性",name:"paginationSizes"},{type:{name:"array"},required:"",defaultValue:{value:"default() { return []; }",func:!0},tags:{link:[{title:"link",description:"https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md"}]},comment:"/**\n * 查询字段渲染, 配置参考el-form-renderer\n * @link https://github.com/leezng/el-form-renderer/blob/dev/README.zh-CN.md\n */",description:"查询字段渲染, 配置参考el-form-renderer",name:"searchForm"},{type:{name:"boolean"},required:"",defaultValue:{value:"false",func:!1},tags:{},comment:"/**\n * 单选, 适用场景: 不可以批量删除\n */",description:"单选, 适用场景: 不可以批量删除",name:"single"},{type:{name:"object"},required:"",defaultValue:{value:"default() { return {}; }",func:!0},tags:{link:[{title:"link",description:"http://element.eleme.io/#/zh-CN/component/table#table-attributes"}]},comment:"/**\n * element table 属性设置, 详情配置参考element-ui官网\n * @link http://element.eleme.io/#/zh-CN/component/table#table-attributes\n */",description:"element table 属性设置, 详情配置参考element-ui官网",name:"tableAttrs"},{type:{name:"string"},required:"",defaultValue:{value:'"payload.totalElements"',func:!1},tags:{},comment:"/**\n * 分页数据的总数在接口返回的数据中的路径, 嵌套对象使用.表示即可\n */",description:"分页数据的总数在接口返回的数据中的路径, 嵌套对象使用.表示即可",name:"totalPath"},{type:{name:"string"},required:"",defaultValue:{value:'"children"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 子节点的字段名\n */",description:"树形结构相关: 子节点的字段名",name:"treeChildKey"},{type:{name:"string"},required:"",defaultValue:{value:'"parentId"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 父节点的字段名\n */",description:"树形结构相关: 父节点的字段名",name:"treeParentKey"},{type:{name:"string"},required:"",defaultValue:{value:'"id"',func:!1},tags:{},comment:"/**\n * 树形结构相关: 父节点字段值的来源字段。\n * 新增/修改时会用到, 例如, 在id为2的节点新增子节点, 则子节点的parentId为2, 也即parentId的值来源于字段id, 故treeParentValue为id\n */",description:"树形结构相关: 父节点字段值的来源字段。\n新增/修改时会用到, 例如, 在id为2的节点新增子节点, 则子节点的parentId为2, 也即parentId的值来源于字段id, 故treeParentValue为id",name:"treeParentValue"},{type:{name:"string"},required:"",defaultValue:{value:'""',func:!1},tags:{},comment:"/**\n * 请求url, 如果为空, 则不会发送请求\n */",description:"请求url, 如果为空, 则不会发送请求",name:"url"}],comment:"",tags:{},events:{edit:{description:"点击修改 触发edit事件",type:void 0,properties:void 0,comment:"/**\n * 点击修改 触发edit事件\n * @event edit\n */"},view:{description:"点击查看 触发view事件",type:void 0,properties:void 0,comment:"/**\n * 点击查看 触发view事件\n * @event view\n */"},new:{description:"点击新增 触发new事件",type:void 0,properties:void 0,comment:"/**\n * 点击新增 触发new事件\n * @event new\n */"},reset:{description:"按下重置按钮后触发,\n另外, 当customQuery.sync时, 会重置customQuery",type:void 0,properties:void 0,comment:"/**\n * 按下重置按钮后触发,\n * 另外, 当customQuery.sync时, 会重置customQuery\n * @event reset\n */"},"selection-change":{description:"多选启用时生效, 返回(selected)已选中行的数组",type:void 0,properties:void 0,comment:"/**\n * 多选启用时生效, 返回(selected)已选中行的数组\n * @event selection-change\n */"},error:{description:"请求数据失败,返回err对象",type:void 0,properties:void 0,comment:"/**\n * 请求数据失败,返回err对象\n * @event error\n */"},update:{description:"请求返回, 数据更新后触发, 返回(data, resp) data是渲染table的数据, resp是请求返回的完整response",type:void 0,properties:void 0,comment:"/**\n * 请求返回, 数据更新后触发, 返回(data, resp) data是渲染table的数据, resp是请求返回的完整response\n * @event update\n */"}},slots:{search:{description:"额外的搜索内容, 当searchForm不满足需求时可以使用"},default:{description:"自定义操作列, 当extraButtons不满足需求时可以使用"},form:{description:"额外的弹窗表单内容, 当form不满足需求时可以使用"}},examples:[]}}]); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index f8a413ea..7c31a0ed 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -El Data Table Style Guide
\ No newline at end of file +El Data Table Style Guide
\ No newline at end of file diff --git a/docs/storybook/iframe.html b/docs/storybook/iframe.html index 2501f476..56ea4dc3 100644 --- a/docs/storybook/iframe.html +++ b/docs/storybook/iframe.html @@ -23,6 +23,6 @@
- + \ No newline at end of file diff --git a/docs/storybook/index.html b/docs/storybook/index.html index 07bccbb2..93e3f574 100644 --- a/docs/storybook/index.html +++ b/docs/storybook/index.html @@ -40,5 +40,5 @@
- + diff --git a/docs/storybook/static/manager.90177b5a749be80c7b9f.bundle.js b/docs/storybook/static/manager.90177b5a749be80c7b9f.bundle.js deleted file mode 100644 index a8a0e206..00000000 --- a/docs/storybook/static/manager.90177b5a749be80c7b9f.bundle.js +++ /dev/null @@ -1 +0,0 @@ -!function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module.default}:function getModuleExports(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=719)}([function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(723)},function(module,exports){var core=module.exports={version:"2.5.7"};"number"==typeof __e&&(__e=core)},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var _assign2=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(52));exports.default=_assign2.default||function(target){for(var i=1;i2?arguments[2]:{},props=keys(map);hasSymbols&&(props=props.concat(Object.getOwnPropertySymbols(map))),foreach(props,function(name){defineProperty(object,name,map[name],predicates[name])})};defineProperties.supportsDescriptors=!!supportsDescriptors,module.exports=defineProperties},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var _typeof3=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(20));exports.default=function(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!==(void 0===call?"undefined":(0,_typeof3.default)(call))&&"function"!=typeof call?self:call}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var _setPrototypeOf2=_interopRequireDefault(__webpack_require__(345)),_create2=_interopRequireDefault(__webpack_require__(349)),_typeof3=_interopRequireDefault(__webpack_require__(20));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+(void 0===superClass?"undefined":(0,_typeof3.default)(superClass)));subClass.prototype=(0,_create2.default)(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(subClass,superClass):subClass.__proto__=superClass)}},function(module,exports,__webpack_require__){var global=__webpack_require__(10),core=__webpack_require__(1),ctx=__webpack_require__(23),hide=__webpack_require__(24),has=__webpack_require__(25),$export=function(type,name,source){var key,own,out,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports.prototype,target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{}).prototype;for(key in IS_GLOBAL&&(source=name),source)(own=!IS_FORCED&&target&&void 0!==target[key])&&has(exports,key)||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(a,b,c){if(this instanceof C){switch(arguments.length){case 0:return new C;case 1:return new C(a);case 2:return new C(a,b)}return new C(a,b,c)}return C.apply(this,arguments)};return F.prototype=C.prototype,F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports.virtual||(exports.virtual={}))[key]=out,type&$export.R&&expProto&&!expProto[key]&&hide(expProto,key,out)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},function(module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},function(module,exports,__webpack_require__){var store=__webpack_require__(106)("wks"),uid=__webpack_require__(72),Symbol=__webpack_require__(10).Symbol,USE_SYMBOL="function"==typeof Symbol;(module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&Symbol[name]||(USE_SYMBOL?Symbol:uid)("Symbol."+name))}).store=store},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(335),__esModule:!0}},function(module,exports){var g;g=function(){return this}();try{g=g||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(14);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15),IE8_DOM_DEFINE=__webpack_require__(158),toPrimitive=__webpack_require__(102),dP=Object.defineProperty;exports.f=__webpack_require__(17)?Object.defineProperty:function defineProperty(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");return"value"in Attributes&&(O[P]=Attributes.value),O}},function(module,exports,__webpack_require__){module.exports=!__webpack_require__(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},,function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(249);module.exports=Function.prototype.bind||implementation},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var _iterator2=_interopRequireDefault(__webpack_require__(337)),_symbol2=_interopRequireDefault(__webpack_require__(188)),_typeof="function"==typeof _symbol2.default&&"symbol"==typeof _iterator2.default?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof _symbol2.default&&obj.constructor===_symbol2.default&&obj!==_symbol2.default.prototype?"symbol":typeof obj};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default="function"==typeof _symbol2.default&&"symbol"===_typeof(_iterator2.default)?function(obj){return void 0===obj?"undefined":_typeof(obj)}:function(obj){return obj&&"function"==typeof _symbol2.default&&obj.constructor===_symbol2.default&&obj!==_symbol2.default.prototype?"symbol":void 0===obj?"undefined":_typeof(obj)}},function(module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},function(module,exports,__webpack_require__){var store=__webpack_require__(90)("wks"),uid=__webpack_require__(50),Symbol=__webpack_require__(21).Symbol,USE_SYMBOL="function"==typeof Symbol;(module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&Symbol[name]||(USE_SYMBOL?Symbol:uid)("Symbol."+name))}).store=store},function(module,exports,__webpack_require__){var aFunction=__webpack_require__(58);module.exports=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},function(module,exports,__webpack_require__){var dP=__webpack_require__(16),createDesc=__webpack_require__(53);module.exports=__webpack_require__(17)?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},function(module,exports,__webpack_require__){var IObject=__webpack_require__(120),defined=__webpack_require__(103);module.exports=function(it){return IObject(defined(it))}},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(313),__esModule:!0}},,,function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var _defineProperty2=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(121));exports.default=function(obj,key,value){return key in obj?(0,_defineProperty2.default)(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}},,function(module,exports,__webpack_require__){module.exports=!__webpack_require__(63)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(module,exports){var core=module.exports={version:"2.5.7"};"number"==typeof __e&&(__e=core)},function(module,exports,__webpack_require__){var dP=__webpack_require__(37),createDesc=__webpack_require__(65);module.exports=__webpack_require__(34)?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(64),IE8_DOM_DEFINE=__webpack_require__(136),toPrimitive=__webpack_require__(89),dP=Object.defineProperty;exports.f=__webpack_require__(34)?Object.defineProperty:function defineProperty(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");return"value"in Attributes&&(O[P]=Attributes.value),O}},function(module,exports,__webpack_require__){var IObject=__webpack_require__(218),defined=__webpack_require__(140);module.exports=function(it){return IObject(defined(it))}},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(99)},function(module,exports,__webpack_require__){"use strict";(function(global){var origSymbol=global.Symbol,hasSymbolSham=__webpack_require__(296);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}}).call(exports,__webpack_require__(13))},function(module,exports){module.exports={}},function(module,exports,__webpack_require__){(function(global){var win;win="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},module.exports=win}).call(exports,__webpack_require__(13))},function(module,exports,__webpack_require__){var $keys=__webpack_require__(159),enumBugKeys=__webpack_require__(107);module.exports=Object.keys||function keys(O){return $keys(O,enumBugKeys)}},function(module,exports,__webpack_require__){var defined=__webpack_require__(103);module.exports=function(it){return Object(defined(it))}},function(module,exports,__webpack_require__){"use strict";var $at=__webpack_require__(319)(!0);__webpack_require__(122)(String,"String",function(iterated){this._t=String(iterated),this._i=0},function(){var point,O=this._t,index=this._i;return index>=O.length?{value:void 0,done:!0}:(point=$at(O,index),this._i+=point.length,{value:point,done:!1})})},,,function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(void 0===key?"":key,")_",(++id+px).toString(36))}},function(module,exports,__webpack_require__){"use strict";var bind=__webpack_require__(19);module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(309),__esModule:!0}},function(module,exports){module.exports=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports){module.exports=!0},function(module,exports,__webpack_require__){__webpack_require__(321);for(var global=__webpack_require__(10),hide=__webpack_require__(24),Iterators=__webpack_require__(41),TO_STRING_TAG=__webpack_require__(11)("toStringTag"),DOMIterables="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),i=0;i= 0");var index=this.ToLength(integerIndex);if(!this.SameValueZero(integerIndex,index))throw new RangeError("index must be >= 0 and < 2 ** 53 - 1");return index}});delete ES2017.EnumerableOwnNames,module.exports=ES2017},function(module,exports,__webpack_require__){"use strict";var assign=__webpack_require__(69),ES5=__webpack_require__(153),ES2015=__webpack_require__(97),ES2016=__webpack_require__(99),ES={ES5:ES5,ES6:ES2015,ES2015:ES2015,ES7:ES2016,ES2016:ES2016,ES2017:__webpack_require__(70)};assign(ES,ES5),delete ES.CheckObjectCoercible,assign(ES,ES2015),module.exports=ES},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(void 0===key?"":key,")_",(++id+px).toString(36))}},,,,function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0,exports.default=function(obj,keys){var target={};for(var i in obj)keys.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(obj,i)&&(target[i]=obj[i]);return target}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _theme=__webpack_require__(480);Object.defineProperty(exports,"baseFonts",{enumerable:!0,get:function get(){return _theme.baseFonts}}),Object.defineProperty(exports,"monoFonts",{enumerable:!0,get:function get(){return _theme.monoFonts}});var _routed_link=__webpack_require__(481);Object.defineProperty(exports,"RoutedLink",{enumerable:!0,get:function get(){return _interopRequireDefault(_routed_link).default}});var _menu_link=__webpack_require__(811);Object.defineProperty(exports,"MenuLink",{enumerable:!0,get:function get(){return _interopRequireDefault(_menu_link).default}});var _highlight_button=__webpack_require__(812);Object.defineProperty(exports,"HighlightButton",{enumerable:!0,get:function get(){return _interopRequireDefault(_highlight_button).default}});var _table=__webpack_require__(813);Object.defineProperty(exports,"Table",{enumerable:!0,get:function get(){return _interopRequireDefault(_table).default}});var _cell=__webpack_require__(814);Object.defineProperty(exports,"Td",{enumerable:!0,get:function get(){return _cell.td}}),Object.defineProperty(exports,"Th",{enumerable:!0,get:function get(){return _cell.th}});var _button=__webpack_require__(815);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"Button",{enumerable:!0,get:function get(){return _interopRequireDefault(_button).default}})},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function getPrefixedValue(prefixedValue,value,keepUnprefixed){if(keepUnprefixed)return[prefixedValue,value];return prefixedValue},module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(prefixedValue,value,keepUnprefixed){return keepUnprefixed?[prefixedValue,value]:prefixedValue},module.exports=exports.default},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(104),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddonStore=void 0;var _keys2=_interopRequireDefault(__webpack_require__(29)),_classCallCheck3=_interopRequireDefault(__webpack_require__(3)),_createClass3=_interopRequireDefault(__webpack_require__(4));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var AddonStore=exports.AddonStore=function(){function AddonStore(){(0,_classCallCheck3.default)(this,AddonStore),this.loaders={},this.panels={},this.channel=null,this.preview=null,this.database=null}return(0,_createClass3.default)(AddonStore,[{key:"getChannel",value:function getChannel(){if(!this.channel)throw new Error("Accessing nonexistent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel");return this.channel}},{key:"setChannel",value:function setChannel(channel){this.channel=channel}},{key:"getPreview",value:function getPreview(){return this.preview}},{key:"setPreview",value:function setPreview(preview){this.preview=preview}},{key:"getDatabase",value:function getDatabase(){return this.database}},{key:"setDatabase",value:function setDatabase(database){this.database=database}},{key:"getPanels",value:function getPanels(){return this.panels}},{key:"addPanel",value:function addPanel(name,panel){this.panels[name]=panel}},{key:"register",value:function register(name,loader){this.loaders[name]=loader}},{key:"loadAddons",value:function loadAddons(api){var _this=this;(0,_keys2.default)(this.loaders).map(function(name){return _this.loaders[name]}).forEach(function(loader){return loader(api)})}}]),AddonStore}();exports.default=new AddonStore},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15),dPs=__webpack_require__(182),enumBugKeys=__webpack_require__(107),IE_PROTO=__webpack_require__(105)("IE_PROTO"),Empty=function(){},createDict=function(){var iframeDocument,iframe=__webpack_require__(101)("iframe"),i=enumBugKeys.length;for(iframe.style.display="none",__webpack_require__(160).appendChild(iframe),iframe.src="javascript:",(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write("