cnhis-design-vue 3.2.13-beta.0 → 3.2.13-beta.3
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/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +2 -2
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/template-render/src/components/Button.vue.d.ts +1 -0
- package/es/components/template-render/src/components/Button.vue2.js +1 -1
- package/es/components/template-render/src/components/Field.vue.d.ts +1 -1
- package/es/components/template-render/src/components/Field.vue2.js +1 -1
- package/es/components/template-render/src/components/index.d.ts +3 -2
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as t,ref as n,createVNode as
|
1
|
+
import{defineComponent as e,inject as t,ref as n,computed as i,createVNode as o}from"vue";import{NButton as l}from"naive-ui";import{InjectionAIChat as a}from"../types/index.js";import"../../../index.js";import{isArray as s}from"lodash-es";import r from"../../../form-render/index.js";import d from"../../../template-render/index.js";var u=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},instructionId:{type:String}},emits:["button-click"],setup(e,{attrs:u,slots:c,emit:m}){const{patientInfo:p,state:f}=t(a),v=n([]),g=n(),y=i((()=>{var t,n;return!!(null==(n=null==(t=e.msgItem)?void 0:t.content)?void 0:n.body)}));function b(e){try{return JSON.parse(e),!0}catch(e){return!1}}const h=e.msgItem.content;function I(e){const{eventName:t,data:n}=e;t&&m("button-click",{fieldItem:n,isBI:!0})}function x(e){h.data[e.id+"Disabled"]=!0,m("button-click")}return y.value&&(v.value=(h.body.items||[]).map((t=>{var n,i;const o={html_type:t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=t.labelField)?n:"label"},option:[],is_null:t.required?"0":"1"};return"SELECT"===o.html_type&&(o.option=t.options,"fixed"===t.dataSourceType&&(null==(i=t.options)?void 0:i.length)||(o.html_type="REMOTE_SEARCH",Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{instructionId:e.instructionId,code:t.code,configs:p},dependKey:[]}),s(t.dependencies)&&t.dependencies.length&&(o.urlConfig.dependKey=t.dependencies))),o}))),()=>{var t;return o("div",{class:"card"},[y.value?[o("p",null,[h.title||h.header.title]),o(r,{disabled:e.msgItem.disabled,column:12,ref:g,"field-list":v.value},null),h.footer.buttons.map((t=>function(t){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},i=y.value?{...n,marginTop:"0"}:n;return o(l,{style:i,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){if(y.value){if(!g.value)return;const n=g.value.getFormValues();try{await g.value.validate(),e.msgItem.content.body.items.forEach((e=>{n[e.code]&&(e.value=n[e.code])})),f.loading=!0,m("button-click",{values:n,buttonInfo:t,isForm:!0})}catch(e){}}else m("button-click")}},{default:()=>[y.value?null==t?void 0:t.text:h.buttonName]})}(t)))]:o(d,{config:b(null==(t=h.settings)?void 0:t.setting)?JSON.parse(h.settings.setting):null,data:h.data,"onModule-click":I,"onButton-click":x},null)])}}});export{u as default};
|
@@ -19,11 +19,11 @@ export type QueryData = (props: {
|
|
19
19
|
contentType: string;
|
20
20
|
command: any;
|
21
21
|
prompt: any;
|
22
|
-
}) => Promise<
|
22
|
+
}) => Promise<{
|
23
23
|
contents: MessageItem[];
|
24
24
|
buttonType?: string;
|
25
25
|
[key: string]: any;
|
26
|
-
}
|
26
|
+
}>;
|
27
27
|
export type QueryRecord = (props: {
|
28
28
|
page: number;
|
29
29
|
}) => Promise<{
|
@@ -1 +1 @@
|
|
1
|
-
.c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}.ai-chat{background:linear-gradient(135deg,#c9dbfb,#c9dbfb 20%,rgba(237,237,253,.5) 70%,rgba(151,97,251,.2));display:flex;flex-flow:column nowrap;font-size:14px;height:100%;padding:45px 0 60px;position:relative;width:100%}.ai-chat,.ai-chat *{box-sizing:border-box}.ai-chat .fillet-10{border-radius:10px}.ai-chat .fillet-8{border-radius:8px}.ai-chat .n-avatar{background-color:var(--c-primary-color)}.ai-chat .gradient{background:linear-gradient(178deg,#8f66f7,#4170ee);color:#fff}.ai-chat .gradient:active,.ai-chat .gradient:focus,.ai-chat .gradient:hover{color:#fff}.ai-chat .chat-main{display:flex;flex:1;flex-flow:column-reverse nowrap;overflow-y:auto;padding:0 130px 0 82px;row-gap:16px}.ai-chat .chat-main::-webkit-scrollbar{width:5px}.ai-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-main::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-main .message-item{column-gap:8px;display:flex;flex-flow:row nowrap}.ai-chat .chat-main .message-item:first-child{margin-bottom:auto}.ai-chat .chat-main .message-item .n-avatar{flex-shrink:0}.ai-chat .chat-main .message-item .content-box .content{background:#fff;border-radius:10px;flex:unset;padding:10px 12px}.ai-chat .chat-main .message-item .content-box .content .card{width:236px}.ai-chat .chat-main .message-item .content-box .content .card>p{font-size:14px;line-height:19px}.ai-chat .chat-main .message-item .content-box .content .card .link-btn{display:flex;flex-flow:row wrap;font-size:14px;justify-content:space-between;margin-top:10px;width:100%}.ai-chat .chat-main .message-item .content-box .content .card .link-btn .n-button__content{display:unset;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-main .message-item .content-box .content .card .card-body{border:1px solid #d5d5d5;border-radius:8px;margin-top:5px;overflow:hidden}.ai-chat .chat-main .message-item .content-box .content .card .card-body__head{background:rgba(65,112,238,.14);line-height:36px;padding:0 15px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content{padding:10px 6px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div{display:flex;font-size:12px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div .label{flex:0 0 60px;text-align:right}.ai-chat .chat-main .message-item .content-box .content .card .patient-info{border-top:1px solid #e5e5e5;margin-top:5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item{margin:5px 0 0 5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item:last-child{margin-bottom:0}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:first-child{font-weight:700}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:last-child{color:#888}.ai-chat .chat-main .message-item .content-box .content .card .n-form{margin-top:10px}.ai-chat .chat-main .message-item .content-box .content .card .n-form .form-render__formItemLabel{color:#888}.ai-chat .chat-main .message-item .content-box .content.default h2{font-size:22px;font-weight:500;margin:10px 0}.ai-chat .chat-main .message-item .content-box .content.loading{align-items:center;color:#999;column-gap:10px;display:flex}.ai-chat .chat-main .message-item .content-box.mine .content{background:hsla(0,0%,100%,.48);border-radius:8px}.ai-chat .chat-footer{padding:30px 130px 0}.ai-chat .chat-footer.disabled{cursor:not-allowed}.ai-chat .chat-footer .menu-box{background:#fff;column-gap:8px;display:flex;margin-bottom:8px;overflow-x:auto;padding:10px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{width:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{height:5px}.ai-chat .chat-footer .input-wrapper{background:#fff;box-shadow:0 3px 4px 0 rgba(0,0,0,.1);padding:15px 20px}.ai-chat .chat-footer .input-wrapper .n-input__border,.ai-chat .chat-footer .input-wrapper .n-input__state-border{border:none}.ai-chat .chat-footer .input-wrapper .n-input:not(.n-input--disabled).n-input--focus .n-input__state-border{box-shadow:unset}.ai-chat .chat-footer .input-wrapper .btn-box{display:flex;justify-content:flex-end}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send{align-items:center;cursor:pointer;display:flex;height:46px;justify-content:center;width:58px}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send.disabled{cursor:not-allowed;opacity:.5}.ai-chat .chat-footer .command-box{display:flex;flex-flow:column nowrap;height:100%}.ai-chat .chat-footer .command-box__header{display:flex}.ai-chat .chat-footer .command-box__header .title{color:#999}.ai-chat .chat-footer .command-box__menu{flex:1;overflow-y:auto}.ai-chat .chat-footer .command-box__menu .menu-item{align-items:center;display:flex;padding:8px 0 8px 5px}.ai-chat .chat-footer .command-box__menu .menu-item .remark{color:#999;flex:1;font-size:12px;margin-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-footer .command-box__menu .menu-item .n-icon{margin-left:auto}.ai-chat .chat-footer .command-box__menu .menu-item:hover{cursor:default}.ai-chat .chat-footer .command-box__menu .menu-item.selected{background:#f2f2f2;border-radius:5px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable{position:relative}.ai-chat .chat-footer .command-box__menu .menu-item.selectable .label{color:var(--c-primary-color);margin-left:30px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable:before{background:#e5e5e5;border-radius:5px;content:"/";height:20px;left:5px;line-height:20px;position:absolute;text-align:center;top:10px;width:20px}.ai-chat--small{padding:20px 0 44px}.ai-chat--small .chat-main{padding:0 20px 10px}.ai-chat--small .chat-main .message-item{display:unset}.ai-chat--small .chat-main .message-item .n-avatar{background:transparent}.ai-chat--small .chat-main .message-item .content-box{display:flex;flex-flow:row nowrap}.ai-chat--small .chat-main .message-item .content-box .content{border-radius:3px 14px 14px;max-width:calc(100% - 55px)}.ai-chat--small .chat-main .message-item .content-box .content.default{border-radius:4px 16px 16px}.ai-chat--small .chat-main .message-item .content-box.mine{flex-flow:row-reverse nowrap}.ai-chat--small .chat-main .message-item .content-box.mine .content{background:#5874dc;border-radius:14px 0 14px 14px;color:#fff}.ai-chat--small .chat-footer{padding:10px 20px 0}.ai-chat--small .chat-footer .menu-box{background:none;padding:0}.ai-chat--small .chat-footer .menu-box .n-button{background:#fff}.ai-chat--small .chat-footer .input-wrapper{border-radius:24px;box-shadow:0 0 6px 0 hsla(240,9%,85%,.74);padding:0}.ai-chat .prompt-wrapper{background:linear-gradient(135deg,#ecf3ff,#ecf3ff 20%,rgba(237,237,253,.5) 70%,rgba(203,175,255,.3))}.ai-chat .prompt-wrapper .n-drawer-header{padding:15px}.ai-chat .prompt-wrapper .n-drawer-header__main{width:100%}.ai-chat .prompt-wrapper .n-drawer-header__main .title{display:flex;font-size:14px}.ai-chat .prompt-wrapper .n-drawer-header__main .title .n-button{margin-left:auto}.ai-chat .prompt-wrapper .n-drawer-header__main .n-input{margin-top:10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper{padding:0 10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper{align-content:flex-start;display:flex;flex-wrap:wrap;height:100%;overflow-y:auto}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar{width:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item{background:#fff;border-radius:10px;box-sizing:border-box;break-inside:avoid;cursor:pointer;margin:5px;padding:10px;width:calc(50% - 10px)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item:hover{background-image:linear-gradient(#ecf3ff,#fff 40%,#fff)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item p:last-child{color:#999;font-size:12px}
|
1
|
+
.c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}.c-template-render{box-sizing:border-box;color:#000;font-size:0;line-height:1.6}.c-template-render__flex{display:flex}.c-template-render__flexAlignCenter{align-items:center}.c-template-render__flex-wrap{flex-wrap:wrap}.c-template-render__flex1{flex:1}.c-template-render__width100{width:100%}.c-template-render__color60{color:rgba(0,0,0,.6)}.c-template-render__color100{color:#000}.c-template-render__text-ellipsis{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box!important;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;word-break:break-all}.c-template-render__nowrap{white-space:nowrap}.c-template-render__mgr8{margin-right:8px!important}.c-template-render__mgb8{margin-bottom:8px!important}.c-template-render__mgt4{margin-top:4px!important}.c-template-render__mgb4{margin-bottom:4px!important}.c-template-render__un-mgr8{margin-right:-8px!important}.c-template-render__bar{padding-left:8px;position:relative}.c-template-render__bar:before{background:var(--c-primary-color);border-radius:4px;content:"";height:12px;left:0;position:absolute;top:50%;transform:translateY(-50%);width:4px}.c-template-render__inline{display:inline}.ai-chat{background:linear-gradient(135deg,#c9dbfb,#c9dbfb 20%,rgba(237,237,253,.5) 70%,rgba(151,97,251,.2));display:flex;flex-flow:column nowrap;font-size:14px;height:100%;padding:45px 0 60px;position:relative;width:100%}.ai-chat,.ai-chat *{box-sizing:border-box}.ai-chat .fillet-10{border-radius:10px}.ai-chat .fillet-8{border-radius:8px}.ai-chat .n-avatar{background-color:var(--c-primary-color)}.ai-chat .gradient{background:linear-gradient(178deg,#8f66f7,#4170ee);color:#fff}.ai-chat .gradient:active,.ai-chat .gradient:focus,.ai-chat .gradient:hover{color:#fff}.ai-chat .chat-main{display:flex;flex:1;flex-flow:column-reverse nowrap;overflow-y:auto;padding:0 130px 0 82px;row-gap:16px}.ai-chat .chat-main::-webkit-scrollbar{width:5px}.ai-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-main::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-main .message-item{column-gap:8px;display:flex;flex-flow:row nowrap}.ai-chat .chat-main .message-item:first-child{margin-bottom:auto}.ai-chat .chat-main .message-item .n-avatar{flex-shrink:0}.ai-chat .chat-main .message-item .content-box .content{background:#fff;border-radius:10px;flex:unset;padding:10px 12px}.ai-chat .chat-main .message-item .content-box .content .card{width:236px}.ai-chat .chat-main .message-item .content-box .content .card>p{font-size:14px;line-height:19px}.ai-chat .chat-main .message-item .content-box .content .card .link-btn{display:flex;flex-flow:row wrap;font-size:14px;justify-content:space-between;margin-top:10px;width:100%}.ai-chat .chat-main .message-item .content-box .content .card .link-btn .n-button__content{display:unset;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-main .message-item .content-box .content .card .card-body{border:1px solid #d5d5d5;border-radius:8px;margin-top:5px;overflow:hidden}.ai-chat .chat-main .message-item .content-box .content .card .card-body__head{background:rgba(65,112,238,.14);line-height:36px;padding:0 15px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content{padding:10px 6px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div{display:flex;font-size:12px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div .label{flex:0 0 60px;text-align:right}.ai-chat .chat-main .message-item .content-box .content .card .patient-info{border-top:1px solid #e5e5e5;margin-top:5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item{margin:5px 0 0 5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item:last-child{margin-bottom:0}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:first-child{font-weight:700}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:last-child{color:#888}.ai-chat .chat-main .message-item .content-box .content .card .n-form{margin-top:10px}.ai-chat .chat-main .message-item .content-box .content .card .n-form .form-render__formItemLabel{color:#888}.ai-chat .chat-main .message-item .content-box .content.default h2{font-size:22px;font-weight:500;margin:10px 0}.ai-chat .chat-main .message-item .content-box .content.loading{align-items:center;color:#999;column-gap:10px;display:flex}.ai-chat .chat-main .message-item .content-box.mine .content{background:hsla(0,0%,100%,.48);border-radius:8px}.ai-chat .chat-footer{padding:30px 130px 0}.ai-chat .chat-footer.disabled{cursor:not-allowed}.ai-chat .chat-footer .menu-box{background:#fff;column-gap:8px;display:flex;margin-bottom:8px;overflow-x:auto;padding:10px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{width:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{height:5px}.ai-chat .chat-footer .input-wrapper{background:#fff;box-shadow:0 3px 4px 0 rgba(0,0,0,.1);padding:15px 20px}.ai-chat .chat-footer .input-wrapper .n-input__border,.ai-chat .chat-footer .input-wrapper .n-input__state-border{border:none}.ai-chat .chat-footer .input-wrapper .n-input:not(.n-input--disabled).n-input--focus .n-input__state-border{box-shadow:unset}.ai-chat .chat-footer .input-wrapper .btn-box{display:flex;justify-content:flex-end}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send{align-items:center;cursor:pointer;display:flex;height:46px;justify-content:center;width:58px}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send.disabled{cursor:not-allowed;opacity:.5}.ai-chat .chat-footer .command-box{display:flex;flex-flow:column nowrap;height:100%}.ai-chat .chat-footer .command-box__header{display:flex}.ai-chat .chat-footer .command-box__header .title{color:#999}.ai-chat .chat-footer .command-box__menu{flex:1;overflow-y:auto}.ai-chat .chat-footer .command-box__menu .menu-item{align-items:center;display:flex;padding:8px 0 8px 5px}.ai-chat .chat-footer .command-box__menu .menu-item .remark{color:#999;flex:1;font-size:12px;margin-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-footer .command-box__menu .menu-item .n-icon{margin-left:auto}.ai-chat .chat-footer .command-box__menu .menu-item:hover{cursor:default}.ai-chat .chat-footer .command-box__menu .menu-item.selected{background:#f2f2f2;border-radius:5px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable{position:relative}.ai-chat .chat-footer .command-box__menu .menu-item.selectable .label{color:var(--c-primary-color);margin-left:30px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable:before{background:#e5e5e5;border-radius:5px;content:"/";height:20px;left:5px;line-height:20px;position:absolute;text-align:center;top:10px;width:20px}.ai-chat--small{padding:20px 0 44px}.ai-chat--small .chat-main{padding:0 20px 10px}.ai-chat--small .chat-main .message-item{display:unset}.ai-chat--small .chat-main .message-item .n-avatar{background:transparent}.ai-chat--small .chat-main .message-item .content-box{display:flex;flex-flow:row nowrap}.ai-chat--small .chat-main .message-item .content-box .content{border-radius:3px 14px 14px;max-width:calc(100% - 55px)}.ai-chat--small .chat-main .message-item .content-box .content.default{border-radius:4px 16px 16px}.ai-chat--small .chat-main .message-item .content-box.mine{flex-flow:row-reverse nowrap}.ai-chat--small .chat-main .message-item .content-box.mine .content{background:#5874dc;border-radius:14px 0 14px 14px;color:#fff}.ai-chat--small .chat-footer{padding:10px 20px 0}.ai-chat--small .chat-footer .menu-box{background:none;padding:0}.ai-chat--small .chat-footer .menu-box .n-button{background:#fff}.ai-chat--small .chat-footer .input-wrapper{border-radius:24px;box-shadow:0 0 6px 0 hsla(240,9%,85%,.74);padding:0}.ai-chat .prompt-wrapper{background:linear-gradient(135deg,#ecf3ff,#ecf3ff 20%,rgba(237,237,253,.5) 70%,rgba(203,175,255,.3))}.ai-chat .prompt-wrapper .n-drawer-header{padding:15px}.ai-chat .prompt-wrapper .n-drawer-header__main{width:100%}.ai-chat .prompt-wrapper .n-drawer-header__main .title{display:flex;font-size:14px}.ai-chat .prompt-wrapper .n-drawer-header__main .title .n-button{margin-left:auto}.ai-chat .prompt-wrapper .n-drawer-header__main .n-input{margin-top:10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper{padding:0 10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper{align-content:flex-start;display:flex;flex-wrap:wrap;height:100%;overflow-y:auto}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar{width:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item{background:#fff;border-radius:10px;box-sizing:border-box;break-inside:avoid;cursor:pointer;margin:5px;padding:10px;width:calc(50% - 10px)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item:hover{background-image:linear-gradient(#ecf3ff,#fff 40%,#fff)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item p:last-child{color:#999;font-size:12px}
|
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
31
31
|
};
|
32
32
|
getDisabledText: (button: AnyObject) => any;
|
33
33
|
getButtonStyle: (button: AnyObject) => AnyObject;
|
34
|
+
getButtonProps: (button: AnyObject) => any;
|
34
35
|
handleButtonClick: (button: AnyObject) => void;
|
35
36
|
NButton: any;
|
36
37
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,inject as n,computed as e,openBlock as o,createElementBlock as i,normalizeStyle as l,unref as r,normalizeClass as s,Fragment as u,renderList as a,createBlock as d,mergeProps as c,withModifiers as f,withCtx as p,createTextVNode as
|
1
|
+
import{defineComponent as t,inject as n,computed as e,openBlock as o,createElementBlock as i,normalizeStyle as l,unref as r,normalizeClass as s,Fragment as u,renderList as a,createBlock as d,mergeProps as c,withModifiers as f,withCtx as p,createTextVNode as m,toDisplayString as v}from"vue";import{cloneDeep as b,isObject as g}from"lodash-es";import{InjectionTemplateRenderEmit as y}from"../constants/index.js";import{getRealWidth as k,transNumberToPx as x,isFactor as _,getCurText as z}from"../utils/index.js";import{NButton as C}from"naive-ui";var h=t({__name:"Button",props:{config:{default:()=>({}),type:Object},data:{default:()=>({}),type:Object}},setup(t){const h=t,j=n(y),O=e((()=>{var t;return b((null==(t=h.config)?void 0:t.setting)||{})})),S=e((()=>O.value.buttonList||[])),w=e((()=>{const{containerStyle:t={},unitConfig:n={}}=O.value,e=k(t,n);return{"font-size":"14px",...x(t),width:e,"box-sizing":"border-box"}}));function B(t,n){var e;return t.props.block||n===(null==(e=S.value)?void 0:e.length)-1}function L(t){var n,e;const o=(null==(n=null==t?void 0:t.advancedConfig)?void 0:n.disabled)||{};if((null==(e=o.conditions)?void 0:e.length)>0){if(o.conditions.some((t=>_(t,z(h.data[t.field_key])))))return{disabled:!0,title:null==o?void 0:o.title}}return!1}function T(t){const n=L(t),e=t.customTitle||t.name;return g(n)&&n.title?n.title:e}function q(t){return x(null==t?void 0:t.buttonStyle)||{}}return(t,n)=>(o(),i("div",{style:l(r(w)),class:s(r(O).containerClass)},[(o(!0),i(u,null,a(r(S),((t,n)=>(o(),d(r(C),c({class:B(t,n)?"":"c-template-render__mgr8",key:n},function(t){return{...t.props,size:"normal"===t.props.size?"medium":t.props.size}}(t),{style:q(t),disabled:!!L(t),onClick:f((()=>function(t){j("button-click",{...b(h),button:t})}(t)),["stop"])}),{default:p((()=>[m(v(T(t)),1)])),_:2},1040,["class","style","disabled","onClick"])))),128))],6))}});export{h as default};
|
@@ -24,6 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
24
|
handleModuleClick: (data: AnyObject) => void;
|
25
25
|
prefixText: import("vue").ComputedRef<any>;
|
26
26
|
suffixText: import("vue").ComputedRef<any>;
|
27
|
+
getFieldText: import("vue").ComputedRef<any>;
|
27
28
|
finalContent: import("vue").ComputedRef<any>;
|
28
29
|
showRowNum: import("vue").ComputedRef<any>;
|
29
30
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -35,7 +36,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
35
36
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
36
37
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
37
38
|
conditionalObj: import("vue").ComputedRef<AnyObject>;
|
38
|
-
getFieldText: import("vue").ComputedRef<any>;
|
39
39
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
40
40
|
getFieldColor: import("vue").ComputedRef<any>;
|
41
41
|
conditionMatch: (list: AnyObject[]) => {};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,unref as l,openBlock as n,createElementBlock as a,normalizeClass as i,normalizeStyle as o,withModifiers as s,createElementVNode as r,toDisplayString as c,createCommentVNode as u,createBlock as d,withCtx as v,createTextVNode as p}from"vue";import{
|
1
|
+
import{defineComponent as e,computed as t,unref as l,openBlock as n,createElementBlock as a,normalizeClass as i,normalizeStyle as o,withModifiers as s,createElementVNode as r,toDisplayString as c,createCommentVNode as u,createBlock as d,withCtx as v,createTextVNode as p}from"vue";import{getCurText as f,transNumberToPx as y,getRealWidth as k,isFactor as m}from"../utils/index.js";import{NEllipsis as g}from"naive-ui";import{useCommon as b}from"../hooks/useCommon.js";const h={key:0},x={key:2},C={key:2};var w=e({__name:"Field",props:{config:{default:()=>({}),type:Object},data:{default:()=>({}),type:Object}},setup(e){const w=e,{setting:_,handleModuleClick:j}=b(w),O=t((()=>_.value.prefix||"")),S=t((()=>_.value.suffix||"")),z=t((()=>{const{conditionalShowList:e=[],mappingFiled:t=[]}=_.value.advancedConfig||{},l=H(e);if(Object.keys(l).length>0){const e=f(w.data[null==l?void 0:l.fieldName]||"");if(e)return e}const n=H(t);if(Object.keys(n).length>0){const e=null==n?void 0:n.key;if(e)return e}return f(w.data[_.value.fieldName])||""})),F=t((()=>z.value?O.value+z.value+S.value:E.value)),L=t((()=>_.value.rowNum||1)),N=t((()=>_.value.showTitle&&_.value.title)),M=t((()=>({...y(_.value.titleStyle),"box-sizing":"border-box"}))),B=t((()=>({...y(_.value.contentStyle),"word-break":"break-all","white-space":"normal","box-sizing":"border-box"}))),P=t((()=>{let e=_.value.containerClass||"";return _.value.prefixBar&&(e=`c-template-render__bar ${e}`),e})),T=t((()=>{const{containerStyle:e={},unitConfig:t={}}=_.value,l=k(e,t);return{"font-size":"14px",...y(e),width:l,"box-sizing":"border-box"}})),$=t((()=>"ellipsis"==_.value.textOverflow)),q=t((()=>"showMore"==_.value.textOverflow)),A=t((()=>{const{displayCondition:e=[]}=_.value.advancedConfig||{};return!e.length||e.some((e=>m(e,f(w.data[e.field_key]))))})),D=t((()=>{const{conditionalShowList:e=[]}=_.value.advancedConfig||{};return e.length>0?H(e):{}})),E=t((()=>_.value.emptyPlaceholder||"--")),G=t((()=>{const{conditionalShowList:e=[],mappingFiled:t=[]}=_.value.advancedConfig||{},l=H(e);if(Object.keys(l).length>0)return"";const n=H(t);return Object.keys(n).length>0?null==n?void 0:n.color:""}));function H(e){let t={};for(let l=0;l<e.length;l++){const n=e[l];if(n.conditions.some((e=>m(e,f(w.data[e.field_key]))))){t=n;break}}return t}return(t,f)=>l(A)?(n(),a("div",{key:0,class:i(l(P)),style:o(l(T))},[l(N)?(n(),a("span",{key:0,class:i(["c-template-render__color60",l(_).titleClass]),style:o(l(M)),onClick:f[0]||(f[0]=s((()=>l(j)(e.data)),["stop"]))},[r("span",null,c(l(D).title||l(_).title),1)],6)):u("v-if",!0),u(" 如果有枚举判断的颜色,则不考虑查看更多的筛选 "),l(G)?(n(),a("span",{key:1,style:o(l(B)),class:i(l(_).contentClass),onClick:f[1]||(f[1]=(...e)=>l(j)&&l(j)(...e))},[l(O)&&l(z)?(n(),a("span",h,c(l(O)),1)):u("v-if",!0),l(G)?(n(),a("span",{key:1,style:o({color:l(G)})},c(l(z)||l(E)),5)):u("v-if",!0),l(S)&&l(z)?(n(),a("span",x,c(l(S)),1)):u("v-if",!0)],6)):(n(),a("span",{key:2,style:o(l(B)),class:i(l(_).contentClass),onClick:f[2]||(f[2]=(...e)=>l(j)&&l(j)(...e))},[l($)?(n(),a("span",{key:0,class:"c-template-render__text-ellipsis",style:o({"-webkit-line-clamp":l(L)})},c(l(F)),5)):l(q)?(n(),d(l(g),{key:1,"expand-trigger":"click","line-clamp":l(L)},{default:v((()=>[p(c(l(F)),1)])),_:1},8,["line-clamp"])):(n(),a("span",C,c(l(F)),1))],6))],6)):u("v-if",!0)}});export{w as default};
|
@@ -23,6 +23,7 @@ declare const Field: import("vue").DefineComponent<{
|
|
23
23
|
handleModuleClick: (data: import("../../../../shared/types").AnyObject) => void;
|
24
24
|
prefixText: import("vue").ComputedRef<any>;
|
25
25
|
suffixText: import("vue").ComputedRef<any>;
|
26
|
+
getFieldText: import("vue").ComputedRef<any>;
|
26
27
|
finalContent: import("vue").ComputedRef<any>;
|
27
28
|
showRowNum: import("vue").ComputedRef<any>;
|
28
29
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -34,7 +35,6 @@ declare const Field: import("vue").DefineComponent<{
|
|
34
35
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
35
36
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
36
37
|
conditionalObj: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
37
|
-
getFieldText: import("vue").ComputedRef<any>;
|
38
38
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
39
39
|
getFieldColor: import("vue").ComputedRef<any>;
|
40
40
|
conditionMatch: (list: import("../../../../shared/types").AnyObject[]) => {};
|
@@ -158,6 +158,7 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
158
158
|
handleModuleClick: (data: import("../../../../shared/types").AnyObject) => void;
|
159
159
|
prefixText: import("vue").ComputedRef<any>;
|
160
160
|
suffixText: import("vue").ComputedRef<any>;
|
161
|
+
getFieldText: import("vue").ComputedRef<any>;
|
161
162
|
finalContent: import("vue").ComputedRef<any>;
|
162
163
|
showRowNum: import("vue").ComputedRef<any>;
|
163
164
|
isShowTitle: import("vue").ComputedRef<any>;
|
@@ -169,7 +170,6 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
169
170
|
onlyShowMore: import("vue").ComputedRef<boolean>;
|
170
171
|
isDisplayMatch: import("vue").ComputedRef<any>;
|
171
172
|
conditionalObj: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
172
|
-
getFieldText: import("vue").ComputedRef<any>;
|
173
173
|
emptyPlaceholder: import("vue").ComputedRef<any>;
|
174
174
|
getFieldColor: import("vue").ComputedRef<any>;
|
175
175
|
conditionMatch: (list: import("../../../../shared/types").AnyObject[]) => {};
|
@@ -343,6 +343,7 @@ declare function getComponent(type: COMPONENT_TYPE): import("vue").DefineCompone
|
|
343
343
|
};
|
344
344
|
getDisabledText: (button: import("../../../../shared/types").AnyObject) => any;
|
345
345
|
getButtonStyle: (button: import("../../../../shared/types").AnyObject) => import("../../../../shared/types").AnyObject;
|
346
|
+
getButtonProps: (button: import("../../../../shared/types").AnyObject) => any;
|
346
347
|
handleButtonClick: (button: import("../../../../shared/types").AnyObject) => void;
|
347
348
|
NButton: any;
|
348
349
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.13-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.13-beta.3",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.2.13-beta.3",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.2.13-beta.
|
3
|
+
"version": "3.2.13-beta.3",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"iOS 7",
|
73
73
|
"last 3 iOS versions"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "ac7d5b62ddbd176aa5cf525604c4784b1be007ce"
|
76
76
|
}
|