rx-compo 1.0.65 → 1.0.68

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 (63) hide show
  1. package/es/components/RxCheckboxGroup/index.js +1 -1
  2. package/es/components/RxCheckboxGroup/src/RxCheckboxGroup.d.ts +9 -92
  3. package/es/components/RxCheckboxGroup/src/RxCheckboxGroup.vue.d.ts +17 -8
  4. package/es/components/RxRadio/index.d.ts +4 -0
  5. package/es/components/RxRadio/index.js +1 -0
  6. package/es/components/RxRadio/src/RxRadio.d.ts +15 -0
  7. package/es/components/RxRadio/src/RxRadio.vue.d.ts +25 -0
  8. package/es/components/RxRadioButton/index.d.ts +4 -0
  9. package/es/components/RxRadioButton/index.js +1 -0
  10. package/es/components/RxRadioButton/src/RxRadioButton.d.ts +15 -0
  11. package/es/components/RxRadioButton/src/RxRadioButton.vue.d.ts +25 -0
  12. package/es/components/RxRadioGroup/components/RxRadioComponents.vue.d.ts +4 -0
  13. package/es/components/RxRadioGroup/index.d.ts +4 -0
  14. package/es/components/RxRadioGroup/index.js +1 -0
  15. package/es/components/RxRadioGroup/src/RxRadioGroup.d.ts +11 -0
  16. package/es/components/RxRadioGroup/src/RxRadioGroup.vue.d.ts +16 -0
  17. package/es/components/RxSelectPlus/index.js +1 -1
  18. package/es/components/RxSelectPlus/src/RxSelectPlus.d.ts +2 -2
  19. package/es/components/RxSelectPlus/src/RxSelectPlus.vue.d.ts +2 -2
  20. package/es/components/RxSelectPlus/src/types.d.ts +0 -3
  21. package/es/components/RxSuperCondition/index.js +1 -1
  22. package/es/components/RxSuperCondition/src/hooks/useControlTemplate.d.ts +1 -1
  23. package/es/components/RxTooltip/index.d.ts +2 -1
  24. package/es/components/RxTooltip/src/types.d.ts +8 -0
  25. package/es/components/index.d.ts +3 -0
  26. package/es/components/index.js +1 -1
  27. package/es/utils/useTextOverflow.js +6 -1
  28. package/index.esm.js +1 -1
  29. package/index.js +1 -1
  30. package/lib/components/RxCheckboxGroup/index.js +1 -1
  31. package/lib/components/RxCheckboxGroup/src/RxCheckboxGroup.d.ts +9 -92
  32. package/lib/components/RxCheckboxGroup/src/RxCheckboxGroup.vue.d.ts +17 -8
  33. package/lib/components/RxRadio/index.d.ts +4 -0
  34. package/lib/components/RxRadio/index.js +1 -0
  35. package/lib/components/RxRadio/src/RxRadio.d.ts +15 -0
  36. package/lib/components/RxRadio/src/RxRadio.vue.d.ts +25 -0
  37. package/lib/components/RxRadioButton/index.d.ts +4 -0
  38. package/lib/components/RxRadioButton/index.js +1 -0
  39. package/lib/components/RxRadioButton/src/RxRadioButton.d.ts +15 -0
  40. package/lib/components/RxRadioButton/src/RxRadioButton.vue.d.ts +25 -0
  41. package/lib/components/RxRadioGroup/components/RxRadioComponents.vue.d.ts +4 -0
  42. package/lib/components/RxRadioGroup/index.d.ts +4 -0
  43. package/lib/components/RxRadioGroup/index.js +1 -0
  44. package/lib/components/RxRadioGroup/src/RxRadioGroup.d.ts +11 -0
  45. package/lib/components/RxRadioGroup/src/RxRadioGroup.vue.d.ts +16 -0
  46. package/lib/components/RxSelectPlus/index.js +1 -1
  47. package/lib/components/RxSelectPlus/src/RxSelectPlus.d.ts +2 -2
  48. package/lib/components/RxSelectPlus/src/RxSelectPlus.vue.d.ts +2 -2
  49. package/lib/components/RxSelectPlus/src/types.d.ts +0 -3
  50. package/lib/components/RxSuperCondition/index.js +1 -1
  51. package/lib/components/RxSuperCondition/src/hooks/useControlTemplate.d.ts +1 -1
  52. package/lib/components/RxTooltip/index.d.ts +2 -1
  53. package/lib/components/RxTooltip/src/types.d.ts +8 -0
  54. package/lib/components/index.d.ts +3 -0
  55. package/lib/components/index.js +1 -1
  56. package/lib/utils/useTextOverflow.js +6 -1
  57. package/package.json +1 -1
  58. package/theme-chalk/index.css +1 -1
  59. package/theme-chalk/rx-checkbox-button.css +1 -0
  60. package/theme-chalk/rx-checkbox-group.css +1 -0
  61. package/theme-chalk/rx-radio-button.css +0 -0
  62. package/theme-chalk/rx-radio-group.css +0 -0
  63. package/theme-chalk/rx-radio.css +0 -0
