@aplus-frontend/ui 7.13.3 → 7.13.4
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/es/src/ap-field/select/index.vue.mjs +2 -1
- package/es/src/ap-field/style/select.mjs +4 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -283,7 +283,8 @@ const Oe = { key: 0 }, xe = ["onClick"], ze = /* @__PURE__ */ Z({
|
|
|
283
283
|
x.value ? {
|
|
284
284
|
name: "dropdownRender",
|
|
285
285
|
fn: d(({ menuNode: t }) => [
|
|
286
|
-
F("
|
|
286
|
+
F("div", {
|
|
287
|
+
tabindex: -1,
|
|
287
288
|
class: f(n(u)("popup-all-option")),
|
|
288
289
|
onClick: X
|
|
289
290
|
}, [
|
|
@@ -32,7 +32,7 @@ const n = (i) => {
|
|
|
32
32
|
borderRadius: "2px"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"div.ant-select-item
|
|
35
|
+
"div.ant-select-item": {
|
|
36
36
|
paddingInline: i.space,
|
|
37
37
|
paddingBlock: i.spaceXS,
|
|
38
38
|
fontWeight: "normal !important",
|
|
@@ -42,6 +42,9 @@ const n = (i) => {
|
|
|
42
42
|
display: "inline"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
+
"&:last-child": {
|
|
46
|
+
marginBottom: 0
|
|
47
|
+
},
|
|
45
48
|
"&.ant-select-item-option-selected:not(.ant-select-item-option-disabled)": {
|
|
46
49
|
color: i.colorPrimary
|
|
47
50
|
}
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.13.
|
|
1
|
+
declare const _default: "7.13.4";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@aplus-frontend/antdv"),r=require("lodash-unified");require("../../config-provider/index.js");require("../../hooks/index.js");const U=require("../hooks/use-default-placeholder.js"),$=require("../style/index.js"),j=require("./use-select-options.js"),K=require("../../config-provider/hooks/use-namespace.js"),H=require("../../config-provider/hooks/use-locale.js"),W=require("../../hooks/useControllableValue.js"),G={key:0},J=["onClick"],Q=e.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},variant:{},maxCount:{},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},placeholder:{},loading:{type:Boolean,default:void 0},prefix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},inputValue:{},searchValue:{},autoClearSearchValue:{type:Boolean,default:void 0},onDeselect:{},onActive:{},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},options:{},defaultActiveFirstOption:{type:Boolean,default:void 0},listItemHeight:{},onClickOption:{},menuItemSelectedIcon:{},labelInValue:{type:Boolean,default:void 0},showSearch:{type:Boolean,default:void 0},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},maxTagTextLength:{},maxTagCount:{},maxTagPlaceholder:{},tokenSeparators:{},removeIcon:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showAction:{},onPopupScroll:{},onInputKeyDown:{},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},addAll:{type:[Boolean,Number],default:5},params:{},searchDelay:{default:300},allowOnlySelect:{type:Boolean,default:!0}},emits:["update:value"],setup(B,{expose:N,emit:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@aplus-frontend/antdv"),r=require("lodash-unified");require("../../config-provider/index.js");require("../../hooks/index.js");const U=require("../hooks/use-default-placeholder.js"),$=require("../style/index.js"),j=require("./use-select-options.js"),K=require("../../config-provider/hooks/use-namespace.js"),H=require("../../config-provider/hooks/use-locale.js"),W=require("../../hooks/useControllableValue.js"),G={key:0},J=["onClick"],Q=e.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},variant:{},maxCount:{},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},placeholder:{},loading:{type:Boolean,default:void 0},prefix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},inputValue:{},searchValue:{},autoClearSearchValue:{type:Boolean,default:void 0},onDeselect:{},onActive:{},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},options:{},defaultActiveFirstOption:{type:Boolean,default:void 0},listItemHeight:{},onClickOption:{},menuItemSelectedIcon:{},labelInValue:{type:Boolean,default:void 0},showSearch:{type:Boolean,default:void 0},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},maxTagTextLength:{},maxTagCount:{},maxTagPlaceholder:{},tokenSeparators:{},removeIcon:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showAction:{},onPopupScroll:{},onInputKeyDown:{},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},addAll:{type:[Boolean,Number],default:5},params:{},searchDelay:{default:300},allowOnlySelect:{type:Boolean,default:!0}},emits:["update:value"],setup(B,{expose:N,emit:x}){let u=0;const o=B,{b:s}=K.useNamespace("field-select"),O=$.default("field"),w=e.ref(!1),{t:S}=H.useLocale(),V=r.debounce(t=>{if(!r.isFunction(o.request))return;u+=1;const n=u;f([]),a.value=!0,o.request(t).then(l=>{u===n&&(f(l),a.value=!1)})},o.searchDelay),F=(t,n)=>{const l=o.fieldNames?.label||"label";return typeof n?.[l]=="string"&&n[l].toLowerCase().indexOf(t.toLowerCase())>-1},{options:p,updateOptions:f}=j.useSelectOptions(o),y=e.shallowRef(),a=e.ref(o?.loading||!1),q=x,A=e.computed(()=>{if(o.multiple)return o.tokenSeparators?"tags":"multiple"});async function m(t=!0){if(!r.isFunction(o.request))return;a.value=!0,u+=1;const n=u;try{t&&f([]);const l=await o.request(void 0,o.params);if(n!==u)return;f(l)}finally{a.value=!1}}function I(t){o.onFocus?.(t),o.refetchOnFocus&&u>0&&!a.value&&m(!0)}e.onMounted(()=>{o.lazy||m()}),e.watch(()=>o.params,()=>{m()},{deep:!0});const{value:i,updateValue:v}=W.useControllableValue(o,q),_=U.useDefaultPlaceholder("Select",o),D=e.computed(()=>{const t=e.unref(i);if(!t)return o.emptyText;const n=o.fieldNames?.label||"label",l=o.fieldNames?.value||"value";return r.isArray(t)?t.map(d=>e.unref(p).find(E=>E[l]===d)?.[n]).filter(Boolean).join("、")||o.emptyText:e.unref(p).find(d=>d[l]===t)?.[n]||o.emptyText}),M=e.computed(()=>{const t=!!o?.showSearch,n=o.searchMode;let l={};return t&&(l=n==="request"?{defaultActiveFirstOption:!1,onSearch:V,notFoundContent:a.value?void 0:null,filterOption:!1,suffixIcon:null}:{filterOption:r.isNil(o?.filterOption)?F:o?.filterOption}),{...r.omit(o,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"]),placeholder:e.unref(_),...l}}),h=e.computed(()=>p.value.map(t=>t[o.fieldNames?.value||"value"])),b=e.computed(()=>o.multiple?r.isNumber(o.addAll)?h.value.length>=o.addAll:!!o.addAll:!1);function P(){y.value?.focus()}function T(){y.value?.blur()}function g(t,n){const l=o.fieldNames?.[n]??n;return t[l]}function z(t){const n=g(t,"value");v(o.multiple?[n]:n)}const k=e.computed(()=>{const t=e.unref(i)||[],n=h.value;return n.length>0&&n.every(l=>t.includes(l))}),L=e.computed(()=>(e.unref(i)||[]).length>0&&!k.value);function R(){console.log("123");const t=e.unref(i)||[],n=h.value;n.length&&n.every(l=>t?.includes(l))?v([]):v(h.value)}return N({focus:P,blur:T,request:m}),(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(D.value),1)):(e.openBlock(),e.createBlock(e.unref(c.Select),e.mergeProps({key:1,ref_key:"selectRef",ref:y,"allow-clear":""},M.value,{mode:A.value,value:e.unref(i),options:e.unref(p),loading:a.value,"menu-item-selected-icon":e.h("span"),"popup-class-name":`${e.unref(s)("popup")} ${e.unref(O)}`,open:w.value,"onUpdate:value":e.unref(v),onFocus:I,onDropdownVisibleChange:n[0]||(n[0]=l=>w.value=l)}),e.createSlots({option:e.withCtx(l=>[e.createVNode(e.unref(c.Flex),{justify:"space-between",align:"center",class:e.normalizeClass(e.unref(s)("popup-option-wrapper")),gap:8},{default:e.withCtx(()=>[e.createVNode(e.unref(c.Space),null,{default:e.withCtx(()=>[b.value?(e.openBlock(),e.createBlock(e.unref(c.Checkbox),{key:0,checked:e.unref(i)?.includes(g(l,"value"))},null,8,["checked"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(s)("popup-option-label"))},e.toDisplayString(g(l,"label")),3)]),_:2},1024),t.multiple&&t.allowOnlySelect?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(s)("popup-option-action")),onClick:e.withModifiers(()=>z(l),["stop"])},e.toDisplayString(e.unref(S)("ap.field.chooseOnly")),11,J)):e.createCommentVNode("",!0)]),_:2},1032,["class"])]),_:2},[e.renderList(t.$slots,(l,C)=>({name:C,fn:e.withCtx(d=>[e.renderSlot(t.$slots,C,e.normalizeProps(e.guardReactiveProps(d||{})))])})),a.value?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(c.Spin),{size:"small"})]),key:"0"}:void 0,b.value?{name:"dropdownRender",fn:e.withCtx(({menuNode:l})=>[e.createElementVNode("div",{tabindex:-1,class:e.normalizeClass(e.unref(s)("popup-all-option")),onClick:R},[e.createVNode(e.unref(c.Checkbox),{checked:k.value,indeterminate:L.value},null,8,["checked","indeterminate"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(s)("popup-all-option-label"))},e.toDisplayString(e.unref(S)("ap.field.selectAll")),3)],2),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l)))]),key:"1"}:void 0]),1040,["mode","value","options","loading","menu-item-selected-icon","popup-class-name","open","onUpdate:value"]))}});exports.default=Q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../style/index.js"),n=i=>{const{componentCls:o}=i,e=`${o}-select-popup`;return{[`${e}`]:{padding:i.space,[`${e}-all-option`]:{width:"100%",display:"inline-flex",cursor:"pointer",paddingInline:i.space,paddingBlock:i.spaceSM,[`${e}-all-option-label`]:{paddingInline:i.space}},[`${e}-option-wrapper`]:{height:"22px"},[`${e}-option-label`]:{...l.singleRow(i),color:"inherit"},[`${e}-option-action`]:{display:"none",color:i.colorPrimary,paddingInline:i.spaceSM,paddingBlock:i.spaceXXS,"&:hover":{background:i.colorPrimary,color:"#fff",borderRadius:"2px"}},"div.ant-select-item
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../style/index.js"),n=i=>{const{componentCls:o}=i,e=`${o}-select-popup`;return{[`${e}`]:{padding:i.space,[`${e}-all-option`]:{width:"100%",display:"inline-flex",cursor:"pointer",paddingInline:i.space,paddingBlock:i.spaceSM,[`${e}-all-option-label`]:{paddingInline:i.space}},[`${e}-option-wrapper`]:{height:"22px"},[`${e}-option-label`]:{...l.singleRow(i),color:"inherit"},[`${e}-option-action`]:{display:"none",color:i.colorPrimary,paddingInline:i.spaceSM,paddingBlock:i.spaceXXS,"&:hover":{background:i.colorPrimary,color:"#fff",borderRadius:"2px"}},"div.ant-select-item":{paddingInline:i.space,paddingBlock:i.spaceXS,fontWeight:"normal !important",marginBottom:i.spaceXS,"&:hover":{[`${e}-option-action`]:{display:"inline"}},"&:last-child":{marginBottom:0},"&.ant-select-item-option-selected:not(.ant-select-item-option-disabled)":{color:i.colorPrimary}}}}};exports.genSelectStyle=n;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.13.
|
|
1
|
+
declare const _default: "7.13.4";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.4";exports.default=e;
|