cnhis-design-vue 3.1.43-beta.23 → 3.1.43-beta.25
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/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{useSessionStorage as n}from"@vueuse/core";import{isEqual as o,isFunction as t}from"lodash-es";import{selectOptionsMap as l}from"../rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{IhoTableUtils as i}from"../../utils/index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../constants/index.js";import{defineTablePlugin as u}from"../../hooks/useTablePlugin.js";function d(){const d="keyboardEventPlugin",s=n("ihoTableClipData",null);return u({name:d,apply(n){function u(e,n,u,d,c){var p,f;if(!(null==(p=null==u?void 0:u.keyboardConfig)?void 0:p.isClip))return;const{row:v,column:m}=n.getSelectedCell()||n.getEditRecord()||{};if(!v||!m||!a(m)&&s.value===v[m.field])return;const g=u.uuid&&a(m)&&l.get(u.uuid)[m.field],b=v[m.field];if("copy"===e){const e=(null==(f=(g||[]).filter((e=>b.includes(e.value))))?void 0:f.map((e=>e.label)).join(","))||b;s.value=e}else{if(!function(e){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&Object.keys(r).includes(i.getCellType(o))}(m)||v.$__SEPARATE||!function(e,n,o,l){var i,r;const{beforeEditMethod:u}=n.editConfig||{},d={rowIndex:null!=(i=e.getRowIndex(o))?i:0,columnIndex:null!=(r=e.getColumnIndex(l))?r:0};return!u||t(u)&&u({row:o,column:l,...d,$table:e,$grid:void 0})}(n,u,v,m))return;let e=s.value||"";if(function(e){var n,o;const t=null==(n=e.editRender)?void 0:n.props;return a(e)&&(null==(o=t.componentProps)?void 0:o.multiple)}(m)){const n=(g||[]).filter((n=>e.split(",").includes(n.label))).map((e=>e.value));if(!(null==n?void 0:n.length)||o(b,n))return;e=n}else{const n=(g||[]).find((n=>n.label===e));if(g&&(!n||b===n.value))return;n&&(e=n.value)}v[m.field]=e,d("formChange",{column:m,row:v,oldValue:b,value:e,index:n.getRowIndex(v)}),function(e){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&"SEPARATE"===i.getCellType(o)}(m)&&(null==c||c())}}function a(e){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&"SELECT"===i.getCellType(o)}n.eventHooks.onCopy.tap(d,(({$table:e},n,{emits:o})=>u("copy",e,n,o))),n.eventHooks.onPaste.tap(d,(({$table:e},n,{emits:o,updateTableDataRef:t})=>u("paste",e,n,o,t))),n.eventHooks.onKeydown.tap(d,(async({$event:n,$table:o},t,{emits:l})=>{await e(0);const{row:i,column:r}=o.getSelectedCell()||o.getEditRecord()||{};if(!i||!r)return;l("keyboard",{key:n.key,index:o.getRowIndex(i),value:i[r.field],row:i,column:r})}))}})}export{d as keyboardEventPlugin};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Func } from '../../../../../../../../es/shared/types';
|
|
2
|
-
import { PropType } from 'vue';
|
|
2
|
+
import { type PropType } from 'vue';
|
|
3
3
|
import { VxeTableDefines } from 'vxe-table';
|
|
4
4
|
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -43,8 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
}>>;
|
|
44
44
|
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
45
45
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
46
|
-
formRef: import("vue").Ref<
|
|
47
|
-
isShow: import("vue").Ref<boolean>;
|
|
46
|
+
formRef: import("vue").Ref<any>;
|
|
48
47
|
formattedValue: any;
|
|
49
48
|
onConfirm: (value: any) => void;
|
|
50
49
|
isStartDate: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as r,computed as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as r,computed as i,watch as a,onMounted as l,openBlock as o,createBlock as u,unref as n,mergeProps as s}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as m}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import c from"../../../../../../date-picker/index.js";import v from"../../../../../../../_virtual/plugin-vue_export-helper.js";var f=v(e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:v}){const f=e,w=t(),{emitFormChangeWithParams:D}=p(f),g=r(),y=r(f.value),b=e=>{y.value=e;const t=f.value;t!==e&&(v("update:value",e),D({oldValue:t}))},{isStartDate:$=!1,isEndDate:h=!1}=w,S=w.connectField||"",T=(e,t)=>$&&S?e>t:!(!h||!S)&&e<t,_=e=>{const t=new Date(f.row[S]),r=new Date(e),i=t.getHours(),a=t.getMinutes(),l=t.getSeconds(),o=(e,t,r,i)=>!(h&&r>i)&&(!($&&r<i)&&T(e,t));return{isHourDisabled:t=>{if(!f.row[S])return!1;const a=new Date(`${f.row[S].split(" ")[0]} 00:00:00`).getTime(),l=r.getMinutes(),u=r.getSeconds();return o(t,i,e-60*t*60*1e3-60*l*1e3-1e3*u,a)},isMinuteDisabled:t=>{if(!f.row[S])return!1;const l=new Date(`${f.row[S].split(" ")[0]} ${i}:00:00`).getTime(),u=r.getSeconds();return o(t,a,e-60*t*1e3-1e3*u,l)},isSecondDisabled:t=>{if(!f.row[S])return!1;const r=new Date(`${f.row[S].split(" ")[0]} ${i}:${a}:00`).getTime();return o(t,l,e-1e3*t,r)}}};function j(e){return m(e)?t=>e(t,f.row):null}const x=i((()=>{const e=w.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:d(e)}}})),M={type:w.type||"datetime",clearable:!0,placeholder:w.placeholder||"请选择",...w,...x.value,isDateDisabled:j(w.isDateDisabled)||(e=>!!f.row[S]&&T(e,h?new Date(`${f.row[S].split(" ")[0]} 00:00:00`).getTime():new Date(f.row[S]).getTime()))};return M.type.includes("time")&&(M.isTimeDisabled=j(w.isTimeDisabled)||_),a((()=>f.value),(e=>{y.value=e})),l((()=>{var e,t,r,i,a,l,o;return null==(o=null==(a=null==(r=null==(t=null==(e=g.value)?void 0:e.$datePicker)?void 0:t.inputInstRef)?void 0:(i=r.$el).querySelector)?void 0:(l=a.call(i,"input")).select)?void 0:o.call(l)})),(e,t)=>(o(),u(n(c),s({ref_key:"formRef",ref:g,"formatted-value":y.value},n(M),{"onUpdate:formattedValue":b}),null,16,["formatted-value"]))}}),[["__file","editDate.vue"]]);export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.43-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.43-beta.25",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.43-beta.25",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.43-beta.
|
|
3
|
+
"version": "3.1.43-beta.25",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "6d88f5e074414a7ea31de64235f0ac490da5893a"
|
|
65
65
|
}
|