@@ -1 +1 @@
1
- import{withInstall as e}from"rx-compo/es/utils/with-install";import{computed as o,ref as t,nextTick as l,defineComponent as n,resolveComponent as s,openBlock as c,createBlock as r,normalizeProps as u,mergeProps as a,createSlots as i,renderList as p,withCtx as x,renderSlot as h,guardReactiveProps as m,createElementBlock as d,Fragment as f,createCommentVNode as k,createVNode as C,createTextVNode as g,toDisplayString as b,normalizeClass as y,resolveDynamicComponent as R,createElementVNode as T,normalizeStyle as v}from"vue";import{IxPropTypes as B}from"rx-compo/es/utils";import{ElCheckboxGroup as O,ElRow as A,ElCol as $}from"element-plus";import{map as _}from"lodash-es";import{useVModel as w}from"@vueuse/core";import{RxTooltip as V}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as S}from"rx-compo/es/components/RxScrollbar";import{useTextOverflow as j}from"rx-compo/es/utils/useTextOverflow";import{RxCheckbox as G}from"rx-compo/es/components/RxCheckbox";import{RxCheckboxButton as M}from"rx-compo/es/components/RxCheckboxButton";const I={modelValue:B.array(),RxCheckboxAll:B.bool.def(!1),RxCheckboxAllText:B.string.def("全选"),checkBoxOptions:{type:Array,default:[]},toolTipFormatter:{type:Function,default:null},toolTipConfig:{type:Object,default:{placement:"top"}},gutter:B.number,justify:{type:String,default:"start"},baseColProps:{type:Object,default:()=>({xl:4,lg:6,md:8,sm:12,xs:24})},isButton:B.bool.def(!1),rxCheckBoxAttr:{type:Object,default:{}}};var F=n({name:"RxCheckboxComponents",components:{RxCheckbox:G,RxCheckboxButton:M},setup:(e,{slots:o})=>({rxCheckBoxSlots:Object.keys(o)})});F.render=function(e,o,t,l,n,d){const f=s("rx-checkbox-button"),k=s("rx-checkbox");return e.$attrs.isButton?(c(),r(f,u(a({key:0},e.$attrs.isButton)),i({_:2},[p(e.rxCheckBoxSlots,(o=>({name:o,fn:x((t=>[h(e.$slots,`${o}`,u(m(t)))]))})))]),1040)):(c(),r(k,u(a({key:1},e.$attrs)),i({_:2},[p(e.rxCheckBoxSlots,(o=>({name:o,fn:x((t=>[h(e.$slots,`${o}`,u(m(t)))]))})))]),1040))},F.__file="packages/components/RxCheckboxGroup/components/RxCheckboxComponents.vue";var H=n({name:"RxCheckboxGroup",components:{ElCheckboxGroup:O,ElRow:A,ElCol:$,RxCheckboxComponents:F,RxScrollbar:S,RxTooltip:V},props:I,setup(e,{emit:n}){const s=w(e,"modelValue",n),{isIndeterminate:c,checkAll:r,checkBoxOptionsComputed:u,itemsRef:a,setItemRef:i,handleCheckAllChange:p,handleCheckedChange:x}=function(e,l){const n=o((()=>e.checkBoxOptions||[])),s=t([]),c=t(!0),r=t(!1);return{isIndeterminate:c,checkAll:r,checkboxGroupValue:l,itemsRef:s,checkBoxOptionsComputed:n,setItemRef:e=>{e&&s.value.push(e)},handleCheckAllChange:e=>{l.value=e?_(n.value,(e=>e.label)):[],c.value=!1},handleCheckedChange:e=>{const o=e.length;r.value=o===n.value.length,c.value=o>0&&o<n.value.length}}}(e,s),{rxToolTipConfig:h,updateRxToolTipConfig:m}=function(e){const o=t();return{rxToolTipConfig:o,updateRxToolTipConfig:function(t,l){const{toolTipConfig:n}=e,{width:s}=t.getBoundingClientRect(),c={width:`${s}px`,maxHeight:(null==n?void 0:n.maxHeight)?n.maxHeight:"80px"};o.value=Object.assign(Object.assign({},n),{style:c})}}}(e),{isOverflowed:d,handleMouseenter:f}=function(e,o){const{isOverflowed:t,checkOverflowCustom:n}=j("RxCheckbox");return{itemsRef:e,isOverflowed:t,handleMouseenter:function(t){const s=e.value[t].$el;n(s),l((()=>o(s)))}}}(a,m);return{isIndeterminate:c,checkboxGroupValue:s,checkAll:r,rxToolTipConfig:h,isOverflowed:d,itemsRef:a,checkBoxOptionsComputed:u,setItemRef:i,handleMouseenter:f,handleCheckAllChange:p,handleCheckedChange:x}}});const E={key:0,class:"rx-checkbox-group"};H.render=function(e,o,t,l,n,i){const B=s("RxCheckboxComponents"),O=s("rx-scrollbar"),A=s("rx-tooltip"),$=s("el-col"),_=s("el-row"),w=s("el-checkbox-group");return c(),d(f,null,[e.RxCheckboxAll?(c(),d("div",E,[k(" 自定义全选按钮 "),e.$slots.checkAllSlots?h(e.$slots,"checkAllSlots",{key:0}):(c(),d(f,{key:1},[k(" 默认全选按钮 "),C(B,{modelValue:e.checkAll,"onUpdate:modelValue":o[0]||(o[0]=o=>e.checkAll=o),isButton:!1,indeterminate:e.isIndeterminate,onChange:e.handleCheckAllChange},{default:x((()=>[g(b(e.RxCheckboxAllText),1)])),_:1},8,["modelValue","indeterminate","onChange"])],2112))])):k("v-if",!0),C(w,a({...e.$attrs,...e.$props},{modelValue:e.checkboxGroupValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.checkboxGroupValue=o),onChange:e.handleCheckedChange,class:"rx-checkbox-group"}),{default:x((()=>[k(" 模板默认插槽 "),e.$slots.default?h(e.$slots,"default",{key:0}):(c(),d(f,{key:1},[k(" 配置 "),C(_,{gutter:e.gutter,type:"flex",class:y(`justify-${e.justify}`)},{default:x((()=>[(c(!0),d(f,null,p(e.checkBoxOptionsComputed,((o,t)=>(c(),r($,a({key:t,ref_for:!0,ref:e.setItemRef,style:`${o.colStyle||""}`,class:`${o.colClass||""}`},o.colProps||e.baseColProps),{default:x((()=>[k(" 溢出隐藏 "),e.isOverflowed?(c(),r(A,u(a({key:0},e.rxToolTipConfig)),{content:x((()=>[k(" checkBoxOptions[index].slots options可自定义配置h函数模板 "),o.toolTipSlots?(c(),r(R(o.toolTipSlots.call(null,o)),u(a({key:0},o)),null,16)):e.toolTipFormatter?(c(),d(f,{key:1},[k(" props toolTipFormatter 通配h函数模板 "),(c(),r(R(e.toolTipFormatter.call(null,o)),u(m(o)),null,16))],2112)):(c(),d(f,{key:2},[k(" 默认渲染模板 "),T("div",{style:v(e.rxToolTipConfig.style)},[C(O,{"max-height":e.rxToolTipConfig.style.maxHeight},{default:x((()=>[g(b(o?.toolTipContent),1)])),_:2},1032,["max-height"])],4)],2112))])),default:x((()=>[C(B,a({...e.rxCheckBoxAttr,...o},{isButton:e.isButton,onMouseenter:o=>e.handleMouseenter(t)}),null,16,["isButton","onMouseenter"])])),_:2},1040)):(c(),d(f,{key:1},[k(" 默认checkbox "),C(B,a({...e.rxCheckBoxAttr,...o},{isButton:e.isButton,onMouseenter:o=>e.handleMouseenter(t)}),null,16,["isButton","onMouseenter"])],2112))])),_:2},1040,["style","class"])))),128))])),_:1},8,["gutter","class"])],64))])),_:3},16,["modelValue","onChange"])],64)},H.__file="packages/components/RxCheckboxGroup/src/RxCheckboxGroup.vue";const P=e(H);export{P as RxCheckboxGroup,P as default};
1
+ import{withInstall as e}from"rx-compo/es/utils/with-install";import{computed as o,ref as t,nextTick as l,defineComponent as n,resolveComponent as s,openBlock as r,createBlock as c,normalizeProps as a,mergeProps as u,createSlots as i,renderList as p,withCtx as h,renderSlot as x,guardReactiveProps as m,createElementBlock as d,Fragment as k,createCommentVNode as f,createVNode as C,resolveDynamicComponent as g,toDisplayString as b,normalizeClass as y,createElementVNode as T,normalizeStyle as v,createTextVNode as R}from"vue";import{IxPropTypes as B}from"rx-compo/es/utils";import{ElCheckboxGroup as A,ElRow as O,ElCol as $}from"element-plus";import{map as S}from"lodash-es";import{useVModel as _}from"@vueuse/core";import{RxTooltip as w}from"rx-compo/es/components/RxTooltip";import{RxScrollbar as V}from"rx-compo/es/components/RxScrollbar";import{useTextOverflow as j}from"rx-compo/es/utils/useTextOverflow";import{RxCheckbox as F,RxCheckboxButton as G}from"rx-compo/es/components";const M={modelValue:B.array(),rxCheckboxAll:B.bool.def(!1),rxCheckboxAllText:B.string.def("全选"),checkBoxOptions:{type:Array,default:[]},toolTipFormatter:{type:Function,default:null},checkAllSlotsFormatter:{type:Function,default:null},toolTipConfig:{type:Object,default:{placement:"top"}},gutter:B.number,justify:{type:String,default:"start"},baseColProps:{type:Object,default:()=>({xl:4,lg:6,md:8,sm:12,xs:24})},isButton:B.bool.def(!1),rxCheckBoxAttr:{type:Object,default:{}}};var I=n({name:"RxCheckboxComponents",components:{RxCheckbox:F,RxCheckboxButton:G},setup:(e,{slots:o})=>({rxCheckBoxSlots:Object.keys(o)})});I.render=function(e,o,t,l,n,d){const k=s("rx-checkbox-button"),f=s("rx-checkbox");return e.$attrs.isButton?(r(),c(k,a(u({key:0},e.$attrs.isButton)),i({_:2},[p(e.rxCheckBoxSlots,(o=>({name:o,fn:h((t=>[x(e.$slots,`${o}`,a(m(t)))]))})))]),1040)):(r(),c(f,a(u({key:1},e.$attrs)),i({_:2},[p(e.rxCheckBoxSlots,(o=>({name:o,fn:h((t=>[x(e.$slots,`${o}`,a(m(t)))]))})))]),1040))},I.__file="packages/components/RxCheckboxGroup/components/RxCheckboxComponents.vue";var H=n({name:"RxCheckboxGroup",components:{ElCheckboxGroup:A,ElRow:O,ElCol:$,RxCheckboxComponents:I,RxScrollbar:V,RxTooltip:w},props:M,setup(e,{emit:n}){const s=_(e,"modelValue",n),{isIndeterminate:r,checkAll:c,checkBoxOptionsComputed:a,itemsRef:u,setItemRef:i,handleCheckAllChange:p,handleCheckedChange:h}=function(e,l){const n=o((()=>e.checkBoxOptions||[])),s=t([]),r=t(!0),c=t(!1);return{isIndeterminate:r,checkAll:c,checkboxGroupValue:l,itemsRef:s,checkBoxOptionsComputed:n,setItemRef:e=>{e&&s.value.push(e)},handleCheckAllChange:e=>{l.value=e?S(n.value,(e=>e.label)):[],r.value=!1},handleCheckedChange:e=>{const o=e.length;c.value=o===n.value.length,r.value=o>0&&o<n.value.length}}}(e,s),{rxToolTipConfig:x,updateRxToolTipConfig:m}=function(e){const o=t();return{rxToolTipConfig:o,updateRxToolTipConfig:function(t){const{toolTipConfig:l}=e,{width:n}=t.getBoundingClientRect(),s={width:(null==l?void 0:l.tooltipWidth)?l.tooltipWidth:`${n}px`,maxHeight:(null==l?void 0:l.maxHeight)?l.maxHeight:"80px"};o.value=Object.assign(Object.assign({},l),{style:s})}}}(e),{isOverflowed:d,handleMouseenter:k}=function(e,o){const{isOverflowed:t,checkOverflowCustom:n}=j("RxCheckbox");return{itemsRef:e,isOverflowed:t,handleMouseenter:function(t){const s=e.value[t].$el;n(s),l((()=>o(s)))}}}(u,m);return{isIndeterminate:r,checkboxGroupValue:s,checkAll:c,rxToolTipConfig:x,isOverflowed:d,itemsRef:u,checkBoxOptionsComputed:a,setItemRef:i,handleMouseenter:k,handleCheckAllChange:p,handleCheckedChange:h}}});const E={key:0,class:"rx-checkbox-group"},P={key:2};H.render=function(e,o,t,l,n,i){const B=s("RxCheckboxComponents"),A=s("rx-scrollbar"),O=s("rx-tooltip"),$=s("el-col"),S=s("el-row"),_=s("el-checkbox-group");return r(),d(k,null,[e.rxCheckboxAll?(r(),d("div",E,[f(" 默认全选按钮 "),C(B,{modelValue:e.checkAll,"onUpdate:modelValue":o[0]||(o[0]=o=>e.checkAll=o),isButton:!1,indeterminate:e.isIndeterminate,onChange:e.handleCheckAllChange},{default:h((()=>[f(" 函数式 "),e.checkAllSlotsFormatter?(r(),c(g(e.checkAllSlotsFormatter.call(null,{})),{key:0})):e.$slots.checkAllSlots?(r(),d(k,{key:1},[f(" 插槽 "),x(e.$slots,"checkAllSlots")],2112)):(r(),d("span",P,b(e.rxCheckboxAllText),1))])),_:3},8,["modelValue","indeterminate","onChange"])])):f("v-if",!0),C(_,u({...e.$attrs,...e.$props},{modelValue:e.checkboxGroupValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.checkboxGroupValue=o),onChange:e.handleCheckedChange,class:"rx-checkbox-group"}),{default:h((()=>[f(" 模板默认插槽 "),e.$slots.default?x(e.$slots,"default",{key:0}):(r(),d(k,{key:1},[f(" 配置 "),C(S,{gutter:e.gutter,type:"flex",class:y(`justify-${e.justify}`)},{default:h((()=>[(r(!0),d(k,null,p(e.checkBoxOptionsComputed,((o,t)=>(r(),c($,u({key:t,ref_for:!0,ref:e.setItemRef,style:`${o.colStyle||""}`,class:`${o.colClass||""}`},o.colProps||e.baseColProps),{default:h((()=>[f(" 溢出隐藏 "),e.isOverflowed?(r(),c(O,a(u({key:0},e.rxToolTipConfig)),{content:h((()=>[f(" checkBoxOptions[index].slots options可自定义配置h函数模板 "),o.toolTipSlots?(r(),c(g(o.toolTipSlots.call(null,o)),a(u({key:0},o)),null,16)):e.toolTipFormatter?(r(),d(k,{key:1},[f(" props toolTipFormatter 通配h函数模板 "),(r(),c(g(e.toolTipFormatter.call(null,o)),a(m(o)),null,16))],2112)):(r(),d(k,{key:2},[f(" 默认渲染模板 "),T("div",{style:v(e.rxToolTipConfig.style)},[C(A,{"max-height":e.rxToolTipConfig.style.maxHeight},{default:h((()=>[R(b(o?.toolTipContent||o?.label),1)])),_:2},1032,["max-height"])],4)],2112))])),default:h((()=>[C(B,u({...e.rxCheckBoxAttr,...o},{isButton:e.isButton,onMouseenter:o=>e.handleMouseenter(t)}),null,16,["isButton","onMouseenter"])])),_:2},1040)):(r(),d(k,{key:1},[f(" 默认checkbox "),C(B,u({...e.rxCheckBoxAttr,...o},{isButton:e.isButton,onMouseenter:o=>e.handleMouseenter(t)}),null,16,["isButton","onMouseenter"])],2112))])),_:2},1040,["style","class"])))),128))])),_:1},8,["gutter","class"])],64))])),_:3},16,["modelValue","onChange"])],64)},H.__file="packages/components/RxCheckboxGroup/src/RxCheckboxGroup.vue";const U=e(H);export{U as RxCheckboxGroup,U as default};
@@ -1,6 +1,7 @@
1
1
  import type { ExtractPropTypes, DefineComponent, PropType } from 'vue';
