cnhis-design-vue 3.1.48-beta.31 → 3.1.48-beta.32

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.
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as o,unref as n,createBlock as i,createCommentVNode as v,createElementVNode as c,createVNode as s,isRef as d,withCtx as p,normalizeStyle as f,Fragment as m,renderList as h,createTextVNode as y,toDisplayString as _}from"vue";import{keywordMatcher as b,widthAppend as k}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as L,isString as C}from"lodash-es";import{NInput as S,NCheckbox as x,NCheckboxGroup as D,NButtonGroup as I,NButton as U}from"naive-ui";const Y={class:"iho-table__filterWrapper"},$={class:"iho-table__filterCheckAllWrapper"},w={class:"iho-table__filterListItem"},W={class:"iho-table__filterListItem"},j={class:"iho-table__filterFooter"};var E=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const E=e,F=l("$xetable"),O=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=E.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),P=a({get:()=>O.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!E.payload)return;if(O.value.forEach((l=>{E.payload.$panel.changeOption(null,e.includes(l.value),l)})),!F)return t();const{startIndex:l,endIndex:a}=F.internalData.scrollYStore;function t(){E.payload.$panel.confirmFilter(new CustomEvent("click"))}0===l&&1===a||F.reactData.scrollYLoad?t():(F.reactData.scrollYLoad=!0,t(),F.reactData.scrollYLoad=!1)}}),q=t([...P.value]),z=t("");function A(){F&&(F.reactData.filterStore.visible=!1)}u(A);const H=a((()=>{var e,l;if(!E.payload||!E.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=E.payload.column.editRender)?void 0:e.props)?l:{};return L(a)&&a>0?a:10})),R=a((()=>z.value?O.value.filter((e=>!!`${e.label}`.includes(z.value)||(C(e.data)?b(z.value,e.data):void 0))):O.value)),{list:B,containerProps:G,wrapperProps:J}=g(R,{itemHeight:32,overscan:3}),K=a({get:()=>R.value.every((e=>q.value.includes(e.value))),set(e){q.value=e?[...new Set([...q.value,...R.value.map((e=>e.value))])]:q.value.filter((e=>!R.value.some((l=>l.value!==e))))}}),M=a((()=>R.value.some((e=>q.value.includes(e.value)))&&!K.value)),N=a({get:()=>q.value.length===O.value.length&&0!==O.value.length,set:e=>{q.value=e?O.value.map((e=>e.value)):[]}}),Q=a((()=>!!q.value.length&&!N.value)),T=a((()=>({...G.style,height:k(32*H.value)})));function V(){P.value=q.value,A()}function X(){q.value=[]}return(e,l)=>(r(),o("section",Y,[n(O).length>5?(r(),i(n(S),{key:0,value:z.value,"onUpdate:value":l[0]||(l[0]=e=>z.value=e)},null,8,["value"])):v("v-if",!0),c("div",$,[c("div",w,[s(n(x),{label:"全选当前",checked:n(K),"onUpdate:checked":l[1]||(l[1]=e=>d(K)?K.value=e:null),indeterminate:n(M)},null,8,["checked","indeterminate"])]),c("div",W,[s(n(x),{label:"全选所有",checked:n(N),"onUpdate:checked":l[2]||(l[2]=e=>d(N)?N.value=e:null),indeterminate:n(Q)},null,8,["checked","indeterminate"])])]),s(n(D),{value:q.value,"onUpdate:value":l[4]||(l[4]=e=>q.value=e)},{default:p((()=>[c("section",{ref:n(G).ref,style:f(n(T)),onScroll:l[3]||(l[3]=(...e)=>n(G).onScroll&&n(G).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:f(n(J).style)},[(r(!0),o(m,null,h(n(B),(e=>(r(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[s(n(x),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",j,[c("section",null,[y(" 已选择 "),c("span",{style:f({color:"var(--c-primary-color)"})},_(q.value.length),5),y(" 项 ")]),s(n(I),{size:"small"},{default:p((()=>[s(n(U),{onClick:X},{default:p((()=>[y("清空")])),_:1}),s(n(U),{onClick:A},{default:p((()=>[y("取消")])),_:1}),s(n(U),{type:"primary",onClick:V},{default:p((()=>[y("确定")])),_:1})])),_:1})])]))}});export{E as default};
1
+ import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as o,unref as i,createBlock as n,createCommentVNode as v,createElementVNode as c,createVNode as s,isRef as d,withCtx as p,normalizeStyle as f,Fragment as m,renderList as h,toDisplayString as y,createTextVNode as _}from"vue";import{keywordMatcher as b,widthAppend as k}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as L,isString as C}from"lodash-es";import{NInput as S,NCheckbox as w,NCheckboxGroup as x,NButtonGroup as D,NButton as I}from"naive-ui";const U={class:"iho-table__filterWrapper"},Y={class:"iho-table__filterCheckAllWrapper"},$={class:"iho-table__filterListItem"},W={class:"iho-table__filterListItem"},j=["title"],E={class:"iho-table__filterFooter"};var F=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const F=e,O=l("$xetable"),P=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=F.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),q=a({get:()=>P.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!F.payload)return;if(P.value.forEach((l=>{F.payload.$panel.changeOption(null,e.includes(l.value),l)})),!O)return t();const{startIndex:l,endIndex:a}=O.internalData.scrollYStore;function t(){F.payload.$panel.confirmFilter(new CustomEvent("click"))}0===l&&1===a||O.reactData.scrollYLoad?t():(O.reactData.scrollYLoad=!0,t(),O.reactData.scrollYLoad=!1)}}),z=t([...q.value]),A=t("");function H(){O&&(O.reactData.filterStore.visible=!1)}u(H);const R=a((()=>{var e,l;if(!F.payload||!F.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=F.payload.column.editRender)?void 0:e.props)?l:{};return L(a)&&a>0?a:10})),B=a((()=>A.value?P.value.filter((e=>!!`${e.label}`.includes(A.value)||(C(e.data)?b(A.value,e.data):void 0))):P.value)),{list:G,containerProps:J,wrapperProps:K}=g(B,{itemHeight:32,overscan:3}),M=a({get:()=>B.value.every((e=>z.value.includes(e.value))),set(e){z.value=e?[...new Set([...z.value,...B.value.map((e=>e.value))])]:z.value.filter((e=>!B.value.some((l=>l.value!==e))))}}),N=a((()=>B.value.some((e=>z.value.includes(e.value)))&&!M.value)),Q=a({get:()=>z.value.length===P.value.length&&0!==P.value.length,set:e=>{z.value=e?P.value.map((e=>e.value)):[]}}),T=a((()=>!!z.value.length&&!Q.value)),V=a((()=>({...J.style,height:k(32*R.value)})));function X(){q.value=z.value,H()}function Z(){z.value=[]}return(e,l)=>(r(),o("section",U,[i(P).length>5?(r(),n(i(S),{key:0,value:A.value,"onUpdate:value":l[0]||(l[0]=e=>A.value=e)},null,8,["value"])):v("v-if",!0),c("div",Y,[c("div",$,[s(i(w),{label:"全选当前",checked:i(M),"onUpdate:checked":l[1]||(l[1]=e=>d(M)?M.value=e:null),indeterminate:i(N)},null,8,["checked","indeterminate"])]),c("div",W,[s(i(w),{label:"全选所有",checked:i(Q),"onUpdate:checked":l[2]||(l[2]=e=>d(Q)?Q.value=e:null),indeterminate:i(T)},null,8,["checked","indeterminate"])])]),s(i(x),{value:z.value,"onUpdate:value":l[4]||(l[4]=e=>z.value=e)},{default:p((()=>[c("section",{ref:i(J).ref,style:f(i(V)),onScroll:l[3]||(l[3]=(...e)=>i(J).onScroll&&i(J).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:f(i(K).style)},[(r(!0),o(m,null,h(i(G),(e=>(r(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[s(i(w),{value:e.data.value},{default:p((()=>[c("div",{style:{"white-space":"nowrap"},title:e.data.label},y(e.data.label),9,j)])),_:2},1032,["value"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",E,[c("section",null,[_(" 已选择 "),c("span",{style:f({color:"var(--c-primary-color)"})},y(z.value.length),5),_(" 项 ")]),s(i(D),{size:"small"},{default:p((()=>[s(i(I),{onClick:Z},{default:p((()=>[_("清空")])),_:1}),s(i(I),{onClick:H},{default:p((()=>[_("取消")])),_:1}),s(i(I),{type:"primary",onClick:X},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{F as default};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.48-beta.31",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.48-beta.31",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.48-beta.32",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.48-beta.32",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.48-beta.31",
3
+ "version": "3.1.48-beta.32",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",