cnhis-design-vue 3.1.43-beta.0 → 3.1.43-beta.10
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/components/base-search/index.d.ts +46 -114
- package/es/components/base-search/src/index.vue.d.ts +46 -114
- package/es/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/src/hooks/useEdit.d.ts +26 -26
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -0
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +7 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -5
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +2 -2
- package/es/components/classification/src/index.vue.d.ts +7 -6
- package/es/components/date-picker/index.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -4
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +3 -2
- package/es/components/form-config/index.d.ts +72 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +72 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +21 -20
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +43 -0
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeEvent.d.ts +6 -0
- package/es/components/form-render/src/hooks/useLowCodeEvent.js +1 -0
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -127
- package/es/components/form-render/src/types/index.d.ts +1 -2
- package/es/components/iho-table/index.d.ts +15 -5
- package/es/components/iho-table/src/IhoTable.vue.d.ts +15 -5
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.d.ts +4 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +28 -3
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +3 -11
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +27 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +11 -25
- package/es/components/iho-table/src/types/pluginType.d.ts +18 -21
- package/es/components/iho-table/style/iconfont.ttf +0 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +4 -4
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +21 -20
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/quick-search/index.d.ts +54 -224
- package/es/components/quick-search/src/index.vue.d.ts +54 -224
- package/es/components/quick-search/src/index.vue.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/select-person/index.d.ts +13 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +13 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +109 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +67 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +27 -7
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -2
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +13 -3
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +134 -15
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +26 -87
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +16 -0
- package/es/shared/types/business.js +1 -0
- package/es/shared/types/index.d.ts +1 -1
- package/es/shared/utils/business.d.ts +11 -0
- package/es/shared/utils/business.js +1 -0
- package/es/shared/utils/index.d.ts +1 -5
- package/es/shared/utils/index.js +1 -1
- package/package.json +65 -65
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.d.ts +0 -11
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isFunction as
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useMemoize as t,useDebounceFn as l}from"@vueuse/core";import{identity as u,uniqBy as o,isString as r,isEqual as a,omit as i,isArray as c,isFunction as s}from"lodash-es";import{computed as v,inject as m,ref as d,watch as f}from"vue";import"../../index.js";import{InjectionAsyncQueue as y,InjectionFormItemDepsCollector as p}from"../constants/index.js";import{createUrlConfigParams as h,formRenderLog as g,keywordMatcher as w}from"../utils/index.js";import{useFormField as k}from"./useFormField.js";import{useFormRequest as b}from"./useFormRequest.js";function R(e,n){const t=d();return v({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const C=(()=>{const e=new Map,n=t((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:u});return(t,l)=>{const u=e.get(t)||{};return e.set(t,u),Reflect.has(u,l)?u[l]:u[l]=l.match(n(t))}})();function K(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&r(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!r(u)&&(!!C(e.value,u)||!!w(e.value,n.keyword)||!!l.length&&l.some((t=>r(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function F(e,t,l,u,r){const a=R(e,"commonList"),c=R(e,"recentList"),{searchContent:d,optionSearchFilter:f}=K();function p(e){return n(e.itemObj)}const h=v((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(p))?n:[]})),g=v((()=>{var e,n;return null!=(n=null==(e=c.value)?void 0:e.map(p))?n:[]})),w=v((()=>{if(!e.recommend||!h.value.length&&!g.value.length)return t.value;const n=o(h.value.concat(g.value),(e=>e[r.value])),l=t.value.filter((e=>n.every((function(n){return n[r.value]!==e[r.value]}))));return[...f(n,u.value),...l]})),{getRecommendRequestInfo:C,getHttpInstance:F}=b();function j(n){const{url:t,getRecommendIds:l}=C(),u=s(l)?l():{},o=s(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:x}=k(),O=m(y);return{postRecommend:async function(n){if(!e.recommend)return;const t=F();if(!t)return;const{url:u,info:o}=j("post"),a=w.value.find((e=>e[r.value]===n));a&&l("postRecommend",await t.post(u,{...o,keyword:"",itemId:r.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(d.value=n,a.value&&c.value&&e.recommendCache)return;const t=await O.addAsync(function(n,t){const{url:l,info:u}=j("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(x.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(i(n,["type"])):"recently"===n.type&&e.recently.push(i(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),c.value=u.slice(0,e.recentNum)},sortedOptions:w}}function j(n,t){e();const u=m(y),o=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:c,optionSearchFilter:s}=K(),w=d(null),{field:b,fieldKey:R}=k(),C=l((async function(e){if(c.value=e||"",!n.urlConfig)return w.value=null;try{w.value=await u.addAsync(await h({config:n.urlConfig,cache:n.requestCache,field:b.value}))}catch(e){r(e)&&g(e)}}),300),F=v((()=>w.value?s(w.value,o.value):Array.isArray(n.options)?s(n.options,o.value):[])),j=v((()=>w.value||n.options||[])),x=m(p);return f((()=>n.urlConfig),((e,l)=>{a(e,l)||(w.value=null,e&&(x.setDeps(R.value,e.dependKey||[],(async()=>{w.value=null,t.value=null,!n.lazyRequest&&await C()})),(t.value||!n.lazyRequest)&&C()))}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}function x(n,t){e();const u=m(y),o=v((()=>{var e,t,l,u;return null!=(u=null!=(l=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0])?l:n.labelField)?u:"text"})),i=v((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),c=v((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:s,optionSearchFilter:p}=K(),h=d(null),{fieldKey:w}=k(),{getSearchRequestInfo:R}=b(),C=l((async function(e){if(s.value=e||"",!n.autograph||!n.wordbook)return h.value=null;try{h.value=await u.addAsync(function(e,t,l){const u={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};return{...R(),params:u,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,w.value))}catch(e){r(e)&&g(e)}}),300),F=v((()=>h.value?p(h.value,o.value,c.value):Array.isArray(n.options)?p(n.options,o.value):[])),j=v((()=>h.value||n.options||[]));return f((()=>n.wordbook),((e,l)=>{a(e,l)||(h.value=null,e&&(t.value||!n.lazyRequest)&&C())}),{immediate:!0}),{labelKey:o,valueKey:i,filterOptions:F,fullOptions:j,fetchData:C}}export{C as searchContentMatcher,x as useAutographOptions,F as useRecommendOptions,j as useUrlConfigOptions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isArray as t,isObject as r}from"lodash-es";import{getBindEventSettingTrigger as n}from"../../../../shared/utils/business.js";function o(o){if(!e(o))return;const{decoratorProps:{fieldItem:i}={}}=o;i&&t(i.bindEventSetting)&&i.bindEventSetting.length&&i.bindEventSetting.forEach((e=>{r(e)&&n(e.event_type)(e,{getter:e=>o.form.getValuesIn(e),setter(e,t){o.form.setValuesIn(e,t)}})}))}function i(){return{lowCodeEventTrigger:o}}export{i as useLowCodeEvent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{Path as r}from"@formily/path";import{isArray as i}from"lodash-es";import{computed as o,unref as t}from"vue";import{isMatchLowCodeCondition as n}from"../../../../shared/utils/business.js";function l(l,d){const s={hideField:c((e=>e.setDisplay("none"))),showField:c((e=>e.setDisplay("visible"))),requiredField:c((e=>e.required=!0)),notRequiredField:c((e=>{e.required=!1,e.validate()})),enabledField:c((e=>e.editable=!0)),disabledField:c((e=>e.editable=!1))};function c(r){return i=>{i.forEach((i=>{const o=d.query(i).take();o&&e(o)&&r(o)}))}}const u=o((()=>t(l)?t(l).reduce(((e,r)=>(i(r.conObj)&&r.conObj.forEach((r=>e.push(r.field_key))),e)),[]):[]));function a(e,r,i){if(i.field_key===e)return n(r,i)}function f(e){Object.entries(e).forEach((([e,r])=>s[e]&&s[e](r)))}return{lowCodeReactionsHandler:function(e,r){const i=t(l);i&&u.value.includes(e)&&i.forEach((i=>{var o,t;o=e,t=r,i.conObj.every((e=>a(o,t,e)))&&f(i)}))},triggerAllReactionsHandler:function(){const e=t(l);if(!e)return;const o=d.getFormState().values;e.forEach((e=>{(function(e,o){if(!i(o.conObj))return;return o.conObj.every((i=>a(i.field_key,r.getIn(e,i.field_key),i)))})(o,e)&&f(e)}))}}}export{l as useLowCodeReactions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble } from '../../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/shared/types';
|
|
2
2
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
@@ -89,58 +89,19 @@ export declare type FormWordbook = Partial<{
|
|
|
89
89
|
conObjFirstLevel: AnyObject[];
|
|
90
90
|
}>;
|
|
91
91
|
export declare type FieldItem = {
|
|
92
|
-
/**
|
|
93
|
-
* 字段的key
|
|
94
|
-
*/
|
|
95
92
|
val_key: string;
|
|
96
|
-
/**
|
|
97
|
-
* 控件类型
|
|
98
|
-
*/
|
|
99
93
|
html_type: HtmlType;
|
|
100
94
|
} & Partial<{
|
|
101
|
-
/**
|
|
102
|
-
* 是否开启批注(需要先在表单维度开启)
|
|
103
|
-
*/
|
|
104
95
|
annotation: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* 定制化字段, AGE类型控件时的单位字段
|
|
107
|
-
*/
|
|
108
96
|
val_key_unit: string;
|
|
109
|
-
/**
|
|
110
|
-
* 是否允许编辑('1'为允许编辑)
|
|
111
|
-
*/
|
|
112
97
|
is_edit: FormCommonState;
|
|
113
|
-
/**
|
|
114
|
-
* 控件在栅栏系统中的的宽度值, 默认为3
|
|
115
|
-
*/
|
|
116
98
|
elem_width: number;
|
|
117
|
-
/**
|
|
118
|
-
* 是否展示('1'为展示)
|
|
119
|
-
*/
|
|
120
99
|
is_show: FormCommonState;
|
|
121
|
-
/**
|
|
122
|
-
* 是否允许为空('1'为允许为空)
|
|
123
|
-
*/
|
|
124
100
|
is_null: FormCommonState;
|
|
125
|
-
/**
|
|
126
|
-
* 字段label
|
|
127
|
-
*/
|
|
128
101
|
name: string;
|
|
129
|
-
/**
|
|
130
|
-
* 字段label(优先级比name高)
|
|
131
|
-
*/
|
|
132
102
|
alias: string;
|
|
133
|
-
/**
|
|
134
|
-
* 默认值
|
|
135
|
-
*/
|
|
136
103
|
default_val: any;
|
|
137
|
-
/**
|
|
138
|
-
* 是否开启清空功能('0'表示开启)
|
|
139
|
-
*/
|
|
140
104
|
is_empty: FormCommonState;
|
|
141
|
-
/**
|
|
142
|
-
* 是否隐藏label('1'表示隐藏)
|
|
143
|
-
*/
|
|
144
105
|
hide_title: FormCommonState;
|
|
145
106
|
placeholder: string;
|
|
146
107
|
validate: ValidateItem;
|
|
@@ -150,123 +111,40 @@ export declare type FieldItem = {
|
|
|
150
111
|
* 仅在html_type为SELECT时生效
|
|
151
112
|
*/
|
|
152
113
|
multi_select: FormCommonState;
|
|
153
|
-
/**
|
|
154
|
-
* 多选时最大选择数量
|
|
155
|
-
*/
|
|
156
114
|
multi_select_value: number | string;
|
|
157
115
|
/**
|
|
158
116
|
* 1.用于CASCADER控件提供层级参数
|
|
159
117
|
* 2.用于SEARCH控件提供字段信息
|
|
160
118
|
*/
|
|
161
119
|
wordbook: FormWordbook;
|
|
162
|
-
/**
|
|
163
|
-
* switch控件,开启状态参数
|
|
164
|
-
*/
|
|
165
120
|
open: SwitchProperty;
|
|
166
|
-
/**
|
|
167
|
-
* switch控件,关闭状态参数
|
|
168
|
-
*/
|
|
169
121
|
close: SwitchProperty;
|
|
170
|
-
/**
|
|
171
|
-
* date控件value格式
|
|
172
|
-
*/
|
|
173
122
|
date_format: string;
|
|
174
|
-
/**
|
|
175
|
-
* slider控件间距
|
|
176
|
-
*/
|
|
177
123
|
step_length: string | number;
|
|
178
124
|
urlConfig: UrlConfig;
|
|
179
|
-
/**
|
|
180
|
-
* 控件组
|
|
181
|
-
*/
|
|
182
125
|
suffixConfig: ArrayAble<FieldItem>;
|
|
183
|
-
/**
|
|
184
|
-
* 数据源签名
|
|
185
|
-
*/
|
|
186
126
|
autograph: string;
|
|
187
|
-
/**
|
|
188
|
-
* 合并错误信息
|
|
189
|
-
*/
|
|
190
127
|
defined_error_msg: string;
|
|
191
|
-
/**
|
|
192
|
-
* 是否使用json格式对该字段值进行合并
|
|
193
|
-
*/
|
|
194
128
|
extendKey: string;
|
|
195
|
-
/**
|
|
196
|
-
* 是否允许linebar控件收起('1'表示不可收起)
|
|
197
|
-
*/
|
|
198
129
|
is_not_fold: string;
|
|
199
|
-
/**
|
|
200
|
-
* 控件中的备注
|
|
201
|
-
*/
|
|
202
130
|
remark: string;
|
|
203
|
-
/**
|
|
204
|
-
* 是否允许用户在下拉控件中创建自定义选项
|
|
205
|
-
*/
|
|
206
131
|
free_entry: FormCommonState;
|
|
207
|
-
/**
|
|
208
|
-
* 文本域控件默认行数
|
|
209
|
-
*/
|
|
210
132
|
initialize_high: number;
|
|
211
|
-
|
|
212
|
-
* 数据类型
|
|
213
|
-
*/
|
|
133
|
+
bindEventSetting: BindEventSettingItem[];
|
|
214
134
|
fieldType: SchemaTypes;
|
|
215
|
-
/**
|
|
216
|
-
* BUTTON/TEXT控件内容
|
|
217
|
-
*/
|
|
218
135
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
|
219
|
-
/**
|
|
220
|
-
* 用于控制是否启用请求的懒执行
|
|
221
|
-
*/
|
|
222
136
|
lazyRequest: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* 用于控制请求是否开启缓存
|
|
225
|
-
*/
|
|
226
137
|
requestCache: boolean;
|
|
227
|
-
/**
|
|
228
|
-
* COMBINATION控件最大表单组数量
|
|
229
|
-
*/
|
|
230
138
|
maxGroupNum: number;
|
|
231
|
-
/**
|
|
232
|
-
* COMBINATION json format
|
|
233
|
-
*/
|
|
234
139
|
jsonCombination: boolean;
|
|
235
|
-
/**
|
|
236
|
-
* COMBINATION控件子项
|
|
237
|
-
*/
|
|
238
140
|
children: FieldItem[];
|
|
239
|
-
/**
|
|
240
|
-
* 子项
|
|
241
|
-
*/
|
|
242
141
|
properties: FieldItem[];
|
|
243
|
-
/**
|
|
244
|
-
* 控件额外的props
|
|
245
|
-
*/
|
|
246
142
|
componentProps: AnyObject;
|
|
247
|
-
/**
|
|
248
|
-
* FormItem额外的props
|
|
249
|
-
*/
|
|
250
143
|
decoratorProps: AnyObject;
|
|
251
|
-
/**
|
|
252
|
-
* 是否不使用decorator组件(n-form-item)
|
|
253
|
-
*/
|
|
254
144
|
noDecorator: Boolean;
|
|
255
|
-
/**
|
|
256
|
-
* COMPLEX控件布局类型
|
|
257
|
-
*/
|
|
258
145
|
display: 'grid' | 'flex';
|
|
259
|
-
/**
|
|
260
|
-
* 控件插槽
|
|
261
|
-
*/
|
|
262
146
|
slots: Record<string, (...args: unknown[]) => unknown>;
|
|
263
|
-
/**
|
|
264
|
-
* COMPLEX控件额外样式
|
|
265
|
-
*/
|
|
266
147
|
wrapperStyle: CSSProperties | Record<string, string>;
|
|
267
|
-
/**
|
|
268
|
-
* 多级表单的显示策略, checked表示展示选中的子表单, all表示任何时候都展示所有子表单
|
|
269
|
-
*/
|
|
270
148
|
childFieldStrategy?: 'checked' | 'all';
|
|
271
149
|
/**
|
|
272
150
|
* 自定义校验规则
|
|
@@ -275,9 +153,6 @@ export declare type FieldItem = {
|
|
|
275
153
|
* @return {void|string} 返回校验信息
|
|
276
154
|
*/
|
|
277
155
|
validator: (value: unknown, fieldItem: FieldItem) => void | string;
|
|
278
|
-
/**
|
|
279
|
-
* 表单联动配置
|
|
280
|
-
*/
|
|
281
156
|
reactions: ArrayAble<ReactionType>;
|
|
282
157
|
[key: string]: any;
|
|
283
158
|
}>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AsyncQueue } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
|
-
import { LOW_CODE_VALUE_RELATION } from '../../../../../es/shared/utils';
|
|
2
|
+
import { AnyObject, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
|
|
4
3
|
import { DataField, Field, Form } from '@formily/core';
|
|
5
4
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
6
5
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -2159,15 +2159,18 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2159
2159
|
list: string[];
|
|
2160
2160
|
}[] | undefined;
|
|
2161
2161
|
} | undefined;
|
|
2162
|
-
anchorList?: string
|
|
2162
|
+
anchorList?: (string | {
|
|
2163
|
+
name?: string | undefined;
|
|
2164
|
+
field: string;
|
|
2165
|
+
})[] | undefined;
|
|
2163
2166
|
sortableConfig?: {
|
|
2164
2167
|
[x: string]: any;
|
|
2165
2168
|
enable?: boolean | undefined;
|
|
2166
2169
|
usePreset?: boolean | undefined;
|
|
2167
2170
|
} | undefined;
|
|
2168
2171
|
}>;
|
|
2172
|
+
updateConfigRefDebounced: () => void;
|
|
2169
2173
|
updateConfigRef: () => void;
|
|
2170
|
-
_updateConfigRef: () => void;
|
|
2171
2174
|
fieldListRef: import("vue").Ref<{
|
|
2172
2175
|
property?: string | undefined;
|
|
2173
2176
|
type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
|
|
@@ -2467,12 +2470,12 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2467
2470
|
getKey?: (() => string) | undefined;
|
|
2468
2471
|
annotation?: boolean | undefined;
|
|
2469
2472
|
}[]>;
|
|
2473
|
+
updateFieldListRefDebounced: () => void;
|
|
2470
2474
|
updateFieldListRef: () => void;
|
|
2471
|
-
_updateFieldListRef: () => void;
|
|
2472
2475
|
dataTransfer: (data: import("../../../es/shared/types").AnyObject[]) => Promise<import("../../../es/shared/types").AnyObject[]>;
|
|
2473
2476
|
tableDataRef: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
|
|
2477
|
+
updateTableDataRefDebounced: () => Promise<void>;
|
|
2474
2478
|
updateTableDataRef: () => Promise<void>;
|
|
2475
|
-
_updateTableDataRef: () => Promise<void>;
|
|
2476
2479
|
tableHandler: import("../../../es/components/iho-table/src/types").IhoTableHandler;
|
|
2477
2480
|
eventHookHandler: {
|
|
2478
2481
|
onCopy: import("vxe-table").VxeTableEvents.Copy | undefined;
|
|
@@ -4573,13 +4576,20 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4573
4576
|
list: string[];
|
|
4574
4577
|
}[] | undefined;
|
|
4575
4578
|
} | undefined;
|
|
4576
|
-
anchorList?: string
|
|
4579
|
+
anchorList?: (string | {
|
|
4580
|
+
name?: string | undefined;
|
|
4581
|
+
field: string;
|
|
4582
|
+
})[] | undefined;
|
|
4577
4583
|
sortableConfig?: {
|
|
4578
4584
|
[x: string]: any;
|
|
4579
4585
|
enable?: boolean | undefined;
|
|
4580
4586
|
usePreset?: boolean | undefined;
|
|
4581
4587
|
} | undefined;
|
|
4582
4588
|
}>;
|
|
4589
|
+
configChanged: boolean;
|
|
4590
|
+
fieldChanged: boolean;
|
|
4591
|
+
dataChanged: boolean;
|
|
4592
|
+
updateState: () => void;
|
|
4583
4593
|
header: any;
|
|
4584
4594
|
footer: any;
|
|
4585
4595
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2158,15 +2158,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2158
2158
|
list: string[];
|
|
2159
2159
|
}[] | undefined;
|
|
2160
2160
|
} | undefined;
|
|
2161
|
-
anchorList?: string
|
|
2161
|
+
anchorList?: (string | {
|
|
2162
|
+
name?: string | undefined;
|
|
2163
|
+
field: string;
|
|
2164
|
+
})[] | undefined;
|
|
2162
2165
|
sortableConfig?: {
|
|
2163
2166
|
[x: string]: any;
|
|
2164
2167
|
enable?: boolean | undefined;
|
|
2165
2168
|
usePreset?: boolean | undefined;
|
|
2166
2169
|
} | undefined;
|
|
2167
2170
|
}>;
|
|
2171
|
+
updateConfigRefDebounced: () => void;
|
|
2168
2172
|
updateConfigRef: () => void;
|
|
2169
|
-
_updateConfigRef: () => void;
|
|
2170
2173
|
fieldListRef: import("vue").Ref<{
|
|
2171
2174
|
property?: string | undefined;
|
|
2172
2175
|
type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
|
|
@@ -2466,12 +2469,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2466
2469
|
getKey?: (() => string) | undefined;
|
|
2467
2470
|
annotation?: boolean | undefined;
|
|
2468
2471
|
}[]>;
|
|
2472
|
+
updateFieldListRefDebounced: () => void;
|
|
2469
2473
|
updateFieldListRef: () => void;
|
|
2470
|
-
_updateFieldListRef: () => void;
|
|
2471
2474
|
dataTransfer: (data: AnyObject[]) => Promise<AnyObject[]>;
|
|
2472
2475
|
tableDataRef: import("vue").Ref<AnyObject[]>;
|
|
2476
|
+
updateTableDataRefDebounced: () => Promise<void>;
|
|
2473
2477
|
updateTableDataRef: () => Promise<void>;
|
|
2474
|
-
_updateTableDataRef: () => Promise<void>;
|
|
2475
2478
|
tableHandler: IhoTableHandler;
|
|
2476
2479
|
eventHookHandler: {
|
|
2477
2480
|
onCopy: import("vxe-table").VxeTableEvents.Copy | undefined;
|
|
@@ -4572,13 +4575,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4572
4575
|
list: string[];
|
|
4573
4576
|
}[] | undefined;
|
|
4574
4577
|
} | undefined;
|
|
4575
|
-
anchorList?: string
|
|
4578
|
+
anchorList?: (string | {
|
|
4579
|
+
name?: string | undefined;
|
|
4580
|
+
field: string;
|
|
4581
|
+
})[] | undefined;
|
|
4576
4582
|
sortableConfig?: {
|
|
4577
4583
|
[x: string]: any;
|
|
4578
4584
|
enable?: boolean | undefined;
|
|
4579
4585
|
usePreset?: boolean | undefined;
|
|
4580
4586
|
} | undefined;
|
|
4581
4587
|
}>;
|
|
4588
|
+
configChanged: boolean;
|
|
4589
|
+
fieldChanged: boolean;
|
|
4590
|
+
dataChanged: boolean;
|
|
4591
|
+
updateState: () => void;
|
|
4582
4592
|
header: any;
|
|
4583
4593
|
footer: any;
|
|
4584
4594
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as s,openBlock as n,createElementBlock as i,unref as r,normalizeStyle as u,createBlock as c,resolveDynamicComponent as f,createElementVNode as d,createVNode as m,mergeProps as p,createSlots as v,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as y}from"@vueuse/core";import"date-fns";import{isString as C,isFunction as D}from"lodash-es";import{widthAppend as j,uuidGenerator as $}from"../../../shared/utils/index.js";import{promiseTimeout as _}from"@vueuse/shared";import{VxeTableEventNameList as H,InjectionIhoTableEmits as T,InjectionIhoTableAnnotation as w,InjectionIhoTableUUID as A,InjectionIhoTableInstance as L,InjectionIhoTableConfig as R,InjectionIhoTableFieldList as E,InjectionIhoTableHandler as F}from"./constants/index.js";import{createTableHooks as I,applyTableConfigHooks as O,applyTableFieldHooks as S,createTableEventHandlers as W,createDomInsertComponent as q,createDataTransfer as z}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as B}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as G}from"./utils/index.js";import J from"../../../_virtual/plugin-vue_export-helper.js";const K=["id"];var M=J(e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...H],setup(e,{expose:H,emit:J}){var M,N;const P=e,Q=k({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),U=t((()=>{var e,t;const a=null!=(t=null==(e=P.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":C(a)&&(a.includes("calc")||a.endsWith("%"))?a:j(a)}})),V=B(),X=function(e,...t){J(e,...t);const a=r(te)[G(e)];D(a)&&a(...t),V.trigger(e,...t)};a(T,X);const Y=I();a(w,t((()=>P.annotation)));const Z=$();a(A,Z);const ee=o();a(L,ee);const te=o({uuid:null!=(N=null==(M=P.tableConfig)?void 0:M.uuid)?N:Z});a(R,te);const ae=y(oe,10);function oe(){te.value=O(Y,P.tableConfig,{$table:ee,emits:X}),te.value.uuid=Z}const le=o([]);a(E,le);const se=y(ne,10);function ne(){le.value=S(Y,P.fieldList,te.value,{$table:ee,emits:X})}const ie=z(Y,te,ee),re=o([])
|
|
1
|
+
import{defineComponent as e,computed as t,provide as a,ref as o,watch as l,resolveComponent as s,openBlock as n,createElementBlock as i,unref as r,normalizeStyle as u,createBlock as c,resolveDynamicComponent as f,createElementVNode as d,createVNode as m,mergeProps as p,createSlots as v,renderList as b,withCtx as h,createCommentVNode as g,renderSlot as x}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as y}from"@vueuse/core";import"date-fns";import{isString as C,isFunction as D}from"lodash-es";import{widthAppend as j,uuidGenerator as $}from"../../../shared/utils/index.js";import{promiseTimeout as _}from"@vueuse/shared";import{VxeTableEventNameList as H,InjectionIhoTableEmits as T,InjectionIhoTableAnnotation as w,InjectionIhoTableUUID as A,InjectionIhoTableInstance as L,InjectionIhoTableConfig as R,InjectionIhoTableFieldList as E,InjectionIhoTableHandler as F}from"./constants/index.js";import{createTableHooks as I,applyTableConfigHooks as O,applyTableFieldHooks as S,createTableEventHandlers as W,createDomInsertComponent as q,createDataTransfer as z}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as B}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as G}from"./utils/index.js";import J from"../../../_virtual/plugin-vue_export-helper.js";const K=["id"];var M=J(e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...H],setup(e,{expose:H,emit:J}){var M,N;const P=e,Q=k({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),U=t((()=>{var e,t;const a=null!=(t=null==(e=P.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":C(a)&&(a.includes("calc")||a.endsWith("%"))?a:j(a)}})),V=B(),X=function(e,...t){J(e,...t);const a=r(te)[G(e)];D(a)&&a(...t),V.trigger(e,...t)};a(T,X);const Y=I();a(w,t((()=>P.annotation)));const Z=$();a(A,Z);const ee=o();a(L,ee);const te=o({uuid:null!=(N=null==(M=P.tableConfig)?void 0:M.uuid)?N:Z});a(R,te);const ae=y(oe,10);function oe(){te.value=O(Y,P.tableConfig,{$table:ee,emits:X}),te.value.uuid=Z}const le=o([]);a(E,le);const se=y(ne,10);function ne(){le.value=S(Y,P.fieldList,te.value,{$table:ee,emits:X})}const ie=z(Y,te,ee),re=o([]);async function ue(){var e;re.value=await ie(P.tableData),null==(e=ee.value)||e.recalculate(!0)}const ce={updateTableDataRef:y(ue,10),updateConfigRef:ae,updateFieldListRef:se};a(F,ce);const fe=W({hooks:Y,config:te,$table:ee,context:ce,emits:X}),de=t((()=>({...te.value,...fe})));let me=!1,pe=!1,ve=!1;const be=y((()=>{me&&oe(),pe&&ne(),ve&&ue(),me=!1,pe=!1,ve=!1}),10);l((()=>P.tableConfig),(()=>{me=!0,pe=!0,ve=!0,be()}),{deep:!0}),l((()=>P.fieldList),(()=>{pe=!0,ve=!0,be()}),{deep:!0}),l([()=>[...P.tableData],()=>{var e;return null==(e=P.tableData)?void 0:e.length}],(()=>{ve=!0,be()})),l([()=>P.tableData,()=>{var e;return null==(e=P.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=te.value.treeConfig)?void 0:e.expandAll)&&(await _(11),null==(t=ee.value)||t.setAllTreeExpand(!0))})),oe(),ne(),ue();const{header:he,footer:ge}=q(Y);return H({$table:ee,async loadData(e){var t;null==(t=ee.value)||t.loadData(await ie(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),...Y.exposeHooks.expose.call({},te,{$table:ee,emits:X})}),Y.setupHooks.setup.call(te,le,{$table:ee,emits:X}),(e,t)=>{const a=s("vxe-grid");return n(),i("section",{class:"iho-table",id:r(Z),style:u(r(Q))},[(n(),c(f(r(he)))),d("section",{style:u(r(U))},[m(a,p({ref_key:"$table",ref:ee},r(de),{columns:le.value,data:re.value}),v({_:2},[b(e.$slots,((t,a)=>({name:a,fn:h((()=>[g(" 实际上所有的vxe-grid插槽都支持 "),x(e.$slots,a)]))})))]),1040,["columns","data"])],4),(n(),c(f(r(ge))))],12,K)}}}),[["__file","IhoTable.vue"]]);export{M as default};
|
|
@@ -2,7 +2,7 @@ import { AnyObject } from '../../../../../../es/shared/types';
|
|
|
2
2
|
import { AsyncParallelHook, AsyncSeriesHook } from '../../../../../../es/shared/utils/tapable';
|
|
3
3
|
import { AbstractDataHooks } from '../../../../../../es/components/iho-table/src/types';
|
|
4
4
|
declare class TableDataHooks extends AbstractDataHooks {
|
|
5
|
-
readonly dataStart: AsyncParallelHook<
|
|
5
|
+
readonly dataStart: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
6
|
readonly data: AsyncSeriesHook<[AnyObject, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig, {
|
|
7
7
|
remove(): void;
|
|
8
8
|
$table: import("@vueuse/shared").MaybeRef<import("../../../../../../es/shared/types").Nullable<import("vxe-table").VxeTableInstance>>;
|
|
@@ -10,7 +10,7 @@ declare class TableDataHooks extends AbstractDataHooks {
|
|
|
10
10
|
insertBefore(data: import("../../../../../../es/shared/types").ArrayAble<AnyObject>): void;
|
|
11
11
|
insertAfter(data: import("../../../../../../es/shared/types").ArrayAble<AnyObject>): void;
|
|
12
12
|
}], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
13
|
-
readonly dataEnd: AsyncParallelHook<
|
|
13
|
+
readonly dataEnd: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
14
|
}
|
|
15
15
|
export declare function useDataHooks(): {
|
|
16
16
|
create: () => TableDataHooks;
|
|
@@ -4,6 +4,6 @@ export declare function useTableContext(): {
|
|
|
4
4
|
tableHandler: import("../types").IhoTableHandler;
|
|
5
5
|
tableEmit: import("../types").IhoTableEmits;
|
|
6
6
|
eventListener: import("./tapHooks/useEventHooks").IhoTableEventListener;
|
|
7
|
-
$table: import("vue").Ref<import("
|
|
7
|
+
$table: import("vue").Ref<import("../../..").UndefinedAble<import("vxe-table").VxeTableInstance>>;
|
|
8
8
|
uuid: string;
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,createVNode as l,isVNode as n}from"vue";import{NTabs as a,NTabPane as o}from"naive-ui";import{useAnchor as r}from"./useAnchor.js";import{useTableContext as
|
|
1
|
+
import{defineComponent as e,computed as t,createVNode as l,isVNode as n}from"vue";import{NTabs as a,NTabPane as o}from"naive-ui";import{useAnchor as r}from"./useAnchor.js";import{useTableContext as i}from"../../hooks/useTableContext.js";var u=e({name:"IhoTableAnchor",setup(){const{configRef:e,eventListener:u,fieldListRef:p,$table:c}=i(),{updateAnchor:f,onScroll:s,currentAnchorList:d,anchorValue:v}=r(t((()=>{var t;return(null!=(t=e.value.anchorList)?t:[]).map((e=>"string"==typeof e?{field:e}:{...e}))})),c,p);return u.addEventListener("scroll",s),()=>{let e;return d.value.length>0?l(a,{type:"line",animated:!0,"pane-style":"padding: 0",value:v.value,"onUpdate:value":e=>v.value=e},"function"==typeof(t=e=d.value.map((e=>l(o,{name:e.field,tab:e.title,key:e.field,tabProps:{onClick:()=>f(e.field)}},null))))||"[object Object]"===Object.prototype.toString.call(t)&&!n(t)?e:{default:()=>[e]}):null;var t}}});export{u as default};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { VxeTableInstance } from 'vxe-table';
|
|
3
3
|
import { IhoTableFieldItem, IhoTableEmitPayload } from '../../../../../../es/components/iho-table/src/types';
|
|
4
|
-
export declare const useAnchor: (anchorList: ComputedRef<
|
|
4
|
+
export declare const useAnchor: (anchorList: ComputedRef<{
|
|
5
|
+
name?: string;
|
|
6
|
+
field: string;
|
|
7
|
+
}[]>, $table: Ref<VxeTableInstance | undefined>, fieldListRef: Ref<IhoTableFieldItem[]>) => {
|
|
5
8
|
updateAnchor: (field: string) => Promise<void>;
|
|
6
9
|
onScroll: ({ scrollLeft, bodyWidth }: IhoTableEmitPayload<'scroll'>[0]) => void;
|
|
7
10
|
currentAnchorList: Ref<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shallowOmit as l}from"../../../../../shared/utils/index.js";import{ref as e,watch as
|
|
1
|
+
import{shallowOmit as l}from"../../../../../shared/utils/index.js";import{ref as e,watch as i,unref as t}from"vue";import{useThrottleFn as n}from"@vueuse/core";import{cloneDeep as o,findLastIndex as u}from"lodash-es";function r(e,i){e.forEach((e=>{var t;if(null==(t=e.children)?void 0:t.length){const t=l(o(e),["children"]);t.width=0,i.push(t),r(e.children,i)}else(function(l){return l.visible||!Reflect.has(l,"visible")})(e)&&i.push(e)}))}const a=(l,a,f)=>{const c=e([]),d=e();let s=!0;const v=n((function({scrollLeft:l,bodyWidth:e}){if(!c.value.length||!s)return;const i=l+e/2,t=u(c.value,(l=>i>=l.left));~t&&(d.value=c.value[t].field)}),800);return i([()=>f.value,()=>l.value],(()=>{!function(){var e,i,n;if(c.value=[],null==(e=t(l))?void 0:e.length){let e=0;const u=[];r(o(f.value),u),u.forEach((i=>{var n;const{field:o="",minWidth:u,width:r,fixed:a,title:f=""}=i,d=+(null!=(n=null!=u?u:r)?n:0);if("left"==a);else{e+=d;const i=t(l).find((l=>l.field===o));i&&c.value.push({field:o,title:i.name||f,left:e-d})}})),d.value=(null==(n=null==(i=c.value)?void 0:i[0])?void 0:n.field)||""}}()}),{immediate:!0,deep:!0}),{updateAnchor:async function(l){var e,i;s=!1;const t=c.value.find((e=>e.field===l));await(null==(i=a.value)?void 0:i.scrollTo(null!=(e=null==t?void 0:t.left)?e:0)),setTimeout((()=>{s=!0}),900)},onScroll:v,currentAnchorList:c,anchorValue:d}};export{a as useAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../index.js";import{isFunction as n}from"lodash-es";import{
|
|
1
|
+
import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as n}from"lodash-es";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";import{getBindEventSettingTrigger as e}from"../../../../../shared/utils/business.js";function t(){const t="fieldConnectionPlugin";return o({name:t,apply(o){o.configHooks.config.tap(t,(o=>{const t=o.onFormChange;return o.onFormChange=function(o){var i;const{column:r,row:s}=o,l=null==(i=r.editRender)?void 0:i.props;if(l&&(null==l?void 0:l.bindEventSetting)){l.bindEventSetting.forEach((n=>{e(n.event_type)(n,{getter:n=>s[n],setter:(n,o)=>s[n]=o})}))}n(t)&&t(o)},o}))}})}export{t as fieldConnectionPlugin};
|
|
@@ -25,11 +25,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
近一个月: () => number[];
|
|
26
26
|
};
|
|
27
27
|
onConfirm: (value: [number, number], formattedValue: [string, string] | null) => void;
|
|
28
|
-
CDatePicker: import("
|
|
28
|
+
CDatePicker: import("../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
29
|
+
updateUnchangedValue: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
};
|
|
32
|
+
onConfirm: {
|
|
33
|
+
type: FunctionConstructor;
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
29
36
|
attrs: {
|
|
30
37
|
[x: string]: unknown;
|
|
31
38
|
};
|
|
32
|
-
|
|
39
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
updateUnchangedValue: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
};
|
|
43
|
+
onConfirm: {
|
|
44
|
+
type: FunctionConstructor;
|
|
45
|
+
};
|
|
46
|
+
}>> & {}>>;
|
|
47
|
+
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
33
48
|
panelInstRef: import("vue").Ref<null>;
|
|
34
49
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
35
50
|
formatRef: import("vue").ComputedRef<string>;
|
|
@@ -37,8 +52,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
52
|
focus: () => any;
|
|
38
53
|
blur: () => any;
|
|
39
54
|
onUpdateShow: (show: boolean) => void;
|
|
55
|
+
onConfirm: (...args: any[]) => void;
|
|
40
56
|
NDatePicker: any;
|
|
41
|
-
},
|
|
57
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
updateUnchangedValue: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
};
|
|
61
|
+
onConfirm: {
|
|
62
|
+
type: FunctionConstructor;
|
|
63
|
+
};
|
|
64
|
+
}>>, {
|
|
65
|
+
updateUnchangedValue: boolean;
|
|
66
|
+
}>>;
|
|
42
67
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
68
|
payload: {
|
|
44
69
|
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e}from"vue";import"../../../index.js";import t from"./filter.vue.js";import{isValid as i,compareDesc as
|
|
1
|
+
import{createVNode as e}from"vue";import"../../../index.js";import t from"./filter.vue.js";import{isValid as i,compareDesc as o}from"date-fns";import{isObject as n,isArray as r}from"@vue/shared";import{defineTablePlugin as l}from"../../hooks/useTablePlugin.js";function f(){const f="filterDaterangeRenderPlugin";return l({name:f,vxe(i){i.renderer.mixin({[f]:{showFilterFooter:!1,renderFilter:(i,o)=>e(t,{payload:o,key:o.column.field},null)}})},apply(e){e.fieldHooks.field.tap(f,((e,t,l,{$table:a})=>{var d,u,s,m;const c=null==(d=e.editRender)?void 0:d.props;if(!n(c))return e;if(!(null==(u=null==c?void 0:c.filterSetting)?void 0:u.daterange))return e;e.filterRender={name:f};const p=null==(s=a.value)?void 0:s.getColumnByField(e.field),v={};return p&&r(p.filters)&&Object.assign(v,{...(null==(m=p.filters)?void 0:m[0])||{}}),e.filters=[{data:void 0,...v}],e.filterMethod||(e.filterMethod=function({option:e,row:t,column:n}){const{data:r}=e,l=t[n.field];return!!i(new Date(l))&&(o(new Date(l),new Date(r[0]))<=0&&o(new Date(l),new Date(r[1]))>=0)}),l.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...l.filterConfig},e}))}})}export{f as filterDaterangeRenderPlugin};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, PropType, ref } from 'vue';
|
|
2
|
-
import { VxeColumnPropTypes, VxeTableConstructor,
|
|
2
|
+
import { VxeColumnPropTypes, VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from 'vxe-table';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
payload: {
|
|
5
5
|
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
@@ -12,17 +12,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
}>> & {}>>;
|
|
15
|
-
|
|
16
|
-
optionsRef: import("vue").ComputedRef<VxeTableDefines.FilterOption[] & VxeColumnPropTypes.Filter[]>;
|
|
15
|
+
optionsRef: import("vue").ComputedRef<import("vxe-table").VxeTableDefines.FilterOption[] & VxeColumnPropTypes.Filter[]>;
|
|
17
16
|
checkedRef: import("vue").WritableComputedRef<string[]>;
|
|
18
17
|
$table: (VxeTableConstructor & VxeTablePrivateMethods & VxeTableMethods) | undefined;
|
|
19
|
-
sortStatusRef: import("vue").WritableComputedRef<"desc" | "asc" | null>;
|
|
20
18
|
checkedCacheRef: import("vue").Ref<string[]>;
|
|
21
19
|
searchFilterText: import("vue").Ref<string>;
|
|
22
20
|
close: () => void;
|
|
23
21
|
OPTION_ITEM_HEIGHT: number;
|
|
24
22
|
viewCapacity: import("vue").ComputedRef<number>;
|
|
25
|
-
list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<VxeTableDefines.FilterOption>[]>;
|
|
23
|
+
list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<import("vxe-table").VxeTableDefines.FilterOption>[]>;
|
|
26
24
|
containerProps: {
|
|
27
25
|
ref: import("vue").Ref<any>;
|
|
28
26
|
onScroll: () => void;
|
|
@@ -40,12 +38,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
38
|
containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
41
39
|
confirmFilter: () => void;
|
|
42
40
|
reset: () => void;
|
|
43
|
-
sortStatusList: {
|
|
44
|
-
status: VxeTablePropTypes.SortOrder;
|
|
45
|
-
text: string;
|
|
46
|
-
}[];
|
|
47
|
-
setSort: (value: VxeTablePropTypes.SortOrder) => void;
|
|
48
|
-
CheckmarkOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
49
41
|
NButton: any;
|
|
50
42
|
NButtonGroup: any;
|
|
51
43
|
NCheckbox: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as o,unref as i,createBlock as n,createCommentVNode as v,createElementVNode as s,createVNode as c,isRef as p,withCtx as d,normalizeStyle as f,Fragment as h,renderList as m,toDisplayString as _,createTextVNode as y}from"vue";import{widthAppend as g}from"../../../../../shared/utils/index.js";import{useVirtualList as b}from"@vueuse/core";import{isNumber as k}from"lodash-es";import{NInput as C,NCheckbox as $,NCheckboxGroup as x,NButtonGroup as S,NButton as j}from"naive-ui";import L from"../../../../../_virtual/plugin-vue_export-helper.js";const U={class:"iho-table__filterWrapper"},w={class:"iho-table__filterListItem"},E={class:"iho-table__filterFooter"};var F=L(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const L=e,F=l((()=>{var e,l,a;return null!=(a=null==(l=null==(e=L.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),I=l({get:()=>F.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(L.payload)return F.value.forEach((l=>{L.payload.$panel.changeOption(null,e.includes(l.value),l)})),L.payload.$panel.confirmFilter(new CustomEvent("click"))}}),O=a("$xetable"),P=t([...I.value]),W=t("");function q(){O&&(O.reactData.filterStore.visible=!1)}u(q);const z=l((()=>{var e,l;if(!L.payload||!L.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=L.payload.column.editRender)?void 0:e.props)?l:{};return k(a)&&a>0?a:10})),{list:D,containerProps:H,wrapperProps:R}=b(l((()=>W.value?F.value.filter((e=>`${e.label}`.includes(W.value))):F.value)),{itemHeight:32,overscan:3}),A=l((()=>!!P.value.length&&P.value.length!==F.value.length)),B=l({get:()=>P.value.length===F.value.length&&0!==F.value.length,set:e=>{P.value=e?F.value.map((e=>e.value)):[]}}),G=l((()=>({...H.style,height:g(32*z.value)})));function J(){I.value=P.value,q()}function K(){P.value=[]}return(e,l)=>(r(),o("section",U,[i(F).length>5?(r(),n(i(C),{key:0,value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e)},null,8,["value"])):v("v-if",!0),s("div",w,[c(i($),{label:"全选",checked:i(B),"onUpdate:checked":l[1]||(l[1]=e=>p(B)?B.value=e:null),indeterminate:i(A)},null,8,["checked","indeterminate"])]),c(i(x),{value:P.value,"onUpdate:value":l[3]||(l[3]=e=>P.value=e)},{default:d((()=>[s("section",{ref:i(H).ref,style:f(i(G)),onScroll:l[2]||(l[2]=(...e)=>i(H).onScroll&&i(H).onScroll(...e)),class:"iho-table__filterListWrapper"},[s("section",{style:f(i(R).style)},[(r(!0),o(h,null,m(i(D),(e=>(r(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[c(i($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),s("footer",E,[s("section",null,_(`已选择${P.value.length}项`),1),c(i(S),{size:"small"},{default:d((()=>[c(i(j),{onClick:K},{default:d((()=>[y("清空")])),_:1}),c(i(j),{onClick:q},{default:d((()=>[y("取消")])),_:1}),c(i(j),{type:"primary",onClick:J},{default:d((()=>[y("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{F as default};
|