2
- import type { RxCheckboxPropsType, RxCheckboxButtonPropsType } from 'rx-compo/es/components';
2
+ import type { RxCheckboxPropsType, RxCheckboxButtonPropsType, RxTooltipPropsType, ToolTipScrollbarCustomType } from 'rx-compo/es/components';
3
3
  declare type RxCheckBoxComponents = RxCheckboxPropsType & RxCheckboxButtonPropsType;
4
+ declare type RxCheckBoxGroupToolTipConfig = RxTooltipPropsType & ToolTipScrollbarCustomType;
4
5
  export interface ColObject {
5
6
  span?: number;
6
7
  offset?: number;
@@ -27,10 +28,10 @@ export interface CheckBoxType extends RxCheckBoxComponents {
27
28
  }
28
29
  export declare const RxCheckboxGroupProps: {
29
30
  modelValue: import("vue-types").VueTypeValidableDef<unknown[]>;
30
- RxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
31
+ rxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
31
32
  default: boolean;
32
33
  };
33
- RxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
34
+ rxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
34
35
  default: string;
35
36
  };
36
37
  checkBoxOptions: {
@@ -41,96 +42,12 @@ export declare const RxCheckboxGroupProps: {
41
42
  type: FunctionConstructor;
42
43
  default: any;
43
44
  };
45
+ checkAllSlotsFormatter: {
46
+ type: FunctionConstructor;
47
+ default: any;
48
+ };
44
49
  toolTipConfig: {
45
- type: PropType<{} & {
46
- readonly disabled?: boolean;
47
- readonly onClick?: Function;
48
- readonly style?: import("vue").StyleValue;
49
- readonly id?: string;
50
- readonly popperClass?: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | {
51
- [x: string]: boolean;
52
- } | (string | {
53
- [x: string]: boolean;
54
- } | (string | {
55
- [x: string]: boolean;
56
- } | (string | {
57
- [x: string]: boolean;
58
- } | (string | {
59
- [x: string]: boolean;
60
- } | (string | {
61
- [x: string]: boolean;
62
- } | (string | {
63
- [x: string]: boolean;
64
- } | (string | {
65
- [x: string]: boolean;
66
- } | (string | {
67
- [x: string]: boolean;
68
- } | (string | {
69
- [x: string]: boolean;
70
- } | (string | any[] | {
71
- [x: string]: boolean;
72
- })[])[])[])[])[])[])[])[])[])[]>, unknown, unknown>;
73
- readonly popperOptions?: unknown;
74
- readonly zIndex?: number;
75
- readonly onBlur?: Function;
76
- readonly onFocus?: Function;
77
- readonly onMouseleave?: Function;
78
- readonly onMouseenter?: Function;
79
- readonly onKeydown?: Function;
80
- readonly visible?: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<boolean>, unknown, unknown>;
81
- readonly effect?: string;
82
- readonly teleported?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
83
- readonly persistent?: boolean;
84
- openDelay?: number;
85
- visibleArrow?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
86
- readonly hideAfter?: number;
87
- showArrow?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
88
- readonly appendTo?: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | HTMLElement>, unknown, unknown>;
89
- readonly content?: string;
90
- readonly rawContent?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
91
- readonly ariaLabel?: string;
92
- readonly transition?: string;
93
- readonly className?: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | {
94
- [x: string]: boolean;
95
- } | (string | {
96
- [x: string]: boolean;
97
- } | (string | {
98
- [x: string]: boolean;
99
- } | (string | {
100
- [x: string]: boolean;
101
- } | (string | {
102
- [x: string]: boolean;
103
- } | (string | {
104
- [x: string]: boolean;
105
- } | (string | {
106
- [x: string]: boolean;
107
- } | (string | {
108
- [x: string]: boolean;
109
- } | (string | {
110
- [x: string]: boolean;
111
- } | (string | {
112
- [x: string]: boolean;
113
- } | (string | any[] | {
114
- [x: string]: boolean;
115
- })[])[])[])[])[])[])[])[])[])[]>, unknown, unknown>;
116
- readonly enterable?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
117
- readonly pure?: boolean;
118
- readonly popperStyle?: import("vue").StyleValue;
119
- readonly referenceEl?: HTMLElement;
120
- readonly stopPopperMouseEvent?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
121
- readonly boundariesPadding?: number;
122
- readonly fallbackPlacements?: import("element-plus").Placement;
123
- readonly gpuAcceleration?: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
124
- readonly offset?: number;
125
- readonly placement?: import("element-plus/es/utils").BuildPropType<StringConstructor, import("element-plus").Placement, unknown>;
126
- readonly strategy?: import("element-plus/es/utils").BuildPropType<StringConstructor, "fixed" | "absolute", unknown>;
127
- readonly showAfter?: number;
128
- readonly trigger?: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<"focus" | "hover" | "click" | "contextmenu" | ("focus" | "hover" | "click" | "contextmenu")[]>, unknown, unknown>;
129
- readonly virtualRef?: import("element-plus").Measurable;
130
- readonly virtualTriggering?: boolean;
131
- readonly onContextmenu?: Function;
132
- readonly open?: boolean;
133
- } & ScrollbarMaxHeight>;
50
+ type: PropType<RxCheckBoxGroupToolTipConfig>;
134
51
  default: {
135
52
  placement: string;
136
53
  };
@@ -1,9 +1,9 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  modelValue: import("vue-types").VueTypeValidableDef<unknown[]>;
3
- RxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
3
+ rxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
4
4
  default: boolean;
5
5
  };
6
- RxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
6
+ rxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
7
7
  default: string;
8
8
  };
