cnhis-design-vue 3.1.41-beta.19 → 3.1.41-beta.20
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,ref as t,computed as n,openBlock as a,createElementBlock as i,normalizeClass as o,createElementVNode as r,createCommentVNode as s,renderSlot as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as n,openBlock as a,createElementBlock as i,normalizeClass as o,createElementVNode as r,createCommentVNode as s,renderSlot as f,Fragment as l,createVNode as c,unref as d,withCtx as p,mergeProps as u,toDisplayString as v,renderList as g,createBlock as m,resolveDynamicComponent as h,createTextVNode as y,h as _,nextTick as I}from"vue";import{isString as b,isArray as k}from"lodash-es";import{NPopover as w,NImage as x,NTag as $,NEllipsis as S}from"naive-ui";import z from"./InfoDescription.vue.js";import H from"../../../_virtual/plugin-vue_export-helper.js";const P={class:"c-info-header__operation"},j={key:0,class:"c-info-header__divider"},C={class:"c-info-header__patient"},L={class:"c-info-header__patientHeader"},F={key:0,class:"c-info-header__patientHeader--name"},M={key:1,class:"c-info-header__patientHeader--sex"},q={key:2,class:"c-info-header__patientHeader--age"},A={class:"c-info-header__setting"},D=["onClick"];var N=H(e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},separator:{type:String,default:":"},patientInfo:{type:Object,default:()=>({})},infoList:{type:Array,required:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:32},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]}},emits:["openPatientInfo","fieldSet","update:compact"],setup(e,{expose:H,emit:N}){const B=e,O=t();function R(){var e;return null==(e=O.value)?void 0:e.updateColumn()}const U={patientInfo:{event:function(){N("openPatientInfo")},render:()=>[_("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){N("fieldSet")},render:()=>[_("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){N("update:compact",!B.compact),await I(),await R()},render:()=>[_("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},W=n((()=>B.settingIcons.map((e=>(b(e)?U[e]:e)||{}))));function E({type:e="warning"}){return{color:{warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"}[e],textColor:{warning:"#fff",info:"#2563F4"}[e]}}const G=n((()=>B.patientInfo&&k(B.patientInfo.tagList)?B.patientInfo.tagList.filter((e=>e.render||b(e.content)&&e.content)):[]));return H({update:R}),(t,n)=>(a(),i("div",{class:o(["c-info-header",{"is-compact":e.compact}])},[r("section",P,[s(" 操作区插槽 "),f(t.$slots,"operation")]),t.$slots.operation?(a(),i("div",j)):s("v-if",!0),r("section",C,[s(" 患者信息区插槽 "),f(t.$slots,"patientModule"),s(" 头像区插槽 "),f(t.$slots,"avatarModule",{},(()=>[t.$slots.avatarModule?s("v-if",!0):(a(),i(l,{key:0},[s(" 头像插槽 "),f(t.$slots,"avatar",{},(()=>[c(d(w),null,{trigger:p((()=>[c(d(x),u({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:p((()=>[c(d(x),u({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),r("section",null,[r("header",L,[e.patientInfo.name?(a(),i("div",F,v(e.patientInfo.name),1)):s("v-if",!0),e.patientInfo.sex?(a(),i("div",M,"/ "+v(e.patientInfo.sex),1)):s("v-if",!0),null!=e.patientInfo.age?(a(),i("div",q," / "+v(e.patientInfo.age)+v(e.patientInfo.ageUnit||"岁"),1)):s("v-if",!0),s(" tag区插槽 "),f(t.$slots,"tags",{tagList:d(G)},(()=>[(a(!0),i(l,null,g(e.patientInfo.tagList||[],(e=>(a(),m(d($),u({key:e.content,size:"medium",bordered:!1,color:E(e)},e),{default:p((()=>[e.render?(a(),m(h(e.render),{key:0})):(a(),m(d(S),{key:1,style:{"max-width":"96px"}},{default:p((()=>[y(v(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),s(" 头像信息区插槽 "),f(t.$slots,"avatarInfo")])],64))]))]),c(z,u({ref_key:"infoDescriptionRef",ref:O,"root-slot":t.$slots},t.$props),{info:p((()=>[s(" 信息描述区插槽 "),f(t.$slots,"info")])),_:3},16,["root-slot"]),r("section",A,[s(" 设置区插槽 "),f(t.$slots,"setting"),t.$slots.setting?s("v-if",!0):(a(!0),i(l,{key:0},g(d(W),(e=>(a(),i("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(a(),m(h(e.render)))],8,D)))),128))])],2))}}),[["__file","InfoHeader.vue"]]);export{N as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.41-beta.
|
|
3
|
+
"version": "3.1.41-beta.20",
|
|
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": "3cba66d49c36cf69108bbf7d6e79516c2d953113"
|
|
65
65
|
}
|