cnhis-design-vue 3.1.49-beta.23 → 3.1.49-beta.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/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/keyboard/index.d.ts +3 -3
- package/es/components/keyboard/src/Keyboard.vue.d.ts +3 -3
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/multi-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as s,createBlock as n,unref as r,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as v,createTextVNode as y,toDisplayString as b,createVNode as k,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as A,NCheckbox as _,NTooltip as S,NIcon as C,NPopconfirm as W,NButton as E}from"naive-ui";import q from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/Row.vue.js";import{isArray as N,cloneDeep as R,isString as j,omit as B}from"lodash-es";import{isDisable as I,setStyle as U,getGroupTree as D}from"./utils/index.js";import{uuidGenerator as O}from"../../../shared/utils/index.js";import{HelpCircleSharp as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as s,createBlock as n,unref as r,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as v,createTextVNode as y,toDisplayString as b,createVNode as k,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as A,NCheckbox as _,NTooltip as S,NIcon as C,NPopconfirm as W,NButton as E}from"naive-ui";import q from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/Row.vue.js";import{isArray as N,cloneDeep as R,isString as j,omit as B}from"lodash-es";import{isDisable as I,setStyle as U,getGroupTree as D}from"./utils/index.js";import{uuidGenerator as O}from"../../../shared/utils/index.js";import{HelpCircleSharp as T}from"@vicons/ionicons5";const V={class:"c-field-set__table-header"},P=h("span",null,"数值越小,优先级越高",-1),K=["tabindex"],L={key:1,class:"c-field-set__table-footer"};var G=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:G,emit:H}){const M=e,$={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},z=l(w().value.primaryColor),J=l(""),Q=l(),X=l([]),Y=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),Z=t((()=>X.value.flat())),ee=i({columns:Y.value,fieldList:Z.value,onUpdateChecked:function({checked:e,column:l}){const t=!e||ue(l.field);l.checkedAll=!t}}),le={keyword:J.value,idx:0,startIdx:0},te=()=>{H("save",{tableFields:ae()})},ie=()=>{H("close")};function oe(){X.value=de(),re(),H("reset")}function de(){const e=R(M.fields).map((e=>({...e,uuid:O()})));return Object.keys($).forEach((l=>{e.forEach((e=>{"old"==M.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[$[l]]=1==e[l]:e[$[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),function(e){if(M.groupSetting){return D(M.groupSetting,e).reduce(((t,i)=>{const o=j(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function ae(){let e=[];return e="old"==M.type?Z.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,...M.isEdit?{required:e.required,editable:e.editable}:{}}))):Z.value,e.map((e=>B(e,["uuid"])))}function se(){const e=le.keyword!==J.value;let l=J.value?Z.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(J.value))return!!e||t>le.idx})):0;-1!==l||e||(l=le.startIdx),Q.value.scrollTop=52*l,Object.assign(le,{keyword:J.value,idx:l},e?{startIdx:l}:{})}function ne(e){var l;return!!J.value&&(null==(l=e.title)?void 0:l.includes(J.value))}function re(){var e,l;(null==(e=M.showColumnNames)?void 0:e.length)&&(Y.value=Y.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=M.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=M.customColumns)?void 0:l.length)&&Y.value.push(...M.customColumns),M.showSeq&&Y.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),Y.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&M.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=X.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ue(e.field)&&!l}}))}function ue(e){return X.value.flat().some((l=>!I(l,e)&&!l[e]&&"0001"!=l.id))}return o([()=>M.fields,()=>{var e;return null==(e=M.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(X.value=de(),re())}),{immediate:!0,deep:!0}),G({getTableFields:ae}),(l,t)=>(d(),a("div",{class:"c-field-set",style:s({"--row-height":"52px","--primary-color":z.value})},[e.showSearch?(d(),n(r(A),{key:0,class:"c-field-set__search-wrapper",value:J.value,"onUpdate:value":t[0]||(t[0]=e=>J.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(se,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",V,[(d(!0),a(p,null,m(Y.value,((e,l)=>(d(),a(p,{key:l},[e.isShow?(d(),a("span",{key:0,class:"table-cell",style:s(r(U)(e))},["checkbox"===e.type?(d(),n(r(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void Z.value.forEach((e=>{I(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:v((()=>[y(b(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):f("v-if",!0),y(" "+b("checkbox"!==e.type?e.title:"")+" ",1),"sortPriority"===e.field?(d(),n(r(S),{key:1,trigger:"hover"},{trigger:v((()=>[k(r(C),{component:r(T),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[P])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"c-field-set__table-body",ref_key:"tableBodyRef",ref:Q},[k(r(q),{modelValue:X.value,"onUpdate:modelValue":t[1]||(t[1]=e=>X.value=e),animation:"150","item-key":"id",draggable:".item"},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(d(),a("div",{key:0,class:"item",tabindex:l},[r(N)(e)?(d(!0),a(p,{key:0},m(e,((e,t)=>(d(),n(F,g(ee,{key:t,element:e,idx:l+1,"is-highlight":ne(e)}),null,16,["element","idx","is-highlight"])))),128)):(d(),n(F,g({key:1},ee,{element:e,idx:l+1,"is-highlight":ne(e)}),null,16,["element","idx","is-highlight"]))],8,K))])),_:1},8,["modelValue"])],512),e.footerFlag?(d(),a("div",L,[f(" 底部按钮插槽 "),x(l.$slots,"footer",{},(()=>[k(r(W),{onPositiveClick:oe},{trigger:v((()=>[k(r(E),{style:{"margin-right":"8px"}},{default:v((()=>[y("恢复默认设置")])),_:1})])),default:v((()=>[y(" 确认要恢复系统默认设置吗? ")])),_:1}),k(r(E),{style:{"margin-right":"8px"},onClick:ie},{default:v((()=>[y("取消")])),_:1}),k(r(E),{type:"primary",onClick:te},{default:v((()=>[y("保存")])),_:1})]))])):f("v-if",!0)],4))}});export{G as default};
|
|
@@ -89,9 +89,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
89
89
|
}>;
|
|
90
90
|
style: import("vue").ComputedRef<string>;
|
|
91
91
|
englishKeys: import("vue").Ref<string[]>;
|
|
92
|
-
popoverRef: import("vue").Ref<
|
|
93
|
-
englishKeyboardRef: import("vue").Ref<
|
|
94
|
-
keyboardDragRef: import("vue").Ref<HTMLElement |
|
|
92
|
+
popoverRef: import("vue").Ref<any>;
|
|
93
|
+
englishKeyboardRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
94
|
+
keyboardDragRef: import("vue").Ref<HTMLElement | undefined>;
|
|
95
95
|
currentValue: import("vue").Ref<any>;
|
|
96
96
|
_style: import("vue").ComputedRef<string> | undefined;
|
|
97
97
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
@@ -90,9 +90,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
90
|
}>;
|
|
91
91
|
style: import("vue").ComputedRef<string>;
|
|
92
92
|
englishKeys: import("vue").Ref<string[]>;
|
|
93
|
-
popoverRef: import("vue").Ref<
|
|
94
|
-
englishKeyboardRef: import("vue").Ref<
|
|
95
|
-
keyboardDragRef: import("vue").Ref<HTMLElement |
|
|
93
|
+
popoverRef: import("vue").Ref<any>;
|
|
94
|
+
englishKeyboardRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
95
|
+
keyboardDragRef: import("vue").Ref<HTMLElement | undefined>;
|
|
96
96
|
currentValue: import("vue").Ref<any>;
|
|
97
97
|
_style: import("vue").ComputedRef<string> | undefined;
|
|
98
98
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,provide as t,computed as o,unref as
|
|
1
|
+
import{defineComponent as e,ref as l,provide as t,computed as o,unref as a,openBlock as n,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as f,normalizeClass as c,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import C from"./components/NumberPanel.vue.js";import{useDraggable as _}from"@vueuse/core";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";const D=p("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=j(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(),L=l(),W=l(),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=_(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,a,n;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(n=null==(a=B.moveOffset)?void 0:a.y)?n:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){H.value.setShow(!1),X.value=e,U("change",e)}return R({select:function(){Q.value=Date.now()}}),(l,t)=>a(T)||e.panel?!a(T)&&e.panel?(n(),u(C,d({key:1},a($),{style:a(P)}),null,16,["style"])):(n(),f("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(a(A))},[r(a(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[D,r(a(b),{onClick:t[1]||(t[1]=e=>Z("close")),component:a(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(n(!0),f(m,null,v(G.value,((e,l)=>(n(),f("span",{key:e,class:c(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(n(),u(a(b),{key:0,component:a(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(n(),u(a(b),{key:1,component:a(S)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(n(),u(a(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},a(P)]),"display-directive":"show"},{trigger:s((()=>[r(a(w),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(C,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as s,ref as n,nextTick as t,watch as i,openBlock as r,createElementBlock as
|
|
1
|
+
import{defineComponent as e,inject as s,ref as n,nextTick as t,watch as i,openBlock as r,createElementBlock as o,Fragment as a,renderList as l,unref as c,toDisplayString as u,createCommentVNode as m,createVNode as d,withCtx as f,createTextVNode as g,createElementVNode as v}from"vue";import{NAvatar as p}from"naive-ui";import{useInfiniteScroll as _}from"@vueuse/core";import{getHistoryRecordApi as y,accessSessionApi as L}from"../api/index.js";const M={key:0,class:"time"},I={key:1,class:"message-box left"},T={class:"content"},h=["innerHTML"],k={key:2,class:"message-box right"},H={class:"content"},w=["innerHTML"];var x=e({__name:"ChatMain",setup(e){const x=s("state"),A=s("setMsgList"),S=s("setIsAppendMsg"),b=n();async function z(){var e,s;try{const n=null==(s=null==(e=x.msgList)?void 0:e[0])?void 0:s.id,t=await y({mergeType:1,sessionId:x.currentSessionId,from:x.userInfo.username,source:2,id:n});if(!Array.isArray(t))return;if(n&&0===t.length)return console.log("没有更多消息了");A(n?[...t,...x.msgList]:t),n||j()}catch(e){console.log(e)}}function N(e,s){return+(e.createdTime||Date.now())-+(0==s?0:x.msgList[s-1].createdTime)>18e4}async function j(){var e,s,n;await t();const i=null!=(s=null==(e=b.value)?void 0:e.scrollHeight)?s:0;null==(n=b.value)||n.scrollTo({top:i})}return _(b,(()=>{z()}),{distance:20,direction:"top"}),i((()=>x.currentSessionId),((e,s)=>{e&&(!async function(e){await L({sessionId:x.currentSessionId,lastSessionId:e,from:x.userInfo.username})}(s),z())}),{immediate:!0}),i((()=>x.isAppendMsg),(e=>{e&&(A([...x.msgList,x.currentMsg]),S(!1),j())}),{immediate:!0}),(e,s)=>(r(),o("div",{class:"chat-main",ref_key:"chatMainRef",ref:b},[(r(!0),o(a,null,l(c(x).msgList,((e,s)=>(r(),o("div",{class:"message-item",key:s},[N(e,s)?(r(),o("p",M,u(e.__time),1)):m("v-if",!0),e.__left?(r(),o("div",I,[d(c(p),{round:"",size:"large"},{default:f((()=>[g(u(e.fromName.slice(-2)),1)])),_:2},1024),v("div",T,[v("p",{innerHTML:e.__content},null,8,h)])])):(r(),o("div",k,[v("div",H,[v("p",{innerHTML:e.__content},null,8,w)]),d(c(p),{round:"",size:"large"},{default:f((()=>[g(u(e.fromName.slice(-2)),1)])),_:2},1024)]))])))),128))],512))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.49-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.49-beta.24",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.49-beta.24",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.49-beta.
|
|
3
|
+
"version": "3.1.49-beta.24",
|
|
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": "b1ad8d8f8db06ba88862b8526562e3ed78508e8d"
|
|
67
67
|
}
|