cnhis-design-vue 3.1.51-beta.22 → 3.1.51-beta.23
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as a,ref as o,
|
|
1
|
+
import{defineComponent as e,computed as t,provide as a,ref as o,toRaw as l,watch as n,resolveComponent as r,openBlock as s,createElementBlock as i,unref as u,normalizeStyle as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as v,createVNode as m,mergeProps as p,createSlots as b,renderList as g,withCtx as h,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as D}from"vue";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as $}from"@vueuse/core";import"date-fns";import{isString as j,isEqualWith as w,isFunction as I,pick as H}from"lodash-es";import{widthAppend as T,uuidGenerator as _}from"../../../shared/utils/index.js";import{promiseTimeout as A}from"@vueuse/shared";import{VxeTableEventNameList as L,InjectionIhoTableEmits as R,InjectionIhoTableAnnotation as S,InjectionIhoTableUUID as E,InjectionIhoTableInstance as F,InjectionIhoTableConfig as O,InjectionIhoTableFieldList as B,InjectionIhoTableHandler as W}from"./constants/index.js";import{createTableHooks as q,applyTableConfigHooks as z,applyTableFieldHooks as G,createTableEventHandlers as J,createDomInsertComponent as K,createDataTransfer as M}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as N}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as P}from"./utils/index.js";const Q=["id"];var U=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",...L],setup(e,{expose:L,emit:U}){var V,X;const Y=e,Z=C({"--c-border-color":"#e2e2e2","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#f7f7f7"}),ee=t((()=>{var e,t;const a=null!=(t=null==(e=Y.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===a?"100%":j(a)&&(a.includes("calc")||a.endsWith("%"))?a:T(a)}})),te=N(),ae=function(e,...t){U(e,...t);const a=u(re)[P(e)];I(a)&&a(...t),te.trigger(e,...t)};a(R,ae);const oe=q();a(S,t((()=>Y.annotation)));const le=_();a(E,le);const ne=o();a(F,ne);const re=o({uuid:null!=(X=null==(V=Y.tableConfig)?void 0:V.uuid)?X:le});a(O,re);const se=$(ie,10);function ie(){re.value=z(oe,Y.tableConfig,{$table:ne,emits:ae}),re.value.uuid=le}const ue=o([]);a(B,ue);const de=$(ce,10);function ce(){const e=G(oe,Y.fieldList,re.value,{$table:ne,emits:ae});w(e,l(ue.value),((e,t)=>{if(I(e)&&I(t))return e.toString()===t.toString()}))||(ue.value=e)}const fe=M(oe,re,ne),ve=o([]);async function me(){var e,t;const a=await fe(Y.tableData),o=null==(e=ne.value)?void 0:e.getTableData().fullData;if(o){let e=0;if(!(o.some((t=>{var o;if(!(null==(o=ne.value)?void 0:o.isInsertByRow(t))){if(t!==a[e])return!0;e++}}))||e!==a.length))return}ve.value=a,null==(t=ne.value)||t.recalculate(!0)}const pe={updateTableDataRef:$(me,10),updateConfigRef:se,updateFieldListRef:de};a(W,pe);const be=J({hooks:oe,config:re,$table:ne,context:pe,emits:ae}),ge=t((()=>({...re.value,...be})));let he=!1,xe=!1,ke=!1;const ye=$((()=>{he&&ie(),xe&&ce(),ke&&me(),he=!1,xe=!1,ke=!1}),10);n((()=>Y.tableConfig),(()=>{he=!0,xe=!0,ke=!0,ye()}),{deep:!0}),n((()=>Y.fieldList),(()=>{xe=!0,ke=!0,ye()}),{deep:!0}),n([()=>[...Y.tableData],()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(()=>{ke=!0,ye()})),n([()=>Y.tableData,()=>{var e;return null==(e=Y.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=re.value.treeConfig)?void 0:e.expandAll)&&(await A(11),null==(t=ne.value)||t.setAllTreeExpand(!0))})),ie(),ce(),me();const{header:De,footer:Ce}=K(oe);function $e(e){return H(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return L({$table:ne,async loadData(e){var t;null==(t=ne.value)||t.loadData(await fe(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=ne.value)||e.loadColumn([]),null==(t=ne.value)||t.loadData([]),ie(),ce(),me()},...oe.exposeHooks.expose.call({},re,{$table:ne,emits:ae})}),oe.setupHooks.setup.call(re,ue,{$table:ne,emits:ae}),(e,t)=>{const a=r("vxe-grid");return s(),i("section",{class:"iho-table",id:u(le),style:d(u(Z))},[(s(),c(f(u(De)))),v("section",{style:d(u(ee))},[m(a,p({ref_key:"$table",ref:ne},u(ge),{columns:ue.value,data:ve.value}),b({_:2},[g(e.$slots,((t,a)=>({name:a,fn:h((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,a,y(D($e(t))))]))})))]),1040,["columns","data"])],4),(s(),c(f(u(Ce))))],12,Q)}}});export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.51-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.51-beta.23",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.51-beta.23",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51-beta.
|
|
3
|
+
"version": "3.1.51-beta.23",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "4de78eb82319e59a692b6a00651de15a8e702a9d"
|
|
67
67
|
}
|