cnhis-design-vue 3.1.43-beta.11 → 3.1.43-beta.14

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.
Files changed (38) hide show
  1. package/es/components/base-search/index.d.ts +4 -0
  2. package/es/components/base-search/src/index.vue.d.ts +4 -0
  3. package/es/components/base-search/src/index.vue.js +1 -1
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/classification/index.d.ts +3 -1
  6. package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
  7. package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
  8. package/es/components/classification/src/index.vue.d.ts +3 -1
  9. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +6 -0
  10. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  11. package/es/components/index.css +1 -1
  12. package/es/components/quick-search/style/index.css +1 -1
  13. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +3 -1
  14. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
  15. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
  16. package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
  17. package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +3 -28
  18. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  19. package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.d.ts +118 -0
  20. package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +1 -0
  21. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  22. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +0 -1
  23. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  24. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -1
  25. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  26. package/es/components/table-filter/src/components/render-widget/enums.d.ts +17 -0
  27. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  28. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +5 -0
  29. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  30. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  31. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +125 -19
  32. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  33. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  34. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  35. package/es/components/table-filter/src/types/enums.d.ts +3 -1
  36. package/es/components/table-filter/src/types/enums.js +1 -1
  37. package/es/shared/package.json.js +1 -1
  38. package/package.json +2 -2
@@ -4,6 +4,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
4
4
  type: import("vue").PropType<import("..").IsettingsType>;
5
5
  default: () => {
6
6
  hideQuickSearch: number;
7
+ hideResetBtn: number;
7
8
  };
8
9
  };
9
10
  searchFieldList: {
@@ -65,6 +66,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
65
66
  type: import("vue").PropType<import("..").IsettingsType>;
66
67
  default: () => {
67
68
  hideQuickSearch: number;
69
+ hideResetBtn: number;
68
70
  };
69
71
  };
70
72
  searchFieldList: {
@@ -117,6 +119,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
117
119
  alias?: string | undefined;
118
120
  }[]>;
119
121
  showQuickSearch: import("vue").ComputedRef<boolean>;
122
+ showResetBtn: import("vue").ComputedRef<boolean>;
120
123
  initOutSearchFieldList: () => void;
121
124
  isShowSetting: (v: string) => boolean;
122
125
  foldQuickSearch: () => void;
@@ -177,6 +180,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
177
180
  type: import("vue").PropType<import("..").IsettingsType>;
178
181
  default: () => {
179
182
  hideQuickSearch: number;
183
+ hideResetBtn: number;
180
184
  };
181
185
  };
182
186
  searchFieldList: {
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: PropType<IsettingsType>;
6
6
  default: () => {
7
7
  hideQuickSearch: number;
8
+ hideResetBtn: number;
8
9
  };
9
10
  };
10
11
  searchFieldList: {
@@ -66,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
66
67
  type: PropType<IsettingsType>;
67
68
  default: () => {
68
69
  hideQuickSearch: number;
70
+ hideResetBtn: number;
69
71
  };
70
72
  };
