cnhis-design-vue 3.2.5-beta.0 → 3.2.5-beta.2
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/es/components/button-print/index.d.ts +13 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +13 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +3 -3
- package/es/components/field-set/src/components/Row.vue.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/switch.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -2309,6 +2309,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2309
2309
|
default: string;
|
|
2310
2310
|
type: StringConstructor;
|
|
2311
2311
|
};
|
|
2312
|
+
noDefaultFormatMsg: {
|
|
2313
|
+
default: string;
|
|
2314
|
+
type: StringConstructor;
|
|
2315
|
+
};
|
|
2312
2316
|
token: {
|
|
2313
2317
|
type: StringConstructor;
|
|
2314
2318
|
};
|
|
@@ -2403,6 +2407,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2403
2407
|
default: string;
|
|
2404
2408
|
type: StringConstructor;
|
|
2405
2409
|
};
|
|
2410
|
+
noDefaultFormatMsg: {
|
|
2411
|
+
default: string;
|
|
2412
|
+
type: StringConstructor;
|
|
2413
|
+
};
|
|
2406
2414
|
token: {
|
|
2407
2415
|
type: StringConstructor;
|
|
2408
2416
|
};
|
|
@@ -4178,6 +4186,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4178
4186
|
default: string;
|
|
4179
4187
|
type: StringConstructor;
|
|
4180
4188
|
};
|
|
4189
|
+
noDefaultFormatMsg: {
|
|
4190
|
+
default: string;
|
|
4191
|
+
type: StringConstructor;
|
|
4192
|
+
};
|
|
4181
4193
|
token: {
|
|
4182
4194
|
type: StringConstructor;
|
|
4183
4195
|
};
|
|
@@ -4238,6 +4250,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4238
4250
|
showLoading: boolean;
|
|
4239
4251
|
hideButtons: unknown[];
|
|
4240
4252
|
printCopies: number;
|
|
4253
|
+
noDefaultFormatMsg: string;
|
|
4241
4254
|
}>>;
|
|
4242
4255
|
getProps: import("vue").ComputedRef<Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
4243
4256
|
printParams: {
|
|
@@ -2315,6 +2315,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2315
2315
|
default: string;
|
|
2316
2316
|
type: StringConstructor;
|
|
2317
2317
|
};
|
|
2318
|
+
noDefaultFormatMsg: {
|
|
2319
|
+
default: string;
|
|
2320
|
+
type: StringConstructor;
|
|
2321
|
+
};
|
|
2318
2322
|
token: {
|
|
2319
2323
|
type: StringConstructor;
|
|
2320
2324
|
};
|
|
@@ -2409,6 +2413,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2409
2413
|
default: string;
|
|
2410
2414
|
type: StringConstructor;
|
|
2411
2415
|
};
|
|
2416
|
+
noDefaultFormatMsg: {
|
|
2417
|
+
default: string;
|
|
2418
|
+
type: StringConstructor;
|
|
2419
|
+
};
|
|
2412
2420
|
token: {
|
|
2413
2421
|
type: StringConstructor;
|
|
2414
2422
|
};
|
|
@@ -4184,6 +4192,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4184
4192
|
default: string;
|
|
4185
4193
|
type: StringConstructor;
|
|
4186
4194
|
};
|
|
4195
|
+
noDefaultFormatMsg: {
|
|
4196
|
+
default: string;
|
|
4197
|
+
type: StringConstructor;
|
|
4198
|
+
};
|
|
4187
4199
|
token: {
|
|
4188
4200
|
type: StringConstructor;
|
|
4189
4201
|
};
|
|
@@ -4244,6 +4256,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4244
4256
|
showLoading: boolean;
|
|
4245
4257
|
hideButtons: unknown[];
|
|
4246
4258
|
printCopies: number;
|
|
4259
|
+
noDefaultFormatMsg: string;
|
|
4247
4260
|
}>>;
|
|
4248
4261
|
getProps: import("vue").ComputedRef<Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
4249
4262
|
printParams: {
|
|
@@ -57,6 +57,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
57
|
default: string;
|
|
58
58
|
type: StringConstructor;
|
|
59
59
|
};
|
|
60
|
+
noDefaultFormatMsg: {
|
|
61
|
+
default: string;
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
60
64
|
token: {
|
|
61
65
|
type: StringConstructor;
|
|
62
66
|
};
|
|
@@ -154,6 +158,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
158
|
default: string;
|
|
155
159
|
type: StringConstructor;
|
|
156
160
|
};
|
|
161
|
+
noDefaultFormatMsg: {
|
|
162
|
+
default: string;
|
|
163
|
+
type: StringConstructor;
|
|
164
|
+
};
|
|
157
165
|
token: {
|
|
158
166
|
type: StringConstructor;
|
|
159
167
|
};
|
|
@@ -1932,6 +1940,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1932
1940
|
default: string;
|
|
1933
1941
|
type: StringConstructor;
|
|
1934
1942
|
};
|
|
1943
|
+
noDefaultFormatMsg: {
|
|
1944
|
+
default: string;
|
|
1945
|
+
type: StringConstructor;
|
|
1946
|
+
};
|
|
1935
1947
|
token: {
|
|
1936
1948
|
type: StringConstructor;
|
|
1937
1949
|
};
|
|
@@ -1992,5 +2004,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1992
2004
|
showLoading: boolean;
|
|
1993
2005
|
hideButtons: unknown[];
|
|
1994
2006
|
printCopies: number;
|
|
2007
|
+
noDefaultFormatMsg: string;
|
|
1995
2008
|
}>;
|
|
1996
2009
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,inject as e,ref as n,reactive as i,computed as a,onMounted as r,watch as o,openBlock as s,createElementBlock as l,Fragment as d,createVNode as p,unref as u,withCtx as m,renderSlot as c,withModifiers as f,createTextVNode as v,toDisplayString as y,mergeProps as g}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as h,NDropdown as I,NButton as P,NIcon as w}from"naive-ui";import{ChevronDown as
|
|
1
|
+
import{defineComponent as t,inject as e,ref as n,reactive as i,computed as a,onMounted as r,watch as o,openBlock as s,createElementBlock as l,Fragment as d,createVNode as p,unref as u,withCtx as m,renderSlot as c,withModifiers as f,createTextVNode as v,toDisplayString as y,mergeProps as g}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as h,NDropdown as I,NButton as P,NIcon as w}from"naive-ui";import{ChevronDown as F}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as k}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as S}from"../utils/browserPrint.js";import x from"./IdentityVerification.vue.js";import{format as O}from"date-fns";import{savePrivateFormatApi as j,getPrivateFormatApi as L}from"../api.js";var D=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},noDefaultFormatMsg:{default:"获取打印格式失败,请联系管理员!",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number,default:1}},setup(t,{expose:D}){var E;const M=t,N=h();let C;const V=e(k),B={},R=n(""),z=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null});let A=n([{label:M.printText,key:"printText"},{label:M.previewText,key:"previewText"},{label:M.pdfLoadText,key:"downloadPdf"},{label:M.formatEditText,key:"formatEditText"},...(null==(E=M.externalOptionConfig)?void 0:E.options)||[]]);const J=a((()=>{if(!z.currentFormatId)return{};let t=z.currentFormatId;return z.formatList.find((e=>e.id===t))})),U=a((()=>{var t;return(null==(t=J.value)?void 0:t.name)||"格式选择"})),q=a((()=>{let t=z.formatList.find((t=>t.id===z.currentFormatId));return null==t?void 0:t.templateId})),K=async t=>{if(M.directPrint){if(z.spinning)return;return"button"===t?void await dt():ot()}return ot()},_=t=>p("span",{class:{active:t.key===z.currentFormatId}},[t.label]),G=(t,e)=>{z.spinning=!1;let n={type:e,formatId:z.currentFormatId,templateId:q.value};V("success",t,n)},H=t=>{z.spinning=!1,V("error",t),b(t)&&"notInstalledApp"===t.type&&N.error(t.message)},Y=t=>{z.spinning=!1,V("cancel",t)},$=t=>{V("error",{message:"前置条件执行错误",type:t,preExecution:!0})},Q=(t=0)=>{var e;const n=(null==(e=M.printParams)?void 0:e.length)?M.printParams[t]:z.printParams[t];return JSON.stringify({...n||{},...M.token?{token:M.token}:{}})},W=()=>{var t,e;let n={},i={};if(null==(t=z.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(z.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(z.printParams.map((e=>JSON.parse(e.datasetData[t]))));i={datasetData:{}},i.datasetData[t]=n}else Object.keys(z.printParams[0]).forEach((t=>{i[t]=[],z.printParams.forEach((e=>{i[t].includes(e[t])||i[t].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(Q(0)),i),JSON.stringify(n)},X=()=>{let t=z.printParams.length;const e=async e=>{try{--t<=0&&G(e,"print")}catch(t){console.log("error",t)}};M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("print").then((()=>{const t={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,printdlgshow:M.printdlgshow,signature:M.signature,copies:M.printCopies};if("MULTI"===M.strategy)for(let n=0;n<z.printParams.length;n++)n>0&&(t.printdlgshow="0"),C.printDirect({...t,params:Q(n)},e,H,Y);else C.printDirect({...t,params:W()},(t=>{G(t,"print")}),H,Y)})).catch((()=>{$("print"),z.spinning=!1})).finally((()=>{z.visible=!1})))},Z=async(t,e)=>{var n,i;switch(t){case"printText":X();break;case"previewText":(async()=>{M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("preview").then((()=>{const t="MULTI"===M.strategy?Q():W(),e={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,params:t,btnprint:M.btnprint,signature:M.signature};C.preview(e,(t=>{G(t,"preview")}),H)})).catch((()=>{$("preview"),z.spinning=!1})).finally((()=>{z.visible=!1})))})();break;case"formatEditText":M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("edit").then((()=>{z.identityVerification.visible=!0})).catch((()=>{$("edit")})).finally((()=>{z.visible=!1,z.spinning=!1})));break;case"downloadPdf":(async()=>{M.showLoading&&z.spinning||(z.spinning=!0,M.prevFn("download").then((()=>{const t="MULTI"===M.strategy?Q():W(),e={formatId:z.currentFormatId,templateId:q.value,authorizationKey:R.value,print:{print:"1",type:"1"},params:t,signature:M.signature};C.downloadPDF(e,(t=>G(t,"preview")),H)})).catch((()=>{$("download"),z.spinning=!1})).finally((()=>{z.visible=!1})))})();break;default:{z.visible=!1;const a=z.formatList.find((e=>e.id===t))||{};if(Object.keys(a).length>0){z.currentFormatId=t;const[e]=A.value;e.label=(null==a?void 0:a.name)||e.label,await j({formatForms:[{...a}],name:B.name||a.templateName,number:B.number||a.number,templateId:B.templateId||a.templateId,...B.id?{id:B.id}:{}},{token:M.token})}else null==(i=null==(n=M.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},tt=()=>{z.visible=!1,V("clickoutside")},et=()=>(z.isInited=!1,z.spinning=!1,setTimeout((()=>{z.visible=!1}),0),!1),nt=(t,e,n)=>{const i={};return e.forEach((e=>{let a=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=O(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&a&&(i[e[n]]=a)})),i},it=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData={[t.name]:JSON.stringify(nt(n,e,"fieldName"))}})),i=Object.assign({},i,nt(n,e,"key")),i})),at=async t=>{var e;if(z.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],z.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";const{data:i}=await L({templateId:t[0].templateId},{token:M.token});if("SUCCESS"===i.result){const{formatForms:e=[]}=i.map||{};Object.assign(B,i.map||{});const a=null==(n=null==e?void 0:e[0])?void 0:n.id;if(a&&t.map((t=>t.id)).includes(a))return a}const a=t.find((t=>1==t[e]));return(null==a?void 0:a.id)||t[0].id})(z.formatList,"defaultFlag"),!z.currentFormatId)return N.error(M.noDefaultFormatMsg),et();(()=>{var t;const e=z.formatList.map((t=>({label:t.name,key:t.id})));A.value.unshift({label:U.value,key:"format",children:e}),M.hideButtons.length>0&&(A.value=A.value.filter((t=>!M.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),i=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},a=Object.keys(i);a.includes("RY7.2.21.1.M2.G94181E")||(A.value=A.value.filter((t=>"downloadPdf"!=t.key))),a.includes("RY7.2.21.1.M2.G33633A")||(A.value=A.value.filter((t=>"formatEditText"!=t.key)))}})();let n=null==(e=await M.queryTemplateParams())?void 0:e.obj;if(!n||!q.value)return N.error("获取打印模板失败,请联系管理员!"),et();z.templateParams=n,z.printParams=it(z.templateParams,M.params)},rt=async()=>{var t;if(z.isInited)return!0;z.isInited=!0,z.spinning=!0,(()=>{if(C)return!1;C=new T})();const e=await M.queryPrintFormatByNumber();return await at(e),(null==(t=e.obj)?void 0:t.length)>0&&(R.value=e.obj[0].authorizationKey||""),z.spinning=!1,!0},ot=async(t=!0)=>{var e,n;if(await M.clickPrevFn())if((null==(e=M.params)?void 0:e.length)||(null==(n=M.printParams)?void 0:n.length)){if(!z.visible){if(!await rt())return!1}t&&(z.visible=!z.visible)}else N.warning(M.noDataMsg)},st=()=>{z.watchPrintParamsReformatFn&&z.watchPrintParamsReformatFn(),z.isInited?z.printParams=it(z.templateParams,M.params):z.watchPrintParamsReformatFn=()=>o((()=>z.isInited),(t=>{if(!t)return!1;st()}))},lt=t=>{if(z.identityVerification.visible=!1,S(z.currentFormatId))return G(null,"edit");const e={formatId:z.currentFormatId,templateId:q.value,params:Q(),token:t};C.editPrintFormat(e,(t=>{G(t,"edit")}),H)};async function dt(){await ot(!1),X()}return r((()=>{z.isInited=!1})),o((()=>M.params),(t=>{if(!(null==t?void 0:t.length))return!1;st()}),{deep:!0}),D({directPrint:dt}),(e,n)=>(s(),l(d,null,[p(u(I),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:z.visible,onClickoutside:tt,options:u(A),onSelect:Z,"render-label":_},{default:m((()=>[c(e.$slots,"button",{handleClickPrintBtn:ot,printSpinning:z.spinning,printbtnText:t.btnText,printVisible:z.visible},(()=>[p(u(P),{class:"dropdown-button",loading:t.showLoading&&z.spinning,onClick:n[1]||(n[1]=f((()=>K("button")),["stop"]))},{default:m((()=>[v(y(t.btnText)+" ",1),p(u(w),{component:u(F),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=f((()=>K("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["show","options"]),p(x,g(e.$attrs,{modelValue:z.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>z.identityVerification.visible=t),formatId:z.currentFormatId,templateId:u(q),onSuccess:lt}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
|
|
@@ -475,11 +475,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
475
475
|
hide: boolean;
|
|
476
476
|
}>;
|
|
477
477
|
draggable: boolean;
|
|
478
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
479
|
+
isFieldSet: boolean;
|
|
478
480
|
idx: number;
|
|
479
481
|
isHighlight: boolean;
|
|
480
482
|
isHighlightRow: boolean;
|
|
481
|
-
isFieldSet: boolean;
|
|
482
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
483
483
|
}>;
|
|
484
484
|
EditDialog: import("vue").DefineComponent<{
|
|
485
485
|
visible: {
|
|
@@ -496,11 +496,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
496
496
|
hide: boolean;
|
|
497
497
|
}>;
|
|
498
498
|
draggable: boolean;
|
|
499
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
500
|
+
isFieldSet: boolean;
|
|
499
501
|
idx: number;
|
|
500
502
|
isHighlight: boolean;
|
|
501
503
|
isHighlightRow: boolean;
|
|
502
|
-
isFieldSet: boolean;
|
|
503
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
504
504
|
}>;
|
|
505
505
|
setStyle: typeof setStyle;
|
|
506
506
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -613,11 +613,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
613
613
|
hide: boolean;
|
|
614
614
|
}>;
|
|
615
615
|
draggable: boolean;
|
|
616
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
617
|
+
isFieldSet: boolean;
|
|
616
618
|
idx: number;
|
|
617
619
|
isHighlight: boolean;
|
|
618
620
|
isHighlightRow: boolean;
|
|
619
|
-
isFieldSet: boolean;
|
|
620
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
621
621
|
}>;
|
|
622
622
|
isArray: {
|
|
623
623
|
(value?: any): value is any[];
|
|
@@ -725,10 +725,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
725
725
|
rowDraggable: boolean;
|
|
726
726
|
showSeq: boolean;
|
|
727
727
|
footerFlag: boolean;
|
|
728
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
729
728
|
customColumns: FieldSetColumnItem[];
|
|
730
729
|
showSearch: boolean;
|
|
731
730
|
showSortPriority: boolean;
|
|
732
731
|
showHeadFilter: boolean;
|
|
732
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
733
733
|
}>;
|
|
734
734
|
export default _default;
|
|
@@ -317,10 +317,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
317
317
|
hide: boolean;
|
|
318
318
|
}>;
|
|
319
319
|
draggable: boolean;
|
|
320
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
321
|
+
isFieldSet: boolean;
|
|
320
322
|
idx: number;
|
|
321
323
|
isHighlight: boolean;
|
|
322
324
|
isHighlightRow: boolean;
|
|
323
|
-
isFieldSet: boolean;
|
|
324
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
325
325
|
}>;
|
|
326
326
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export declare const SWITCH: import("vue").DefineComponent<{
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
onChange: {};
|
|
19
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
}, () => JSX.Element | JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
value: {};
|
|
21
21
|
openDescription: {
|
|
22
22
|
type: PropType<Description>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as r,mergeProps as l,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as p,assignValueBindKey as v}from"../../utils/schema.js";import{connect as c,mapProps as d}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=c(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:p}){const v=o(),c=t(!1),{fieldKey:d}=m(),h=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),f=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),y=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},w=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},j=i({get:()=>e.value===h.value,set(o){if("SWITCH"!==e.showMode||"required"!==d.value||o)return p("update:value",o?h.value:f.value);c.value=!0}});function k(){p("update:value",f.value)}return()=>"SWITCH"===e.showMode?[r(n,l({value:j.value,"onUpdate:value":e=>j.value=e},v),{checked:y,unchecked:w}),r(a,{show:c.value,"onUpdate:show":e=>c.value=e,"display-directive":"show",preset:"dialog",title:"确认",content:"是否确认由必填改为非必填?","positive-text":"确认","negative-text":"取消",onPositiveClick:k},null)]:r(s,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:y})}}),d(p,v));export{h as SWITCH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.5-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.5-beta.2",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.5-beta.2",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.5-beta.
|
|
3
|
+
"version": "3.2.5-beta.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "5f105123b9be452d691af96f06d3b84599db331b"
|
|
75
75
|
}
|