@gct-paas/design 0.0.1-dev.0 → 0.0.1-dev.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.
- package/LICENSE +21 -0
- package/dist/index.min.cjs +1 -0
- package/dist/index.system.min.js +1 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +3 -0
- package/es/hooks/useStyle.d.ts +15 -0
- package/es/hooks/useStyle.mjs +135 -0
- package/es/index.d.ts +5 -0
- package/es/index.mjs +28 -0
- package/es/interface/index.d.ts +1 -0
- package/es/interface/index.mjs +3 -0
- package/es/interface/props/index.d.ts +1 -0
- package/es/interface/props/index.mjs +1 -0
- package/es/interface/props/plugin-comp-props.d.ts +15 -0
- package/es/interface/props/plugin-comp-props.mjs +1 -0
- package/es/schema/common-config/autofill-editor-config.d.ts +4 -0
- package/es/schema/common-config/autofill-editor-config.mjs +45 -0
- package/es/schema/common-config/base-button-config.d.ts +45 -0
- package/es/schema/common-config/base-button-config.mjs +85 -0
- package/es/schema/common-config/button-editor-config.d.ts +14 -0
- package/es/schema/common-config/button-editor-config.mjs +142 -0
- package/es/schema/common-config/button-props-func.d.ts +5 -0
- package/es/schema/common-config/button-props-func.mjs +12 -0
- package/es/schema/common-config/column-editor-config.d.ts +3 -0
- package/es/schema/common-config/column-editor-config.mjs +29 -0
- package/es/schema/common-config/common-style.d.ts +3 -0
- package/es/schema/common-config/common-style.mjs +86 -0
- package/es/schema/common-config/display-editor-config.d.ts +3 -0
- package/es/schema/common-config/display-editor-config.mjs +67 -0
- package/es/schema/common-config/formItem-editor-config.d.ts +3 -0
- package/es/schema/common-config/formItem-editor-config.mjs +70 -0
- package/es/schema/common-config/permission-editor-config.d.ts +2 -0
- package/es/schema/common-config/permission-editor-config.mjs +16 -0
- package/es/schema/index.d.ts +9 -0
- package/es/schema/index.mjs +11 -0
- package/es/types/index.d.ts +26 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +3 -0
- package/es/utils/message/message.d.ts +14 -0
- package/es/utils/message/message.mjs +35 -0
- package/package.json +19 -11
- package/dist/design.cjs +0 -1
- package/dist/design.system.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 冠骋信息技术有限公司
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("ant-design-vue"),d=require("vue"),t=require("@gct-paas/core"),r=require("lodash-es");class F{info(o,n){return new Promise(i=>{s.message.info(o,n,()=>{i()})})}success(o,n){return new Promise(i=>{s.message.success(o,n,()=>{i()})})}warning(o,n){return new Promise(i=>{s.message.warning(o,n,()=>{i()})})}error(o,n){return new Promise(i=>{s.message.error(o,n,()=>{i()})})}}const O={position:"",top:"",left:"",right:"",bottom:"",width:"",height:"",backgroundColor:"",marginAll:"",marginTop:"",marginRight:"",marginBottom:"",marginLeft:"",paddingAll:"",paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",labelFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:t.TextDecoration.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:t.TextDecoration.NONE,color:""},tagStyle:{color:"",tagType:t.TagTypeEnum.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"},C=["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"];function _(e){return e+"px"}const a={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?_(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,r.pick(e,a.fontAttrs)),typeof a.mapAttrs=="object"&&Object.keys(a.mapAttrs).forEach(n=>{const{attr:i,callback:l}=a.mapAttrs[n];o[i]=typeof l=="function"?l(e[n]):e[n]}),o}};function G(e){const{style:o={},ignoringStyle:n=[]}=e||{},i=d.computed(()=>M(o)),l=d.computed(()=>{var m,g,b,y,f,E,h,T,D,S,x,R;const c={position:r.isEmpty(o.position)?"":o.position+" !important",top:r.isEmpty(o.top)?"":o.top+"px !important",left:r.isEmpty(o.left)?"":o.left+"px !important",right:r.isEmpty(o.right)?"":o.right+"px !important",bottom:r.isEmpty(o.bottom)?"":o.bottom+"px !important",width:r.isEmpty(o.width)?"":o.width+"px !important",height:r.isEmpty(o.height)?"":o.height+"px !important",backgroundColor:r.isEmpty(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:r.isEmpty(o.marginTop)?"":o.marginTop+"px !important",marginRight:r.isEmpty(o.marginRight)?"":o.marginRight+"px !important",marginBottom:r.isEmpty(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:r.isEmpty(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:r.isEmpty(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:r.isEmpty(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:r.isEmpty(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:r.isEmpty(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${(m=o.borderLeft)==null?void 0:m.borderWidth}px ${(g=o.borderLeft)==null?void 0:g.borderStyle} ${(b=o.borderLeft)==null?void 0:b.borderColor} !important`,borderRight:`${(y=o.borderRight)==null?void 0:y.borderWidth}px ${(f=o.borderRight)==null?void 0:f.borderStyle} ${(E=o.borderRight)==null?void 0:E.borderColor} !important`,borderBottom:`${(h=o.borderBottom)==null?void 0:h.borderWidth}px ${(T=o.borderBottom)==null?void 0:T.borderStyle} ${(D=o.borderBottom)==null?void 0:D.borderColor} !important`,borderTop:`${(S=o.borderTop)==null?void 0:S.borderWidth}px ${(x=o.borderTop)==null?void 0:x.borderStyle} ${(R=o.borderTop)==null?void 0:R.borderColor} !important`,borderTopRightRadius:r.isEmpty(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:r.isEmpty(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:r.isEmpty(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:r.isEmpty(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return n.forEach(A=>{c[A]=void 0}),c}),L=d.computed(()=>a.font(o.labelFont)),I=d.computed(()=>a.font(o.contentFont));return{wrapperStyle:l,wStyle:i,labelFont:L,contentFont:I}}function M(e={}){const o={};for(const n in e)o[n]=U(n,e[n]);return o}function U(e,o){return r.isNil(o)||r.isEmpty(o)?"":C.includes(e)?o+" !important":o+"px !important"}const B=[t.FIELD_TYPE.REF,t.FIELD_TYPE.USER,t.FIELD_TYPE.ORG,t.FIELD_TYPE.RDO_REF,t.FIELD_TYPE.ATTACHMENT],k=({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!B.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!B.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}];function p(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const u={hidden:!1,componentDependency:{sortDependency:[],configDependency:{[t.Dependency_ENUM.HIDDEN]:{expression:""},[t.Dependency_ENUM.READONLY]:{expression:""},[t.Dependency_ENUM.DISABLED]:{expression:""},[t.Dependency_ENUM.REQUIRED]:{expression:""},[t.Dependency_ENUM.ASSIGNMENT]:{expression:"",strategy:t.ASSIGNMENTSTRATEGY_ENUM.alwaysCover}}}},P=[{component:"dependency-editor",name:"componentDependency",label:"",group:t.PropGroup.COMPONENTDEPENDENCY,hidden:e=>e.materialType===t.MaterialEnum.MaterialEmbedTableField||e.type===t.FormComponents.Form&&e.preLocation?!0:p(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:t.PropGroup.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===t.MaterialEnum.cardListFormField||[t.FIELD_TYPE.EXPRESSION_CONDITION,t.FIELD_TYPE.SERIALRULE,t.FIELD_TYPE.LABEL_TEMPLATE].includes(e.props.fieldType)}}],W={disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:t.ButtonStyle.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:t.ButtonType.PRIMARY,danger:!1,size:t.ButtonSize.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...u},Y=[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:t.PropGroup.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:t.PropGroup.BUTTON},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.BUTTON,hidden:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.BUTTON,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}],w={disabled:!1,buttonTheme:t.ButtonColorTheme.DEFAULT,buttonType:t.ButtonColorType.DEFAULT,icon:"",iconColor:"",buttonStyle:t.ButtonStyle.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""},z=[{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:t.PropGroup.ButtonStyle,hidden:e=>p(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.ButtonStyle,hidden:e=>!e.props.hasIcon||p(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:t.PropGroup.ButtonStyle,hidden:e=>p(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:t.PropGroup.ButtonStyle,hidden:e=>p(e),_config:{tooltip:"sys.pageDesigner.buttonConfirm"}},{component:"texteare-editor",name:"confirmText",label:"sys.pageDesigner.regHint",group:t.PropGroup.ButtonStyle,_config:{i18n:!0,placeholder:"sys.pageDesigner.confirmTodo"},hidden:e=>!e.props.confirm||p(e)}],$=[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:t.StyleGroup.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:t.StyleGroup.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}],v=[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:t.PropGroup.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:t.fixedAlignENUM.LEFT},{label:"sys.pageDesigner.none",value:t.fixedAlignENUM.NONE},{label:"sys.pageDesigner.right",value:t.fixedAlignENUM.RIGHT}]}}],H={field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...u},j=[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:t.PropGroup.BASIC,hidden:e=>e.platform===t.Platform.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:t.PropGroup.BASIC,hidden:e=>!e.props.showExplain,_config:{i18n:!0}},{component:"switch-editor",name:"displayLabelText",label:"sys.pageDesigner.displayLabelText",group:t.PropGroup.ADVANCED},{component:"switch-editor",name:"disabled",label:"sys.pageDesigner.disabled",group:t.PropGroup.ADVANCED},{component:"switch-editor",name:"readonly",label:"sys.pageDesigner.readonly",group:t.PropGroup.ADVANCED},...P],K=[{component:"permission-editor",label:"",group:t.PropGroup.PERMISSION,hidden:e=>p(e)}];function N(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new F}exports.baseBtnEditor=Y;exports.baseBtnProp=W;exports.buttonEditor=z;exports.buttonProps=w;exports.buttonStyleEditor=$;exports.default=N;exports.displayEditor=P;exports.displayProps=u;exports.fixedAlignEditor=v;exports.formItemDisplayEditor=j;exports.formItemProps=H;exports.getAutofillEditor=k;exports.hiddenButtonProps=p;exports.install=N;exports.notNeedPxStyle=C;exports.permissionEditor=K;exports.style=O;exports.useStyle=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["ant-design-vue","vue","@gct-paas/core","lodash-es"],function(a,to){"use strict";var u,b,d,D,h,l,c,R,r,T,C,m,B,E,x,N,S,f,A,n,I,L;return{setters:[t=>{u=t.message},t=>{b=t.computed},t=>{d=t.BorderStyle,D=t.TagTypeEnum,h=t.TextDecoration,l=t.FIELD_TYPE,c=t.Dependency_ENUM,R=t.ASSIGNMENTSTRATEGY_ENUM,r=t.PropGroup,T=t.MaterialEnum,C=t.FormComponents,m=t.ButtonSize,B=t.ButtonType,E=t.ButtonStyle,x=t.ButtonColorType,N=t.ButtonColorTheme,S=t.StyleGroup,f=t.fixedAlignENUM,A=t.Platform},t=>{n=t.isEmpty,I=t.pick,L=t.isNil}],execute:function(){a({default:P,hiddenButtonProps:s,install:P,useStyle:Q});class t{info(o,i){return new Promise(p=>{u.info(o,i,()=>{p()})})}success(o,i){return new Promise(p=>{u.success(o,i,()=>{p()})})}warning(o,i){return new Promise(p=>{u.warning(o,i,()=>{p()})})}error(o,i){return new Promise(p=>{u.error(o,i,()=>{p()})})}}const ro=a("style",{position:"",top:"",left:"",right:"",bottom:"",width:"",height:"",backgroundColor:"",marginAll:"",marginTop:"",marginRight:"",marginBottom:"",marginLeft:"",paddingAll:"",paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",labelFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:h.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:h.NONE,color:""},tagStyle:{color:"",tagType:D.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"}),K=a("notNeedPxStyle",["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"]);function V(e){return e+"px"}const g={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?V(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,I(e,g.fontAttrs)),typeof g.mapAttrs=="object"&&Object.keys(g.mapAttrs).forEach(i=>{const{attr:p,callback:y}=g.mapAttrs[i];o[p]=typeof y=="function"?y(e[i]):e[i]}),o}};function Q(e){const{style:o={},ignoringStyle:i=[]}=e||{},p=b(()=>X(o)),y=b(()=>{var M,U,k,W,w,G,$,z,Y,v,H,j;const _={position:n(o.position)?"":o.position+" !important",top:n(o.top)?"":o.top+"px !important",left:n(o.left)?"":o.left+"px !important",right:n(o.right)?"":o.right+"px !important",bottom:n(o.bottom)?"":o.bottom+"px !important",width:n(o.width)?"":o.width+"px !important",height:n(o.height)?"":o.height+"px !important",backgroundColor:n(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:n(o.marginTop)?"":o.marginTop+"px !important",marginRight:n(o.marginRight)?"":o.marginRight+"px !important",marginBottom:n(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:n(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:n(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:n(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:n(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:n(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${(M=o.borderLeft)==null?void 0:M.borderWidth}px ${(U=o.borderLeft)==null?void 0:U.borderStyle} ${(k=o.borderLeft)==null?void 0:k.borderColor} !important`,borderRight:`${(W=o.borderRight)==null?void 0:W.borderWidth}px ${(w=o.borderRight)==null?void 0:w.borderStyle} ${(G=o.borderRight)==null?void 0:G.borderColor} !important`,borderBottom:`${($=o.borderBottom)==null?void 0:$.borderWidth}px ${(z=o.borderBottom)==null?void 0:z.borderStyle} ${(Y=o.borderBottom)==null?void 0:Y.borderColor} !important`,borderTop:`${(v=o.borderTop)==null?void 0:v.borderWidth}px ${(H=o.borderTop)==null?void 0:H.borderStyle} ${(j=o.borderTop)==null?void 0:j.borderColor} !important`,borderTopRightRadius:n(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:n(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:n(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:n(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return i.forEach(eo=>{_[eo]=void 0}),_}),Z=b(()=>g.font(o.labelFont)),oo=b(()=>g.font(o.contentFont));return{wrapperStyle:y,wStyle:p,labelFont:Z,contentFont:oo}}function X(e={}){const o={};for(const i in e)o[i]=q(i,e[i]);return o}function q(e,o){return L(o)||n(o)?"":K.includes(e)?o+" !important":o+"px !important"}const F=[l.REF,l.USER,l.ORG,l.RDO_REF,l.ATTACHMENT],no=a("getAutofillEditor",({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}]);function s(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const O=a("displayProps",{hidden:!1,componentDependency:{sortDependency:[],configDependency:{[c.HIDDEN]:{expression:""},[c.READONLY]:{expression:""},[c.DISABLED]:{expression:""},[c.REQUIRED]:{expression:""},[c.ASSIGNMENT]:{expression:"",strategy:R.alwaysCover}}}}),J=a("displayEditor",[{component:"dependency-editor",name:"componentDependency",label:"",group:r.COMPONENTDEPENDENCY,hidden:e=>e.materialType===T.MaterialEmbedTableField||e.type===C.Form&&e.preLocation?!0:s(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:r.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===T.cardListFormField||[l.EXPRESSION_CONDITION,l.SERIALRULE,l.LABEL_TEMPLATE].includes(e.props.fieldType)}}]),io=a("baseBtnProp",{disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:E.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:B.PRIMARY,danger:!1,size:m.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...O}),ao=a("baseBtnEditor",[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:r.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:r.BUTTON},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.BUTTON,hidden:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.BUTTON,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}]),po=a("buttonProps",{disabled:!1,buttonTheme:N.DEFAULT,buttonType:x.DEFAULT,icon:"",iconColor:"",buttonStyle:E.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""}),lo=a("buttonEditor",[{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:r.ButtonStyle,hidden:e=>s(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.ButtonStyle,hidden:e=>!e.props.hasIcon||s(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:r.ButtonStyle,hidden:e=>s(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:r.ButtonStyle,hidden:e=>s(e),_config:{tooltip:"sys.pageDesigner.buttonConfirm"}},{component:"texteare-editor",name:"confirmText",label:"sys.pageDesigner.regHint",group:r.ButtonStyle,_config:{i18n:!0,placeholder:"sys.pageDesigner.confirmTodo"},hidden:e=>!e.props.confirm||s(e)}]),so=a("buttonStyleEditor",[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:S.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:S.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}]),co=a("fixedAlignEditor",[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:r.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:f.LEFT},{label:"sys.pageDesigner.none",value:f.NONE},{label:"sys.pageDesigner.right",value:f.RIGHT}]}}]),go=a("formItemProps",{field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...O}),uo=a("formItemDisplayEditor",[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:r.BASIC,hidden:e=>e.platform===A.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:r.BASIC,hidden:e=>!e.props.showExplain,_config:{i18n:!0}},{component:"switch-editor",name:"displayLabelText",label:"sys.pageDesigner.displayLabelText",group:r.ADVANCED},{component:"switch-editor",name:"disabled",label:"sys.pageDesigner.disabled",group:r.ADVANCED},{component:"switch-editor",name:"readonly",label:"sys.pageDesigner.readonly",group:r.ADVANCED},...J]),bo=a("permissionEditor",[{component:"permission-editor",label:"",group:r.PERMISSION,hidden:e=>s(e)}]);function P(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new t}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useStyle } from './useStyle';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export declare function useStyle(widget: LowCodeWidget.BasicSchema): {
|
|
3
|
+
wrapperStyle: import('vue').ComputedRef<any>;
|
|
4
|
+
wStyle: import('vue').ComputedRef<any>;
|
|
5
|
+
labelFont: import('vue').ComputedRef<any>;
|
|
6
|
+
contentFont: import('vue').ComputedRef<any>;
|
|
7
|
+
};
|
|
8
|
+
export declare const schemaToStyle: (schema: any) => any;
|
|
9
|
+
export declare function propsToStyle(styleProps?: any): any;
|
|
10
|
+
export declare const transAlign2flex: {
|
|
11
|
+
left: string;
|
|
12
|
+
center: string;
|
|
13
|
+
right: string;
|
|
14
|
+
justify: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { notNeedPxStyle } from '../schema/common-config/common-style.mjs';
|
|
3
|
+
import { pick, isEmpty, isNil } from 'lodash-es';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function pxToVw(pxValue) {
|
|
7
|
+
if (import.meta.env.VITE_APP_ENV === "mobile") {
|
|
8
|
+
return pxValue / 375 * 100 + "vw";
|
|
9
|
+
} else {
|
|
10
|
+
return pxValue + "px";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const cmpStyle = {
|
|
14
|
+
fontAttrs: [
|
|
15
|
+
"fontWeight",
|
|
16
|
+
"fontSize",
|
|
17
|
+
"color",
|
|
18
|
+
"textDecorationLine",
|
|
19
|
+
"textAlign"
|
|
20
|
+
],
|
|
21
|
+
mapAttrs: {
|
|
22
|
+
bold: {
|
|
23
|
+
attr: "fontWeight",
|
|
24
|
+
callback: (value) => {
|
|
25
|
+
return value ? 700 : 400;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
italic: {
|
|
29
|
+
attr: "fontStyle",
|
|
30
|
+
callback: (value) => {
|
|
31
|
+
return value ? "italic" : "normal";
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
textDecoration: {
|
|
35
|
+
attr: "textDecorationLine"
|
|
36
|
+
},
|
|
37
|
+
fontSize: {
|
|
38
|
+
attr: "fontSize",
|
|
39
|
+
callback: (value) => {
|
|
40
|
+
return value ? pxToVw(value) : "";
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
align: {
|
|
44
|
+
attr: "textAlign"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
// 获取font样式,
|
|
48
|
+
font(font) {
|
|
49
|
+
if (!font) return {};
|
|
50
|
+
const o = {};
|
|
51
|
+
Object.assign(o, pick(font, cmpStyle.fontAttrs));
|
|
52
|
+
if (typeof cmpStyle.mapAttrs === "object") {
|
|
53
|
+
Object.keys(cmpStyle.mapAttrs).forEach((k) => {
|
|
54
|
+
const { attr, callback } = cmpStyle.mapAttrs[k];
|
|
55
|
+
o[attr] = typeof callback === "function" ? callback(font[k]) : font[k];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return o;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function useStyle(widget) {
|
|
62
|
+
const { style = {}, ignoringStyle = [] } = widget || {};
|
|
63
|
+
const wStyle = computed(() => {
|
|
64
|
+
return propsToStyle(style);
|
|
65
|
+
});
|
|
66
|
+
const wrapperStyle = computed(() => {
|
|
67
|
+
const styleData = {
|
|
68
|
+
position: isEmpty(style.position) ? "" : style.position + " !important",
|
|
69
|
+
top: isEmpty(style.top) ? "" : style.top + "px !important",
|
|
70
|
+
left: isEmpty(style.left) ? "" : style.left + "px !important",
|
|
71
|
+
right: isEmpty(style.right) ? "" : style.right + "px !important",
|
|
72
|
+
bottom: isEmpty(style.bottom) ? "" : style.bottom + "px !important",
|
|
73
|
+
width: isEmpty(style.width) ? "" : style.width + "px !important",
|
|
74
|
+
height: isEmpty(style.height) ? "" : style.height + "px !important",
|
|
75
|
+
backgroundColor: isEmpty(style.backgroundColor) ? "" : style.backgroundColor + " !important",
|
|
76
|
+
marginTop: isEmpty(style.marginTop) ? "" : style.marginTop + "px !important",
|
|
77
|
+
marginRight: isEmpty(style.marginRight) ? "" : style.marginRight + "px !important",
|
|
78
|
+
marginBottom: isEmpty(style.marginBottom) ? "" : style.marginBottom + "px !important",
|
|
79
|
+
marginLeft: isEmpty(style.marginLeft) ? "" : style.marginLeft + "px !important",
|
|
80
|
+
paddingTop: isEmpty(style.paddingTop) ? "" : style.paddingTop + "px !important",
|
|
81
|
+
paddingRight: isEmpty(style.paddingRight) ? "" : style.paddingRight + "px !important",
|
|
82
|
+
paddingBottom: isEmpty(style.paddingBottom) ? "" : style.paddingBottom + "px !important",
|
|
83
|
+
paddingLeft: isEmpty(style.paddingLeft) ? "" : style.paddingLeft + "px !important",
|
|
84
|
+
borderLeft: `${style.borderLeft?.borderWidth}px ${style.borderLeft?.borderStyle} ${style.borderLeft?.borderColor} !important`,
|
|
85
|
+
borderRight: `${style.borderRight?.borderWidth}px ${style.borderRight?.borderStyle} ${style.borderRight?.borderColor} !important`,
|
|
86
|
+
borderBottom: `${style.borderBottom?.borderWidth}px ${style.borderBottom?.borderStyle} ${style.borderBottom?.borderColor} !important`,
|
|
87
|
+
borderTop: `${style.borderTop?.borderWidth}px ${style.borderTop?.borderStyle} ${style.borderTop?.borderColor} !important`,
|
|
88
|
+
borderTopRightRadius: isEmpty(style.borderTopRightRadius) ? "" : style.borderTopRightRadius + "px !important",
|
|
89
|
+
borderTopLeftRadius: isEmpty(style.borderTopLeftRadius) ? "" : style.borderTopLeftRadius + "px !important",
|
|
90
|
+
borderBottomRightRadius: isEmpty(style.borderBottomRightRadius) ? "" : style.borderBottomRightRadius + "px !important",
|
|
91
|
+
borderBottomLeftRadius: isEmpty(style.borderBottomLeftRadius) ? "" : style.borderBottomLeftRadius + "px !important"
|
|
92
|
+
};
|
|
93
|
+
ignoringStyle.forEach((key) => {
|
|
94
|
+
styleData[key] = void 0;
|
|
95
|
+
});
|
|
96
|
+
return styleData;
|
|
97
|
+
});
|
|
98
|
+
const labelFont = computed(() => {
|
|
99
|
+
return cmpStyle.font(style.labelFont);
|
|
100
|
+
});
|
|
101
|
+
const contentFont = computed(() => {
|
|
102
|
+
return cmpStyle.font(style.contentFont);
|
|
103
|
+
});
|
|
104
|
+
return {
|
|
105
|
+
wrapperStyle,
|
|
106
|
+
wStyle,
|
|
107
|
+
labelFont,
|
|
108
|
+
contentFont
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const schemaToStyle = (schema) => cmpStyle.font(schema);
|
|
112
|
+
function propsToStyle(styleProps = {}) {
|
|
113
|
+
const wStyle = {};
|
|
114
|
+
for (const prop in styleProps) {
|
|
115
|
+
wStyle[prop] = makeStyleProp(prop, styleProps[prop]);
|
|
116
|
+
}
|
|
117
|
+
return wStyle;
|
|
118
|
+
}
|
|
119
|
+
function makeStyleProp(prop, value) {
|
|
120
|
+
if (isNil(value) || isEmpty(value)) {
|
|
121
|
+
return "";
|
|
122
|
+
}
|
|
123
|
+
if (notNeedPxStyle.includes(prop)) {
|
|
124
|
+
return value + " !important";
|
|
125
|
+
}
|
|
126
|
+
return value + "px !important";
|
|
127
|
+
}
|
|
128
|
+
const transAlign2flex = {
|
|
129
|
+
left: "flex-start",
|
|
130
|
+
center: "center",
|
|
131
|
+
right: "flex-end",
|
|
132
|
+
justify: "space-between"
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export { propsToStyle, schemaToStyle, transAlign2flex, useStyle };
|
package/es/index.d.ts
ADDED
package/es/index.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './utils/index.mjs';
|
|
2
|
+
import './hooks/index.mjs';
|
|
3
|
+
import './interface/index.mjs';
|
|
4
|
+
import './schema/index.mjs';
|
|
5
|
+
import { MessageUtil } from './utils/message/message.mjs';
|
|
6
|
+
export { useStyle } from './hooks/useStyle.mjs';
|
|
7
|
+
export { getAutofillEditor } from './schema/common-config/autofill-editor-config.mjs';
|
|
8
|
+
export { baseBtnEditor, baseBtnProp } from './schema/common-config/base-button-config.mjs';
|
|
9
|
+
export { buttonEditor, buttonProps, buttonStyleEditor } from './schema/common-config/button-editor-config.mjs';
|
|
10
|
+
export { hiddenButtonProps } from './schema/common-config/button-props-func.mjs';
|
|
11
|
+
export { fixedAlignEditor } from './schema/common-config/column-editor-config.mjs';
|
|
12
|
+
export { notNeedPxStyle, style } from './schema/common-config/common-style.mjs';
|
|
13
|
+
export { displayEditor, displayProps } from './schema/common-config/display-editor-config.mjs';
|
|
14
|
+
export { formItemDisplayEditor, formItemProps } from './schema/common-config/formItem-editor-config.mjs';
|
|
15
|
+
export { permissionEditor } from './schema/common-config/permission-editor-config.mjs';
|
|
16
|
+
|
|
17
|
+
"use strict";
|
|
18
|
+
function install() {
|
|
19
|
+
if (!window._gct) {
|
|
20
|
+
console.error(
|
|
21
|
+
"\u672A\u627E\u5230 _gct \u5BF9\u8C61\uFF0C\u8BF7\u5148\u5B89\u88C5 @gct-paas/core \u5305\u540E\u518D\u5B89\u88C5 @gct-paas/design \u5305\uFF01"
|
|
22
|
+
);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
window._gct.message = new MessageUtil();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { install as default, install };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PluginCompProps } from './plugin-comp-props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 插件组件输入参数
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @interface PluginCompProps
|
|
7
|
+
*/
|
|
8
|
+
export interface PluginCompProps {
|
|
9
|
+
/**
|
|
10
|
+
* 组件配置模型
|
|
11
|
+
*
|
|
12
|
+
* @type {LowCodeWidget.BasicSchema}
|
|
13
|
+
*/
|
|
14
|
+
widget: LowCodeWidget.BasicSchema;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const SHOW_FIELD_TYPE = [
|
|
5
|
+
FIELD_TYPE.REF,
|
|
6
|
+
FIELD_TYPE.USER,
|
|
7
|
+
FIELD_TYPE.ORG,
|
|
8
|
+
FIELD_TYPE.RDO_REF,
|
|
9
|
+
FIELD_TYPE.ATTACHMENT
|
|
10
|
+
];
|
|
11
|
+
const getAutofillEditor = ({
|
|
12
|
+
groupName
|
|
13
|
+
}) => {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
component: "switch-editor",
|
|
17
|
+
name: "enableAutofill",
|
|
18
|
+
label: "sys.pageDesigner.autofill",
|
|
19
|
+
group: groupName,
|
|
20
|
+
hidden: (widget) => {
|
|
21
|
+
if (widget.props.bindFieldKey || widget.props.fieldReadonly) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
return !SHOW_FIELD_TYPE.includes(widget.props.fieldType) || widget.props.multiple;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
component: "autofill-editor",
|
|
29
|
+
name: "autofillRules",
|
|
30
|
+
label: "",
|
|
31
|
+
group: groupName,
|
|
32
|
+
hidden: (widget) => {
|
|
33
|
+
if (widget.props.bindFieldKey || widget.props.fieldReadonly) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return (
|
|
37
|
+
// 如果不是这些字段类型/是多选模式/或者没开启自动填充 则隐藏
|
|
38
|
+
!SHOW_FIELD_TYPE.includes(widget.props.fieldType) || widget.props.enableAutofill === false || widget.props.multiple
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { getAutofillEditor };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ButtonSize, ButtonStyle, operateSysEnums, LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export interface BaseButtonProps extends LowCodeWidget.WidgetProps {
|
|
3
|
+
/**
|
|
4
|
+
* 关联表单
|
|
5
|
+
*/
|
|
6
|
+
refForm?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 关联列表
|
|
9
|
+
*/
|
|
10
|
+
refList?: string;
|
|
11
|
+
/**标题 */
|
|
12
|
+
title: string;
|
|
13
|
+
/**二次确认 */
|
|
14
|
+
confirm?: boolean;
|
|
15
|
+
confirmText?: string;
|
|
16
|
+
/**内置事件 */
|
|
17
|
+
innerEvent?: boolean;
|
|
18
|
+
/**系统事件类型 */
|
|
19
|
+
sysMethedType?: operateSysEnums;
|
|
20
|
+
linkPage?: string;
|
|
21
|
+
/**事件名称 */
|
|
22
|
+
eventName?: string;
|
|
23
|
+
/**显示规则 */
|
|
24
|
+
icon: string;
|
|
25
|
+
iconColor: string;
|
|
26
|
+
size: ButtonSize;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
/**是否显示按钮名称 */
|
|
29
|
+
hasText: boolean;
|
|
30
|
+
/**是否显示图标 */
|
|
31
|
+
hasIcon: boolean;
|
|
32
|
+
/**按钮type */
|
|
33
|
+
type: string;
|
|
34
|
+
/**是否是危险类型 */
|
|
35
|
+
danger: boolean;
|
|
36
|
+
/**关联模型 */
|
|
37
|
+
model?: string;
|
|
38
|
+
i18nConfig?: string;
|
|
39
|
+
buttonStyle?: ButtonStyle;
|
|
40
|
+
enableCustomColor: boolean;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
fontColor?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const baseBtnProp: BaseButtonProps;
|
|
45
|
+
export declare const baseBtnEditor: LowCodeWidget.PropEditor[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ButtonSize, ButtonType, ButtonStyle, PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { displayProps } from './display-editor-config.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const baseBtnProp = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
icon: "icon-park:all-application",
|
|
8
|
+
iconColor: "",
|
|
9
|
+
/**标题 */
|
|
10
|
+
title: "${sys.pageDesigner.button}",
|
|
11
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
12
|
+
/**二次确认 */
|
|
13
|
+
confirm: false,
|
|
14
|
+
confirmText: "",
|
|
15
|
+
// /**内置事件 */
|
|
16
|
+
// innerEvent: true,
|
|
17
|
+
/**系统事件类型 */
|
|
18
|
+
// sysMethedType: undefined,
|
|
19
|
+
// linkPage: '',
|
|
20
|
+
/**事件名称 */
|
|
21
|
+
// eventName: '',
|
|
22
|
+
hasIcon: false,
|
|
23
|
+
hasText: true,
|
|
24
|
+
type: ButtonType.PRIMARY,
|
|
25
|
+
danger: false,
|
|
26
|
+
size: ButtonSize.DEFAULT,
|
|
27
|
+
enableCustomColor: false,
|
|
28
|
+
backgroundColor: "",
|
|
29
|
+
fontColor: "",
|
|
30
|
+
...displayProps
|
|
31
|
+
};
|
|
32
|
+
const baseBtnEditor = [
|
|
33
|
+
{
|
|
34
|
+
component: "text-editor",
|
|
35
|
+
name: "title",
|
|
36
|
+
label: "sys.pageDesigner.buttonName",
|
|
37
|
+
group: PropGroup.BASIC,
|
|
38
|
+
_config: {
|
|
39
|
+
i18n: true,
|
|
40
|
+
showCount: true,
|
|
41
|
+
maxlength: 32
|
|
42
|
+
},
|
|
43
|
+
changeCallback: (widget, val) => {
|
|
44
|
+
widget.alias = val;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
component: "button-type-editor",
|
|
49
|
+
name: {
|
|
50
|
+
type: "type",
|
|
51
|
+
danger: "danger",
|
|
52
|
+
icon: "icon",
|
|
53
|
+
label: "label",
|
|
54
|
+
hasText: "hasText",
|
|
55
|
+
hasIcon: "hasIcon"
|
|
56
|
+
},
|
|
57
|
+
label: "sys.pageDesigner.buttonType",
|
|
58
|
+
group: PropGroup.BUTTON
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
component: "icon-editor",
|
|
62
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
63
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
64
|
+
group: PropGroup.BUTTON,
|
|
65
|
+
// _config: {
|
|
66
|
+
// showColor: true,
|
|
67
|
+
// },
|
|
68
|
+
hidden: (widget) => {
|
|
69
|
+
return !widget.props.hasIcon;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
component: "radio-bgc-editor",
|
|
74
|
+
name: "size",
|
|
75
|
+
label: "sys.pageDesigner.buttonSize",
|
|
76
|
+
group: PropGroup.BUTTON,
|
|
77
|
+
_config: {
|
|
78
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
79
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export { baseBtnEditor, baseBtnProp };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonColorType, ButtonColorTheme, ButtonStyle, LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export declare const buttonProps: {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
buttonTheme: ButtonColorTheme;
|
|
5
|
+
buttonType: ButtonColorType;
|
|
6
|
+
icon: string;
|
|
7
|
+
iconColor: string;
|
|
8
|
+
buttonStyle: ButtonStyle;
|
|
9
|
+
enableCustomColor: boolean;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const buttonEditor: LowCodeWidget.PropEditor[];
|
|
14
|
+
export declare const buttonStyleEditor: LowCodeWidget.StyleEditor[];
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ButtonStyle, ButtonColorType, ButtonColorTheme, PropGroup, ButtonSize, StyleGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const buttonProps = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
buttonTheme: ButtonColorTheme.DEFAULT,
|
|
8
|
+
buttonType: ButtonColorType.DEFAULT,
|
|
9
|
+
icon: "",
|
|
10
|
+
iconColor: "",
|
|
11
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
12
|
+
enableCustomColor: false,
|
|
13
|
+
backgroundColor: "",
|
|
14
|
+
fontColor: ""
|
|
15
|
+
};
|
|
16
|
+
const buttonEditor = [
|
|
17
|
+
{
|
|
18
|
+
component: "button-type-editor",
|
|
19
|
+
name: {
|
|
20
|
+
type: "type",
|
|
21
|
+
danger: "danger",
|
|
22
|
+
icon: "icon",
|
|
23
|
+
label: "label",
|
|
24
|
+
hasText: "hasText",
|
|
25
|
+
hasIcon: "hasIcon"
|
|
26
|
+
},
|
|
27
|
+
label: "sys.pageDesigner.buttonType",
|
|
28
|
+
group: PropGroup.ButtonStyle,
|
|
29
|
+
hidden: (widget) => {
|
|
30
|
+
return hiddenButtonProps(widget);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
component: "icon-editor",
|
|
35
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
36
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
37
|
+
group: PropGroup.ButtonStyle,
|
|
38
|
+
hidden: (widget) => {
|
|
39
|
+
return !widget.props.hasIcon || hiddenButtonProps(widget);
|
|
40
|
+
},
|
|
41
|
+
_config: {
|
|
42
|
+
clearable: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
component: "switch-editor",
|
|
47
|
+
name: "enableCustomColor",
|
|
48
|
+
label: "sys.pageDesigner.customBtnColor",
|
|
49
|
+
group: PropGroup.ButtonStyle,
|
|
50
|
+
hidden: (widget) => {
|
|
51
|
+
return hiddenButtonProps(widget);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
component: "button-color-editor",
|
|
56
|
+
name: "fontColor",
|
|
57
|
+
label: "sys.pageDesigner.buttonNameColor",
|
|
58
|
+
group: PropGroup.ButtonStyle,
|
|
59
|
+
_config: {
|
|
60
|
+
isInRow: true
|
|
61
|
+
},
|
|
62
|
+
hidden: (widget) => {
|
|
63
|
+
return !widget.props.enableCustomColor;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
component: "button-color-editor",
|
|
68
|
+
name: "backgroundColor",
|
|
69
|
+
label: "sys.pageDesigner.buttonStyleColor",
|
|
70
|
+
group: PropGroup.ButtonStyle,
|
|
71
|
+
_config: {
|
|
72
|
+
isInRow: true
|
|
73
|
+
},
|
|
74
|
+
hidden: (widget) => {
|
|
75
|
+
return !widget.props.enableCustomColor || widget.props.type === "link";
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
component: "radio-bgc-editor",
|
|
80
|
+
name: "size",
|
|
81
|
+
label: "sys.pageDesigner.buttonSize",
|
|
82
|
+
group: PropGroup.ButtonStyle,
|
|
83
|
+
hidden: (widget) => {
|
|
84
|
+
return !!widget;
|
|
85
|
+
},
|
|
86
|
+
_config: {
|
|
87
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
88
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
component: "switch-editor",
|
|
94
|
+
name: "confirm",
|
|
95
|
+
label: "sys.pageDesigner.confirm",
|
|
96
|
+
group: PropGroup.ButtonStyle,
|
|
97
|
+
hidden: (widget) => {
|
|
98
|
+
return hiddenButtonProps(widget);
|
|
99
|
+
},
|
|
100
|
+
_config: {
|
|
101
|
+
tooltip: "sys.pageDesigner.buttonConfirm"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
component: "texteare-editor",
|
|
106
|
+
name: "confirmText",
|
|
107
|
+
label: "sys.pageDesigner.regHint",
|
|
108
|
+
group: PropGroup.ButtonStyle,
|
|
109
|
+
_config: {
|
|
110
|
+
i18n: true,
|
|
111
|
+
placeholder: "sys.pageDesigner.confirmTodo"
|
|
112
|
+
},
|
|
113
|
+
hidden: (widget) => {
|
|
114
|
+
return !widget.props.confirm || hiddenButtonProps(widget);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
const buttonStyleEditor = [
|
|
119
|
+
{
|
|
120
|
+
component: "position-editor",
|
|
121
|
+
name: "position",
|
|
122
|
+
label: "sys.pageDesigner.position",
|
|
123
|
+
group: StyleGroup.LAYOUT,
|
|
124
|
+
// 按钮容器中的按钮不需要样式属性
|
|
125
|
+
hidden: (widget) => {
|
|
126
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
component: "margin-editor",
|
|
131
|
+
group: StyleGroup.MARGIN,
|
|
132
|
+
// 按钮容器中的按钮不需要样式属性
|
|
133
|
+
hidden: (widget) => {
|
|
134
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
135
|
+
},
|
|
136
|
+
_config: {
|
|
137
|
+
hiddenMarginOrPadding: "padding"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
export { buttonEditor, buttonProps, buttonStyleEditor };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function hiddenButtonProps(widget) {
|
|
3
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "model")) {
|
|
4
|
+
return !widget.props.model;
|
|
5
|
+
}
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "refForm")) {
|
|
7
|
+
return !widget.props.refForm;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { hiddenButtonProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { fixedAlignENUM, PropGroup } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const fixedAlignEditor = [
|
|
5
|
+
{
|
|
6
|
+
component: "radio-icon-editor",
|
|
7
|
+
name: "fixedAlign",
|
|
8
|
+
label: "sys.pageDesigner.columnFixed",
|
|
9
|
+
group: PropGroup.SHOW,
|
|
10
|
+
_config: {
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
label: "sys.pageDesigner.left",
|
|
14
|
+
value: fixedAlignENUM.LEFT
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "sys.pageDesigner.none",
|
|
18
|
+
value: fixedAlignENUM.NONE
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "sys.pageDesigner.right",
|
|
22
|
+
value: fixedAlignENUM.RIGHT
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
export { fixedAlignEditor };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { BorderStyle, TagTypeEnum, TextDecoration } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const style = {
|
|
5
|
+
position: "",
|
|
6
|
+
top: "",
|
|
7
|
+
left: "",
|
|
8
|
+
right: "",
|
|
9
|
+
bottom: "",
|
|
10
|
+
width: "",
|
|
11
|
+
height: "",
|
|
12
|
+
backgroundColor: "",
|
|
13
|
+
marginAll: "",
|
|
14
|
+
marginTop: "",
|
|
15
|
+
marginRight: "",
|
|
16
|
+
marginBottom: "",
|
|
17
|
+
marginLeft: "",
|
|
18
|
+
paddingAll: "",
|
|
19
|
+
paddingTop: "",
|
|
20
|
+
paddingRight: "",
|
|
21
|
+
paddingBottom: "",
|
|
22
|
+
paddingLeft: "",
|
|
23
|
+
labelFont: {
|
|
24
|
+
align: "left",
|
|
25
|
+
fontSize: "",
|
|
26
|
+
bold: false,
|
|
27
|
+
italic: false,
|
|
28
|
+
textDecoration: TextDecoration.NONE,
|
|
29
|
+
color: ""
|
|
30
|
+
},
|
|
31
|
+
contentFont: {
|
|
32
|
+
align: "left",
|
|
33
|
+
fontSize: "",
|
|
34
|
+
bold: false,
|
|
35
|
+
italic: false,
|
|
36
|
+
textDecoration: TextDecoration.NONE,
|
|
37
|
+
color: ""
|
|
38
|
+
},
|
|
39
|
+
tagStyle: {
|
|
40
|
+
color: "",
|
|
41
|
+
tagType: TagTypeEnum.RADIUS
|
|
42
|
+
},
|
|
43
|
+
tagStyleOpen: false,
|
|
44
|
+
borderAll: {
|
|
45
|
+
borderStyle: BorderStyle.NONE,
|
|
46
|
+
borderColor: "#F0F0F0",
|
|
47
|
+
borderWidth: "1"
|
|
48
|
+
},
|
|
49
|
+
borderLeft: {
|
|
50
|
+
borderStyle: BorderStyle.NONE,
|
|
51
|
+
borderColor: "#F0F0F0",
|
|
52
|
+
borderWidth: "1"
|
|
53
|
+
},
|
|
54
|
+
borderRight: {
|
|
55
|
+
borderStyle: BorderStyle.NONE,
|
|
56
|
+
borderColor: "#F0F0F0",
|
|
57
|
+
borderWidth: "1"
|
|
58
|
+
},
|
|
59
|
+
borderBottom: {
|
|
60
|
+
borderStyle: BorderStyle.NONE,
|
|
61
|
+
borderColor: "#F0F0F0",
|
|
62
|
+
borderWidth: "1"
|
|
63
|
+
},
|
|
64
|
+
borderTop: {
|
|
65
|
+
borderStyle: BorderStyle.NONE,
|
|
66
|
+
borderColor: "#F0F0F0",
|
|
67
|
+
borderWidth: "1"
|
|
68
|
+
},
|
|
69
|
+
borderTopRightRadius: "0",
|
|
70
|
+
borderTopLeftRadius: "0",
|
|
71
|
+
borderBottomRightRadius: "0",
|
|
72
|
+
borderBottomLeftRadius: "0",
|
|
73
|
+
borderAllRadius: "0"
|
|
74
|
+
};
|
|
75
|
+
const notNeedPxStyle = [
|
|
76
|
+
"position",
|
|
77
|
+
"backgroundColor",
|
|
78
|
+
"bold",
|
|
79
|
+
"italic",
|
|
80
|
+
"textDecoration",
|
|
81
|
+
"color",
|
|
82
|
+
"borderStyle",
|
|
83
|
+
"borderColor"
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
export { notNeedPxStyle, style };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Dependency_ENUM, ASSIGNMENTSTRATEGY_ENUM, PropGroup, MaterialEnum, FormComponents, FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const displayProps = {
|
|
6
|
+
////显隐配置start
|
|
7
|
+
hidden: false,
|
|
8
|
+
// displayType: DisplayType.CONFIG,
|
|
9
|
+
// displayRule: '',
|
|
10
|
+
componentDependency: {
|
|
11
|
+
sortDependency: [],
|
|
12
|
+
configDependency: {
|
|
13
|
+
/**隐藏 */
|
|
14
|
+
[Dependency_ENUM.HIDDEN]: {
|
|
15
|
+
expression: ""
|
|
16
|
+
},
|
|
17
|
+
/**只读 */
|
|
18
|
+
[Dependency_ENUM.READONLY]: {
|
|
19
|
+
expression: ""
|
|
20
|
+
},
|
|
21
|
+
/**禁用 */
|
|
22
|
+
[Dependency_ENUM.DISABLED]: {
|
|
23
|
+
expression: ""
|
|
24
|
+
},
|
|
25
|
+
/**必填 */
|
|
26
|
+
[Dependency_ENUM.REQUIRED]: {
|
|
27
|
+
expression: ""
|
|
28
|
+
},
|
|
29
|
+
[Dependency_ENUM.ASSIGNMENT]: {
|
|
30
|
+
expression: "",
|
|
31
|
+
strategy: ASSIGNMENTSTRATEGY_ENUM.alwaysCover
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const displayEditor = [
|
|
37
|
+
{
|
|
38
|
+
component: "dependency-editor",
|
|
39
|
+
name: "componentDependency",
|
|
40
|
+
label: "",
|
|
41
|
+
group: PropGroup.COMPONENTDEPENDENCY,
|
|
42
|
+
hidden: (widget) => {
|
|
43
|
+
if (widget.materialType === MaterialEnum.MaterialEmbedTableField) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (widget.type === FormComponents.Form && widget.preLocation) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return hiddenButtonProps(widget);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
component: "switch-editor",
|
|
54
|
+
name: "notSubmitInHide",
|
|
55
|
+
label: "sys.pageDesigner.submitWhenHidden",
|
|
56
|
+
group: PropGroup.FIELD_CONFIG,
|
|
57
|
+
hidden(widget) {
|
|
58
|
+
return !widget.isField || !widget.props.field || !!widget.props.bindFieldKey || !!widget.props.fieldReadonly || widget.materialType === MaterialEnum.cardListFormField || [
|
|
59
|
+
FIELD_TYPE.EXPRESSION_CONDITION,
|
|
60
|
+
FIELD_TYPE.SERIALRULE,
|
|
61
|
+
FIELD_TYPE.LABEL_TEMPLATE
|
|
62
|
+
].includes(widget.props.fieldType);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
export { displayEditor, displayProps };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PropGroup, Platform } from '@gct-paas/core';
|
|
2
|
+
import { displayProps, displayEditor } from './display-editor-config.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const formItemProps = {
|
|
6
|
+
field: "",
|
|
7
|
+
fieldId: "",
|
|
8
|
+
label: "",
|
|
9
|
+
modelKey: "",
|
|
10
|
+
fieldType: void 0,
|
|
11
|
+
bindModelKey: void 0,
|
|
12
|
+
disabled: false,
|
|
13
|
+
explain: "",
|
|
14
|
+
showExplain: false,
|
|
15
|
+
displayLabelText: true,
|
|
16
|
+
readonly: false,
|
|
17
|
+
fieldReadonly: false,
|
|
18
|
+
notSubmitInHide: true,
|
|
19
|
+
...displayProps
|
|
20
|
+
};
|
|
21
|
+
const formItemDisplayEditor = [
|
|
22
|
+
{
|
|
23
|
+
component: "switch-editor",
|
|
24
|
+
name: "showExplain",
|
|
25
|
+
label: "sys.pageDesigner.explain",
|
|
26
|
+
group: PropGroup.BASIC,
|
|
27
|
+
hidden: (widget) => {
|
|
28
|
+
return widget.platform === Platform.MOBILE;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
component: "texteare-editor",
|
|
33
|
+
name: "explain",
|
|
34
|
+
label: "",
|
|
35
|
+
group: PropGroup.BASIC,
|
|
36
|
+
hidden: (widget) => {
|
|
37
|
+
return !widget.props.showExplain;
|
|
38
|
+
},
|
|
39
|
+
_config: {
|
|
40
|
+
i18n: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
component: "switch-editor",
|
|
45
|
+
name: "displayLabelText",
|
|
46
|
+
label: "sys.pageDesigner.displayLabelText",
|
|
47
|
+
group: PropGroup.ADVANCED
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
component: "switch-editor",
|
|
51
|
+
name: "disabled",
|
|
52
|
+
label: "sys.pageDesigner.disabled",
|
|
53
|
+
group: PropGroup.ADVANCED
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
component: "switch-editor",
|
|
57
|
+
name: "readonly",
|
|
58
|
+
label: "sys.pageDesigner.readonly",
|
|
59
|
+
group: PropGroup.ADVANCED
|
|
60
|
+
},
|
|
61
|
+
...displayEditor
|
|
62
|
+
// {
|
|
63
|
+
// component: 'switch-editor',
|
|
64
|
+
// name: 'notSubmitInHide',
|
|
65
|
+
// label: 'sys.pageDesigner.notSubmitInHide',
|
|
66
|
+
// group: PropGroup.DISPLAY,
|
|
67
|
+
// },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export { formItemDisplayEditor, formItemProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const permissionEditor = [
|
|
6
|
+
{
|
|
7
|
+
component: "permission-editor",
|
|
8
|
+
label: "",
|
|
9
|
+
group: PropGroup.PERMISSION,
|
|
10
|
+
hidden: (widget) => {
|
|
11
|
+
return hiddenButtonProps(widget);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export { permissionEditor };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { getAutofillEditor } from './common-config/autofill-editor-config';
|
|
2
|
+
export { baseBtnEditor, baseBtnProp } from './common-config/base-button-config';
|
|
3
|
+
export { buttonEditor, buttonProps, buttonStyleEditor, } from './common-config/button-editor-config';
|
|
4
|
+
export { hiddenButtonProps } from './common-config/button-props-func';
|
|
5
|
+
export { fixedAlignEditor } from './common-config/column-editor-config';
|
|
6
|
+
export { style, notNeedPxStyle } from './common-config/common-style';
|
|
7
|
+
export { displayEditor, displayProps, } from './common-config/display-editor-config';
|
|
8
|
+
export { formItemProps, formItemDisplayEditor, } from './common-config/formItem-editor-config';
|
|
9
|
+
export { permissionEditor } from './common-config/permission-editor-config';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { getAutofillEditor } from './common-config/autofill-editor-config.mjs';
|
|
2
|
+
export { baseBtnEditor, baseBtnProp } from './common-config/base-button-config.mjs';
|
|
3
|
+
export { buttonEditor, buttonProps, buttonStyleEditor } from './common-config/button-editor-config.mjs';
|
|
4
|
+
export { hiddenButtonProps } from './common-config/button-props-func.mjs';
|
|
5
|
+
export { fixedAlignEditor } from './common-config/column-editor-config.mjs';
|
|
6
|
+
export { notNeedPxStyle, style } from './common-config/common-style.mjs';
|
|
7
|
+
export { displayEditor, displayProps } from './common-config/display-editor-config.mjs';
|
|
8
|
+
export { formItemDisplayEditor, formItemProps } from './common-config/formItem-editor-config.mjs';
|
|
9
|
+
export { permissionEditor } from './common-config/permission-editor-config.mjs';
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@gct-paas/core/es/types';
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
type PartialByKeys<T, K extends keyof T> = {
|
|
5
|
+
[P in K]?: T[P];
|
|
6
|
+
} & Pick<T, Exclude<keyof T, K>>;
|
|
7
|
+
|
|
8
|
+
type RequiredByKeys<T, K extends keyof T> = {
|
|
9
|
+
[P in K]: T[P];
|
|
10
|
+
} & Pick<T, Exclude<keyof T, K>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// declare module '@gct-paas/core' {
|
|
14
|
+
// interface GctGlobal {
|
|
15
|
+
// register: {
|
|
16
|
+
// designer: {
|
|
17
|
+
// mobile: DesignerRegister;
|
|
18
|
+
// web: DesignerRegister;
|
|
19
|
+
// };
|
|
20
|
+
// render: {
|
|
21
|
+
// mobile: RenderRegister;
|
|
22
|
+
// web: RenderRegister;
|
|
23
|
+
// };
|
|
24
|
+
// };
|
|
25
|
+
// }
|
|
26
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MessageUtil } from './message/message';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IMessageUtil } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 消息提示工具
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class MessageUtil
|
|
7
|
+
* @implements {IMessageUtil}
|
|
8
|
+
*/
|
|
9
|
+
export declare class MessageUtil implements IMessageUtil {
|
|
10
|
+
info(msg: string, duration?: number): Promise<void>;
|
|
11
|
+
success(msg: string, duration?: number): Promise<void>;
|
|
12
|
+
warning(msg: string, duration?: number): Promise<void>;
|
|
13
|
+
error(msg: string, duration?: number): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { message } from 'ant-design-vue';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class MessageUtil {
|
|
5
|
+
info(msg, duration) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
message.info(msg, duration, () => {
|
|
8
|
+
resolve();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
success(msg, duration) {
|
|
13
|
+
return new Promise((resolve) => {
|
|
14
|
+
message.success(msg, duration, () => {
|
|
15
|
+
resolve();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
warning(msg, duration) {
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
message.warning(msg, duration, () => {
|
|
22
|
+
resolve();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
error(msg, duration) {
|
|
27
|
+
return new Promise((resolve) => {
|
|
28
|
+
message.error(msg, duration, () => {
|
|
29
|
+
resolve();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { MessageUtil };
|
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
|
-
"main": "dist/index.
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"main": "dist/index.min.cjs",
|
|
7
|
+
"module": "es/index.mjs",
|
|
8
|
+
"types": "es/index.d.ts",
|
|
9
|
+
"system": "dist/index.system.min.js",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
|
-
"types": "./
|
|
12
|
-
"import": "./
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
12
|
+
"types": "./es/index.d.ts",
|
|
13
|
+
"import": "./es/index.mjs",
|
|
14
|
+
"require": "./dist/index.min.cjs"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"dist",
|
|
19
|
+
"es",
|
|
18
20
|
"CHANGELOG.md",
|
|
19
21
|
"README.md"
|
|
20
22
|
],
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
"scripts": {
|
|
32
34
|
"dev": "rollup -c -w --environment=NODE_ENV:development",
|
|
33
35
|
"build": "npm run lint && rollup -c --environment=NODE_ENV:production && vite build --mode production --config vite.config.ts",
|
|
34
|
-
"lint": "eslint src
|
|
36
|
+
"lint": "eslint src --fix",
|
|
35
37
|
"publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
|
|
36
38
|
"publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
|
|
37
39
|
"publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
|
|
@@ -39,8 +41,14 @@
|
|
|
39
41
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
40
42
|
},
|
|
41
43
|
"dependencies": {
|
|
42
|
-
"@gct-paas/
|
|
43
|
-
"@gct-paas/core": "0.0.1-dev.
|
|
44
|
+
"@gct-paas/build": "0.0.1-dev.11",
|
|
45
|
+
"@gct-paas/core": "0.0.1-dev.11",
|
|
46
|
+
"ant-design-vue": "3.2.20",
|
|
47
|
+
"qx-util": "^0.4.8",
|
|
48
|
+
"vue": "^3.5.13"
|
|
44
49
|
},
|
|
45
|
-
"
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"vue": "^3.x"
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "3f988584fd9450fa356f802a0316d75ee44a6a27"
|
|
46
54
|
}
|
package/dist/design.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(){console.log("Hello World!")}exports.run=o;
|
package/dist/design.system.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register([],function(e,o){"use strict";return{execute:function(){e("run",n);function n(){console.log("Hello World!")}}}});
|