9
9
  checkBoxOptions: {
@@ -14,6 +14,10 @@ declare const _default: import("vue").DefineComponent<{
14
14
  type: FunctionConstructor;
15
15
  default: any;
16
16
  };
17
+ checkAllSlotsFormatter: {
18
+ type: FunctionConstructor;
19
+ default: any;
20
+ };
17
21
  toolTipConfig: {
18
22
  type: import("vue").PropType<{} & {
19
23
  readonly disabled?: boolean;
@@ -103,7 +107,7 @@ declare const _default: import("vue").DefineComponent<{
103
107
  readonly virtualTriggering?: boolean;
104
108
  readonly onContextmenu?: Function;
105
109
  readonly open?: boolean;
106
- } & ScrollbarMaxHeight>;
110
+ } & import("rx-compo/es/components/RxTooltip").ToolTipScrollbarCustomType>;
107
111
  default: {
108
112
  placement: string;
109
113
  };
@@ -146,10 +150,10 @@ declare const _default: import("vue").DefineComponent<{
146
150
  handleCheckedChange: (value: any) => void;
147
151
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
148
152
  modelValue: import("vue-types").VueTypeValidableDef<unknown[]>;
149
- RxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
153
+ rxCheckboxAll: import("vue-types").VueTypeValidableDef<boolean> & {
150
154
  default: boolean;
151
155
  };
152
- RxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
156
+ rxCheckboxAllText: import("vue-types").VueTypeValidableDef<string> & {
153
157
  default: string;
154
158
  };
155
159
  checkBoxOptions: {
@@ -160,6 +164,10 @@ declare const _default: import("vue").DefineComponent<{
160
164
  type: FunctionConstructor;
161
165
  default: any;
162
166
  };
167
+ checkAllSlotsFormatter: {
168
+ type: FunctionConstructor;
169
+ default: any;
170
+ };
163
171
  toolTipConfig: {
164
172
  type: import("vue").PropType<{} & {
165
173
  readonly disabled?: boolean;
@@ -249,7 +257,7 @@ declare const _default: import("vue").DefineComponent<{
249
257
  readonly virtualTriggering?: boolean;
250
258
  readonly onContextmenu?: Function;
251
259
  readonly open?: boolean;
252
- } & ScrollbarMaxHeight>;
260
+ } & import("rx-compo/es/components/RxTooltip").ToolTipScrollbarCustomType>;
253
261
  default: {
254
262
  placement: string;
255
263
  };
@@ -284,10 +292,11 @@ declare const _default: import("vue").DefineComponent<{
284
292
  };
285
293
  justify: string;
286
294
  baseColProps: import("./RxCheckboxGroup").ColProps;
287
- RxCheckboxAll: boolean;
288
- RxCheckboxAllText: string;
295
+ rxCheckboxAll: boolean;
296
+ rxCheckboxAllText: string;
289
297
  checkBoxOptions: import("./RxCheckboxGroup").CheckBoxType[];
290
298
  toolTipFormatter: Function;
299
+ checkAllSlotsFormatter: Function;
291
300
  isButton: boolean;
292
301
  rxCheckBoxAttr: {
293
302
  modelValue: string | number | boolean;
@@ -0,0 +1,4 @@
1
+ declare const RxRadio: any;
2
+ export { RxRadio };
3
+ export default RxRadio;
4
+ export type { RxRadioProps, RxRadioPublicProps, RxRadioComponent } from './src/RxRadio';
@@ -0,0 +1 @@
1
+ import{withInstall as o}from"rx-compo/es/utils/with-install";import{defineComponent as e,resolveComponent as l,openBlock as t,createElementBlock as a,createVNode as s,mergeProps as r,createSlots as u,withCtx as d,createBlock as n,resolveDynamicComponent as i,normalizeProps as m,renderSlot as p}from"vue";import{ElRadio as c}from"element-plus";import{useVModel as f}from"@vueuse/core";var R=e({name:"RxRadio",components:{ElRadio:c},props:{modelValue:{type:[String,Number,Boolean],default:!1},slots:{type:Function,default:null}},setup:(o,{emit:e})=>({rxRadioLoacl:f(o,"modelValue",e)})});const x={class:"rx-radio"};R.render=function(o,e,c,f,R,v){const $=l("el-radio");return t(),a("div",x,[s($,r({modelValue:o.rxRadioLoacl,"onUpdate:modelValue":e[0]||(e[0]=e=>o.rxRadioLoacl=e)},{...o.$attrs,...o.$props}),u({_:2},[o.$slots.default||o.slots?{name:"default",fn:d((()=>[o.slots?(t(),n(i(o.slots.call(null,o.$attrs)),m(r({key:0},o.$attrs)),null,16)):p(o.$slots,"default",{key:1})]))}:void 0]),1040,["modelValue"])])},R.__file="packages/components/RxRadio/src/RxRadio.vue";const v=o(R);export{v as RxRadio,v as default};
@@ -0,0 +1,15 @@
1
+ import type { ExtractInnerPropTypes, ExtractPublicPropTypes } from 'rx-compo/es/utils';
2
+ import { DefineComponent } from 'vue';
3
+ export declare const RxRadioProps: {
4
+ modelValue: {
5
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
6
+ default: boolean;
7
+ };
8
+ slots: {
9
+ type: FunctionConstructor;
10
+ default: any;
11
+ };
12
+ };
13
+ export declare type RxRadioProps = ExtractInnerPropTypes<typeof RxRadioProps>;
14
+ export declare type RxRadioPublicProps = ExtractPublicPropTypes<typeof RxRadioProps>;
15
+ export declare type RxRadioComponent = DefineComponent<keyof RxRadioPublicProps> & RxRadioPublicProps;
@@ -0,0 +1,25 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
4
+ default: boolean;
5
+ };
6
+ slots: {
7
+ type: FunctionConstructor;
8
+ default: any;
9
+ };
10
+ }, {
11
+ rxRadioLoacl: import("vue").Ref<string | number | boolean> | import("vue").WritableComputedRef<string | number | boolean>;
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ modelValue: {
14
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
15
+ default: boolean;
16
+ };
17
+ slots: {
18
+ type: FunctionConstructor;
19
+ default: any;
20
+ };
21
+ }>>, {
22
+ slots: Function;
23
+ modelValue: string | number | boolean;
24
+ }>;
25
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const RxRadioButton: any;
2
+ export { RxRadioButton };
3
+ export default RxRadioButton;
4
+ export type { RxRadioButtonProps, RxRadioButtonPublicProps, RxRadioButtonComponent } from './src/RxRadioButton';
@@ -0,0 +1 @@
1
+ import{withInstall as o}from"rx-compo/es/utils/with-install";import{defineComponent as t,resolveComponent as e,openBlock as l,createElementBlock as a,createVNode as s,mergeProps as r,createSlots as u,withCtx as n,createBlock as d,resolveDynamicComponent as i,normalizeProps as m,renderSlot as p}from"vue";import{ElRadio as c}from"element-plus";import{useVModel as f}from"@vueuse/core";var R=t({name:"RxRadioButton",components:{ElRadio:c},props:{modelValue:{type:[String,Number,Boolean],default:!1},slots:{type:Function,default:null}},setup:(o,{emit:t})=>({rxRadioLoacl:f(o,"modelValue",t)})});const x={class:"rx-radio-button"};R.render=function(o,t,c,f,R,v){const $=e("el-radio-button");return l(),a("div",x,[s($,r({modelValue:o.rxRadioLoacl,"onUpdate:modelValue":t[0]||(t[0]=t=>o.rxRadioLoacl=t)},{...o.$attrs,...o.$props}),u({_:2},[o.$slots.default||o.slots?{name:"default",fn:n((()=>[o.slots?(l(),d(i(o.slots.call(null,o.$attrs)),m(r({key:0},o.$attrs)),null,16)):p(o.$slots,"default",{key:1})]))}:void 0]),1040,["modelValue"])])},R.__file="packages/components/RxRadioButton/src/RxRadioButton.vue";const v=o(R);export{v as RxRadioButton,v as default};
@@ -0,0 +1,15 @@
1
+ import type { ExtractInnerPropTypes, ExtractPublicPropTypes } from 'rx-compo/es/utils';
2
+ import { DefineComponent } from 'vue';
3
+ export declare const RxRadioButtonProps: {
4
+ modelValue: {
5
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
6
+ default: boolean;
7
+ };
8
+ slots: {
9
+ type: FunctionConstructor;
10
+ default: any;
11
+ };
12
+ };
13
+ export declare type RxRadioButtonProps = ExtractInnerPropTypes<typeof RxRadioButtonProps>;
14
+ export declare type RxRadioButtonPublicProps = ExtractPublicPropTypes<typeof RxRadioButtonProps>;
15
+ export declare type RxRadioButtonComponent = DefineComponent<keyof RxRadioButtonPublicProps> & RxRadioButtonPublicProps;
@@ -0,0 +1,25 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
4
+ default: boolean;
5
+ };
6
+ slots: {
7
+ type: FunctionConstructor;
8
+ default: any;
9
+ };
10
+ }, {
11
+ rxRadioLoacl: import("vue").Ref<string | number | boolean> | import("vue").WritableComputedRef<string | number | boolean>;
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ modelValue: {
14
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
15
+ default: boolean;
16
+ };
17
+ slots: {
18
+ type: FunctionConstructor;
19
+ default: any;
20
+ };
21
+ }>>, {
22
+ slots: Function;
23
+ modelValue: string | number | boolean;
24
+ }>;
25
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ rxRadioSlots: string[];
3
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const RxRadioGroup: any;
2
+ export { RxRadioGroup };
3
+ export default RxRadioGroup;
4
+ export type { RxRadioGroupProps, RxRadioGroupPublicProps, RxRadioGroupComponent } from './src/RxRadioGroup';
@@ -0,0 +1 @@
1
+ import{withInstall as o}from"rx-compo/es/utils/with-install";import{defineComponent as e,resolveComponent as t,openBlock as r,createBlock as s,normalizeProps as a,mergeProps as n,createSlots as p,renderList as u,withCtx as l,renderSlot as m,guardReactiveProps as i,createCommentVNode as d}from"vue";import{useVModel as c}from"@vueuse/core";import{ElRadioGroup as R}from"element-plus";import{RxRadio as x}from"rx-compo/es/components";const f={modelValue:{type:[String,Number,Boolean],default:!1}};var $=e({name:"RxRadioComponents",components:{RxRadio:x},setup:(o,{slots:e})=>({rxRadioSlots:Object.keys(e)})});$.render=function(o,e,d,c,R,x){const f=t("rx-radio");return o.$attrs.isButton?(r(),s(f,a(n({key:0},o.$attrs.isButton)),p({_:2},[u(o.rxRadioSlots,(e=>({name:e,fn:l((t=>[m(o.$slots,`${e}`,a(i(t)))]))})))]),1040)):(r(),s(f,a(n({key:1},o.$attrs)),p({_:2},[u(o.rxRadioSlots,(e=>({name:e,fn:l((t=>[m(o.$slots,`${e}`,a(i(t)))]))})))]),1040))},$.__file="packages/components/RxRadioGroup/components/RxRadioComponents.vue";var k=e({name:"RxRadioGroup",components:{ElRadioGroup:R,RxRadioComponents:$},props:f,setup:(o,{emit:e})=>({checkboxGroupValue:c(o,"modelValue",e)})});k.render=function(o,e,a,p,u,i){const c=t("RxRadioComponents"),R=t("el-radio-group");return r(),s(R,n({...o.$attrs,...o.$props},{modelValue:o.checkboxGroupValue,"onUpdate:modelValue":e[0]||(e[0]=e=>o.checkboxGroupValue=e),class:"rx-radio-group"}),{default:l((()=>[d(" 模板默认插槽 "),o.$slots.default?m(o.$slots,"default",{key:0}):(r(),s(c,{key:1}))])),_:3},16,["modelValue"])},k.__file="packages/components/RxRadioGroup/src/RxRadioGroup.vue";const G=o(k);export{G as RxRadioGroup,G as default};
@@ -0,0 +1,11 @@
1
+ import type { ExtractInnerPropTypes, ExtractPublicPropTypes } from 'rx-compo/es/utils';
2
+ import { DefineComponent } from 'vue';
3
+ export declare const RxRadioGroupProps: {
4
+ modelValue: {
5
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
6
+ default: boolean;
7
+ };
8
+ };
9
+ export declare type RxRadioGroupProps = ExtractInnerPropTypes<typeof RxRadioGroupProps>;
10
+ export declare type RxRadioGroupPublicProps = ExtractPublicPropTypes<typeof RxRadioGroupProps>;
11
+ export declare type RxRadioGroupComponent = DefineComponent<keyof RxRadioGroupPublicProps> & RxRadioGroupPublicProps;
@@ -0,0 +1,16 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
4
+ default: boolean;
5
+ };
6
+ }, {
7
+ checkboxGroupValue: import("vue").Ref<string | number | boolean> | import("vue").WritableComputedRef<string | number | boolean>;
8
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ modelValue: {
10
+ type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
11
+ default: boolean;
12
+ };
13
+ }>>, {
14
+ modelValue: string | number | boolean;
15
+ }>;
16
+ export default _default;
@@ -1 +1 @@
1
- import{withInstall as e}from"rx-compo/es/utils/with-install";import{computed as o,ref as t,watch as l,nextTick as n,defineComponent as s,onMounted as r,resolveComponent as i,openBlock as u,createElementBlock as c,mergeProps as a,createBlock as p,normalizeProps as x,withCtx as f,createVNode as m,createSlots as d,renderList as T,renderSlot as g,guardReactiveProps as S,createCommentVNode as v,normalizeStyle as R,createTextVNode as h,toDisplayString as C}from"vue";import{useVModel as y}from"@vueuse/core";import{RxScrollbar as P}from"rx-compo/es/components/RxScrollbar";import{RxTooltip as M}from"rx-compo/es/components/RxTooltip";import{RxSelect as V}from"rx-compo/es/components/RxSelect";import{useTextOverflow as w}from"rx-compo/es/utils/useTextOverflow";import{find as O}from"lodash-es";var b=s({name:"RxSelectPlus",components:{RxSelect:V,RxScrollbar:P,RxTooltip:M},props:{modelValue:{type:[Array,String,Number,Boolean,Object],default:""},toolTip:{type:Boolean,default:!0},toolTipConfig:{type:Object,default:{placement:"top"}},options:{type:Array,default:[]}},setup(e,{attrs:s,slots:i,emit:u,expose:c}){const a=t(),p=t(),x=y(e,"modelValue",u),{isOverflowed:f,componentsSwitch:m,handleMouseenter:d}=function(e){const{isOverflowed:t,checkOverflowCustom:l}=w("RxSelectPlus"),n=o((()=>e.toolTip&&t.value));return{isOverflowed:t,componentsSwitch:n,handleMouseenter:function(e){l(e.target)}}}(e),{rxToolTipConfig:T,updateRxToolTipConfig:g,getRxToolTipConfig:S}=function(e,o,l){const n=t();return{rxToolTipConfig:n,updateRxToolTipConfig:function(){var o;const{toolTipConfig:s,options:r,modelValue:i}=e,{width:u}=l.value.getBoundingClientRect(),c={width:`${u}px`,maxHeight:(null==s?void 0:s.maxHeight)?s.maxHeight:"80px"},a=t();if(null==s?void 0:s.content){const{content:e}=s;a.value=e}else a.value=null===(o=O(r,(e=>e.value===i)))||void 0===o?void 0:o.label;n.value=Object.assign(Object.assign({},s),{style:c,content:a.value})},getRxToolTipConfig:function(){return n.value}}}(e,0,a),v=Object.keys(i);return r((()=>{!function(e,o){l((()=>e.value),(()=>{n((()=>{o()}))}),{deep:!0,immediate:!0})}(x,g)})),c({rxSelectPlusRef:a,rxSelectRef:p,updateRxToolTipConfig:g,getRxToolTipConfig:S}),{rxSelectPlusRef:a,rxSelectRef:p,rxToolTipConfig:T,isOverflowed:f,rxSelectModelPlusValue:x,componentsSwitch:m,selectPlusSlots:v,handleMouseenter:d}}});b.render=function(e,o,t,l,n,s){const r=i("rx-select"),y=i("rx-scrollbar"),P=i("rx-tooltip");return u(),c("div",a({ref:"rxSelectPlusRef"},e.$attrs),[e.componentsSwitch?(u(),p(P,x(a({key:0},e.rxToolTipConfig)),{default:f((()=>[m(r,a({modelValue:e.rxSelectModelPlusValue,"onUpdate:modelValue":o[0]||(o[0]=o=>e.rxSelectModelPlusValue=o),class:"rx-select",ref:"rxSelectRef"},e.$attrs,{options:e.options,onMouseenter:e.handleMouseenter}),d({_:2},[T(e.selectPlusSlots,(o=>({name:o,fn:f((t=>[g(e.$slots,`${o}`,x(S(t)))]))})))]),1040,["modelValue","options","onMouseenter"])])),content:f((()=>[v(" 自定义tooltip "),e.$slots.rxToolTipSlot?g(e.$slots,"rxToolTipSlot",{key:0}):(u(),c("div",{key:1,style:R(e.rxToolTipConfig.style)},[v(" 默认模板 "),m(y,{"max-height":e.rxToolTipConfig.style.maxHeight},{default:f((()=>[h(C(e.rxToolTipConfig?.content),1)])),_:1},8,["max-height"])],4))])),_:3},16)):(u(),p(r,a({key:1,modelValue:e.rxSelectModelPlusValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.rxSelectModelPlusValue=o)},e.$attrs,{ref:"rxSelectRef",class:"rx-select",options:e.options,onMouseenter:e.handleMouseenter}),d({_:2},[T(e.selectPlusSlots,(o=>({name:o,fn:f((t=>[g(e.$slots,`${o}`,x(S(t)))]))})))]),1040,["modelValue","options","onMouseenter"]))],16)},b.__file="packages/components/RxSelectPlus/src/RxSelectPlus.vue";const $=e(b);export{$ as RxSelectPlus,$ as default};
1
+ import{withInstall as e}from"rx-compo/es/utils/with-install";import{computed as o,ref as t,watch as l,nextTick as n,defineComponent as s,onMounted as i,resolveComponent as r,openBlock as u,createElementBlock as c,mergeProps as a,createBlock as p,normalizeProps as x,withCtx as f,createVNode as m,createSlots as d,renderList as T,renderSlot as g,guardReactiveProps as S,createCommentVNode as v,normalizeStyle as h,createTextVNode as R,toDisplayString as C}from"vue";import{useVModel as y}from"@vueuse/core";import{RxScrollbar as P}from"rx-compo/es/components/RxScrollbar";import{RxTooltip as M}from"rx-compo/es/components/RxTooltip";import{RxSelect as V}from"rx-compo/es/components/RxSelect";import{useTextOverflow as w}from"rx-compo/es/utils/useTextOverflow";import{find as O}from"lodash-es";var b=s({name:"RxSelectPlus",components:{RxSelect:V,RxScrollbar:P,RxTooltip:M},props:{modelValue:{type:[Array,String,Number,Boolean,Object],default:""},toolTip:{type:Boolean,default:!0},toolTipConfig:{type:Object,default:{placement:"top"}},options:{type:Array,default:[]}},setup(e,{attrs:s,slots:r,emit:u,expose:c}){const a=t(),p=t(),x=y(e,"modelValue",u),{isOverflowed:f,componentsSwitch:m,handleMouseenter:d}=function(e){const{isOverflowed:t,checkOverflowCustom:l}=w("RxSelectPlus"),n=o((()=>e.toolTip&&t.value));return{isOverflowed:t,componentsSwitch:n,handleMouseenter:function(e){l(e.target)}}}(e),{rxToolTipConfig:T,updateRxToolTipConfig:g,getRxToolTipConfig:S}=function(e,o,l){const n=t();return{rxToolTipConfig:n,updateRxToolTipConfig:function(){var o;const{toolTipConfig:s,options:i,modelValue:r}=e,{width:u}=l.value.getBoundingClientRect(),c={width:(null==s?void 0:s.tooltipWidth)?s.tooltipWidth:`${u}px`,maxHeight:(null==s?void 0:s.maxHeight)?s.maxHeight:"80px"},a=t();if(null==s?void 0:s.content){const{content:e}=s;a.value=e}else a.value=null===(o=O(i,(e=>e.value===r)))||void 0===o?void 0:o.label;n.value=Object.assign(Object.assign({},s),{style:c,content:a.value})},getRxToolTipConfig:function(){return n.value}}}(e,0,a),v=Object.keys(r);return i((()=>{!function(e,o){l((()=>e.value),(()=>{n((()=>{o()}))}),{deep:!0,immediate:!0})}(x,g)})),c({rxSelectPlusRef:a,rxSelectRef:p,updateRxToolTipConfig:g,getRxToolTipConfig:S}),{rxSelectPlusRef:a,rxSelectRef:p,rxToolTipConfig:T,isOverflowed:f,rxSelectModelPlusValue:x,componentsSwitch:m,selectPlusSlots:v,handleMouseenter:d}}});b.render=function(e,o,t,l,n,s){const i=r("rx-select"),y=r("rx-scrollbar"),P=r("rx-tooltip");return u(),c("div",a({ref:"rxSelectPlusRef"},e.$attrs),[e.componentsSwitch?(u(),p(P,x(a({key:0},e.rxToolTipConfig)),{default:f((()=>[m(i,a({modelValue:e.rxSelectModelPlusValue,"onUpdate:modelValue":o[0]||(o[0]=o=>e.rxSelectModelPlusValue=o),class:"rx-select",ref:"rxSelectRef"},e.$attrs,{options:e.options,onMouseenter:e.handleMouseenter}),d({_:2},[T(e.selectPlusSlots,(o=>({name:o,fn:f((t=>[g(e.$slots,`${o}`,x(S(t)))]))})))]),1040,["modelValue","options","onMouseenter"])])),content:f((()=>[v(" 自定义tooltip "),e.$slots.rxToolTipSlot?g(e.$slots,"rxToolTipSlot",{key:0}):(u(),c("div",{key:1,style:h(e.rxToolTipConfig.style)},[v(" 默认模板 "),m(y,{"max-height":e.rxToolTipConfig.style.maxHeight},{default:f((()=>[R(C(e.rxToolTipConfig?.content),1)])),_:1},8,["max-height"])],4))])),_:3},16)):(u(),p(i,a({key:1,modelValue:e.rxSelectModelPlusValue,"onUpdate:modelValue":o[1]||(o[1]=o=>e.rxSelectModelPlusValue=o)},e.$attrs,{ref:"rxSelectRef",class:"rx-select",options:e.options,onMouseenter:e.handleMouseenter}),d({_:2},[T(e.selectPlusSlots,(o=>({name:o,fn:f((t=>[g(e.$slots,`${o}`,x(S(t)))]))})))]),1040,["modelValue","options","onMouseenter"]))],16)},b.__file="packages/components/RxSelectPlus/src/RxSelectPlus.vue";const $=e(b);export{$ as RxSelectPlus,$ as default};
@@ -1,6 +1,6 @@
1
1
  import type { ExtractPropTypes, PropType, DefineComponent } from 'vue';
