cnhis-design-vue 3.1.53-beta.11 → 3.1.53-beta.12

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.
@@ -136,23 +136,29 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
136
136
  newFields: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
137
137
  columns: import("vue").Ref<{
138
138
  title: string;
139
- type: "text" | "checkbox" | "select" | "input" | "inputNumber";
139
+ type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
140
140
  field: string;
141
141
  checkedAll?: boolean | undefined;
142
142
  disabledAll?: boolean | undefined;
143
143
  isHeadCheckHide?: boolean | undefined;
144
144
  isShow?: boolean | undefined;
145
+ contentRender?: ((column: import("../../../es/shared/types").AnyObject, row: import("../../../es/shared/types").AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
146
+ [key: string]: any;
147
+ }>) | undefined;
145
148
  }[]>;
146
149
  fieldList: import("vue").ComputedRef<import("../../../es/shared/types").AnyObject[]>;
147
150
  rowProps: {
148
151
  columns: {
149
152
  title: string;
150
- type: "text" | "checkbox" | "select" | "input" | "inputNumber";
153
+ type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
151
154
  field: string;
152
155
  checkedAll?: boolean | undefined;
153
156
  disabledAll?: boolean | undefined;
154
157
  isHeadCheckHide?: boolean | undefined;
155
158
  isShow?: boolean | undefined;
159
+ contentRender?: ((column: import("../../../es/shared/types").AnyObject, row: import("../../../es/shared/types").AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
160
+ [key: string]: any;
161
+ }>) | undefined;
156
162
  }[];
157
163
  fieldList: import("../../../es/shared/types").AnyObject[];
158
164
  onUpdateChecked: ({ checked, column }: {
@@ -440,6 +446,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
440
446
  setStyle: typeof import("./src/utils").setStyle;
441
447
  isDisable: typeof import("./src/utils").isDisable;
442
448
  ReorderTwoOutline: 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<{}>>, {}>;
449
+ isFunction: (value: any) => value is (...args: any[]) => any;
443
450
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
444
451
  element: {
445
452
  type: import("vue").PropType<Partial<{
@@ -138,23 +138,29 @@ declare const _default: import("vue").DefineComponent<{
138
138
  newFields: import("vue").Ref<AnyObject[]>;
139
139
  columns: import("vue").Ref<{
140
140
  title: string;
141
- type: "text" | "checkbox" | "select" | "input" | "inputNumber";
141
+ type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
142
142
  field: string;
143
143
  checkedAll?: boolean | undefined;
144
144
  disabledAll?: boolean | undefined;
145
145
  isHeadCheckHide?: boolean | undefined;
146
146
  isShow?: boolean | undefined;
147
+ contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
148
+ [key: string]: any;
149
+ }>) | undefined;
147
150
  }[]>;
148
151
  fieldList: import("vue").ComputedRef<AnyObject[]>;
149
152
  rowProps: {
150
153
  columns: {
151
154
  title: string;
152
- type: "text" | "checkbox" | "select" | "input" | "inputNumber";
155
+ type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
153
156
  field: string;
154
157
  checkedAll?: boolean | undefined;
155
158
  disabledAll?: boolean | undefined;
156
159
  isHeadCheckHide?: boolean | undefined;
157
160
  isShow?: boolean | undefined;
161
+ contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
162
+ [key: string]: any;
163
+ }>) | undefined;
158
164
  }[];
159
165
  fieldList: AnyObject[];
160
166
  onUpdateChecked: ({ checked, column }: {
@@ -425,6 +431,7 @@ declare const _default: import("vue").DefineComponent<{
425
431
  setStyle: typeof setStyle;
426
432
  isDisable: typeof isDisable;
427
433
  ReorderTwoOutline: 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<{}>>, {}>;
434
+ isFunction: (value: any) => value is (...args: any[]) => any;
428
435
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
429
436
  element: {
430
437
  type: PropType<Partial<{
@@ -147,6 +147,7 @@ declare const _default: import("vue").DefineComponent<{
147
147
  setStyle: typeof setStyle;
148
148
  isDisable: typeof isDisable;
149
149
  ReorderTwoOutline: 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<{}>>, {}>;
150
+ isFunction: (value: any) => value is (...args: any[]) => any;
150
151
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
151
152
  element: {
152
153
  type: PropType<Partial<{
@@ -1 +1 @@
1
- import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as r,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as f,normalizeClass as c,toDisplayString as m,withDirectives as p,vShow as v}from"vue";import{NTooltip as y,NIcon as h,NCheckbox as b,NSelect as k,NInput as g,NInputNumber as x}from"naive-ui";import{setStyle as N,isDisable as U}from"../utils/index.js";import{ReorderTwoOutline as E}from"@vicons/ionicons5";import{range as w}from"lodash-es";const C={class:"row"},H=["title"],O=f("span",null,"拖拽调整顺序",-1);var P=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]},isHighlight:{type:Boolean}},emits:["updateChecked"],setup(e,{emit:P}){const S=e,D=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],L=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function A(e){switch(e.field){case"fixedWay":return D;case"sortDirection":return L;case"sortPriority":return function(){const e=w(1,S.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),l=S.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==S.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();default:return[]}}function F(e){if("sortPriority"!==e.field)return!1;const{sortDirection:l}=S.element;return!l||"NONE"===l}return(w,D)=>(l(),t("div",C,[(l(!0),t(i,null,n(e.columns,((n,w)=>{return l(),t(i,{key:w},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(r(N)(n))},["text"===n.type?(l(),t(i,{key:0},[0===w?(l(),o(r(y),{key:0,trigger:"hover"},{trigger:d((()=>[u(r(h),{style:{"margin-right":"5px",top:"2px"},component:r(E)},null,8,["component"])])),default:d((()=>[O])),_:1})):s("v-if",!0),f("span",{class:c([e.isHighlight&&"title"===n.field?"highlight":""])},m("seq"===n.field?e.idx:e.element[n.field]),3)],64)):s("v-if",!0),"checkbox"===n.type?p((l(),o(r(b),{key:1,disabled:r(U)(e.element,n.field),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){P("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(C=e.element,D=n.field,"isShowHeaderFilter"===D?C.isConfiguredHeaderFilter&&"0001"!=S.element.id:"0001"!=S.element.id)]]):s("v-if",!0),"select"===n.type?p((l(),o(r(k),{key:2,clearable:"",disabled:F(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(S.element.sortPriority=null)}(e,n)],options:A(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):s("v-if",!0),"input"===n.type?p((l(),o(r(g),{key:3,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),o(r(x),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0)],12,H)):s("v-if",!0)],64);var C,D})),128))]))}});export{P as default};
1
+ import{defineComponent as e,openBlock as t,createElementBlock as l,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as f,normalizeClass as c,toDisplayString as m,withDirectives as p,vShow as v,resolveDynamicComponent as y}from"vue";import{NTooltip as h,NIcon as b,NCheckbox as k,NSelect as g,NInput as x,NInputNumber as N}from"naive-ui";import{setStyle as U,isDisable as E}from"../utils/index.js";import{ReorderTwoOutline as w}from"@vicons/ionicons5";import{isFunction as C,range as H}from"lodash-es";const O={class:"row"},P=["title"],S=f("span",null,"拖拽调整顺序",-1);var D=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]},isHighlight:{type:Boolean}},emits:["updateChecked"],setup(e,{emit:D}){const L=e,R=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],A=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function F(e){switch(e.field){case"fixedWay":return R;case"sortDirection":return A;case"sortPriority":return function(){const e=H(1,L.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),t=L.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==L.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!t.includes(e.value)))}();default:return[]}}function _(e){if("sortPriority"!==e.field)return!1;const{sortDirection:t}=L.element;return!t||"NONE"===t}return(H,R)=>(t(),l("div",O,[(t(!0),l(i,null,n(e.columns,((n,H)=>{return t(),l(i,{key:H},[n.isShow?(t(),l("span",{key:0,class:"table-cell",title:e.element[n.field],style:r(a(U)(n))},["text"===n.type?(t(),l(i,{key:0},[0===H?(t(),o(a(h),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(b),{style:{"margin-right":"5px",top:"2px"},component:a(w)},null,8,["component"])])),default:d((()=>[S])),_:1})):s("v-if",!0),f("span",{class:c([e.isHighlight&&"title"===n.field?"highlight":""])},m("seq"===n.field?e.idx:e.element[n.field]),3)],64)):s("v-if",!0),"checkbox"===n.type?p((t(),o(a(k),{key:1,disabled:a(E)(e.element,n.field),checked:e.element[n.field],"onUpdate:checked":[t=>e.element[n.field]=t,e=>function(e,t){D("updateChecked",{checked:e,column:t})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(O=e.element,R=n.field,"isShowHeaderFilter"===R?O.isConfiguredHeaderFilter&&"0001"!=L.element.id:"0001"!=L.element.id)]]):s("v-if",!0),"select"===n.type?p((t(),o(a(g),{key:2,clearable:"",disabled:_(n),value:e.element[n.field],"onUpdate:value":[t=>e.element[n.field]=t,e=>function(e,t){"sortDirection"===t.field&&"NONE"===e&&(L.element.sortPriority=null)}(e,n)],options:F(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):s("v-if",!0),"input"===n.type?p((t(),o(a(x),{key:3,value:e.element[n.field],"onUpdate:value":t=>e.element[n.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(t(),o(a(N),{key:4,value:e.element[n.field],"onUpdate:value":t=>e.element[n.field]=t},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===n.type&&a(C)(n.contentRender)?(t(),o(y((()=>n.contentRender(n,e.element))),{key:5})):s("v-if",!0)],12,P)):s("v-if",!0)],64);var O,R})),128))]))}});export{D as default};
@@ -1,3 +1,5 @@
1
+ import { AnyObject } from '../../../../../es/shared/types';
2
+ import { VNode } from 'vue';
1
3
  export declare type FieldSetItem = Partial<{
2
4
  id: string;
3
5
  name: string;
@@ -19,10 +21,11 @@ export declare type FieldSetItem = Partial<{
19
21
  export declare type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth';
20
22
  export declare type FieldSetColumnItem = {
21
23
  title: string;
22
- type: 'text' | 'checkbox' | 'select' | 'input' | 'inputNumber';
24
+ type: 'text' | 'checkbox' | 'select' | 'input' | 'inputNumber' | 'custom';
23
25
  field: string;
24
26
  checkedAll?: boolean;
25
27
  disabledAll?: boolean;
26
28
  isHeadCheckHide?: boolean;
27
29
  isShow?: boolean;
30
+ contentRender?: (column: AnyObject, row: AnyObject) => VNode | String;
28
31
  };
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.53-beta.11",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.53-beta.11",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.53-beta.12",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.53-beta.12",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.53-beta.11",
3
+ "version": "3.1.53-beta.12",
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": "d8c98c5c3b6a5cd926e3d1f68e1aeef46f7d8b7a"
66
+ "gitHead": "3131a71d3bbd42c743aa5bdcdb9ec97eb3ffd69a"
67
67
  }