htui-yllkbz 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8737,20 +8737,18 @@ SelectTable.install = function (Vue) {
8737
8737
  * @Author: hutao
8738
8738
  * @Date: 2021-10-21 10:08:41
8739
8739
  * @LastEditors: hutao
8740
- * @LastEditTime: 2021-12-01 11:17:26
8740
+ * @LastEditTime: 2021-12-01 11:22:56
8741
8741
  */
8742
8742
  // 存储组件列表
8743
8743
 
8744
- var components = [packages_SelectTable];
8745
- var comString = ["HtSelectTable"]; // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
8744
+ var components = [packages_SelectTable]; // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
8746
8745
 
8747
8746
  var install = function install(Vue) {
8748
8747
  // 判断是否安装
8749
8748
  if (install.installed) return; // 遍历注册全局组件
8750
8749
 
8751
8750
  components.map(function (component, index) {
8752
- console.log('component', component.options);
8753
- return Vue.component(component.options.name, component);
8751
+ return Vue.component(component.options.name || component.name, component);
8754
8752
  });
8755
8753
  }; // 判断是否是直接引入文件
8756
8754
 
Binary file
package/lib/htui.umd.js CHANGED
@@ -8746,20 +8746,18 @@ SelectTable.install = function (Vue) {
8746
8746
  * @Author: hutao
8747
8747
  * @Date: 2021-10-21 10:08:41
8748
8748
  * @LastEditors: hutao
8749
- * @LastEditTime: 2021-12-01 11:17:26
8749
+ * @LastEditTime: 2021-12-01 11:22:56
8750
8750
  */
8751
8751
  // 存储组件列表
8752
8752
 
8753
- var components = [packages_SelectTable];
8754
- var comString = ["HtSelectTable"]; // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
8753
+ var components = [packages_SelectTable]; // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
8755
8754
 
8756
8755
  var install = function install(Vue) {
8757
8756
  // 判断是否安装
8758
8757
  if (install.installed) return; // 遍历注册全局组件
8759
8758
 
8760
8759
  components.map(function (component, index) {
8761
- console.log('component', component.options);
8762
- return Vue.component(component.options.name, component);
8760
+ return Vue.component(component.options.name || component.name, component);
8763
8761
  });
8764
8762
  }; // 判断是否是直接引入文件
8765
8763
 
Binary file
@@ -25,4 +25,4 @@ PERFORMANCE OF THIS SOFTWARE.
25
25
  * (c) 2015-present Evan You
26
26
  * @license MIT
27
27
  */
28
- function O(t){return O="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j(t){return E(t)||k(t)||P()}function E(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function k(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function P(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function A(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function C(t,e){_(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){_(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){_(t,e,n)}))}function _(t,e,n){var r=n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)}))}var T={__proto__:[]},R=T instanceof Array;function I(t){return function(e,n,r){var o="function"===typeof e?e:e.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(e){return t(e,n,r)}))}}function D(t){var e=O(t);return null==t||"object"!==e&&"function"!==e}function L(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var o={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(o[t]=r[t])})),o}var N=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function U(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=e.name||t._componentTag||t.name;var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(t){if("constructor"!==t)if(N.indexOf(t)>-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"===typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){return S({},t,r.value)}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return L(this,t)}});var r=t.__decorators__;r&&(r.forEach((function(t){return t(e)})),delete t.__decorators__);var o=Object.getPrototypeOf(t.prototype),i=o instanceof w.a?o.constructor:w.a,c=i.extend(e);return F(c,t,i),A()&&C(c,t),c}var M={prototype:!0,arguments:!0,callee:!0,caller:!0};function F(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!M[r]){var o=Object.getOwnPropertyDescriptor(t,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(e,r);if(!R){if("cid"===r)return;var c=Object.getOwnPropertyDescriptor(n,r);if(!D(i.value)&&c&&c.value===i.value)return}0,Object.defineProperty(t,r,i)}}}))}function B(t){return"function"===typeof t?U(t):function(e){return U(e,t)}}B.registerHooks=function(t){N.push.apply(N,j(t))};var $=B;var q="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function H(t,e,n){if(q&&!Array.isArray(t)&&"function"!==typeof t&&"undefined"===typeof t.type){var r=Reflect.getMetadata("design:type",e,n);r!==Object&&(t.type=r)}}function K(t){return void 0===t&&(t={}),function(e,n){H(t,e,n),I((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function z(t,e){void 0===e&&(e={});var n=e.deep,r=void 0!==n&&n,o=e.immediate,i=void 0!==o&&o;return I((function(e,n){"object"!==typeof e.watch&&(e.watch=Object.create(null));var o=e.watch;"object"!==typeof o[t]||Array.isArray(o[t])?"undefined"===typeof o[t]&&(o[t]=[]):o[t]=[o[t]],o[t].push({handler:n,deep:r,immediate:i})}))}var V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.state.loading,expression:"state.loading"}]},[n("header",[n("el-input",{staticClass:"htui-search",attrs:{placeholder:t.searchPlaceholder||"请输入关键字查询"},model:{value:t.state.filterData.Filter,callback:function(e){t.$set(t.state.filterData,"Filter",e)},expression:"state.filterData.Filter"}})],1),n("article",[n("el-table",{ref:"comTable",staticStyle:{width:"100%"},attrs:{height:t.confige.table&&t.confige.table.height?t.confige.table.height:250,"row-key":t.confige.table&&t.confige.table.rowkey?t.confige.table.rowkey:"id",data:t.dataSource,"tooltip-effect":"dark"},on:{"row-click":t.rowClick}},[n("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("el-checkbox",{attrs:{value:t.state.checkObj&&t.state.checkObj.id===r.id},nativeOn:{click:function(t){t.preventDefault()}}})]}}])}),n("el-table-column",{attrs:{label:"序号",width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s((t.state.filterData.currentPage-1)*t.state.filterData.MaxResultCount+(e.$index+1))+" ")]}}])}),t._l(t.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{label:t.title,"show-overflow-tooltip":!0,prop:t.key,width:t.width||120}})}))],2)],1),n("footer",[n("el-row",[n("el-col",{attrs:{span:24}},[n("p",{staticStyle:{width:"90px",float:"left"}},[t._v("共"+t._s(t.dataSource.length)+"条")]),t._e()],1)],1)],1)])},J=[];n("4de4"),n("c740"),n("caad"),n("e6cf"),n("a79d"),n("2532"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(Object(n),!0).forEach((function(e){G(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("auth-login-form",{tag:"div",staticClass:"container-login",attrs:{"base-config":JSON.stringify(t.baseConfig)}})},Q=[],Z=(n("cca6"),n("ac1f"),n("466d"),n("a78e")),tt=n.n(Z),et={Language:"zh-Hans",setLanguage:function(t){this.Language=t},loginUrl:"/oauth2/connect/token",content:"通过创新的技术与产品,提升用户价值",setContent:function(t){this.content=t},logoUrl:"/publicData/images/loginLogo.png",setLogoUrl:function(t){this.logoUrl=t},imgurl:"/publicData/images/loginBg-1.png",setImgUrl:function(t){this.imgurl=t},setLoginUrl:function(t){this.loginUrl=t},isTenantAvailable:"/oauth2/api/abp/multi-tenancy/tenants/by-name",setIsTenantAvailable:function(t){this.isTenantAvailable=t},authorization:"Authorization",token_type:"token_type",oAuthConfig:{grant_type:"password",scope:"AuthServer",client_id:"AuthServer_App",client_secret:"1q2w3e*"},setOAuthConfig:function(t){this.oAuthConfig=Object.assign(this.oAuthConfig,t)},accessTokenKey:"Abp.AuthToken",abpTenantKey:"Abp.TenantId",tenantKey:"__tenant",setTenantKey:function(t){this.tenantKey=t},ApplicationId:{key:"ApplicationId",value:""},setApplicationId:function(t){t.key&&(this.ApplicationId.key=t.key),t.value&&(this.ApplicationId.value=t.value)},userId:"userId",enc_auth_token_key:"enc_auth_token",refreshTokenKey:"refresh_token_key",loginTitle:"星环视界智能科技",setLoginTitle:function(t){this.loginTitle=t},getLoginState:function(){return!!tt.a.get(this.accessTokenKey)},currentLoginInfoUrl:"/oauth2/api/abp/application-configuration",setcurrentLoginInfoUrl:function(t){this.currentLoginInfoUrl=t},clearCookies:function(){var t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(var e=t.length;e--;)document.cookie=t[e]+"=0;path=/;expires="+new Date(0).toUTCString()},getCookie:function(t){return tt.a.get(t)},setCookie:function(t,e,n){tt.a.set(t,e,n)}},nt=et,rt=function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.baseConfig=nt,t}return f(n,[{key:"created",value:function(){}},{key:"mounted",value:function(){}}]),n}(w.a);rt=m([$({components:{}})],rt);var ot=rt,it=ot;n("019a");function ct(t,e,n,r,o,i,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):o&&(u=a?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var at=ct(it,Y,Q,!1,null,null,null),ut=(at.exports,n("bc3a")),st=n.n(ut);function ft(t){const e=(new Date).getTime().toString();let n=document.createElement("auth-alert");n.setAttribute("error",JSON.stringify(t)),n.setAttribute("response",t.response?JSON.stringify(t.response):""),n.id="my-alert"+e,document.body.appendChild(n)}let lt={baseURL:nt.baseUrl,timeout:6e4};const pt=st.a.create(lt);pt.interceptors.request.use((function(t){if(tt.a.get(nt.accessTokenKey)){const e=tt.a.get(nt.token_type)+" "+tt.a.get(nt.accessTokenKey);t.headers[nt.authorization]=e}return tt.a.get(nt.tenantKey)&&(t.headers[nt.tenantKey]=tt.a.get(nt.tenantKey)),(nt.ApplicationId.value||tt.a.get(nt.ApplicationId.key))&&(t.headers[nt.ApplicationId.key]=nt.ApplicationId.value||tt.a.get(nt.ApplicationId.key)),t.headers["Accept-Language"]=nt.Language,t}),(function(t){return ft(t),Promise.reject(t)})),pt.interceptors.response.use((function(t){return t}),(function(t){return ft(t),console.log(t),Promise.reject(t)}));var dt=pt,ht=function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.state={loading:!1,dataSource:[],showPage:!0,filterData:{currentPage:1,Filter:"",MaxResultCount:1e3,SkipCount:0,totalCount:0},checkObj:void 0},t}return f(n,[{key:"created",value:function(){this.getDataSource()}},{key:"rowClick",value:function(t){var e=this.state.checkObj;e&&e.id===t.id?this.state.checkObj=void 0:this.state.checkObj=t,this.$emit("callback",this.state.checkObj,"click")}},{key:"topage",value:function(t){Array.isArray(t)?this.state.dataSource=t:t.items&&t.items.length?(this.state.dataSource=t.items,this.state.filterData.totalCount=t.totalCount):this.state.dataSource=[],this.toFindData()}},{key:"clearCheck",value:function(){this.state.checkObj=void 0,this.$emit("callback",this.state.checkObj)}},{key:"toFindData",value:function(){var t=this.confige,e=t.name,n=t.value,r=this.state.dataSource,o=r.findIndex((function(t){return t[null!==e&&void 0!==e?e:"id"]===n}));r.length&&(this.state.checkObj=r[o]),this.$emit("callback",this.state.checkObj)}},{key:"handleCurrentChange",value:function(t){this.state.filterData.currentPage=t||1;var e=this.state.filterData,n=e.MaxResultCount,r=void 0===n?0:n,o=e.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"handelSizeChange",value:function(t){this.state.filterData.currentPage=1,this.state.filterData.MaxResultCount=t;var e=this.state.filterData,n=e.MaxResultCount,r=void 0===n?0:n,o=e.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"getDataSource",value:function(){var t=this,e=this.confige.ajax,n=e.type,r=void 0===n?"get":n,o=e.url,i=e.params,c=e.data;if(this.state.loading=!0,"get"===r){var a={params:W(W({},this.state.filterData),i)};dt.get(o,W({},a)).then((function(e){t.topage(e.data)})).catch((function(){t.$notify.error("请求失败")})).finally((function(){t.state.loading=!1}))}else{var u={params:W(W({},this.state.filterData),i),data:W(W({},this.state.filterData),c)};dt.post(o,W({},u)).then((function(e){t.topage(e.data)})).catch((function(){t.$notify.error("请求失败")})).finally((function(){t.state.loading=!1}))}}},{key:"dataSource",get:function(){var t=this.state,e=t.filterData,n=t.dataSource,r=e.Filter;return n.filter((function(t){return JSON.stringify(t).includes(r)}))}}]),n}(w.a);m([K()],ht.prototype,"columns",void 0),m([K()],ht.prototype,"searchPlaceholder",void 0),m([K()],ht.prototype,"confige",void 0),m([K()],ht.prototype,"visible",void 0),m([z("confige")],ht.prototype,"getDataSource",null),ht=m([$],ht);var vt=ht,yt=vt,bt=ct(yt,V,J,!1,null,"0b6f7347",null),gt=bt.exports,mt=(n("45f7"),function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.state={config:{key:"",disabled:!1,clearable:!1,value:"",name:"",ajax:{url:"",params:{}},text:void 0},visible:!1,loading:!1,name:"",show:!1,icon:"el-icon-arrow-down",columns:[{key:"code",title:"编码"},{key:"name",title:"名称"},{key:"description",title:"描述"}]},t}return f(n,[{key:"created",value:function(){this.state.config=JSON.parse(this.config),this.columns&&(this.state.columns=this.columns)}},{key:"show",value:function(){this.state.icon="el-icon-arrow-up",this.state.show=!0}},{key:"callback",value:function(t,e){var n=this.state.config,r=n.text||"name";this.state.name=t?t[r]:void 0,this.$emit("change",t,e),e&&(this.state.visible=!1)}},{key:"hide",value:function(){this.state.icon="el-icon-arrow-down",this.state.show=!1}},{key:"blurInput",value:function(){var t=this.state.show;this.state.icon=t?"el-icon-arrow-up":"el-icon-arrow-down"}},{key:"focusInput",value:function(){this.state.icon="el-icon-circle-close",this.state.visible=!this.state.config.disabled}},{key:"clear",value:function(){if(!this.state.config.disabled){var t=this.$refs[this.state.config.key||"ht-table"];this.state.visible=!1,t.clearCheck()}}},{key:"watchConfig",value:function(t){this.state.config=JSON.parse(t)}}]),n}(w.a));m([K()],mt.prototype,"comStyle",void 0),m([K()],mt.prototype,"config",void 0),m([K()],mt.prototype,"width",void 0),m([K()],mt.prototype,"placeholder",void 0),m([K()],mt.prototype,"searchPlaceholder",void 0),m([K()],mt.prototype,"columns",void 0),m([z("config")],mt.prototype,"watchConfig",null),mt=m([$({name:"HtSelectTable",components:{CommonTable:gt}})],mt);var xt=mt,wt=xt,Ot=ct(wt,c,a,!1,null,null,null),St=Ot.exports;St.install=function(t){t.component("HtSelectTable",St)};var jt=St,Et=[jt],kt=function t(e){t.installed||Et.map((function(t,n){return console.log("component",t.options),e.component(t.options.name,t)}))};"undefined"!==typeof window&&window.Vue&&kt(window.Vue);var Pt={install:kt,HtSelectTable:jt};e["default"]=Pt},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise}})}));
28
+ function O(t){return O="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j(t){return E(t)||k(t)||P()}function E(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function k(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function P(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function A(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function C(t,e){_(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){_(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){_(t,e,n)}))}function _(t,e,n){var r=n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)}))}var T={__proto__:[]},R=T instanceof Array;function I(t){return function(e,n,r){var o="function"===typeof e?e:e.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(e){return t(e,n,r)}))}}function D(t){var e=O(t);return null==t||"object"!==e&&"function"!==e}function L(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var o={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(o[t]=r[t])})),o}var N=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function U(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=e.name||t._componentTag||t.name;var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(t){if("constructor"!==t)if(N.indexOf(t)>-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"===typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){return S({},t,r.value)}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return L(this,t)}});var r=t.__decorators__;r&&(r.forEach((function(t){return t(e)})),delete t.__decorators__);var o=Object.getPrototypeOf(t.prototype),i=o instanceof w.a?o.constructor:w.a,c=i.extend(e);return F(c,t,i),A()&&C(c,t),c}var M={prototype:!0,arguments:!0,callee:!0,caller:!0};function F(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!M[r]){var o=Object.getOwnPropertyDescriptor(t,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(e,r);if(!R){if("cid"===r)return;var c=Object.getOwnPropertyDescriptor(n,r);if(!D(i.value)&&c&&c.value===i.value)return}0,Object.defineProperty(t,r,i)}}}))}function B(t){return"function"===typeof t?U(t):function(e){return U(e,t)}}B.registerHooks=function(t){N.push.apply(N,j(t))};var $=B;var q="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function H(t,e,n){if(q&&!Array.isArray(t)&&"function"!==typeof t&&"undefined"===typeof t.type){var r=Reflect.getMetadata("design:type",e,n);r!==Object&&(t.type=r)}}function K(t){return void 0===t&&(t={}),function(e,n){H(t,e,n),I((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function z(t,e){void 0===e&&(e={});var n=e.deep,r=void 0!==n&&n,o=e.immediate,i=void 0!==o&&o;return I((function(e,n){"object"!==typeof e.watch&&(e.watch=Object.create(null));var o=e.watch;"object"!==typeof o[t]||Array.isArray(o[t])?"undefined"===typeof o[t]&&(o[t]=[]):o[t]=[o[t]],o[t].push({handler:n,deep:r,immediate:i})}))}var V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.state.loading,expression:"state.loading"}]},[n("header",[n("el-input",{staticClass:"htui-search",attrs:{placeholder:t.searchPlaceholder||"请输入关键字查询"},model:{value:t.state.filterData.Filter,callback:function(e){t.$set(t.state.filterData,"Filter",e)},expression:"state.filterData.Filter"}})],1),n("article",[n("el-table",{ref:"comTable",staticStyle:{width:"100%"},attrs:{height:t.confige.table&&t.confige.table.height?t.confige.table.height:250,"row-key":t.confige.table&&t.confige.table.rowkey?t.confige.table.rowkey:"id",data:t.dataSource,"tooltip-effect":"dark"},on:{"row-click":t.rowClick}},[n("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("el-checkbox",{attrs:{value:t.state.checkObj&&t.state.checkObj.id===r.id},nativeOn:{click:function(t){t.preventDefault()}}})]}}])}),n("el-table-column",{attrs:{label:"序号",width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s((t.state.filterData.currentPage-1)*t.state.filterData.MaxResultCount+(e.$index+1))+" ")]}}])}),t._l(t.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{label:t.title,"show-overflow-tooltip":!0,prop:t.key,width:t.width||120}})}))],2)],1),n("footer",[n("el-row",[n("el-col",{attrs:{span:24}},[n("p",{staticStyle:{width:"90px",float:"left"}},[t._v("共"+t._s(t.dataSource.length)+"条")]),t._e()],1)],1)],1)])},J=[];n("4de4"),n("c740"),n("caad"),n("e6cf"),n("a79d"),n("2532"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(Object(n),!0).forEach((function(e){G(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("auth-login-form",{tag:"div",staticClass:"container-login",attrs:{"base-config":JSON.stringify(t.baseConfig)}})},Q=[],Z=(n("cca6"),n("ac1f"),n("466d"),n("a78e")),tt=n.n(Z),et={Language:"zh-Hans",setLanguage:function(t){this.Language=t},loginUrl:"/oauth2/connect/token",content:"通过创新的技术与产品,提升用户价值",setContent:function(t){this.content=t},logoUrl:"/publicData/images/loginLogo.png",setLogoUrl:function(t){this.logoUrl=t},imgurl:"/publicData/images/loginBg-1.png",setImgUrl:function(t){this.imgurl=t},setLoginUrl:function(t){this.loginUrl=t},isTenantAvailable:"/oauth2/api/abp/multi-tenancy/tenants/by-name",setIsTenantAvailable:function(t){this.isTenantAvailable=t},authorization:"Authorization",token_type:"token_type",oAuthConfig:{grant_type:"password",scope:"AuthServer",client_id:"AuthServer_App",client_secret:"1q2w3e*"},setOAuthConfig:function(t){this.oAuthConfig=Object.assign(this.oAuthConfig,t)},accessTokenKey:"Abp.AuthToken",abpTenantKey:"Abp.TenantId",tenantKey:"__tenant",setTenantKey:function(t){this.tenantKey=t},ApplicationId:{key:"ApplicationId",value:""},setApplicationId:function(t){t.key&&(this.ApplicationId.key=t.key),t.value&&(this.ApplicationId.value=t.value)},userId:"userId",enc_auth_token_key:"enc_auth_token",refreshTokenKey:"refresh_token_key",loginTitle:"星环视界智能科技",setLoginTitle:function(t){this.loginTitle=t},getLoginState:function(){return!!tt.a.get(this.accessTokenKey)},currentLoginInfoUrl:"/oauth2/api/abp/application-configuration",setcurrentLoginInfoUrl:function(t){this.currentLoginInfoUrl=t},clearCookies:function(){var t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(var e=t.length;e--;)document.cookie=t[e]+"=0;path=/;expires="+new Date(0).toUTCString()},getCookie:function(t){return tt.a.get(t)},setCookie:function(t,e,n){tt.a.set(t,e,n)}},nt=et,rt=function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.baseConfig=nt,t}return f(n,[{key:"created",value:function(){}},{key:"mounted",value:function(){}}]),n}(w.a);rt=m([$({components:{}})],rt);var ot=rt,it=ot;n("019a");function ct(t,e,n,r,o,i,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):o&&(u=a?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var at=ct(it,Y,Q,!1,null,null,null),ut=(at.exports,n("bc3a")),st=n.n(ut);function ft(t){const e=(new Date).getTime().toString();let n=document.createElement("auth-alert");n.setAttribute("error",JSON.stringify(t)),n.setAttribute("response",t.response?JSON.stringify(t.response):""),n.id="my-alert"+e,document.body.appendChild(n)}let lt={baseURL:nt.baseUrl,timeout:6e4};const pt=st.a.create(lt);pt.interceptors.request.use((function(t){if(tt.a.get(nt.accessTokenKey)){const e=tt.a.get(nt.token_type)+" "+tt.a.get(nt.accessTokenKey);t.headers[nt.authorization]=e}return tt.a.get(nt.tenantKey)&&(t.headers[nt.tenantKey]=tt.a.get(nt.tenantKey)),(nt.ApplicationId.value||tt.a.get(nt.ApplicationId.key))&&(t.headers[nt.ApplicationId.key]=nt.ApplicationId.value||tt.a.get(nt.ApplicationId.key)),t.headers["Accept-Language"]=nt.Language,t}),(function(t){return ft(t),Promise.reject(t)})),pt.interceptors.response.use((function(t){return t}),(function(t){return ft(t),console.log(t),Promise.reject(t)}));var dt=pt,ht=function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.state={loading:!1,dataSource:[],showPage:!0,filterData:{currentPage:1,Filter:"",MaxResultCount:1e3,SkipCount:0,totalCount:0},checkObj:void 0},t}return f(n,[{key:"created",value:function(){this.getDataSource()}},{key:"rowClick",value:function(t){var e=this.state.checkObj;e&&e.id===t.id?this.state.checkObj=void 0:this.state.checkObj=t,this.$emit("callback",this.state.checkObj,"click")}},{key:"topage",value:function(t){Array.isArray(t)?this.state.dataSource=t:t.items&&t.items.length?(this.state.dataSource=t.items,this.state.filterData.totalCount=t.totalCount):this.state.dataSource=[],this.toFindData()}},{key:"clearCheck",value:function(){this.state.checkObj=void 0,this.$emit("callback",this.state.checkObj)}},{key:"toFindData",value:function(){var t=this.confige,e=t.name,n=t.value,r=this.state.dataSource,o=r.findIndex((function(t){return t[null!==e&&void 0!==e?e:"id"]===n}));r.length&&(this.state.checkObj=r[o]),this.$emit("callback",this.state.checkObj)}},{key:"handleCurrentChange",value:function(t){this.state.filterData.currentPage=t||1;var e=this.state.filterData,n=e.MaxResultCount,r=void 0===n?0:n,o=e.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"handelSizeChange",value:function(t){this.state.filterData.currentPage=1,this.state.filterData.MaxResultCount=t;var e=this.state.filterData,n=e.MaxResultCount,r=void 0===n?0:n,o=e.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"getDataSource",value:function(){var t=this,e=this.confige.ajax,n=e.type,r=void 0===n?"get":n,o=e.url,i=e.params,c=e.data;if(this.state.loading=!0,"get"===r){var a={params:W(W({},this.state.filterData),i)};dt.get(o,W({},a)).then((function(e){t.topage(e.data)})).catch((function(){t.$notify.error("请求失败")})).finally((function(){t.state.loading=!1}))}else{var u={params:W(W({},this.state.filterData),i),data:W(W({},this.state.filterData),c)};dt.post(o,W({},u)).then((function(e){t.topage(e.data)})).catch((function(){t.$notify.error("请求失败")})).finally((function(){t.state.loading=!1}))}}},{key:"dataSource",get:function(){var t=this.state,e=t.filterData,n=t.dataSource,r=e.Filter;return n.filter((function(t){return JSON.stringify(t).includes(r)}))}}]),n}(w.a);m([K()],ht.prototype,"columns",void 0),m([K()],ht.prototype,"searchPlaceholder",void 0),m([K()],ht.prototype,"confige",void 0),m([K()],ht.prototype,"visible",void 0),m([z("confige")],ht.prototype,"getDataSource",null),ht=m([$],ht);var vt=ht,yt=vt,bt=ct(yt,V,J,!1,null,"0b6f7347",null),gt=bt.exports,mt=(n("45f7"),function(t){p(n,t);var e=g(n);function n(){var t;return u(this,n),t=e.apply(this,arguments),t.state={config:{key:"",disabled:!1,clearable:!1,value:"",name:"",ajax:{url:"",params:{}},text:void 0},visible:!1,loading:!1,name:"",show:!1,icon:"el-icon-arrow-down",columns:[{key:"code",title:"编码"},{key:"name",title:"名称"},{key:"description",title:"描述"}]},t}return f(n,[{key:"created",value:function(){this.state.config=JSON.parse(this.config),this.columns&&(this.state.columns=this.columns)}},{key:"show",value:function(){this.state.icon="el-icon-arrow-up",this.state.show=!0}},{key:"callback",value:function(t,e){var n=this.state.config,r=n.text||"name";this.state.name=t?t[r]:void 0,this.$emit("change",t,e),e&&(this.state.visible=!1)}},{key:"hide",value:function(){this.state.icon="el-icon-arrow-down",this.state.show=!1}},{key:"blurInput",value:function(){var t=this.state.show;this.state.icon=t?"el-icon-arrow-up":"el-icon-arrow-down"}},{key:"focusInput",value:function(){this.state.icon="el-icon-circle-close",this.state.visible=!this.state.config.disabled}},{key:"clear",value:function(){if(!this.state.config.disabled){var t=this.$refs[this.state.config.key||"ht-table"];this.state.visible=!1,t.clearCheck()}}},{key:"watchConfig",value:function(t){this.state.config=JSON.parse(t)}}]),n}(w.a));m([K()],mt.prototype,"comStyle",void 0),m([K()],mt.prototype,"config",void 0),m([K()],mt.prototype,"width",void 0),m([K()],mt.prototype,"placeholder",void 0),m([K()],mt.prototype,"searchPlaceholder",void 0),m([K()],mt.prototype,"columns",void 0),m([z("config")],mt.prototype,"watchConfig",null),mt=m([$({name:"HtSelectTable",components:{CommonTable:gt}})],mt);var xt=mt,wt=xt,Ot=ct(wt,c,a,!1,null,null,null),St=Ot.exports;St.install=function(t){t.component("HtSelectTable",St)};var jt=St,Et=[jt],kt=function t(e){t.installed||Et.map((function(t,n){return e.component(t.options.name||t.name,t)}))};"undefined"!==typeof window&&window.Vue&&kt(window.Vue);var Pt={install:kt,HtSelectTable:jt};e["default"]=Pt},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise}})}));
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "typings": "types/index.d.ts",
5
5
  "main": "lib/htui.common.js",
6
6
  "style": "lib/htui.css",
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-01 11:17:26
7
+ * @LastEditTime: 2021-12-01 11:22:56
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -15,17 +15,12 @@ import HtSelectTable from './SelectTable/index'
15
15
  const components = [
16
16
  HtSelectTable
17
17
  ]
18
- const comString = ["HtSelectTable"]
19
18
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
20
19
  const install = function (Vue: any) {
21
20
  // 判断是否安装
22
21
  if ((install as any).installed) return
23
22
  // 遍历注册全局组件
24
- components.map((component: any, index) => {
25
-
26
- console.log('component', component.options);
27
- return Vue.component(component.options.name, component)
28
- })
23
+ components.map((component: any, index) => Vue.component(component.options.name || component.name, component))
29
24
  }
30
25
  // 判断是否是直接引入文件
31
26
  if (typeof window !== 'undefined' && window.Vue) {