71
73
  searchFieldList: {
@@ -118,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{
118
120
  alias?: string | undefined;
119
121
  }[]>;
120
122
  showQuickSearch: import("vue").ComputedRef<boolean>;
123
+ showResetBtn: import("vue").ComputedRef<boolean>;
121
124
  initOutSearchFieldList: () => void;
122
125
  isShowSetting: (v: string) => boolean;
123
126
  foldQuickSearch: () => void;
@@ -178,6 +181,7 @@ declare const _default: import("vue").DefineComponent<{
178
181
  type: PropType<IsettingsType>;
179
182
  default: () => {
180
183
  hideQuickSearch: number;
184
+ hideResetBtn: number;
181
185
  };
182
186
  };
183
187
  searchFieldList: {
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as i,watch as l,openBlock as a,createElementBlock as r,createElementVNode as n,createCommentVNode as o,renderSlot as s,unref as u,createVNode as c,withCtx as f,createTextVNode as d,toDisplayString as h,Fragment as m,renderList as p}from"vue";import v from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import b from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as y,NIcon as k}from"naive-ui";import{Search as S}from"@vicons/ionicons5";import{cloneDeep as j}from"lodash-es";import x from"../../../_virtual/plugin-vue_export-helper.js";const q={class:"base-search-block"},_={class:"base-container"},A={class:"bease-left"},O={class:"base-ul"},F={key:0,class:"baseli showQuickBtn"},R=n("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),I={key:0,class:"qqConObjCount"},Q={key:1,class:"baseli"},V={key:2,class:"baseli"},w=n("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var E=x(e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{emit:x}){const E=e,{outQuickSearchFn:D}=g(),{isRender:L,getRenderSearchConObj:N,isExistDefValByRenderWidget:P,resetRenderWidgetValue:W}=C(),{transformData:B,transformParams:U}=b(),$=t([]),z=t(!1),M=t([]),T=i((()=>{var e;return e="hideQuickSearch",0==E.showSettings[e]}));function G(){x("foldQuickSearch",!0)}function H(e={}){const t=K()||[];!function(e,t,i=!1,l={}){let a=[];M.value.length>0&&(a=j(M.value));x("onFilterSearch",e,t,i,a,l)}(t,U(t),!0,e)}function J(e,t){M.value.forEach((i=>{i._frontId===e&&(i.widgetCfg.isInit=t)}))}function K(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let i=0;i<e.length;i++){let l=e[i];const a=N(l);a&&t.push(a)}return t.filter((e=>e.value))}(M.value)}function X(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{W(e)})),D.handlerInitSearchItem(e)}(M.value),x("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>E.searchFieldList),(e=>{e&&e.length>0&&function(){M.value=[];let e=j(B(E.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));M.value=e,D.handlerInitSearchItem(M.value),M.value.some((e=>L(e)?P(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>E.qqConObjCount),(e=>{const t=$.value.length||0;z.value=t+Number(e)>0}),{immediate:!0}),l((()=>M),(()=>{$.value=K()||[];const e=U($.value);z.value=$.value.length+Number(E.qqConObjCount)>0,x("getFilterParam",$.value,e)}),{immediate:!0,deep:!0}),(t,i)=>(a(),r("div",q,[n("div",_,[n("div",A,[n("ul",O,[o(" 筛选分类插槽 "),s(t.$slots,"classification"),u(T)?(a(),r("li",F,[c(u(y),{class:"search-default",type:"default",onClick:G},{default:f((()=>[R,d(" 筛选"),e.qqConObjCount?(a(),r("span",I,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(a(!0),r(m,null,p(M.value,(t=>(a(),r(m,null,[t.isRender?(a(),r("li",{class:"baseli outQuickSearch-li",key:t._frontId},[c(v,{cfg:t,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e,filterApiConfig:e.filterApiConfig,onOutFilterChange:H,onChangeInit:J},null,8,["cfg","modelValue","onUpdate:modelValue","filterApiConfig"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),M.value&&M.value.length>0?(a(),r("li",Q,[c(u(y),{type:"primary",onClick:H},{default:f((()=>[c(u(k),{component:u(S),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),d(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),z.value?(a(),r("li",V,[c(u(y),{onClick:X},{default:f((()=>[w,d(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),s(t.$slots,"buttons")])])])]))}}),[["__file","index.vue"]]);export{E as default};
1
+ import{defineComponent as e,ref as t,computed as i,watch as l,openBlock as a,createElementBlock as n,createElementVNode as r,createCommentVNode as o,renderSlot as s,unref as u,createVNode as c,withCtx as f,createTextVNode as d,toDisplayString as h,Fragment as m,renderList as p}from"vue";import v from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import b from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as y,NIcon as k}from"naive-ui";import{Search as S}from"@vicons/ionicons5";import{cloneDeep as j}from"lodash-es";import x from"../../../_virtual/plugin-vue_export-helper.js";const q={class:"base-search-block"},R={class:"base-container"},_={class:"bease-left"},A={class:"base-ul"},O={key:0,class:"baseli showQuickBtn"},F=r("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),I={key:0,class:"qqConObjCount"},Q={key:1,class:"baseli"},V={key:2,class:"baseli"},w=r("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var B=x(e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0,hideResetBtn:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{emit:x}){const B=e,{outQuickSearchFn:E}=g(),{isRender:D,getRenderSearchConObj:L,isExistDefValByRenderWidget:N,resetRenderWidgetValue:P}=C(),{transformData:W,transformParams:U}=b(),$=t([]),z=t(!1),M=t([]),T=i((()=>H("hideQuickSearch"))),G=i((()=>H("hideResetBtn")));function H(e){return 0==B.showSettings[e]}function J(){x("foldQuickSearch",!0)}function K(e={}){const t=Y()||[];!function(e,t,i=!1,l={}){let a=[];M.value.length>0&&(a=j(M.value));x("onFilterSearch",e,t,i,a,l)}(t,U(t),!0,e)}function X(e,t){M.value.forEach((i=>{i._frontId===e&&(i.widgetCfg.isInit=t)}))}function Y(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let i=0;i<e.length;i++){let l=e[i];const a=L(l);a&&t.push(a)}return t.filter((e=>e.value))}(M.value)}function Z(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{P(e)})),E.handlerInitSearchItem(e)}(M.value),x("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>B.searchFieldList),(e=>{e&&e.length>0&&function(){M.value=[];let e=j(W(B.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));M.value=e,E.handlerInitSearchItem(M.value),M.value.some((e=>D(e)?N(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>B.qqConObjCount),(e=>{const t=$.value.length||0;z.value=t+Number(e)>0&&G.value}),{immediate:!0}),l((()=>M),(()=>{$.value=Y()||[];const e=U($.value);z.value=$.value.length+Number(B.qqConObjCount)>0&&G.value,x("getFilterParam",$.value,e)}),{immediate:!0,deep:!0}),(t,i)=>(a(),n("div",q,[r("div",R,[r("div",_,[r("ul",A,[o(" 筛选分类插槽 "),s(t.$slots,"classification"),u(T)?(a(),n("li",O,[c(u(y),{class:"search-default",type:"default",onClick:J},{default:f((()=>[F,d(" 筛选"),e.qqConObjCount?(a(),n("span",I,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(a(!0),n(m,null,p(M.value,(t=>(a(),n(m,null,[t.isRender?(a(),n("li",{class:"baseli outQuickSearch-li",key:t._frontId},[c(v,{cfg:t,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e,filterApiConfig:e.filterApiConfig,onOutFilterChange:K,onChangeInit:X},null,8,["cfg","modelValue","onUpdate:modelValue","filterApiConfig"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),M.value&&M.value.length>0?(a(),n("li",Q,[c(u(y),{type:"primary",onClick:K},{default:f((()=>[c(u(k),{component:u(S),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),d(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),z.value?(a(),n("li",V,[c(u(y),{onClick:Z},{default:f((()=>[w,d(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),s(t.$slots,"buttons")])])])]))}}),[["__file","index.vue"]]);export{B as default};
@@ -1 +1 @@
1
- @font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .n-input-number{width:136px}.render-widget-input-number-group .divider{text-align:center;width:26px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
1
+ @font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
@@ -766,7 +766,9 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
766
766
  DATE: string;
767
767
  DATE_TIME: string;
768
768
  CHECKBOX_GROUP: string;
769
- INPUTNUMBER_GROUP: string;
769
+ INPUTNUMBER_RANGE: string;
770
+ DATE_RANGE: string;
771
+ DATETIME_RANGE: string;
770
772
  };
771
773
  WidgetValEnums: {
772
774
  CUSTOM: string;
@@ -236,7 +236,9 @@ declare const _default: import("vue").DefineComponent<{
236
236
  DATE: string;
237
237
  DATE_TIME: string;
238
238
  CHECKBOX_GROUP: string;
239
- INPUTNUMBER_GROUP: string;
239
+ INPUTNUMBER_RANGE: string;
240
+ DATE_RANGE: string;
241
+ DATETIME_RANGE: string;
240
242
  };
241
243
  WidgetValEnums: {
242
244
  CUSTOM: string;
@@ -553,7 +553,9 @@ declare const _default: import("vue").DefineComponent<{
553
553
  DATE: string;
554
554
  DATE_TIME: string;
555
555
  CHECKBOX_GROUP: string;
556
- INPUTNUMBER_GROUP: string;
556
+ INPUTNUMBER_RANGE: string;
557
+ DATE_RANGE: string;
558
+ DATETIME_RANGE: string;
557
559
  };
558
560
  WidgetValEnums: {
559
561
  CUSTOM: string;
@@ -767,7 +767,9 @@ declare const _default: import("vue").DefineComponent<{
767
767
  DATE: string;
768
768
  DATE_TIME: string;
769
769
  CHECKBOX_GROUP: string;
770
- INPUTNUMBER_GROUP: string;
770
+ INPUTNUMBER_RANGE: string;
771
+ DATE_RANGE: string;
772
+ DATETIME_RANGE: string;
771
773
  };
772
774
  WidgetValEnums: {
773
775
  CUSTOM: string;
@@ -53,6 +53,7 @@ export declare const RADIO: import("vue").DefineComponent<{
53
53
  type: PropType<"checked" | "all">;
54
54
  default: string;
55
55
  };
56
+ clearable: BooleanConstructor;
56
57
  onChange: {};
57
58
  }, () => 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<{
58
59
  value: {
@@ -107,6 +108,7 @@ export declare const RADIO: import("vue").DefineComponent<{
107
108
  type: PropType<"checked" | "all">;
108
109
  default: string;
109
110
  };
111
+ clearable: BooleanConstructor;
110
112
  onChange: {};
111
113
  }>> & {
112
114
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -118,6 +120,7 @@ export declare const RADIO: import("vue").DefineComponent<{
118
120
  lazyRequest: boolean;
119
121
  requestCache: boolean;
120
122
  childFieldStrategy: "checked" | "all";
123
+ clearable: boolean;
121
124
  }>;
122
125
  export declare const CHECKBOX: import("vue").DefineComponent<{
123
126
  value: {
@@ -172,6 +175,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
172
175
  type: PropType<"checked" | "all">;
173
176
  default: string;
174
177
  };
178
+ clearable: BooleanConstructor;
175
179
  onChange: {};
176
180
  }, () => 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<{
177
181
  value: {
@@ -226,6 +230,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
226
230
  type: PropType<"checked" | "all">;
227
231
  default: string;
228
232
  };
233
+ clearable: BooleanConstructor;
229
234
  onChange: {};
230
235
  }>> & {
231
236
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -237,4 +242,5 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
237
242
  lazyRequest: boolean;
238
243
  requestCache: boolean;
239
244
  childFieldStrategy: "checked" | "all";
245
+ clearable: boolean;
240
246
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,createVNode as t,isVNode as o}from"vue";import{connect as l,mapProps as a}from"@formily/vue";import{NSpace as r,NRadio as i,NRadioGroup as u,NCheckbox as n,NCheckboxGroup as p}from"naive-ui";import"../../../index.js";import{useComplexOptions as d}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as s}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as c,createVisitedSetter as v}from"../../utils/schema.js";import{useFormField as y}from"../../hooks/useFormField.js";function f(l,a,i){return e({name:l,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},onChange:{}},emits:["update:value"],setup(e,{emit:l}){const{field:u}=y(),{renderComplexOption:n,valueRef:p}=d(e,l),{labelKey:c,valueKey:f,fullOptions:j}=s(e,p),{injectValueBindKey:b,injectValueValidate:h}=m();h(p);const g=b(p);return()=>t(a,{key:g.value,value:p.value,"onUpdate:value":e=>p.value=e,onClick:v(u)},{default:()=>[t(r,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var l;return[null==(l=j.value)?void 0:l.map((l=>{let a;return t(i,{key:l[f.value],value:l[f.value],disabled:l.disabled},"function"==typeof(r=a=n({value:p.value,option:l,valueKey:f.value,labelKey:c.value,childFieldStrategy:e.childFieldStrategy}))||"[object Object]"===Object.prototype.toString.call(r)&&!o(r)?a:{default:()=>[a]});var r}))]}})]})}})}const j=l(f("FormRadio",u,i),a({dataSource:"options"},c)),b=l(f("FormCheckbox",p,n),a({dataSource:"options"},c));export{b as CHECKBOX,j as RADIO};
1
+ import{defineComponent as e,createVNode as t,isVNode as l}from"vue";import{connect as o,mapProps as a}from"@formily/vue";import{promiseTimeout as r}from"@vueuse/shared";import{NSpace as i,NRadio as u,NRadioGroup as n,NCheckbox as p,NCheckboxGroup as d}from"naive-ui";import"../../../index.js";import{useComplexOptions as s}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as c}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as v,createVisitedSetter as f}from"../../utils/schema.js";import{useFormField as y}from"../../hooks/useFormField.js";function b(o,a,u){return e({name:o,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},clearable:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:o}){const{field:p}=y(),{renderComplexOption:d,valueRef:v}=s(e,o),{labelKey:b,valueKey:j,fullOptions:h}=c(e,v),{injectValueBindKey:g,injectValueValidate:k}=m();k(v);const S=g(v);async function F(){if(!e.clearable)return;const t=v.value;await r(0),a===n&&null!=t&&(v.value=null)}return()=>t(a,{key:S.value,value:v.value,"onUpdate:value":e=>v.value=e,onClick:f(p)},{default:()=>[t(i,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var o;return[null==(o=h.value)?void 0:o.map((o=>{let a;return t(u,{key:o[j.value],value:o[j.value],disabled:o.disabled,onClick:F},"function"==typeof(r=a=d({value:v.value,option:o,valueKey:j.value,labelKey:b.value,childFieldStrategy:e.childFieldStrategy}))||"[object Object]"===Object.prototype.toString.call(r)&&!l(r)?a:{default:()=>[a]});var r}))]}})]})}})}const j=o(b("FormRadio",n,u),a({dataSource:"options"},v)),h=o(b("FormCheckbox",d,p),a({dataSource:"options"},v));export{h as CHECKBOX,j as RADIO};