cnhis-design-vue 3.1.42-beta.58 → 3.1.42-beta.59
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/iho-table/index.d.ts +36 -36
- package/es/components/iho-table/src/IhoTable.vue.d.ts +36 -36
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/index.d.ts +3 -14
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const b=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const j=t(),{field:b,title:C}=m(),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),S=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[F.value])).slice(-1).join(""):null}catch(e){return null}}));function w(e,t,a){y("update:value",u(a)?a.map((function(e){return{...e,label:e[g.value],children:void 0,parent:void 0}})):null)}const A=l(p);async function H(t){e.filterable?await async function(){if(!e.urlConfig||j.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:C.value,cache:e.requestCache});function a(e,t){const l={[g.value]:e[g.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}j.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),C.value,t));if(!a.length&&t)return t.isLeaf=!0,w(0,0,n(t)),void(E.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&j.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[g.value]:a[g.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:j.value=l}(t),await L()}const x=`form-render__cascade--menu-${l(d)}`;async function L(){await n();const e=document.querySelector(`.${x} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function q(e,t){if(!e||!t)return!1;const{keyword:a,[g.value]:l}=t
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u,isString as s}from"lodash-es";import"../../../index.js";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as p,InjectionFormUUID as d}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NCascader as v}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as f,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as j,traverseDependKey as k}from"../../utils/schema.js";const b=f(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:f,emit:y}){const j=t(),{field:b,title:C}=m(),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),S=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[F.value])).slice(-1).join(""):null}catch(e){return null}}));function w(e,t,a){y("update:value",u(a)?a.map((function(e){return{...e,label:e[g.value],children:void 0,parent:void 0}})):null)}const A=l(p);async function H(t){e.filterable?await async function(){if(!e.urlConfig||j.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:C.value,cache:e.requestCache});function a(e,t){const l={[g.value]:e[g.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}j.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),C.value,t));if(!a.length&&t)return t.isLeaf=!0,w(0,0,n(t)),void(E.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&j.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[g.value]:a[g.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:j.value=l}(t),await L()}const x=`form-render__cascade--menu-${l(d)}`;async function L(){await n();const e=document.querySelector(`.${x} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function q(e,t){if(!e||!t)return!1;const{keyword:a,[g.value]:l}=t,r=!!s(a)&&a.split(",").some((t=>t.includes(e))),o=!!s(l)&&l.includes(e);return r||o}const{injectValueValidate:B,injectValueWatchFromEmpty:K,injectValueBindKey:V}=c();K((()=>e.value),H),B((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(j.value=null,await H())}));const E=t(!1);function O(e){E.value=!!e,e&&H()}const W=a((()=>j.value||e.options||[])),N=a((()=>!e.filterable)),P=V(S);return()=>o(v,{key:P.value,remote:N.value,filterable:e.filterable,"menu-props":{class:x,onClick:L},checkStrategy:"child",show:!!E.value,"onUpdate:show":O,value:S.value,filter:q,"onUpdate:value":w,labelField:g.value,valueField:F.value,options:W.value,onLoad:H,onFocus:h(b)},f)}}),y({dataSource:"options"},j));export{b as SEARCH_CASCADER};
|
|
@@ -89,7 +89,7 @@ export declare type FormBusinessFormatter = (payload: {
|
|
|
89
89
|
}) => unknown;
|
|
90
90
|
export declare namespace FormLowCodeReactions {
|
|
91
91
|
type ConObj = {
|
|
92
|
-
con: LOW_CODE_VALUE_RELATION
|
|
92
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
93
93
|
field_key: string;
|
|
94
94
|
value: unknown;
|
|
95
95
|
};
|
|
@@ -282,7 +282,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
282
282
|
} | undefined;
|
|
283
283
|
autofocus?: string | undefined;
|
|
284
284
|
autoselect?: boolean | undefined;
|
|
285
|
-
defaultValue?: string | number | object | any[] | {
|
|
285
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
286
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
287
|
+
}) => any) | {
|
|
286
288
|
exec: (string: string) => RegExpExecArray | null;
|
|
287
289
|
test: (string: string) => boolean;
|
|
288
290
|
readonly source: string;
|
|
@@ -303,9 +305,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
303
305
|
[Symbol.search]: (string: string) => number;
|
|
304
306
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
305
307
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
306
|
-
} |
|
|
307
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
308
|
-
}) => any) | {
|
|
308
|
+
} | {
|
|
309
309
|
toString: () => string;
|
|
310
310
|
toDateString: () => string;
|
|
311
311
|
toTimeString: () => string;
|
|
@@ -585,7 +585,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
585
585
|
} | undefined;
|
|
586
586
|
autofocus?: string | undefined;
|
|
587
587
|
autoselect?: boolean | undefined;
|
|
588
|
-
defaultValue?: string | number | object | any[] | {
|
|
588
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
589
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
590
|
+
}) => any) | {
|
|
589
591
|
exec: (string: string) => RegExpExecArray | null;
|
|
590
592
|
test: (string: string) => boolean;
|
|
591
593
|
readonly source: string;
|
|
@@ -606,9 +608,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
606
608
|
[Symbol.search]: (string: string) => number;
|
|
607
609
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
608
610
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
609
|
-
} |
|
|
610
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
611
|
-
}) => any) | {
|
|
611
|
+
} | {
|
|
612
612
|
toString: () => string;
|
|
613
613
|
toDateString: () => string;
|
|
614
614
|
toTimeString: () => string;
|
|
@@ -1061,7 +1061,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1061
1061
|
} | undefined;
|
|
1062
1062
|
autofocus?: string | undefined;
|
|
1063
1063
|
autoselect?: boolean | undefined;
|
|
1064
|
-
defaultValue?: string | number | object | any[] | {
|
|
1064
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
1065
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1066
|
+
}) => any) | {
|
|
1065
1067
|
exec: (string: string) => RegExpExecArray | null;
|
|
1066
1068
|
test: (string: string) => boolean;
|
|
1067
1069
|
readonly source: string;
|
|
@@ -1082,9 +1084,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1082
1084
|
[Symbol.search]: (string: string) => number;
|
|
1083
1085
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1084
1086
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1085
|
-
} |
|
|
1086
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1087
|
-
}) => any) | {
|
|
1087
|
+
} | {
|
|
1088
1088
|
toString: () => string;
|
|
1089
1089
|
toDateString: () => string;
|
|
1090
1090
|
toTimeString: () => string;
|
|
@@ -1420,7 +1420,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1420
1420
|
} | undefined;
|
|
1421
1421
|
autofocus?: string | undefined;
|
|
1422
1422
|
autoselect?: boolean | undefined;
|
|
1423
|
-
defaultValue?: string | number | object | any[] | {
|
|
1423
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
1424
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1425
|
+
}) => any) | {
|
|
1424
1426
|
exec: (string: string) => RegExpExecArray | null;
|
|
1425
1427
|
test: (string: string) => boolean;
|
|
1426
1428
|
readonly source: string;
|
|
@@ -1441,9 +1443,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1441
1443
|
[Symbol.search]: (string: string) => number;
|
|
1442
1444
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1443
1445
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1444
|
-
} |
|
|
1445
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1446
|
-
}) => any) | {
|
|
1446
|
+
} | {
|
|
1447
1447
|
toString: () => string;
|
|
1448
1448
|
toDateString: () => string;
|
|
1449
1449
|
toTimeString: () => string;
|
|
@@ -2292,7 +2292,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2292
2292
|
} | undefined;
|
|
2293
2293
|
autofocus?: string | undefined;
|
|
2294
2294
|
autoselect?: boolean | undefined;
|
|
2295
|
-
defaultValue?: string | number | object | any[] | {
|
|
2295
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
2296
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2297
|
+
}) => any) | {
|
|
2296
2298
|
exec: (string: string) => RegExpExecArray | null;
|
|
2297
2299
|
test: (string: string) => boolean;
|
|
2298
2300
|
readonly source: string;
|
|
@@ -2313,9 +2315,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2313
2315
|
[Symbol.search]: (string: string) => number;
|
|
2314
2316
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2315
2317
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2316
|
-
} |
|
|
2317
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2318
|
-
}) => any) | {
|
|
2318
|
+
} | {
|
|
2319
2319
|
toString: () => string;
|
|
2320
2320
|
toDateString: () => string;
|
|
2321
2321
|
toTimeString: () => string;
|
|
@@ -2754,7 +2754,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2754
2754
|
} | undefined;
|
|
2755
2755
|
autofocus?: string | undefined;
|
|
2756
2756
|
autoselect?: boolean | undefined;
|
|
2757
|
-
defaultValue?: string | number | object | any[] | {
|
|
2757
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
2758
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2759
|
+
}) => any) | {
|
|
2758
2760
|
exec: (string: string) => RegExpExecArray | null;
|
|
2759
2761
|
test: (string: string) => boolean;
|
|
2760
2762
|
readonly source: string;
|
|
@@ -2775,9 +2777,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2775
2777
|
[Symbol.search]: (string: string) => number;
|
|
2776
2778
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2777
2779
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2778
|
-
} |
|
|
2779
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2780
|
-
}) => any) | {
|
|
2780
|
+
} | {
|
|
2781
2781
|
toString: () => string;
|
|
2782
2782
|
toDateString: () => string;
|
|
2783
2783
|
toTimeString: () => string;
|
|
@@ -3057,7 +3057,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3057
3057
|
} | undefined;
|
|
3058
3058
|
autofocus?: string | undefined;
|
|
3059
3059
|
autoselect?: boolean | undefined;
|
|
3060
|
-
defaultValue?: string | number | object | any[] | {
|
|
3060
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3061
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3062
|
+
}) => any) | {
|
|
3061
3063
|
exec: (string: string) => RegExpExecArray | null;
|
|
3062
3064
|
test: (string: string) => boolean;
|
|
3063
3065
|
readonly source: string;
|
|
@@ -3078,9 +3080,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3078
3080
|
[Symbol.search]: (string: string) => number;
|
|
3079
3081
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3080
3082
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3081
|
-
} |
|
|
3082
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3083
|
-
}) => any) | {
|
|
3083
|
+
} | {
|
|
3084
3084
|
toString: () => string;
|
|
3085
3085
|
toDateString: () => string;
|
|
3086
3086
|
toTimeString: () => string;
|
|
@@ -3533,7 +3533,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3533
3533
|
} | undefined;
|
|
3534
3534
|
autofocus?: string | undefined;
|
|
3535
3535
|
autoselect?: boolean | undefined;
|
|
3536
|
-
defaultValue?: string | number | object | any[] | {
|
|
3536
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3537
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3538
|
+
}) => any) | {
|
|
3537
3539
|
exec: (string: string) => RegExpExecArray | null;
|
|
3538
3540
|
test: (string: string) => boolean;
|
|
3539
3541
|
readonly source: string;
|
|
@@ -3554,9 +3556,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3554
3556
|
[Symbol.search]: (string: string) => number;
|
|
3555
3557
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3556
3558
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3557
|
-
} |
|
|
3558
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3559
|
-
}) => any) | {
|
|
3559
|
+
} | {
|
|
3560
3560
|
toString: () => string;
|
|
3561
3561
|
toDateString: () => string;
|
|
3562
3562
|
toTimeString: () => string;
|
|
@@ -3892,7 +3892,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3892
3892
|
} | undefined;
|
|
3893
3893
|
autofocus?: string | undefined;
|
|
3894
3894
|
autoselect?: boolean | undefined;
|
|
3895
|
-
defaultValue?: string | number | object | any[] | {
|
|
3895
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3896
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3897
|
+
}) => any) | {
|
|
3896
3898
|
exec: (string: string) => RegExpExecArray | null;
|
|
3897
3899
|
test: (string: string) => boolean;
|
|
3898
3900
|
readonly source: string;
|
|
@@ -3913,9 +3915,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3913
3915
|
[Symbol.search]: (string: string) => number;
|
|
3914
3916
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3915
3917
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3916
|
-
} |
|
|
3917
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3918
|
-
}) => any) | {
|
|
3918
|
+
} | {
|
|
3919
3919
|
toString: () => string;
|
|
3920
3920
|
toDateString: () => string;
|
|
3921
3921
|
toTimeString: () => string;
|
|
@@ -281,7 +281,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
281
|
} | undefined;
|
|
282
282
|
autofocus?: string | undefined;
|
|
283
283
|
autoselect?: boolean | undefined;
|
|
284
|
-
defaultValue?: string | number | object | any[] | {
|
|
284
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
285
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
286
|
+
}) => any) | {
|
|
285
287
|
exec: (string: string) => RegExpExecArray | null;
|
|
286
288
|
test: (string: string) => boolean;
|
|
287
289
|
readonly source: string;
|
|
@@ -302,9 +304,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
302
304
|
[Symbol.search]: (string: string) => number;
|
|
303
305
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
304
306
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
305
|
-
} |
|
|
306
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
307
|
-
}) => any) | {
|
|
307
|
+
} | {
|
|
308
308
|
toString: () => string;
|
|
309
309
|
toDateString: () => string;
|
|
310
310
|
toTimeString: () => string;
|
|
@@ -584,7 +584,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
584
584
|
} | undefined;
|
|
585
585
|
autofocus?: string | undefined;
|
|
586
586
|
autoselect?: boolean | undefined;
|
|
587
|
-
defaultValue?: string | number | object | any[] | {
|
|
587
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
588
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
589
|
+
}) => any) | {
|
|
588
590
|
exec: (string: string) => RegExpExecArray | null;
|
|
589
591
|
test: (string: string) => boolean;
|
|
590
592
|
readonly source: string;
|
|
@@ -605,9 +607,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
605
607
|
[Symbol.search]: (string: string) => number;
|
|
606
608
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
607
609
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
608
|
-
} |
|
|
609
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
610
|
-
}) => any) | {
|
|
610
|
+
} | {
|
|
611
611
|
toString: () => string;
|
|
612
612
|
toDateString: () => string;
|
|
613
613
|
toTimeString: () => string;
|
|
@@ -1060,7 +1060,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1060
1060
|
} | undefined;
|
|
1061
1061
|
autofocus?: string | undefined;
|
|
1062
1062
|
autoselect?: boolean | undefined;
|
|
1063
|
-
defaultValue?: string | number | object | any[] | {
|
|
1063
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
1064
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1065
|
+
}) => any) | {
|
|
1064
1066
|
exec: (string: string) => RegExpExecArray | null;
|
|
1065
1067
|
test: (string: string) => boolean;
|
|
1066
1068
|
readonly source: string;
|
|
@@ -1081,9 +1083,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1081
1083
|
[Symbol.search]: (string: string) => number;
|
|
1082
1084
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1083
1085
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1084
|
-
} |
|
|
1085
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1086
|
-
}) => any) | {
|
|
1086
|
+
} | {
|
|
1087
1087
|
toString: () => string;
|
|
1088
1088
|
toDateString: () => string;
|
|
1089
1089
|
toTimeString: () => string;
|
|
@@ -1419,7 +1419,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1419
1419
|
} | undefined;
|
|
1420
1420
|
autofocus?: string | undefined;
|
|
1421
1421
|
autoselect?: boolean | undefined;
|
|
1422
|
-
defaultValue?: string | number | object | any[] | {
|
|
1422
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
1423
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1424
|
+
}) => any) | {
|
|
1423
1425
|
exec: (string: string) => RegExpExecArray | null;
|
|
1424
1426
|
test: (string: string) => boolean;
|
|
1425
1427
|
readonly source: string;
|
|
@@ -1440,9 +1442,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1440
1442
|
[Symbol.search]: (string: string) => number;
|
|
1441
1443
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
1442
1444
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
1443
|
-
} |
|
|
1444
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
1445
|
-
}) => any) | {
|
|
1445
|
+
} | {
|
|
1446
1446
|
toString: () => string;
|
|
1447
1447
|
toDateString: () => string;
|
|
1448
1448
|
toTimeString: () => string;
|
|
@@ -2291,7 +2291,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2291
2291
|
} | undefined;
|
|
2292
2292
|
autofocus?: string | undefined;
|
|
2293
2293
|
autoselect?: boolean | undefined;
|
|
2294
|
-
defaultValue?: string | number | object | any[] | {
|
|
2294
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
2295
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2296
|
+
}) => any) | {
|
|
2295
2297
|
exec: (string: string) => RegExpExecArray | null;
|
|
2296
2298
|
test: (string: string) => boolean;
|
|
2297
2299
|
readonly source: string;
|
|
@@ -2312,9 +2314,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2312
2314
|
[Symbol.search]: (string: string) => number;
|
|
2313
2315
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2314
2316
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2315
|
-
} |
|
|
2316
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2317
|
-
}) => any) | {
|
|
2317
|
+
} | {
|
|
2318
2318
|
toString: () => string;
|
|
2319
2319
|
toDateString: () => string;
|
|
2320
2320
|
toTimeString: () => string;
|
|
@@ -2753,7 +2753,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2753
2753
|
} | undefined;
|
|
2754
2754
|
autofocus?: string | undefined;
|
|
2755
2755
|
autoselect?: boolean | undefined;
|
|
2756
|
-
defaultValue?: string | number | object | any[] | {
|
|
2756
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
2757
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2758
|
+
}) => any) | {
|
|
2757
2759
|
exec: (string: string) => RegExpExecArray | null;
|
|
2758
2760
|
test: (string: string) => boolean;
|
|
2759
2761
|
readonly source: string;
|
|
@@ -2774,9 +2776,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2774
2776
|
[Symbol.search]: (string: string) => number;
|
|
2775
2777
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
2776
2778
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
2777
|
-
} |
|
|
2778
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2779
|
-
}) => any) | {
|
|
2779
|
+
} | {
|
|
2780
2780
|
toString: () => string;
|
|
2781
2781
|
toDateString: () => string;
|
|
2782
2782
|
toTimeString: () => string;
|
|
@@ -3056,7 +3056,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3056
3056
|
} | undefined;
|
|
3057
3057
|
autofocus?: string | undefined;
|
|
3058
3058
|
autoselect?: boolean | undefined;
|
|
3059
|
-
defaultValue?: string | number | object | any[] | {
|
|
3059
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3060
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3061
|
+
}) => any) | {
|
|
3060
3062
|
exec: (string: string) => RegExpExecArray | null;
|
|
3061
3063
|
test: (string: string) => boolean;
|
|
3062
3064
|
readonly source: string;
|
|
@@ -3077,9 +3079,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3077
3079
|
[Symbol.search]: (string: string) => number;
|
|
3078
3080
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3079
3081
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3080
|
-
} |
|
|
3081
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3082
|
-
}) => any) | {
|
|
3082
|
+
} | {
|
|
3083
3083
|
toString: () => string;
|
|
3084
3084
|
toDateString: () => string;
|
|
3085
3085
|
toTimeString: () => string;
|
|
@@ -3532,7 +3532,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3532
3532
|
} | undefined;
|
|
3533
3533
|
autofocus?: string | undefined;
|
|
3534
3534
|
autoselect?: boolean | undefined;
|
|
3535
|
-
defaultValue?: string | number | object | any[] | {
|
|
3535
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3536
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3537
|
+
}) => any) | {
|
|
3536
3538
|
exec: (string: string) => RegExpExecArray | null;
|
|
3537
3539
|
test: (string: string) => boolean;
|
|
3538
3540
|
readonly source: string;
|
|
@@ -3553,9 +3555,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3553
3555
|
[Symbol.search]: (string: string) => number;
|
|
3554
3556
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3555
3557
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3556
|
-
} |
|
|
3557
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3558
|
-
}) => any) | {
|
|
3558
|
+
} | {
|
|
3559
3559
|
toString: () => string;
|
|
3560
3560
|
toDateString: () => string;
|
|
3561
3561
|
toTimeString: () => string;
|
|
@@ -3891,7 +3891,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3891
3891
|
} | undefined;
|
|
3892
3892
|
autofocus?: string | undefined;
|
|
3893
3893
|
autoselect?: boolean | undefined;
|
|
3894
|
-
defaultValue?: string | number | object | any[] | {
|
|
3894
|
+
defaultValue?: string | number | object | any[] | ((params: {
|
|
3895
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3896
|
+
}) => any) | {
|
|
3895
3897
|
exec: (string: string) => RegExpExecArray | null;
|
|
3896
3898
|
test: (string: string) => boolean;
|
|
3897
3899
|
readonly source: string;
|
|
@@ -3912,9 +3914,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3912
3914
|
[Symbol.search]: (string: string) => number;
|
|
3913
3915
|
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
|
3914
3916
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
3915
|
-
} |
|
|
3916
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
3917
|
-
}) => any) | {
|
|
3917
|
+
} | {
|
|
3918
3918
|
toString: () => string;
|
|
3919
3919
|
toDateString: () => string;
|
|
3920
3920
|
toTimeString: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as
|
|
1
|
+
import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as d,shallowReactive as c}from"vue";import{widthAppend as p,traverse as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{isFunction as v,isNumber as x,last as I,omit as b}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as w,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as R}from"../../hooks/useTablePlugin.js";class H{constructor(){this.records={},this.maxRecords=c(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new H),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(w),d=t("$xetable"),c=o(),f=D(u),m=l((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,l=d.getRowSeq(t);if(!f||null==l||!c.value)return;const n=c.value.clientHeight;f.set(l,o.field,n)}n("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),a((()=>{d&&!S(u)&&C(u,d),h()}));const I=l((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return v(a)?a:()=>m.value})),b=l((()=>{const t=e.payload.column.renderWidth;return x(t)&&t>0?p(t-20-2):""}));return()=>s("div",{ref:c,style:{padding:"7px 0",width:b.value,overflow:"hidden"}},[i(I.value,e.payload)])}});function j(e,t,{scrollTop:o=0}){var l,n;const{uuid:r,rowConfig:a={}}=t;if(!r)return;const s=D(r),{oSize:i=0,gt:d=100}=null!=(l=$(r))?l:{},{internalData:c,reactData:p}=e,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const x=null!=(n=a.height)?n:36,b=m["main-body-wrapper"],w=b?u(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/x)+2+i):8;const T=[0];let R=0;if(o&&h.find(((t,l)=>{const n=e.getRowSeq(t),r=(I(T)||0)+Math.max(x,s.getMax(n));if(T.push(r),r>o)return R=Math.max(0,l-i),y+=Math.min(R,i),!0})),R>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;R>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const H=`${T[R]}px`,M=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(x,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=m[`${e}-body-table`],l=t?u(t):null;l&&(l.style.marginTop=H,l.scrollTop=o),["header","body","footer"].forEach((t=>{const o=m[`${e}-${t}-ySpace`],l=o?u(o):null;l&&(l.style.height=M)}))}));const S=Math.min(h.length,R+y);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((t,o)=>{const l=e.getRowid(t),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const e="variableHeightRendererPlugin";return R({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(F,{payload:t},null)})},apply(t){function o(e){const t=S(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=function(e){const t=e.internalData.elemStore["main-body-wrapper"];return t?u(t):null}(t);o&&j(t,e,{scrollTop:o.scrollTop})}function l(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>o(e)),300)}t.dataHooks.dataStart.tap(e,l),t.eventHooks.onFilterChange.tap(e,((e,t)=>l(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>l(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>l(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&l(t)})),t.eventHooks.onScroll.tap(e,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=b(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return v(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:l})=>(t.uuid&&f(e,((n,r)=>{var a,s,i;if((null==(a=n.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const n=null!=(i=null==(s=t.rowConfig)?void 0:s.height)?i:36,a=D(t.uuid),d=t.cellStyle;if(t.cellStyle=function(e){const t={};if(e.column.fixed&&Reflect.get(e,"fixed")&&l.value){const o=Math.max(n,a.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?v(d)?d(e):d:null)},t.sortableConfig&&t.sortableConfig.enable){const e=t.sortableConfig.onEnd;t.sortableConfig.onEnd=function(o){const l=S(t.uuid);if(l){const{internalData:{elemStore:e}}=l,o=e["main-table-body"];o&&u(o)&&j(l,t,{scrollTop:u(o).scrollTop})}v(e)&&e(o)}}t.showOverflow="tooltip",f(e,(e=>{e.showOverflow="tooltip"})),t.scrollY={...t.scrollY,mode:"default"},t.onWheel=function(e){let t=null,o=0,l=!0;return function(n){if(!e.uuid)return;const r=S(e.uuid);if(!r)return;const{internalData:a}=r,{isHover:s}=e.rowConfig||{},{deltaX:i,deltaY:d}=n,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=r.getRefMaps(),h=d,g=i,v=h<0,x=u(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===a.lastScrollTop)return;n.preventDefault(),a.lastScrollTop=b,a.lastScrollLeft=w,a.lastScrollTime=Date.now(),s&&r.clearHoverRow();const y=c.value,T=p.value,R=y?y.$el:null,H=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));l&&(o=I.scrollTop,l=!1),o+=D*(v?-1:1),t&&t(),t=m(I.scrollTop,o,400,(e=>{I.scrollTop=e,R&&(R.scrollTop=e),H&&(H.scrollTop=e)}),"easeOutCubic",(()=>{o=I.scrollTop,l=!0})),L(r,e,I)}}(t),setTimeout((()=>{k(t.uuid,t.scrollY),o(t)}),300),r()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),$.spinning||$.hasFrontAddress?s("v-if",!0):(l(),n(r,{key:0},[u(oe).noData?(l(),c(P,{key:0,noDataImg:u(oe).noDataImg,noDataTip:u(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(r,{key:1},[u(fe)&&!u(we)?(l(),c(F,p({key:0},u(Se),{onWriteGuage:Le}),null,16)):(l(),n(r,{key:1},[u(ge)?(l(),c(D,p({key:0,ref_key:"countdownDom",ref:te},u(he),{onCloseEvaluateCountdown:Pe}),null,16)):s("v-if",!0),d("div",{class:m(["scale-container",{"scale-container-nopadding":u(ce),"scale-container-hasfooter":u(ye)}]),style:v(u(ue))},[u(me)?(l(),c(u(N),{key:0,config:$.config,maxScore:$.maxScore},null,8,["config","maxScore"])):s("v-if",!0),f(u(q),{ref_key:"formRef",ref:ae,model:$.form,rules:$.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(r,null,y($.formArray,((e,t)=>(l(),n(r,{key:(e.id||e.seq)+t},[u(pe)(e)?(l(),c(u(M),{key:0,path:e.val_key,"show-label":!u(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[d("span",{class:m({"scale-label-required":u(re)(e)}),innerHTML:u(de)(e)},null,10,H),u(re)(e)?(l(),n("span",U,"(必填)")):s("v-if",!0),u(be)(e)?(l(),n("span",W,b(u(be)(e)),1)):s("v-if",!0),u(se)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if($.evatipMap[e.id])return void De($.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=Q.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&($.evatipMap[e.id]||($.evatipMap[e.id]=i,De(i)))})(e)},[Y,k(" 查看提示 ")],8,J)):s("v-if",!0)])),default:g((()=>[(l(),c(C(e.renderCom),p(u(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Fe,onOnChange:t=>((e,t)=>{$.form[t.val_key]=Ne(e)})(t,e),onVodFileList:Be}),null,16,["onOnChange"])),u(ke)(e)?(l(),c(B,{key:0,item:e},null,8,["item"])):s("v-if",!0)])),_:2},1032,["path","show-label"])):s("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),u(ye)?(l(),n("div",X,[s(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(l(),c(u(R),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):s("v-if",!0),Q.isLock?s("v-if",!0):(l(),c(u(R),{key:1,onClick:xe,disabled:$.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):s("v-if",!0)],64))],64))],64))]))}}),[["__file","ScaleView.vue"]]);export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"../../../shared/utils/vexutilsExpand.js";const O={key:0,class:"label-disable-wrap"},j=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,j)):o("v-if",!0),r(c("div",K,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
25
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
25
|
+
|