@houaoran/designer 1.0.8 → 1.0.9
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.
- package/dist/components.es.js +4 -2
- package/dist/components.umd.js +2 -2
- package/dist/index.es.js +781 -779
- package/dist/index.umd.js +58 -58
- package/package.json +1 -1
- package/src/components/CurrentUser.vue +7 -3
package/dist/components.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 可视化表单设计器
|
|
3
|
-
* @houaoran/designer v1.0.
|
|
3
|
+
* @houaoran/designer v1.0.9
|
|
4
4
|
* (c) 2021-2026 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create-designer
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -11805,12 +11805,14 @@ const zt = et.exports, Vt = new zt({ storage: "localStorage" }), $t = (R) => Vt.
|
|
|
11805
11805
|
},
|
|
11806
11806
|
methods: {
|
|
11807
11807
|
getCurrentUser() {
|
|
11808
|
+
var e, t, a, r;
|
|
11808
11809
|
const R = $t("user");
|
|
11809
11810
|
if (!R) {
|
|
11810
11811
|
this.value = "";
|
|
11811
11812
|
return;
|
|
11812
11813
|
}
|
|
11813
|
-
|
|
11814
|
+
const M = (e = R.user) != null ? e : {}, n = ((t = R.switchUsers) != null ? t : []).find((i) => i.id == M.id);
|
|
11815
|
+
console.log(n, "currentUser"), this.userType === "username" ? this.value = M.nickname : this.userType === "deptName" ? this.value = n.deptName : this.userType === "postName" && (this.value = (r = (a = n.postList) == null ? void 0 : a.map((i) => i.postName)) == null ? void 0 : r.join("\u3001"));
|
|
11814
11816
|
}
|
|
11815
11817
|
}
|
|
11816
11818
|
});
|
package/dist/components.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 可视化表单设计器
|
|
3
|
-
* @houaoran/designer v1.0.
|
|
3
|
+
* @houaoran/designer v1.0.9
|
|
4
4
|
* (c) 2021-2026 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create-designer
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -880,4 +880,4 @@
|
|
|
880
880
|
Version 1.1.1
|
|
881
881
|
https://github.com/WQTeam/web-storage-cache
|
|
882
882
|
(c) 2013-2016 WQTeam, MIT license
|
|
883
|
-
*/(function(R,D){(function(o,n){R.exports=n()})(St,function(){function o(l,h){for(var A in h)l[A]=h[A];return l}function n(l){var h=!1;if(l&&l.setItem){h=!0;var A="__"+Math.round(1e7*Math.random());try{l.setItem(A,A),l.removeItem(A)}catch{h=!1}}return h}function e(l){var h=typeof l;return h==="string"&&window[l]instanceof Storage?window[l]:l}function t(l){return Object.prototype.toString.call(l)==="[object Date]"&&!isNaN(l.getTime())}function a(l,h){if(h=h||new Date,typeof l=="number"?l=l===1/0?f:new Date(h.getTime()+1e3*l):typeof l=="string"&&(l=new Date(l)),l&&!t(l))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return l}function r(l){var h=!1;if(l)if(l.code)switch(l.code){case 22:h=!0;break;case 1014:l.name==="NS_ERROR_DOM_QUOTA_REACHED"&&(h=!0)}else l.number===-2147024882&&(h=!0);return h}function i(l,h){this.c=new Date().getTime(),h=h||s;var A=a(h);this.e=A.getTime(),this.v=l}function u(l){return typeof l!="object"?!1:!!(l&&"c"in l&&"e"in l&&"v"in l)}function v(l){var h=new Date().getTime();return h<l.e}function c(l){return typeof l!="string"&&(console.warn(l+" used as a key, but it is not a string."),l=String(l)),l}function m(l){var h={storage:"localStorage",exp:1/0},A=o(h,l),y=A.exp;if(y&&typeof y!="number"&&!t(y))throw new Error("Constructor `exp` parameter cannot be converted to a valid Date instance");s=y;var _=e(A.storage),b=n(_);this.isSupported=function(){return b},b?(this.storage=_,this.quotaExceedHandler=function(E,C,x){if(console.warn("Quota exceeded!"),x&&x.force===!0){var w=this.deleteAllExpires();console.warn("delete all expires CacheItem : ["+w+"] and try execute `set` method again!");try{x.force=!1,this.set(E,C,x)}catch(S){console.warn(S)}}}):o(this,d)}var f=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),s=f,p={serialize:function(l){return JSON.stringify(l)},deserialize:function(l){return l&&JSON.parse(l)}},d={set:function(){},get:function(){},delete:function(){},deleteAllExpires:function(){},clear:function(){},add:function(){},replace:function(){},touch:function(){}},g={set:function(l,h,A){if(l=c(l),typeof A=="number"&&(A={exp:A}),A=o({force:!0},A),h===void 0)return this.delete(l);var y=p.serialize(h),_=new i(y,A.exp);try{this.storage.setItem(l,p.serialize(_))}catch(b){r(b)?this.quotaExceedHandler(l,y,A,b):console.error(b)}return h},get:function(l){l=c(l);var h=null;try{h=p.deserialize(this.storage.getItem(l))}catch{return null}if(u(h)){if(v(h)){var A=h.v;return p.deserialize(A)}this.delete(l)}return null},delete:function(l){return l=c(l),this.storage.removeItem(l),l},deleteAllExpires:function(){for(var l=this.storage.length,h=[],A=this,y=0;l>y;y++){var _=this.storage.key(y),b=null;try{b=p.deserialize(this.storage.getItem(_))}catch{}if(b!==null&&b.e!==void 0){var E=new Date().getTime();E>=b.e&&h.push(_)}}return h.forEach(function(C){A.delete(C)}),h},clear:function(){this.storage.clear()},add:function(l,h,A){l=c(l),typeof A=="number"&&(A={exp:A}),A=o({force:!0},A);try{var y=p.deserialize(this.storage.getItem(l));if(!u(y)||!v(y))return this.set(l,h,A),!0}catch{return this.set(l,h,A),!0}return!1},replace:function(l,h,A){l=c(l);var y=null;try{y=p.deserialize(this.storage.getItem(l))}catch{return!1}if(u(y)){if(v(y))return this.set(l,h,A),!0;this.delete(l)}return!1},touch:function(l,h){l=c(l);var A=null;try{A=p.deserialize(this.storage.getItem(l))}catch{return!1}if(u(A)){if(v(A))return this.set(l,this.get(l),{exp:h}),!0;this.delete(l)}return!1}};return m.prototype=g,m})})(He);const kt=He.exports,Dt=new kt({storage:"localStorage"}),Mt=R=>Dt.get(R),Tt=H.defineComponent({name:"CurrentUser",props:{userType:{type:String,default:"username"}},mounted(){this.value||this.getCurrentUser()},methods:{getCurrentUser(){const R=Mt("user");if(!R){this.value="";return}this.userType==="username"?this.value=
|
|
883
|
+
*/(function(R,D){(function(o,n){R.exports=n()})(St,function(){function o(l,h){for(var A in h)l[A]=h[A];return l}function n(l){var h=!1;if(l&&l.setItem){h=!0;var A="__"+Math.round(1e7*Math.random());try{l.setItem(A,A),l.removeItem(A)}catch{h=!1}}return h}function e(l){var h=typeof l;return h==="string"&&window[l]instanceof Storage?window[l]:l}function t(l){return Object.prototype.toString.call(l)==="[object Date]"&&!isNaN(l.getTime())}function a(l,h){if(h=h||new Date,typeof l=="number"?l=l===1/0?f:new Date(h.getTime()+1e3*l):typeof l=="string"&&(l=new Date(l)),l&&!t(l))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return l}function r(l){var h=!1;if(l)if(l.code)switch(l.code){case 22:h=!0;break;case 1014:l.name==="NS_ERROR_DOM_QUOTA_REACHED"&&(h=!0)}else l.number===-2147024882&&(h=!0);return h}function i(l,h){this.c=new Date().getTime(),h=h||s;var A=a(h);this.e=A.getTime(),this.v=l}function u(l){return typeof l!="object"?!1:!!(l&&"c"in l&&"e"in l&&"v"in l)}function v(l){var h=new Date().getTime();return h<l.e}function c(l){return typeof l!="string"&&(console.warn(l+" used as a key, but it is not a string."),l=String(l)),l}function m(l){var h={storage:"localStorage",exp:1/0},A=o(h,l),y=A.exp;if(y&&typeof y!="number"&&!t(y))throw new Error("Constructor `exp` parameter cannot be converted to a valid Date instance");s=y;var _=e(A.storage),b=n(_);this.isSupported=function(){return b},b?(this.storage=_,this.quotaExceedHandler=function(E,C,x){if(console.warn("Quota exceeded!"),x&&x.force===!0){var w=this.deleteAllExpires();console.warn("delete all expires CacheItem : ["+w+"] and try execute `set` method again!");try{x.force=!1,this.set(E,C,x)}catch(S){console.warn(S)}}}):o(this,d)}var f=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),s=f,p={serialize:function(l){return JSON.stringify(l)},deserialize:function(l){return l&&JSON.parse(l)}},d={set:function(){},get:function(){},delete:function(){},deleteAllExpires:function(){},clear:function(){},add:function(){},replace:function(){},touch:function(){}},g={set:function(l,h,A){if(l=c(l),typeof A=="number"&&(A={exp:A}),A=o({force:!0},A),h===void 0)return this.delete(l);var y=p.serialize(h),_=new i(y,A.exp);try{this.storage.setItem(l,p.serialize(_))}catch(b){r(b)?this.quotaExceedHandler(l,y,A,b):console.error(b)}return h},get:function(l){l=c(l);var h=null;try{h=p.deserialize(this.storage.getItem(l))}catch{return null}if(u(h)){if(v(h)){var A=h.v;return p.deserialize(A)}this.delete(l)}return null},delete:function(l){return l=c(l),this.storage.removeItem(l),l},deleteAllExpires:function(){for(var l=this.storage.length,h=[],A=this,y=0;l>y;y++){var _=this.storage.key(y),b=null;try{b=p.deserialize(this.storage.getItem(_))}catch{}if(b!==null&&b.e!==void 0){var E=new Date().getTime();E>=b.e&&h.push(_)}}return h.forEach(function(C){A.delete(C)}),h},clear:function(){this.storage.clear()},add:function(l,h,A){l=c(l),typeof A=="number"&&(A={exp:A}),A=o({force:!0},A);try{var y=p.deserialize(this.storage.getItem(l));if(!u(y)||!v(y))return this.set(l,h,A),!0}catch{return this.set(l,h,A),!0}return!1},replace:function(l,h,A){l=c(l);var y=null;try{y=p.deserialize(this.storage.getItem(l))}catch{return!1}if(u(y)){if(v(y))return this.set(l,h,A),!0;this.delete(l)}return!1},touch:function(l,h){l=c(l);var A=null;try{A=p.deserialize(this.storage.getItem(l))}catch{return!1}if(u(A)){if(v(A))return this.set(l,this.get(l),{exp:h}),!0;this.delete(l)}return!1}};return m.prototype=g,m})})(He);const kt=He.exports,Dt=new kt({storage:"localStorage"}),Mt=R=>Dt.get(R),Tt=H.defineComponent({name:"CurrentUser",props:{userType:{type:String,default:"username"}},mounted(){this.value||this.getCurrentUser()},methods:{getCurrentUser(){var e,t,a,r;const R=Mt("user");if(!R){this.value="";return}const D=(e=R.user)!=null?e:{},n=((t=R.switchUsers)!=null?t:[]).find(i=>i.id==D.id);console.log(n,"currentUser"),this.userType==="username"?this.value=D.nickname:this.userType==="deptName"?this.value=n.deptName:this.userType==="postName"&&(this.value=(r=(a=n.postList)==null?void 0:a.map(i=>i.postName))==null?void 0:r.join("\u3001"))}}});function Nt(R,D,o,n,e,t){const a=H.resolveComponent("el-input");return H.openBlock(),H.createBlock(a,{modelValue:R.value,"onUpdate:modelValue":D[0]||(D[0]=r=>R.value=r),disabled:"",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])}const Bt=ge(Tt,[["render",Nt]]),Ut="",Oe=R=>{R.component("FcEditor",Xe),R.component("FcTitle",tt),R.component("SignaturePad",ut),R.component("TableForm",ft),R.component("FcTable",vt),R.component("InputRange",wt),R.component("DictSelect",Ct),R.component("CurrentUser",Bt)};Oe(Qe.default),pe.default=Oe,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|