@aplus-frontend/ui 0.1.23 → 0.1.24
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/index.mjs +66 -63
- package/es/src/ap-download/ap-download.vue.d.ts +0 -3
- package/es/src/ap-download/ap-download.vue.mjs +10 -10
- package/es/src/ap-field/number/index.vue.mjs +20 -19
- package/es/src/ap-form/ap-form-item.vue.mjs +27 -25
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +18 -18
- package/es/src/ap-form/interface.d.ts +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/es/src/business/ap-attachment/ApAttachment.mjs +82 -0
- package/es/src/business/ap-attachment/constans.d.ts +44 -0
- package/es/src/business/ap-attachment/constans.mjs +42 -0
- package/es/src/business/ap-attachment/index.d.ts +3 -0
- package/es/src/business/ap-attachment/interface.d.ts +13 -0
- package/es/src/business/ap-attachment/style.css +62 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +25 -22
- package/es/src/business/ap-input-radio/interface.d.ts +8 -2
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +4 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +29 -0
- package/es/src/business/hooks/usePageListApTable.mjs +67 -0
- package/es/src/business/index.d.ts +123 -3
- package/es/src/business/index.mjs +29 -26
- package/es/src/editable-table/form-item.vue.mjs +80 -77
- package/es/src/editable-table/hooks/use-get-columns.mjs +30 -30
- package/es/src/editable-table/interface.d.ts +2 -2
- package/es/src/index.mjs +204 -201
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +2 -2
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -0
- package/lib/src/business/ap-attachment/constans.d.ts +44 -0
- package/lib/src/business/ap-attachment/constans.js +1 -0
- package/lib/src/business/ap-attachment/index.d.ts +3 -0
- package/lib/src/business/ap-attachment/interface.d.ts +13 -0
- package/lib/src/business/ap-attachment/style.css +62 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +8 -2
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +29 -0
- package/lib/src/business/hooks/usePageListApTable.js +1 -0
- package/lib/src/business/index.d.ts +123 -3
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/interface.d.ts +2 -2
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/package.json +2 -2
|
@@ -10,15 +10,12 @@ declare function __VLS_template(): {
|
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
11
|
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
|
|
12
12
|
size: string;
|
|
13
|
-
color: string;
|
|
14
13
|
disabled: boolean;
|
|
15
14
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
|
|
16
15
|
size: string;
|
|
17
|
-
color: string;
|
|
18
16
|
disabled: boolean;
|
|
19
17
|
}>>>, {
|
|
20
18
|
size: "small" | "middle" | "large";
|
|
21
|
-
color: string;
|
|
22
19
|
disabled: boolean;
|
|
23
20
|
}, {}>;
|
|
24
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");const y=require("./hooks/index.js");require("./style/ap-download.css");const b=require("./utils/getFileInfo.js"),S=require("./hooks/useStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");const y=require("./hooks/index.js");require("./style/ap-download.css");const b=require("./utils/getFileInfo.js"),S=require("./hooks/useStyle.js"),q=require("../config-provider/hooks/use-locale.js"),t=require("../config-provider/hooks/use-global-config.js"),z={key:0,class:"icon"},N={class:"text"},v=e.defineComponent({name:"ApDownload",__name:"ap-download",props:{text:{},color:{},size:{default:"middle"},disabled:{type:Boolean,default:!1},fileName:{},needName:{type:[Boolean,Object]},getOssAccess:{}},setup(n){const{lang:l}=q.useLocale(),a=e.useSlots(),c=e.computed(()=>l.value==="zh-cn"?"zh_CN":"en_US"),r=t.useGlobalConfig("uiMode"),o=n,i=t.useGlobalConfig("apUpload"),u=e.computed(()=>o.disabled),d=e.computed(()=>o.color?o.color:r.value==="aplus"?"#0070FF":"#1890FF"),p=e.computed(()=>o.size),{wrapperStyle:m,getWrapperClass:f,getInnerWrapperClass:g}=S.useStyle(d,p,u),C=e.computed(()=>{var s;return o.getOssAccess||((s=i.value)==null?void 0:s.getOssAccess)}),_=async()=>{o.disabled||await(await y.useOssInit(C.value,e.unref(c))).downloadFile(b.getFileInfo(o.needName,o.fileName))};return(s,w)=>(e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle(e.unref(m)),class:e.normalizeClass(e.unref(f)),onClick:_},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(g))},[e.unref(a).icon?(e.openBlock(),e.createElementBlock("span",z,[e.renderSlot(s.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",N,e.toDisplayString(s.text),1)],2)],6))}});exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("ant-design-vue");require("../../hooks/index.js");const s=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("ant-design-vue");require("../../hooks/index.js");const s=require("lodash-unified"),i=require("@fruits-chain/utils"),g=require("./helper.js");require("../../config-provider/index.js");require("./style.css");const S=require("../hooks/use-default-placeholder.js"),q=require("../../config-provider/hooks/use-namespace.js"),C=require("../../hooks/useControllableValue.js"),N=e.defineComponent({name:"ApFieldNumber",__name:"index",props:{mode:{},class:{},style:{},size:{},bordered:{type:Boolean,default:!0},placeholder:{},name:{},id:{},type:{},addonBefore:{},addonAfter:{},prefix:{},"onUpdate:value":{},valueModifiers:{},status:{},stringMode:{type:Boolean},defaultValue:{},value:{},prefixCls:{},min:{default:-1/0},max:{default:1/0},step:{default:1},tabindex:{},controls:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},autofocus:{type:Boolean},keyboard:{type:Boolean,default:!0},parser:{},formatter:{},precision:{},decimalSeparator:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},emptyText:{default:"--"},thousands:{type:Boolean,default:!1},limitDecimalsRetain:{type:Boolean}},emits:["update:value"],setup(d,{expose:p,emit:c}){const f=c,{b:a}=q.useNamespace("field-number"),o=d,l=e.ref(),{value:n,updateValue:m}=C.useControllableValue(o,f),y=S.useDefaultPlaceholder("Number",o),v=e.computed(()=>{let t=e.unref(n);if(s.isNil(t))return o.emptyText;o.precision&&(t=i.roundWith(t,o.precision));let r=o.thousands?i.toDecimalMark(t):String(t);return o.precision&&o.limitDecimalsRetain&&(r=g.addZeroToDecimalPlaces(r,o.precision)),r});function B(){var t;(t=l.value)==null||t.focus()}function b(){var t;(t=l.value)==null||t.blur()}return p({focus:B,blur:b}),(t,r)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a)("label-left"))},[e.renderSlot(t.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(v.value),1),t.$slots.addonAfter?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a)("label-right"))},[e.renderSlot(t.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(k.InputNumber),e.mergeProps({key:1},e.unref(s.omit)(o,["value","onUpdate:value"]),{placeholder:e.unref(y),value:e.unref(n),"onUpdate:value":e.unref(m),ref_key:"inputRef",ref:l}),e.createSlots({_:2},[e.renderList(t.$slots,(V,u)=>({name:u,fn:e.withCtx(h=>[e.renderSlot(t.$slots,u,e.normalizeProps(e.guardReactiveProps(h||{})))])}))]),1040,["placeholder","value","onUpdate:value"]))}});exports.default=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("ant-design-vue"),T=require("ant-design-vue/es/theme/internal"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("ant-design-vue"),T=require("ant-design-vue/es/theme/internal"),i=require("lodash-unified"),z=require("./constant.js"),A=require("@ant-design/icons-vue");require("../config-provider/index.js");const D=require("./context.js");require("./style/ap-form-item.css");const O=require("@fruits-chain/utils"),R=require("../config-provider/hooks/use-namespace.js"),j=["title"],E=e.defineComponent({name:"ApFormItem",__name:"ap-form-item",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{default:"value"},initialValue:{},_signal:{}},setup(g,{expose:B}){var y,b;const t=g,l=e.useSlots(),{model:u,updateModel:s,internalInstance:d}=D.useInjectForm(),{m:f,b:C}=R.useNamespace("ap-form-item"),c=e.ref(!1),r=e.ref(),[,V]=T.useToken();e.onMounted(async()=>{let o=i.isFunction(t.initialValue)?t.initialValue():t.initialValue;O.isPromise(o)&&(o=await o),d==null||d.registerField({name:t.name,initialValue:o})});const m=e.computed(()=>t.name?i.isArray(t.name)?t.name.reduce((o,n)=>o==null?void 0:o[n],e.unref(u)):u==null?void 0:u.value[t.name]:null),p=e.ref((b=(y=l.default)==null?void 0:y.call(l))==null?void 0:b[0]);e.watch(()=>{var o;return(o=l.default)==null?void 0:o.call(l)},o=>{p.value=o==null?void 0:o[0]});function k(o){s==null||s(t.name,o)}function q(){c.value=!0}function N(){c.value=!1}const v=e.computed(()=>{var n,a;if(!t.name)return(n=l.default())==null?void 0:n[0];const o=e.unref(p);return o?e.cloneVNode(o,{[t.valuePropName]:e.unref(m),[`onUpdate:${t.valuePropName}`]:k,bordered:t.bordered?!1:(a=o==null?void 0:o.props)==null?void 0:a.bordered,onFocus:q,onBlur:N}):null});function P(){var o;(o=r.value)==null||o.onFieldBlur()}function S(){var o;(o=r.value)==null||o.onFieldChange()}function w(){var o;(o=r.value)==null||o.clearValidate()}function x(){var o;(o=r.value)==null||o.resetField()}function _(){return e.unref(m)}return B({onFieldBlur:P,onFieldChange:S,clearValidate:w,resetField:x,getFieldValue:_}),(o,n)=>(e.openBlock(),e.createBlock(e.unref(F.Form).Item,e.mergeProps({ref_key:"formItemRef",ref:r},e.unref(i.omit)(t,[...e.unref(z.apFormItemColPropKeys),"tooltip","label"]),{class:{[e.unref(f)("bordered")]:o.bordered,[e.unref(f)("focused")]:o.bordered&&c.value,[e.unref(C)()]:!0},colon:o.bordered?!1:t.colon}),e.createSlots({default:e.withCtx(()=>[v.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0})):e.createCommentVNode("",!0)]),_:2},[t.tooltip?{name:"tooltip",fn:e.withCtx(({class:a})=>[e.createElementVNode("span",{class:e.normalizeClass(a)},[e.createVNode(e.unref(F.Tooltip),{title:t.tooltip},{default:e.withCtx(()=>[e.createVNode(e.unref(A.QuestionCircleOutlined),{style:e.normalizeStyle({color:e.unref(V).colorPrimary})},null,8,["style"])]),_:1},8,["title"])],2)]),key:"0"}:void 0,o.label?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",{title:o.label,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.toDisplayString(o.label),9,j)]),key:"1"}:void 0,e.renderList(e.unref(i.omit)(l,"default"),(a,h)=>({name:h,fn:e.withCtx(I=>[e.renderSlot(o.$slots,h,e.normalizeProps(e.guardReactiveProps(I||{})))])}))]),1040,["class","colon"]))}});exports.default=E;
|
|
@@ -909,7 +909,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
909
909
|
}> | undefined;
|
|
910
910
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
911
911
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
912
|
-
setFieldValue: (
|
|
912
|
+
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
913
913
|
registerWatch: typeof registerWatch;
|
|
914
914
|
getInternalInstance: typeof getInternalInstance;
|
|
915
915
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormProps>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),w=require("ant-design-vue"),x=require("./context.js"),a=require("lodash-unified"),D=require("./constant.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),w=require("ant-design-vue"),x=require("./context.js"),a=require("lodash-unified"),D=require("./constant.js"),F=require("../utils/index.js"),O=i.defineComponent({__name:"ap-form",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{}},setup(V,{expose:C}){const n=V;function g(e,t,l=!0){var _;if(a.isArray(e)){let c=r;for(let d=0;d<e.length-1;d++)e[d]in c||(c[e[d]]={}),c=c[e[d]];c[e[e.length-1]]=t}else r[e]=t;let o=a.isArray(e)?e[0]:e;l&&((_=n.onValuesChange)==null||_.call(n,{[o]:r[o]},r)),f()}const s=i.ref();let h=n.initialValues?a.cloneDeep(n.initialValues):{};const r=i.reactive(n.initialValues||{});let u=[];const M=async()=>{var e;(e=s.value)==null||e.resetFields(),await i.nextTick(()=>{Object.keys(r).forEach(t=>delete r[t]),Object.assign(r,a.cloneDeep(h)),f()})},R=e=>{var t;(t=s.value)==null||t.clearValidate(e)},b=(e,t)=>{var l;return(l=s.value)==null?void 0:l.validateFields(e,t)},q=e=>{var t;return(t=s.value)==null?void 0:t.getFieldsValue(e)},T=(e,t)=>{var l;return(l=s.value)==null?void 0:l.validate(e,t)},A=(e,t={})=>{var l;(l=s.value)==null||l.scrollToField(e,t)},B=e=>{Object.assign(r,e),f()},v=(e,t)=>{g(e,t),f()};function p(e,t){return t||e(i.toRaw(r)),u.push(e),()=>{u=u.filter(l=>l!==e)}}function y({initialValue:e,name:t}){if(F.isDef(e)&&F.isDef(t))if(g(t,e,!1),a.isArray(t)){let l=h;for(let o=0;o<t.length-1;o++)F.isDef(l[t[o]])||(l[t[o]]={}),l=l[t[o]];l[t[t.length-1]]=e}else h[t]=e}function I(e){if(e!==D.INTERNAL_FORM_INSTANCE_MARK){console.warn("getInternalInstance should only used at internal");return}return{registerField:y,registerWatch:p}}function f(){if(u.length){const e=i.toRaw(r);u.forEach(t=>{t(e)})}}return x.useProvideForm({model:i.computed(()=>r),updateModel:g,internalInstance:{registerWatch:p,registerField:y,setFieldValue:v}}),C({resetFields:M,clearValidate:R,validateFields:b,getFieldsValue:q,validate:T,scrollToField:A,setFieldsValue:B,setFieldValue:v,registerWatch:p,getInternalInstance:I}),(e,t)=>(i.openBlock(),i.createBlock(i.unref(w.Form),i.mergeProps({ref_key:"formRef",ref:s},i.unref(a.omit)(n,["initialValues"]),{model:r}),{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default")]),_:3},16,["model"]))}});exports.default=O;
|
|
@@ -11,7 +11,7 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
|
|
|
11
11
|
bordered?: boolean;
|
|
12
12
|
valuePropName?: string;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* 表单项的默认值(只生效一次),支持传入异步函数
|
|
15
15
|
*/
|
|
16
16
|
initialValue?: any;
|
|
17
17
|
/**
|
|
@@ -35,7 +35,7 @@ export type ApFormProps = Omit<FormProps, 'model'> & {
|
|
|
35
35
|
export type WatchFunc = (values?: Recordable) => void;
|
|
36
36
|
export type ApFormExpose<ModelType = any> = {
|
|
37
37
|
setFieldsValue: (fields: Partial<ModelType>) => void;
|
|
38
|
-
setFieldValue: (
|
|
38
|
+
setFieldValue: (name: NamePath, value: any) => void;
|
|
39
39
|
resetFields: () => Promise<void>;
|
|
40
40
|
clearValidate: (name?: NamePath) => void;
|
|
41
41
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
|
|
@@ -440,7 +440,7 @@ declare function __VLS_template(): {
|
|
|
440
440
|
}> | undefined;
|
|
441
441
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
442
442
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
443
|
-
setFieldValue: (
|
|
443
|
+
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
444
444
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
445
445
|
getInternalInstance: (mark: string) => {
|
|
446
446
|
registerField: ({ initialValue, name }: RegistedFieldType) => void;
|
|
@@ -632,7 +632,7 @@ declare function __VLS_template(): {
|
|
|
632
632
|
}> | undefined;
|
|
633
633
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
634
634
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
635
|
-
setFieldValue: (
|
|
635
|
+
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
636
636
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
637
637
|
getInternalInstance: (mark: string) => {
|
|
638
638
|
registerField: ({ initialValue, name }: RegistedFieldType) => void;
|
|
@@ -435,7 +435,7 @@ declare function __VLS_template(): {
|
|
|
435
435
|
}> | undefined;
|
|
436
436
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
437
437
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
438
|
-
setFieldValue: (
|
|
438
|
+
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
439
439
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
440
440
|
getInternalInstance: (mark: string) => {
|
|
441
441
|
registerField: ({ initialValue, name }: RegistedFieldType) => void;
|
|
@@ -627,7 +627,7 @@ declare function __VLS_template(): {
|
|
|
627
627
|
}> | undefined;
|
|
628
628
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
629
629
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
630
|
-
setFieldValue: (
|
|
630
|
+
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
631
631
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
632
632
|
getInternalInstance: (mark: string) => {
|
|
633
633
|
registerField: ({ initialValue, name }: RegistedFieldType) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),c=require("./constants.js"),T=require("@fruits-chain/utils");require("../ap-form/index.js");const g=require("ant-design-vue"),b=require("@ant-design/icons-vue"),y=require("../ap-form/ap-form-item.vue.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const d=(e,t,n)=>{let r={};return i.isObject(e)?Object.keys(e).forEach(s=>{i.isObject(e[s])?r[s]=d(e[s],t[s],n):r[s]=n(e[s],t)}):r=n(e,t),r},j=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,r]=t;return[n.startOf("day").valueOf(),r.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function F(e){return i.isArray(e)?e.join("."):e}function N(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const f=e=>N(e)==="map"?e:new Map(Object.entries(e||{})),a=e=>{const t=[],n=f(e);return n.forEach((r,s)=>{const o=n.get(s)||n.get(`${s}`);if(o){if(typeof o=="object"&&(o!=null&&o.text)){t.push({text:o==null?void 0:o.text,value:s,label:o==null?void 0:o.text,disabled:o.disabled});return}t.push({text:o,label:o,value:s})}}),t},O=e=>i.isUndefined(e)||e<0?0:e,S=(e,t,n)=>{if(n)return n;const r=["select","date"],s=["text","textArea","number"];if(t==="dateRange")return[e("ap.common.chooseText"),e("ap.common.chooseText")];if(r.includes(t))return e("ap.common.chooseText");if(s.includes(t))return e("ap.common.inputText")};function p(e,t){return!e||!i.isFunction(e)?e:e(t)}function V(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function E(e,t,n,r){var l;const s=c.apTableRenderItemMap[e];if(s)return u.createVNode(s,u.mergeProps(t,{mode:"read"}),null);const o=r==null?void 0:r[e];return((l=o==null?void 0:o.render)==null?void 0:l.call(o,t.value,n,t))||t.value}function P(e,t){if(e.customRenderFormItem)return()=>{const s=e.customRenderFormItem(e);return u.cloneVNode(s,{...e.fieldProps,span:e.span,...s.props||{}})};const n=c.apTableFormItemMap[e.valueType];if(n)return n;const r=t==null?void 0:t[e.valueType];return()=>{var o;const s=(o=r==null?void 0:r.renderFormItem)==null?void 0:o.call(r,e.fieldProps.field);return s?u.createVNode(y.default,u.mergeProps(e.fieldProps,{span:e.span}),h(s)?s:{default:()=>[s]}):null}}function v(e,t){const n=p(e.fieldProps,t),r=(n==null?void 0:n.field)||n||{},s=e.valueType==="switch",o=e.valueType==="index",l=s?{checked:t.value}:{value:o?t.index+1:t.value};return e.valueEnum&&(r.valueEnum=e.valueEnum),{...i.omit(r,["request"]),...l}}function I(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=a(e.valueEnum)),t}function C(e,t){var r;const n=t||{};return e.valueEnum&&!((r=n.field)!=null&&r.options)&&(n.field={...n.field,options:a(e.valueEnum)}),n}function q(e){if(!T.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function x(e,t,n){const r=t==null?void 0:t({title:e.title,column:e});if(r&&(r.length>1||r[0].children!=="v-if"))return r;const o=i.isString(e.title)?u.createVNode("span",{style:c.ellipsisTitleStyle,title:e.title},[e.title]):e.title,l=e.tooltip?i.isString(e.tooltip)?u.createVNode(u.Fragment,null,[e.tooltip]):e.tooltip(e):null,m=()=>u.createVNode("span",{style:{display:"inline-flex",alignItems:"center"}},[o,u.createVNode(g.Tooltip,{title:l,placement:"bottom"},{default:()=>[u.createVNode(b.QuestionCircleOutlined,{style:{padding:"4px",color:n,verticalAlign:"middle"}},null)]})]);return l?m:o}exports.apColumnToColumn=I;exports.dataIndexToStr=F;exports.formatParamsValueType=d;exports.getColumnOrder=O;exports.getFieldProps=p;exports.getPlaceholder=S;exports.getSearchFormItemRenderNode=P;exports.getTableCellRenderNode=E;exports.getTableRenderProps=v;exports.getTableRenderType=V;exports.getTableTitle=x;exports.objectToMap=f;exports.objectToString=q;exports.parseFieldValue=j;exports.updateFormProps=C;exports.valueEnumToArray=a;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),c=require("./constants.js"),T=require("@fruits-chain/utils");require("../ap-form/index.js");const g=require("ant-design-vue"),b=require("@ant-design/icons-vue"),y=require("../ap-form/ap-form-item.vue.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const d=(e,t,n)=>{let r={};return i.isObject(e)?Object.keys(e).forEach(s=>{i.isObject(e[s])?r[s]=d(e[s],t[s],n):r[s]=n(e[s],t)}):r=n(e,t),r},j=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,r]=t;return[n.startOf("day").valueOf(),r.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function F(e){return i.isArray(e)?e.join("."):e}function N(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const f=e=>N(e)==="map"?e:new Map(Object.entries(e||{})),a=e=>{const t=[],n=f(e);return n.forEach((r,s)=>{const o=n.get(s)||n.get(`${s}`);if(o){if(typeof o=="object"&&(o!=null&&o.text)){t.push({text:o==null?void 0:o.text,value:s,label:o==null?void 0:o.text,disabled:o.disabled});return}t.push({text:o,label:o,value:s})}}),t},O=e=>i.isUndefined(e)||e<0?0:e,S=(e,t,n)=>{if(n)return n;const r=["select","date"],s=["text","textArea","number"];if(t==="dateRange")return[e("ap.common.chooseText"),e("ap.common.chooseText")];if(r.includes(t))return e("ap.common.chooseText");if(s.includes(t))return e("ap.common.inputText")};function p(e,t){return!e||!i.isFunction(e)?e:e(t)}function V(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function E(e,t,n,r){var l;const s=c.apTableRenderItemMap[e];if(s)return u.createVNode(s,u.mergeProps(t,{mode:"read"}),null);const o=r==null?void 0:r[e];return((l=o==null?void 0:o.render)==null?void 0:l.call(o,t.value,n,t))||t.value}function P(e,t){if(e.customRenderFormItem)return()=>{const s=e.customRenderFormItem(e);return u.cloneVNode(s,{...e.fieldProps,span:e.span,...s.props||{}})};const n=c.apTableFormItemMap[e.valueType];if(n)return n;const r=t==null?void 0:t[e.valueType];return()=>{var o;const s=(o=r==null?void 0:r.renderFormItem)==null?void 0:o.call(r,e.fieldProps.field);return s?u.createVNode(y.default,u.mergeProps(e.fieldProps,{span:e.span}),h(s)?s:{default:()=>[s]}):null}}function v(e,t){const n=p(e.fieldProps,t),r=(n==null?void 0:n.field)||n||{},s=e.valueType==="switch",o=e.valueType==="index",l=s?{checked:t.value}:{value:o?t.index+1:t.value};return e.valueEnum&&(r.valueEnum=e.valueEnum),{...i.omit(r,["request"]),...l}}function I(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=a(e.valueEnum)),t}function C(e,t){var r;const n=t||{};return e.valueEnum&&!((r=n.field)!=null&&r.options)&&(n.field={...n.field,options:a(e.valueEnum)}),n}function q(e){if(!T.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function x(e,t,n){const r=t==null?void 0:t({title:e.title,column:e});if(r&&(r.length>1||r[0].children&&r[0].children!=="v-if"))return r;const o=i.isString(e.title)?u.createVNode("span",{style:c.ellipsisTitleStyle,title:e.title},[e.title]):e.title,l=e.tooltip?i.isString(e.tooltip)?u.createVNode(u.Fragment,null,[e.tooltip]):e.tooltip(e):null,m=()=>u.createVNode("span",{style:{display:"inline-flex",alignItems:"center"}},[o,u.createVNode(g.Tooltip,{title:l,placement:"bottom"},{default:()=>[u.createVNode(b.QuestionCircleOutlined,{style:{padding:"4px",color:n,verticalAlign:"middle"}},null)]})]);return l?m:o}exports.apColumnToColumn=I;exports.dataIndexToStr=F;exports.formatParamsValueType=d;exports.getColumnOrder=O;exports.getFieldProps=p;exports.getPlaceholder=S;exports.getSearchFormItemRenderNode=P;exports.getTableCellRenderNode=E;exports.getTableRenderProps=v;exports.getTableRenderType=V;exports.getTableTitle=x;exports.objectToMap=f;exports.objectToString=q;exports.parseFieldValue=j;exports.updateFormProps=C;exports.valueEnumToArray=a;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { AttachmentItemProps, ApAttachmentProps } from './interface';
|
|
2
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
|
+
declare const _default: DefineComponent<{
|
|
5
|
+
attachmentList: {
|
|
6
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
7
|
+
default: never[];
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
textToolTipPlacement: {
|
|
11
|
+
type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
fileMorePopoverPlacement: {
|
|
15
|
+
type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
color: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
needName: {
|
|
26
|
+
type: PropType<{
|
|
27
|
+
nameKey?: string;
|
|
28
|
+
pathKey?: string;
|
|
29
|
+
}>;
|
|
30
|
+
default: () => {
|
|
31
|
+
nameKey: string;
|
|
32
|
+
pathKey: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
getOssAccess: {
|
|
36
|
+
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
37
|
+
};
|
|
38
|
+
disabled: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
toolTipBgColor: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
|
+
attachmentList: {
|
|
47
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
48
|
+
default: never[];
|
|
49
|
+
required: boolean;
|
|
50
|
+
};
|
|
51
|
+
textToolTipPlacement: {
|
|
52
|
+
type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
fileMorePopoverPlacement: {
|
|
56
|
+
type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
color: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
};
|
|
62
|
+
size: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
needName: {
|
|
67
|
+
type: PropType<{
|
|
68
|
+
nameKey?: string;
|
|
69
|
+
pathKey?: string;
|
|
70
|
+
}>;
|
|
71
|
+
default: () => {
|
|
72
|
+
nameKey: string;
|
|
73
|
+
pathKey: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
getOssAccess: {
|
|
77
|
+
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
78
|
+
};
|
|
79
|
+
disabled: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
toolTipBgColor: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
};
|
|
86
|
+
}>>, {
|
|
87
|
+
size: string;
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
needName: {
|
|
90
|
+
nameKey?: string;
|
|
91
|
+
pathKey?: string;
|
|
92
|
+
};
|
|
93
|
+
textToolTipPlacement: TooltipPlacement;
|
|
94
|
+
attachmentList: AttachmentItemProps[];
|
|
95
|
+
fileMorePopoverPlacement: TooltipPlacement;
|
|
96
|
+
}, {}>;
|
|
97
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("ant-design-vue");require("../../config-provider/index.js");const L=require("./constans.js"),v=require("../../ap-download/utils/getFileInfo.js");require("./style.css");const x=require("../../ap-download/hooks/index.js"),O=require("lodash-unified"),T=require("../../config-provider/hooks/use-namespace.js"),h=require("../../config-provider/hooks/use-global-config.js"),b=require("../../config-provider/hooks/use-locale.js"),P=e.defineComponent({name:"ApAttachment",props:L.ApAttachmentProps(),setup(t){const{b:g,e:o}=T.useNamespace("ap-attachment"),N=h.useGlobalConfig("uiMode"),p=h.useGlobalConfig("apUpload"),{lang:A,t:c}=b.useLocale(),s=e.useSlots(),V=e.computed(()=>A.value==="zh-cn"?"zh_CN":"en_US"),l=e.computed(()=>t.attachmentList.length===1),r=e.computed(()=>t.attachmentList.length>0?t.attachmentList[0].fileName:""),w=e.computed(()=>l.value?r.value:c("ap.apAttachment.downloadall")),d=e.computed(()=>t.color?t.color:N.value==="aplus"?"#0070FF":"#1890FF"),C=e.computed(()=>({width:l.value?"auto":"266px"})),m=e.computed(()=>({"--download-main-color":d.value,"--download-main-color-opacity":v.getHexWithOpacity(d.value,.6)})),q=e.computed(()=>{var a;return t.getOssAccess||((a=p.value)==null?void 0:a.getOssAccess)}),y=e.computed(()=>{const a=s.default?s.default()[0]:null;return a?e.cloneVNode(a,{style:{"font-size":"16px"}}):null}),u=async a=>{if(!t.disabled){const n=await x.useOssInit(q.value,e.unref(V)),i=O.isArray(e.toRaw(a))?e.toRaw(a):[e.toRaw(a)];await n.downloadFile(v.getFileInfo(t.needName,i))}},F=a=>a&&a.length>0?e.createVNode("ul",{class:[o("file-list")],style:m.value},[a.map((n,i)=>e.createVNode("li",{key:i,class:[o("file-item")],onClick:()=>u(n)},[n.fileName])),e.createVNode("li",{class:[o("down-load-all")],onClick:()=>u(t.attachmentList)},[c("ap.apAttachment.downloadall")])]):null;return()=>e.createVNode("div",{class:[g()],style:[C.value,m.value]},[e.createVNode(f.Tooltip,{title:w.value,placement:t.textToolTipPlacement,color:t.toolTipBgColor},{default:()=>[e.createVNode("div",{class:[o("content")],onClick:()=>u(l.value?t.attachmentList[0]:t.attachmentList)},[s.default?e.createVNode("div",{class:[o("text-render")]},[y.value,e.createTextVNode(" ")]):null,e.createVNode("div",{class:[o("text-inner")]},[r.value])])]}),e.createVNode(f.Popover,{content:F(t.attachmentList),placement:t.fileMorePopoverPlacement,color:"#fff"},{default:()=>[!l.value&&e.createVNode("div",{class:[o("more")]},[c("ap.apAttachment.more")])]})])}});exports.default=P;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ApAttachmentProps as _ApAttachmentProps, AttachmentItemProps } from './interface';
|
|
3
|
+
export declare const ApAttachmentProps: () => {
|
|
4
|
+
attachmentList: {
|
|
5
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
6
|
+
default: never[];
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
textToolTipPlacement: {
|
|
10
|
+
type: PropType<_ApAttachmentProps["textToolTipPlacement"]>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
fileMorePopoverPlacement: {
|
|
14
|
+
type: PropType<_ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
needName: {
|
|
25
|
+
type: PropType<{
|
|
26
|
+
nameKey?: string;
|
|
27
|
+
pathKey?: string;
|
|
28
|
+
}>;
|
|
29
|
+
default: () => {
|
|
30
|
+
nameKey: string;
|
|
31
|
+
pathKey: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
getOssAccess: {
|
|
35
|
+
type: PropType<_ApAttachmentProps["getOssAccess"]>;
|
|
36
|
+
};
|
|
37
|
+
disabled: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
toolTipBgColor: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({attachmentList:{type:Array,default:[],required:!0},textToolTipPlacement:{type:String,default:"topLeft"},fileMorePopoverPlacement:{type:String,default:"bottom"},color:{type:String},size:{type:String,default:"middle"},needName:{type:Object,default:()=>({nameKey:"fileName",pathKey:"filePath"})},getOssAccess:{type:Function},disabled:{type:Boolean,default:!1},toolTipBgColor:{type:String}});exports.ApAttachmentProps=e;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApDownLoadProps } from '../../ap-download/interface';
|
|
2
|
+
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
|
+
export type AttachmentItemProps = {
|
|
4
|
+
fileName: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
export type ApAttachmentProps = Required<{
|
|
9
|
+
attachmentList: Array<AttachmentItemProps> | [];
|
|
10
|
+
textToolTipPlacement?: TooltipPlacement;
|
|
11
|
+
fileMorePopoverPlacement?: TooltipPlacement;
|
|
12
|
+
toolTipBgColor?: string;
|
|
13
|
+
} & Pick<ApDownLoadProps, 'color' | 'size' | 'needName' | 'disabled'>> & Pick<ApDownLoadProps, 'getOssAccess'>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.aplus-ap-attachment {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
}
|
|
5
|
+
.aplus-ap-attachment__content {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.aplus-ap-attachment__text-render {
|
|
10
|
+
color: var(--download-main-color);
|
|
11
|
+
margin-right: 5px;
|
|
12
|
+
}
|
|
13
|
+
.aplus-ap-attachment__text-render:hover {
|
|
14
|
+
color: var(--download-main-color-opacity);
|
|
15
|
+
}
|
|
16
|
+
.aplus-ap-attachment__text-inner {
|
|
17
|
+
max-width: 190px;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
color: var(--download-main-color);
|
|
25
|
+
}
|
|
26
|
+
.aplus-ap-attachment__text-inner:hover {
|
|
27
|
+
color: var(--download-main-color-opacity);
|
|
28
|
+
}
|
|
29
|
+
.aplus-ap-attachment__more {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
color: var(--download-main-color);
|
|
34
|
+
}
|
|
35
|
+
.aplus-ap-attachment__more:hover {
|
|
36
|
+
color: var(--download-main-color-opacity);
|
|
37
|
+
}
|
|
38
|
+
.aplus-ap-attachment__file-list {
|
|
39
|
+
max-width: 312px;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
.aplus-ap-attachment__file-item {
|
|
44
|
+
flex: 1;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
margin-bottom: 16px;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
color: #000;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
.aplus-ap-attachment__file-item:hover {
|
|
52
|
+
color: var(--download-main-color);
|
|
53
|
+
}
|
|
54
|
+
.aplus-ap-attachment__down-load-all {
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
color: var(--download-main-color);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
margin-bottom: 0;
|
|
59
|
+
}
|
|
60
|
+
.aplus-ap-attachment__down-load-all:hover {
|
|
61
|
+
color: var(--download-main-color-opacity);
|
|
62
|
+
}
|
|
@@ -6,12 +6,14 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
6
6
|
stringMode: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
8
|
"update:value": (...args: any[]) => void;
|
|
9
|
+
InputRadioChange: (...args: any[]) => void;
|
|
9
10
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInputRadioProps>, {
|
|
10
11
|
bordered: boolean;
|
|
11
12
|
controls: boolean;
|
|
12
13
|
stringMode: boolean;
|
|
13
14
|
}>>> & {
|
|
14
15
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onInputRadioChange?: ((...args: never) => any) | undefined;
|
|
15
17
|
}, {
|
|
16
18
|
bordered: boolean;
|
|
17
19
|
stringMode: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const a=require("ant-design-vue"),f=require("lodash-unified");require("./style.css");const C=require("../../config-provider/hooks/use-namespace.js"),h=e.defineComponent({name:"ApInputRadio",inheritAttrs:!1,__name:"ApInputRadio",props:{disabled:{type:Boolean},stringMode:{type:Boolean,default:!0},precision:{},max:{},min:{},step:{},bordered:{type:Boolean,default:!0},autofocus:{type:Boolean},decimalSeparator:{},controls:{type:Boolean,default:!0},formatter:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},value:{},options:{},onInputRadioChange:{}},emits:["update:value","InputRadioChange"],setup(i,{emit:p}){const c=a.Form.useInjectFormItemContext(),o=i,{b:d,e:m}=C.useNamespace("ap-input-radio"),u=p,r=n=>{let t={...o.value,...n};u("update:value",t),u("InputRadioChange",t),c.onFieldChange()},v=n=>{r({inputval:n})},g=n=>{r({radioVal:n.target.value})};return(n,t)=>{var s,l;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(d)()])},[e.createVNode(e.unref(a.InputNumber),e.mergeProps({class:e.unref(m)("input-number")},e.unref(f.omit)(o,["value","options"]),{value:o.value?(s=o.value)==null?void 0:s.inputval:"",onChange:v}),null,16,["class","value"]),e.createVNode(e.unref(a.RadioGroup),{value:o.value?(l=o.value)==null?void 0:l.radioVal:"",options:o.options,onChange:g},null,8,["value","options"])],2)}}});exports.default=h;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { InputNumberProps } from 'ant-design-vue/es/input-number';
|
|
2
2
|
type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
|
|
3
|
-
type ApInputValyeName = 'inputval' | 'radioVal';
|
|
4
3
|
export type ApInputValType = {
|
|
5
|
-
value
|
|
4
|
+
value: {
|
|
5
|
+
inputval: string | number;
|
|
6
|
+
radioVal: string | number;
|
|
7
|
+
};
|
|
6
8
|
};
|
|
7
9
|
export type ApInputRadioOptions = Array<{
|
|
8
10
|
value: string | number;
|
|
@@ -10,5 +12,9 @@ export type ApInputRadioOptions = Array<{
|
|
|
10
12
|
}>;
|
|
11
13
|
export type ApInputRadioProps = ApInputProps & ApInputValType & {
|
|
12
14
|
options: ApInputRadioOptions;
|
|
15
|
+
onInputRadioChange: (value: {
|
|
16
|
+
inputval: string | number;
|
|
17
|
+
radioVal: string | number;
|
|
18
|
+
}) => void;
|
|
13
19
|
};
|
|
14
20
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './usePageListApTable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js");exports.usePageListApTable=e.usePageListApTable;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ApTableProps } from '../../';
|
|
2
|
+
import { Recordable } from '../../type';
|
|
3
|
+
export interface UsePageListApTable extends ApTableProps {
|
|
4
|
+
/** 是否显示默认的行选择配置
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
isShowRowSelection?: boolean;
|
|
8
|
+
/** 转化ApTable查询参数 */
|
|
9
|
+
transformSearchFormValues?: (values: any) => any;
|
|
10
|
+
/** ApTable数据接口 */
|
|
11
|
+
api?(record: any): Promise<any>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 集成了列表页面的ApTable的默认配置
|
|
15
|
+
* 表格header吸顶效果,表格可拖动,表格行选择
|
|
16
|
+
* @version 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
export declare function usePageListApTable(props?: UsePageListApTable): [ApTableProps, {
|
|
19
|
+
reload: () => void;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
getSearchFormValues: () => any;
|
|
22
|
+
getApTableInstance: () => {
|
|
23
|
+
reset: () => void;
|
|
24
|
+
submit: () => void;
|
|
25
|
+
dataSource: any;
|
|
26
|
+
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
27
|
+
getSearchFormValues: () => Partial< Recordable>;
|
|
28
|
+
} | null;
|
|
29
|
+
}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../index.js");const p=require("lodash-unified"),b=require("vue"),f=require("../../config-provider/hooks/use-global-config.js");function g(l){const t=b.ref(null),n=f.useGlobalConfig("uiMode","aplus");console.log("mode",n.value);const{isShowRowSelection:u=!0,transformSearchFormValues:o,api:a,...c}=l||{},i=async e=>{const r=o?o(e):e;try{if(!a)throw new Error("api is not defined");const{records:s,total:d}=await a(r);return{data:s,total:d}}catch(s){return console.error(s),{data:[],total:0}}};return[p.merge({scroll:{x:"100%",y:"100%"},tableLayout:"fixed",columnResizable:!0,class:"ap-table--sticky",request:a?i:void 0,rowSelection:u?{mode:"internal",fixed:"left",columnWidth:50}:void 0,ref(e){t.value=e}},c),{reload:()=>{var e;(e=t.value)==null||e.submit()},reset:()=>{var e;(e=t.value)==null||e.reset()},getSearchFormValues:()=>{var r;const e=((r=t.value)==null?void 0:r.getSearchFormValues())||{};return o?o(e):e},getApTableInstance:()=>t.value}]}exports.usePageListApTable=g;
|