cnhis-design-vue 3.1.42-beta.23 → 3.1.42-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/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/style/iconfont.ttf +0 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/recommend-search/index.d.ts +5 -121
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +8 -124
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
- package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +2 -60
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/constant/index.d.ts +2 -0
- package/es/components/recommend-search/src/constant/index.js +1 -1
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -1
- package/es/shared/hooks/useDateTime.js +1 -1
- package/package.json +2 -2
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
- /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
- /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
- /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
- /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,openBlock as l,createElementBlock as o,createVNode as n,
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,openBlock as l,createElementBlock as o,createVNode as n,unref as r,mergeProps as u,isRef as i,withCtx as c,createElementVNode as s,normalizeProps as p,guardReactiveProps as v,Fragment as m,renderList as d,normalizeClass as y,toDisplayString as f,createBlock as h,createCommentVNode as _,renderSlot as K}from"vue";import{jsonParse as S}from"../../../../shared/utils/index.js";import{Checkmark as g}from"@vicons/ionicons5";import{useVModel as b,useVirtualList as k}from"@vueuse/core";import{isObject as M}from"lodash-es";import j from"./BaseSearch.js";import{NIcon as x}from"naive-ui";import C from"../../../../_virtual/plugin-vue_export-helper.js";const w={class:"recommend-search"},L=["onClick"],P=["title"],A=s("section",{class:"recommend-search__empty"},"暂无数据",-1);var O=C(e({__name:"RecommendSelect",props:{value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{emit:C}){const O=e,R=t(!1),U=a((()=>R.value?O.editPlaceholder:O.placeholder)),$=t();function B(e){return S(e.itemObj)}const H=a((()=>O.commonList.map(B))),N=a((()=>O.recentList.map(B))),T=a((()=>O.options.filter((e=>{return H.value.every(t)&&N.value.every(t);function t(t){return t[O.valueKey]!==e[O.valueKey]}}))));function q(e){let t="";return[...E.value,$.value].find((a=>{if(M(a)&&a[O.valueKey]===e)return t=a[O.labelKey],!0})),t}const z=t(),D=b(O,"value",C),E=a((()=>[...H.value,...N.value,...T.value]));function F(e=""){C("search",e)}function G(){F(),C("openMenu")}function I(){C("closeMenu")}function J(){D.value=null,C("clear")}function Q(e){var t,a;M(e)&&(D.value=e[O.valueKey],null==(t=z.value)||t.closeMenu(),$.value=e,a=e[O.valueKey],C("choose",{value:a,option:{...$.value}}))}const{list:V,wrapperProps:W,containerProps:X}=k(E,{itemHeight:32,overscan:5});return(t,a)=>(l(),o("section",w,[n(r(j),u({ref_key:"baseSearchRef",ref:z,value:r(D),"onUpdate:value":a[0]||(a[0]=e=>i(D)?D.value=e:null),show:R.value,"onUpdate:show":a[1]||(a[1]=e=>R.value=e),"display-value":q(r(D)),placeholder:r(U),onOpenMenu:G,onCloseMenu:I,onSearch:F,onClear:J},t.$attrs),{menu:c((()=>[r(E).length?(l(),o("section",u({key:0,class:"recommend-search__optionContainer",style:{height:"256px"}},r(X)),[s("section",p(v(r(W))),[(l(!0),o(m,null,d(r(V),(t=>(l(),o("div",{onClick:e=>Q(t.data),key:t.data[e.valueKey],class:y(["recommend-search__option",{"is-active":t.data[e.valueKey]===r(D)}])},[s("div",{class:"recommend-search__optionText",title:t.data.itemObj},f(t.data[e.labelKey]),9,P),t.data[e.valueKey]===r(D)?(l(),h(r(x),{key:0,component:r(g)},null,8,["component"])):_("v-if",!0)],10,L)))),128))],16)],16)):K(t.$slots,"empty",{key:1},(()=>[A]))])),_:3},16,["value","show","display-value","placeholder"])]))}}),[["__file","RecommendSelect.vue"]]);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var o=(o=>(o.COMMONLY="COMMONLY",o.RECENTLY="RECENTLY",o))(o||{});const e=Symbol("InjectionRecommendSearchRootSlots ");export{e as InjectionRecommendSearchRootSlots,o as RecommendType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.iconfont-select-label{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:14px;font-style:normal}.icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-select-label-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;vertical-align:middle}.c-select-label .anticon+.anticon{margin-left:16px}.c-select-label .n-tag{border:1px solid #e0e0e6;margin:0 8px 0 0;max-width:108px}.c-select-label .n-tag .n-base-icon{color:#fff}.c-select-label .n-tag .n-tag__content{align-items:center;display:inline-block;line-height:20px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-label-form-content{border-bottom:1px solid #e8e8e8;border-top:1px solid #e8e8e8;height:100%;width:100%}.c-label-form-content .label-wrap{display:flex;height:100%;width:100%}.c-label-form-content .label-wrap .left-label-wrap{border-right:1px solid #e8e8e8;max-height:404px;width:140px}.c-label-form-content .label-wrap .left-label-wrap.total-left-label-wrap{height:calc(100vh - 109px);max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .left-label-wrap.explicit-label-wrap{height:auto;overflow:hidden;overflow-y:auto;width:100%}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link{font-size:14px;padding:10px 8px}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link.n-anchor-link--active{background-color:#f2f2f2}.c-label-form-content .label-wrap .right-label-wrap{flex:1;max-height:404px;overflow-y:auto}.c-label-form-content .label-wrap .right-label-wrap.total-right-label-wrap{max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .right-label-wrap .label-add{display:inline-flex;height:30px;justify-content:center;line-height:30px;position:relative;text-align:center;top:2px;width:108px}.c-label-form-content .label-wrap .right-label-wrap .label-add .selfval{align-items:center;display:flex;justify-content:center}.c-label-form-content .label-wrap .right-label-wrap .add-input{width:108px}.c-label-form-content .label-wrap .right-label-wrap .add-input .n-input__suffix{cursor:pointer}.c-label-form-content .label-wrap .explicit-continer{border:1px solid #d5d5d5;width:100%}.c-label-form-content .edit-label-type{font-size:12px;margin-left:4px}.c-label-form-content .edit-label-content{margin-top:10px;padding:0 14px}.c-label-form-content .edit-label-content .edit-content{margin-top:8px;width:100%}.c-label-form-content .edit-label-content .edit-content .n-tag{border:1px solid #e0e0e6;margin:0 8px 8px 0;max-width:108px;text-align:center}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.n-dialog__title .svg-wrap{margin:0 0 0 auto}.n-dialog__title .svg-wrap i{cursor:pointer;font-size:16px}
|
|
1
|
+
@font-face{font-family:select-label-iconfont;src:url(select-label-iconfont.ttf) format("truetype")}.iconfont-select-label{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:select-label-iconfont!important;font-size:14px;font-style:normal}.icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-select-label-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;vertical-align:middle}.c-select-label .anticon+.anticon{margin-left:16px}.c-select-label .n-tag{border:1px solid #e0e0e6;margin:0 8px 0 0;max-width:108px}.c-select-label .n-tag .n-base-icon{color:#fff}.c-select-label .n-tag .n-tag__content{align-items:center;display:inline-block;line-height:20px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-label-form-content{border-bottom:1px solid #e8e8e8;border-top:1px solid #e8e8e8;height:100%;width:100%}.c-label-form-content .label-wrap{display:flex;height:100%;width:100%}.c-label-form-content .label-wrap .left-label-wrap{border-right:1px solid #e8e8e8;max-height:404px;width:140px}.c-label-form-content .label-wrap .left-label-wrap.total-left-label-wrap{height:calc(100vh - 109px);max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .left-label-wrap.explicit-label-wrap{height:auto;overflow:hidden;overflow-y:auto;width:100%}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link{font-size:14px;padding:10px 8px}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link.n-anchor-link--active{background-color:#f2f2f2}.c-label-form-content .label-wrap .right-label-wrap{flex:1;max-height:404px;overflow-y:auto}.c-label-form-content .label-wrap .right-label-wrap.total-right-label-wrap{max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .right-label-wrap .label-add{display:inline-flex;height:30px;justify-content:center;line-height:30px;position:relative;text-align:center;top:2px;width:108px}.c-label-form-content .label-wrap .right-label-wrap .label-add .selfval{align-items:center;display:flex;justify-content:center}.c-label-form-content .label-wrap .right-label-wrap .add-input{width:108px}.c-label-form-content .label-wrap .right-label-wrap .add-input .n-input__suffix{cursor:pointer}.c-label-form-content .label-wrap .explicit-continer{border:1px solid #d5d5d5;width:100%}.c-label-form-content .edit-label-type{font-size:12px;margin-left:4px}.c-label-form-content .edit-label-content{margin-top:10px;padding:0 14px}.c-label-form-content .edit-label-content .edit-content{margin-top:8px;width:100%}.c-label-form-content .edit-label-content .edit-content .n-tag{border:1px solid #e0e0e6;margin:0 8px 8px 0;max-width:108px;text-align:center}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.n-dialog__title .svg-wrap{margin:0 0 0 auto}.n-dialog__title .svg-wrap i{cursor:pointer;font-size:16px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,toRefs as l,ref as n,watch as s,openBlock as o,createElementBlock as i,normalizeStyle as p,unref as r,normalizeClass as a,createElementVNode as d,Fragment as u,renderList as c,createCommentVNode as m,withDirectives as
|
|
1
|
+
import{defineComponent as e,computed as t,toRefs as l,ref as n,watch as s,openBlock as o,createElementBlock as i,normalizeStyle as p,unref as r,normalizeClass as a,createElementVNode as d,Fragment as u,renderList as c,createCommentVNode as m,withDirectives as f,renderSlot as h,toDisplayString as v,vShow as g,createBlock as I,withCtx as x,createVNode as y,createTextVNode as B}from"vue";import{NTooltip as w,NEmpty as T}from"naive-ui";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import{defaultCssVars as _}from"./constants/index.js";import k from"../../../_virtual/plugin-vue_export-helper.js";const b={class:"stepBox"},C=["title"],$=d("ul",{class:"nodeTipContent"},[d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(1)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是测试案例,请使用插槽:#nodeTipBox 自定义")]),d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(2)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是个测试案例,请使用插槽:#nodeTipBox 自定义")])],-1),L=["title"],R=["title"],j=["title"],M={key:0,style:{height:"48px"}},N={key:1},D={key:1};var W=k(e({__name:"StepsWheel",props:{stepInfo:{type:Object,default:()=>({list:[],cols:6})},currentStep:{type:Number,default:1},toolTipShow:{type:Boolean,default:!0},lastNodeRender:{type:Boolean,default:!1},noDataMsg:{type:String,default:"暂无节点数据"},placement:{type:String,default:"center"}},setup(e){const B=e,k=S(_,"StepsWheel"),W=t((()=>Math.ceil(P.value.length/B.stepInfo.cols))),A=t((()=>B.lastNodeRender)),{noDataMsg:E}=l(B),O=n(null),F=t((()=>{var e;let t=72;if(null==(e=null==O?void 0:O.value)?void 0:e.length){let e=O.value[0],l=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle;t=isNaN(parseInt(l["min-width"]))?72:parseInt(l["min-width"])}return`${20+B.stepInfo.cols*t}px`})),P=n([]),q=n([]),z=e=>{if(q.value.length){if(e.rowIndex===q.value.length)return!0;if(e.rowIndex<q.value.length)return q.value[e.rowIndex].some((e=>null==e?void 0:e.title))}return!1},G=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2==0&&"frist"==e.nodeType&&e.nodeIndex!==t.length},H=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2!=0&&"last"==e.nodeType&&e.nodeIndex!==t.length},J=(e,t)=>e.rowIndex%2==0?B.currentStep>=t+(B.stepInfo.cols-2*e.sort):B.currentStep>=t+2,K=(e,t)=>{let l=e.length,n=l%t==0?l/t:Math.floor(l/t+1),s=[];for(let l=0;l<n;l++){let n=e.slice(l*t,l*t+t);s.push(n)}return s},Q=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?e!=n[n.length-1].nodeIndex-(t-2*n[n.length-1].sort):e!=n[n.length-1].nodeIndex-1},U=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?A.value&&e==n[0].nodeIndex-(t-2*n[0].sort):A.value&&e==n[n.length-1].nodeIndex-1},V=(e,t)=>{const{cols:l}=B.stepInfo;let n=K(P.value,l),s=n[n.length-1].filter((e=>e));return W.value%2==0?"circle"===t?A.value&&e==s[0].nodeIndex-(l-2*s[0].sort)-l:A.value&&e==s[0].nodeIndex-(l-2*s[0].sort):"circle"===t?A.value&&e==s[s.length-1].nodeIndex-1-l:A.value&&e==s[s.length-1].nodeIndex-2};return s((()=>B.stepInfo),(e=>{var t;(null==(t=null==e?void 0:e.list)?void 0:t.length)&&((e,t)=>{let l=e.length+1,n=Math.ceil(e.length/t),s=!0,o=[];for(var i=0;i<n;i++)o[i]=new Array(t),o[i].fill(null);let p=0,r=0;for(let n=1;n<l;n++)o[p][r]=Object.assign(e[n-1],{nodeIndex:n,rowIndex:p+1}),s?n%t!=0?r++:(s=!s,p++):n%t!=0?r--:(s=!s,p++);let a=[];o.map((e=>{e.map(((e,t)=>e&&(e.sort=t))),e[0]&&(e[0].nodeType="frist"),e[e.length-1]&&(e[e.length-1].nodeType="last"),a=[...a,...e]})),P.value=a,q.value=o})(e.list,e.cols)}),{immediate:!0,deep:!0}),(t,l)=>(o(),i("div",{class:"step-wheel-box",style:p({minWidth:r(F),...r(k)})},[P.value.length?(o(),i("div",{key:0,class:a(["stepOut",{placementLeft:"left"===e.placement,placementRight:"right"===e.placement}])},[d("ul",b,[(o(!0),i(u,null,c(P.value,((l,n)=>(o(),i("li",{ref_for:!0,ref_key:"stepItemRef",ref:O,key:(null==l?void 0:l.stepId)||n,class:a(["stepItem",{[`stepItem_${n+1}`]:!0,[`${null==l?void 0:l.stepId}`]:!!(null==l?void 0:l.stepId)}])},[l?(o(),i(u,{key:0},[m(" 步骤头部信息 "),f(d("div",{class:a(["stepTopBox",{finished:U(n),stepTopBox_right:"right"===e.placement,stepTopBox_left:"left"===e.placement}])},[h(t.$slots,"stepTopBox",{stepItem:l},(()=>[d("span",{title:l.title},v(l.title),9,C)]))],2),[[g,l.title]]),m(" 步骤条的节点,此处为圆圈 "),e.toolTipShow?(o(),I(r(w),{key:0,placement:"top","show-arrow":!0,trigger:"hover",style:p({opacity:"0.88"})},{trigger:x((()=>[d("div",{class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)])),default:x((()=>[h(t.$slots,"nodeTipBox",{stepItem:l,stepId:l.stepId},(()=>[$]))])),_:2},1032,["style"])):(o(),i("div",{key:1,class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)),m(" 步骤条连接线,动态显示 "),"last"!==l.nodeType?f((o(),i("div",{key:2,class:a(["line",{lineActive:J(l,n),finished:V(n)}])},null,2)),[[g,Q(n)]]):m("v-if",!0),m(" 步骤条弯曲连线,动态渲染 "),G(l)||H(l)?(o(),i("div",{key:3,class:a({lineCircleActive:e.currentStep>l.nodeIndex,lineCircleFinished:V(n,"circle"),lineCircleRight:H(l),lineCircleLeft:G(l),lineCirclePlacementRight:H(l)&&"right"===e.placement,lineCirclePlacementLeft:G(l)&&"left"===e.placement})},null,2)):m("v-if",!0),m(" 步骤底部信息 "),d("div",{class:a(["stepBottomBox",{stepBottomBox_right:"right"===e.placement,stepBottomBox_left:"left"===e.placement}])},[h(t.$slots,"stepBottomBox",{stepItem:l},(()=>[m(" 步骤名称 "),f(d("p",{class:a(["stepLabel",{labelFinsh:U(n),stepLabel_right:"right"===e.placement,stepLabel_left:"left"===e.placement}]),title:l.label},v(l.label),11,L),[[g,l.label]]),d("div",{class:a({stepBottomCustomBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement})},[h(t.$slots,"stepBottomCustomBox",{stepItem:l},(()=>[d("div",{class:a({stepBottomDefaultBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement}),style:{width:"100%",display:"flex",flexDirection:"column"}},[f(d("p",{class:"stepExtra",title:l.person},v(l.person),9,R),[[g,l.person]]),m(" 步骤时间 "),f(d("p",{class:"statusTime",title:l.statusTime},v(l.statusTime),9,j),[[g,l.statusTime]])],2)]))],2)])),z(l)?(o(),i("div",M)):m("v-if",!0)],2)],64)):(o(),i("div",N,[m("null元素占位")]))],2)))),128))])],2)):(o(),i("div",D,[y(r(T),{description:r(E)},null,8,["description"])]))],4))}}),[["__file","StepsWheel.vue"]]);export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as r,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as r,ref as t,computed as o,openBlock as s,createBlock as i,unref as m,mergeProps as u,createSlots as f,renderList as a,withCtx as l,renderSlot as p}from"vue";import{NTimePicker as n}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import _ from"../../../_virtual/plugin-vue_export-helper.js";var k=_(e({__name:"TimePicker",setup(e,{expose:_}){const k=r(),v=t(null),d=o((()=>Reflect.get(k,"format")?k.format:"HH:mm:ss")),{focus:h,blur:x}=c(v,d,k);return _({$timePicker:v,focus:h,blur:x}),(e,r)=>(s(),i(m(n),u({ref_key:"timePickerRef",ref:v},e.$attrs),f({_:2},[a(e.$slots,((r,t)=>({name:t,fn:l((()=>[p(e.$slots,t)]))})))]),1040))}}),[["__file","TimePicker.vue"]]);export{k as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import { AnyObject } from '../../../es/shared/types';
|
|
3
|
-
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, formatRef: ComputedRef<string | [string, string]
|
|
3
|
+
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, formatRef: ComputedRef<string | [string, string]>, attrs: AnyObject): {
|
|
4
4
|
focus: () => any;
|
|
5
5
|
blur: () => any;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as
|
|
1
|
+
import{computed as e,unref as t}from"vue";import{useDebounceFn as n,useEventListener as l}from"@vueuse/core";import{isValid as i}from"date-fns";function o(o,s,u){const r=n((e=>{!function(e){const t=e.target;if(["INPUT"].includes(t.tagName)){const{selectionStart:e=0,selectionEnd:n=0}=t;e===n&&t.select()}}(e)}),200),c=e((()=>{var e;return null==(e=o.value)?void 0:e.$el})),a=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;u[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=u[n])}(e,t))),e}));function d(e,n,l){const i=e.value;if(!i)return;const o=e.selectionEnd||0,u=i.length;let r=0,c=0,a=0,d="",f=0;for(;r<u;){const e=i[r++];if(/\d/.test(e)&&(d+=e),r===o){a=d.length;const e=i.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=t(s),g=Array.isArray(v)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?v[1]:v[0]:v;let m="",p=0,h=0;for(r=0;r<g.length&&(l||!(c>=d.length));){const e=g[r++];if(/[yMdHms]/.test(e)?m+=d[c++]||"0":m+=e,n&&c===a){a=-1,p=m.length,h=p;let e=g.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(m+=d.slice(c,c+f),c+=f),r+=e[0].length):(e=g.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(p+=e[1].length,h=p+e[2].length))}}const b=m!==i;if(b){e.value=m;const t=new InputEvent("input");e.dispatchEvent(t)}return n&&(p=p||m.length+1,h=h||m.length+1,e.setSelectionRange(p,h)),b}return l(c,"input",(function(e){const t=e.target;if(!t.value||!Reflect.get(t,"_f_"))return;Reflect.set(t,"_f_",0),d(t,!0)&&(e.preventDefault(),e.stopPropagation())}),!0),l(c,"keydown",(function(e){const{key:t,target:n}=e;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t){d(n,!1,!0);const e=null==n?void 0:n.value,t=Reflect.get(u,"type")||"";e&&!t.includes("range")&&i(new Date(e))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=a.value;if(null==n?void 0:n(e.getTime()))return;const s=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,u=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==s?void 0:s(e.getHours()))return;if(null==u?void 0:u(e.getMinutes()))return;if(null==r?void 0:r(e.getMinutes()))return;return!0}(new Date(e))&&(n.value="",n.dispatchEvent(new InputEvent("input")))}}),!0),l(c,"click",r,!0),{focus:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.blur)?void 0:t.call(e)}}}export{o as useDateTime};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-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": "ed54f70e989c1d8bb0e57d87e27c891296605f43"
|
|
65
65
|
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Func } from '../../../../../es/shared/types';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
displayValue: {
|
|
5
|
-
type: StringConstructor;
|
|
6
|
-
};
|
|
7
|
-
valueFormatter: {
|
|
8
|
-
type: PropType<(value: undefined | number | string | Array<any>) => string>;
|
|
9
|
-
};
|
|
10
|
-
show: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
};
|
|
13
|
-
loading: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
};
|
|
16
|
-
placeholder: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
clearable: {
|
|
21
|
-
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
inputProps: {
|
|
25
|
-
type: ObjectConstructor;
|
|
26
|
-
default: () => {};
|
|
27
|
-
};
|
|
28
|
-
popProps: {
|
|
29
|
-
type: ObjectConstructor;
|
|
30
|
-
default: () => {};
|
|
31
|
-
};
|
|
32
|
-
clearPatternOnOpenMenu: {
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
|
-
}, {
|
|
37
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
-
displayValue: {
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
};
|
|
41
|
-
valueFormatter: {
|
|
42
|
-
type: PropType<(value: undefined | number | string | Array<any>) => string>;
|
|
43
|
-
};
|
|
44
|
-
show: {
|
|
45
|
-
type: BooleanConstructor;
|
|
46
|
-
};
|
|
47
|
-
loading: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
};
|
|
50
|
-
placeholder: {
|
|
51
|
-
type: StringConstructor;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
clearable: {
|
|
55
|
-
type: BooleanConstructor;
|
|
56
|
-
default: boolean;
|
|
57
|
-
};
|
|
58
|
-
inputProps: {
|
|
59
|
-
type: ObjectConstructor;
|
|
60
|
-
default: () => {};
|
|
61
|
-
};
|
|
62
|
-
popProps: {
|
|
63
|
-
type: ObjectConstructor;
|
|
64
|
-
default: () => {};
|
|
65
|
-
};
|
|
66
|
-
clearPatternOnOpenMenu: {
|
|
67
|
-
type: BooleanConstructor;
|
|
68
|
-
default: boolean;
|
|
69
|
-
};
|
|
70
|
-
}>> & {
|
|
71
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
72
|
-
onClear?: ((...args: any[]) => any) | undefined;
|
|
73
|
-
onSearch?: ((...args: any[]) => any) | undefined;
|
|
74
|
-
onOpenMenu?: ((...args: any[]) => any) | undefined;
|
|
75
|
-
onCloseMenu?: ((...args: any[]) => any) | undefined;
|
|
76
|
-
}>>;
|
|
77
|
-
uuid: string;
|
|
78
|
-
emits: (event: "clear" | "update:show" | "search" | "openMenu" | "closeMenu", ...args: any[]) => void;
|
|
79
|
-
search: (content?: any) => void;
|
|
80
|
-
popoverRef: import("vue").Ref<{
|
|
81
|
-
syncPosition: Func;
|
|
82
|
-
} | undefined>;
|
|
83
|
-
_show: import("vue").Ref<boolean>;
|
|
84
|
-
show: import("vue").WritableComputedRef<boolean>;
|
|
85
|
-
inputRef: import("vue").Ref<HTMLElement | undefined>;
|
|
86
|
-
patternContent: import("vue").Ref<string>;
|
|
87
|
-
displayValueRef: import("vue").WritableComputedRef<string | undefined>;
|
|
88
|
-
openMenuAtInput: (evt: PointerEvent) => void;
|
|
89
|
-
openMenu: () => void;
|
|
90
|
-
closeMenu: () => void;
|
|
91
|
-
onClear: () => void;
|
|
92
|
-
NInput: any;
|
|
93
|
-
NPopover: any;
|
|
94
|
-
NSpin: any;
|
|
95
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "update:show" | "search" | "openMenu" | "closeMenu")[], "search" | "closeMenu" | "clear" | "update:show" | "openMenu", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
96
|
-
displayValue: {
|
|
97
|
-
type: StringConstructor;
|
|
98
|
-
};
|
|
99
|
-
valueFormatter: {
|
|
100
|
-
type: PropType<(value: undefined | number | string | Array<any>) => string>;
|
|
101
|
-
};
|
|
102
|
-
show: {
|
|
103
|
-
type: BooleanConstructor;
|
|
104
|
-
};
|
|
105
|
-
loading: {
|
|
106
|
-
type: BooleanConstructor;
|
|
107
|
-
};
|
|
108
|
-
placeholder: {
|
|
109
|
-
type: StringConstructor;
|
|
110
|
-
default: string;
|
|
111
|
-
};
|
|
112
|
-
clearable: {
|
|
113
|
-
type: BooleanConstructor;
|
|
114
|
-
default: boolean;
|
|
115
|
-
};
|
|
116
|
-
inputProps: {
|
|
117
|
-
type: ObjectConstructor;
|
|
118
|
-
default: () => {};
|
|
119
|
-
};
|
|
120
|
-
popProps: {
|
|
121
|
-
type: ObjectConstructor;
|
|
122
|
-
default: () => {};
|
|
123
|
-
};
|
|
124
|
-
clearPatternOnOpenMenu: {
|
|
125
|
-
type: BooleanConstructor;
|
|
126
|
-
default: boolean;
|
|
127
|
-
};
|
|
128
|
-
}>> & {
|
|
129
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
130
|
-
onClear?: ((...args: any[]) => any) | undefined;
|
|
131
|
-
onSearch?: ((...args: any[]) => any) | undefined;
|
|
132
|
-
onOpenMenu?: ((...args: any[]) => any) | undefined;
|
|
133
|
-
onCloseMenu?: ((...args: any[]) => any) | undefined;
|
|
134
|
-
}, {
|
|
135
|
-
loading: boolean;
|
|
136
|
-
show: boolean;
|
|
137
|
-
placeholder: string;
|
|
138
|
-
clearable: boolean;
|
|
139
|
-
inputProps: Record<string, any>;
|
|
140
|
-
popProps: Record<string, any>;
|
|
141
|
-
clearPatternOnOpenMenu: boolean;
|
|
142
|
-
}>;
|
|
143
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as t,openBlock as l,createBlock as o,unref as r,mergeProps as n,isRef as u,withCtx as s,createVNode as p,createElementVNode as i,renderSlot as c}from"vue";import{uuidGenerator as v}from"../../../../shared/utils/index.js";import{useDebounceFn as d,onClickOutside as f}from"@vueuse/core";import{NPopover as h,NInput as m,NSpin as g}from"naive-ui";import y from"../../../../_virtual/plugin-vue_export-helper.js";const w=["id"];var _=y(e({__name:"BaseSearch",props:{displayValue:{type:String},valueFormatter:{type:Function},show:{type:Boolean},loading:{type:Boolean},placeholder:{type:String,default:"请输入"},clearable:{type:Boolean,default:!0},inputProps:{type:Object,default:()=>({})},popProps:{type:Object,default:()=>({})},clearPatternOnOpenMenu:{type:Boolean,default:!0}},emits:["update:show","clear","search","openMenu","closeMenu"],setup(e,{expose:y,emit:_}){const b=e,M=v(),P=d(((e="")=>{_("search",e)}),300),B=a(),O=a(b.show),k=t({get:()=>O.value||b.show,set(e){_("update:show",e),O.value=e}}),x=a(),j=a(""),S=t({get:()=>k.value?j.value:b.displayValue,set(e){j.value=e||"",P(e)}});function F(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&U()}function U(){k.value||(k.value=!0,_("openMenu"),b.clearPatternOnOpenMenu&&(j.value=""))}function C(){var e;k.value=!1,null==(e=x.value)||e.blur(),_("closeMenu")}function N(){_("clear")}return f(x,(e=>{var a;if(!k.value)return;const t=e;if(!t.target)return C();!function(e){let a=!1,t=e;for(;t;){if(t.id===M){a=!0;break}t=t.parentElement}return a}(t.target)?C():null==(a=x.value)||a.focus()})),y({setPattern(e){j.value=e},closeMenu:C,openMenu:U}),(a,t)=>(l(),o(r(h),n({trigger:"manual",class:"recommend-search",placement:"bottom-start",show:r(k),"onUpdate:show":t[2]||(t[2]=e=>u(k)?k.value=e:null),"show-arrow":!1,ref_key:"popoverRef",ref:B,width:"trigger"},e.popProps),{trigger:s((()=>[p(r(m),n(e.inputProps,{placeholder:e.placeholder,clearable:e.clearable,onClear:N,onFocus:F,onClick:F,onKeydown:t[0]||(t[0]=e=>a.$emit("keydown",e)),ref_key:"inputRef",ref:x,value:r(S),"onUpdate:value":t[1]||(t[1]=e=>u(S)?S.value=e:null)}),null,16,["placeholder","clearable","value"])])),default:s((()=>[p(r(g),{show:e.loading},{default:s((()=>[i("section",{id:r(M),class:"base-search__menu",style:{"min-height":"100px"}},[c(a.$slots,"menu")],8,w)])),_:3},8,["show"])])),_:3},16,["show"]))}}),[["__file","BaseSearch.vue"]]);export{_ as default};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|