2
2
  import type { RxOptionPropsType } from 'rx-compo/es/components';
3
- import { ScrollbarMaxHeight } from './types';
3
+ import type { ToolTipScrollbarCustomType } from 'rx-compo/es/components';
4
4
  export declare type SelectType = ExtractPropTypes<Array<any> & String>;
5
5
  export declare const RxSelectPlusProps: {
6
6
  modelValue: {
@@ -100,7 +100,7 @@ export declare const RxSelectPlusProps: {
100
100
  readonly virtualTriggering?: boolean;
101
101
  readonly onContextmenu?: Function;
102
102
  readonly open?: boolean;
103
- } & ScrollbarMaxHeight>;
103
+ } & ToolTipScrollbarCustomType>;
104
104
  default: {
105
105
  placement: string;
106
106
  };
@@ -96,7 +96,7 @@ declare const _default: import("vue").DefineComponent<{
96
96
  readonly virtualTriggering?: boolean;
97
97
  readonly onContextmenu?: Function;
98
98
  readonly open?: boolean;
99
- } & import("./types").ScrollbarMaxHeight>;
99
+ } & import("rx-compo/es/components/RxTooltip").ToolTipScrollbarCustomType>;
100
100
  default: {
101
101
  placement: string;
102
102
  };
@@ -212,7 +212,7 @@ declare const _default: import("vue").DefineComponent<{
212
212
  readonly virtualTriggering?: boolean;
213
213
  readonly onContextmenu?: Function;
214
214
  readonly open?: boolean;
215
- } & import("./types").ScrollbarMaxHeight>;
215
+ } & import("rx-compo/es/components/RxTooltip").ToolTipScrollbarCustomType>;
216
216
  default: {
217
217
  placement: string;
218
218
  };
@@ -1,7 +1,4 @@
1
1
  import { RxSelectPlusInstance, RxSelectInstance } from 'rx-compo/es/components';
2
- export interface ScrollbarMaxHeight {
3
- maxHeight?: number;
4
- }
5
2
  export interface RxSelectPlusExpose {
6
3
  rxSelectPlusRef: RxSelectPlusInstance;
7
4
  rxSelectRef: RxSelectInstance;