cnhis-design-vue 3.1.57-beta.16 → 3.1.57-beta.17
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.
|
@@ -40,8 +40,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
checkAll: import("vue").WritableComputedRef<boolean>;
|
|
41
41
|
indeterminate: import("vue").ComputedRef<boolean>;
|
|
42
42
|
containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
43
|
-
|
|
43
|
+
confirm: () => void;
|
|
44
44
|
reset: () => void;
|
|
45
|
+
loading: import("vue").Ref<boolean>;
|
|
45
46
|
CancelRadio: import("vue").DefineComponent<{
|
|
46
47
|
currentValue: {};
|
|
47
48
|
cancelable: BooleanConstructor;
|
|
@@ -390,6 +391,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
390
391
|
readonly disabled: boolean | undefined;
|
|
391
392
|
readonly defaultValue: string | number | boolean | null;
|
|
392
393
|
}>;
|
|
394
|
+
NSpin: any;
|
|
393
395
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
394
396
|
payload: {
|
|
395
397
|
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,
|
|
1
|
+
import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,onMounted as i,toRaw as o,openBlock as r,createElementBlock as n,unref as v,createBlock as c,createCommentVNode as s,createElementVNode as d,createVNode as p,isRef as f,withCtx as h,mergeProps as m,normalizeProps as _,guardReactiveProps as y,Fragment as b,renderList as k,toDisplayString as g,createTextVNode as C,normalizeStyle as L}from"vue";import I from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{keywordMatcher as w,widthAppend as D}from"../../../../../shared/utils/index.js";import{useVirtualList as S}from"@vueuse/core";import{isNumber as x,isString as U,isFunction as F,isEqual as R}from"lodash-es";import{NInput as W,NCheckbox as Y,NSpin as j,NCheckboxGroup as E,NRadioGroup as $,NButtonGroup as O,NButton as P}from"naive-ui";const V={class:"iho-table__filterWrapper"},q={key:1,class:"iho-table__filterCheckAllWrapper"},z={class:"iho-table__filterListItem"},A={class:"iho-table__filterListItem"},H=["title"],M=["title"],B={class:"iho-table__filterListItemContent"},G={class:"iho-table__filterFooter"};var J=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const J=e,K=l("$xetable"),N=a((()=>{var e;return!!(null==(e=J.payload)?void 0:e.column.filterMultiple)})),Q=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=J.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),T=a({get:()=>Q.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!J.payload||!K)return;const l=K.reactData.filterStore.options||[];N.value?(l.forEach((l=>l._checked=e.includes(l.value))),K.checkFilterOptions()):l.forEach((l=>l._checked=l.value===e[0]));const{startIndex:a,endIndex:t}=K.internalData.scrollYStore;if(0===a&&1===t||K.reactData.scrollYLoad)return u();function u(){J.payload.$panel.confirmFilter(new CustomEvent("click"))}K.reactData.scrollYLoad=!0,u(),K.reactData.scrollYLoad=!1}}),X=t([...T.value]),Z=t("");function ee(){K&&(K.reactData.filterStore.visible=!1)}u(ee);const le=a((()=>{var e,l;if(!J.payload||!J.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=J.payload.column.editRender)?void 0:e.props)?l:{};return x(a)&&a>0?a:10})),ae=a((()=>Z.value?Q.value.filter((e=>!!`${e.label}`.includes(Z.value)||(U(e.data)?w(Z.value,e.data):void 0))):Q.value)),{list:te,containerProps:ue,wrapperProps:ie}=S(ae,{itemHeight:32,overscan:3}),oe=a({get:()=>ae.value.every((e=>X.value.includes(e.value))),set(e){X.value=e?[...new Set([...X.value,...ae.value.map((e=>e.value))])]:X.value.filter((e=>ae.value.every((l=>l.value!==e))))}}),re=a((()=>ae.value.some((e=>X.value.includes(e.value)))&&!oe.value)),ne=a({get:()=>X.value.length===Q.value.length&&0!==Q.value.length,set:e=>{X.value=e?Q.value.map((e=>e.value)):[]}}),ve=a((()=>!!X.value.length&&!ne.value)),ce=a((()=>({height:D(32*le.value)})));function se(){T.value=N.value?X.value:R(X.value[0],null)?[]:[X.value[0]],ee()}function de(){X.value=N.value?[]:[null]}const pe=t(!1);return i((async()=>{var e;if(!K)return;const l=null==(e=J.payload.column.editRender.props)?void 0:e.onFilterShow;if(F(l))try{pe.value=!0,await l(J.payload);const{filterStore:e}=K.reactData;o(e.options)!==o(Q.value)&&(e.options=Q.value)}finally{pe.value=!1}})),(e,l)=>(r(),n("section",V,[v(Q).length>5?(r(),c(v(W),{key:0,value:Z.value,"onUpdate:value":l[0]||(l[0]=e=>Z.value=e)},null,8,["value"])):s("v-if",!0),v(N)?(r(),n("div",q,[d("div",z,[p(v(Y),{label:"全选当前",checked:v(oe),"onUpdate:checked":l[1]||(l[1]=e=>f(oe)?oe.value=e:null),indeterminate:v(re)},null,8,["checked","indeterminate"])]),d("div",A,[p(v(Y),{label:"全选所有",checked:v(ne),"onUpdate:checked":l[2]||(l[2]=e=>f(ne)?ne.value=e:null),indeterminate:v(ve)},null,8,["checked","indeterminate"])])])):s("v-if",!0),p(v(j),{show:pe.value},{default:h((()=>[v(N)?(r(),c(v(E),{key:0,value:X.value,"onUpdate:value":l[3]||(l[3]=e=>X.value=e)},{default:h((()=>[d("section",m(v(ue),{style:v(ce),class:"iho-table__filterListWrapper"}),[d("section",_(y(v(ie))),[(r(!0),n(b,null,k(v(te),(e=>(r(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[p(v(Y),{value:e.data.value},{default:h((()=>[d("div",{class:"iho-table__filterListItemContent",title:e.data.label},g(e.data.label),9,H)])),_:2},1032,["value"])])))),128))],16)],16)])),_:1},8,["value"])):(r(),c(v($),{key:1,value:X.value[0],"onUpdate:value":l[5]||(l[5]=e=>X.value[0]=e)},{default:h((()=>[d("section",m(v(ue),{style:v(ce),class:"iho-table__filterListWrapper"}),[d("section",_(y(v(ie))),[(r(!0),n(b,null,k(v(te),(e=>(r(),n("div",{class:"iho-table__filterListItem",key:e.data.value,title:e.data.label},[p(v(I),{value:e.data.value,currentValue:X.value[0],cancelable:"",onCancel:l[4]||(l[4]=e=>X.value=[null])},{default:h((()=>[d("div",B,g(e.data.label),1)])),_:2},1032,["value","currentValue"])],8,M)))),128))],16)],16)])),_:1},8,["value"]))])),_:1},8,["show"]),d("footer",G,[d("section",null,[v(N)?(r(),n(b,{key:0},[C(" 已选择 "),d("span",{style:L({color:"var(--c-primary-color)"})},g(X.value.length),5),C(" 项 ")],64)):s("v-if",!0)]),p(v(O),{size:"small"},{default:h((()=>[p(v(P),{onClick:de},{default:h((()=>[C("清空")])),_:1}),p(v(P),{onClick:ee},{default:h((()=>[C("取消")])),_:1}),p(v(P),{type:"primary",onClick:se},{default:h((()=>[C("确定")])),_:1})])),_:1})])]))}});export{J as default};
|
|
@@ -117,6 +117,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
117
117
|
formType: string;
|
|
118
118
|
fieldSetting: string | IhoTableLowCodeField.FieldSetting;
|
|
119
119
|
filterCapacity: number;
|
|
120
|
+
onFilterShow: any;
|
|
120
121
|
notParticipatingSearch: 0 | 1;
|
|
121
122
|
componentProps: AnyObject;
|
|
122
123
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.57-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.57-beta.17",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.1.57-beta.17",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.1.57-beta.
|
|
3
|
+
"version": "3.1.57-beta.17",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"iOS 7",
|
|
71
71
|
"last 3 iOS versions"
|
|
72
72
|
],
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "23a9ca8217b9b6a6b831bc7ff2c37291795a4ad5"
|
|
74
74
|
}
|