cnhis-design-vue 3.1.42-release.3 → 3.1.42-release.5

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.
Files changed (192) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/base-search/style/index.css +1 -1
  3. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  4. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  5. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  6. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  7. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  8. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  9. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  10. package/es/components/big-table/src/utils.d.ts +11 -1
  11. package/es/components/big-table/src/utils.js +1 -1
  12. package/es/components/button-print/index.d.ts +32 -7
  13. package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
  14. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  15. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  16. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  17. package/es/components/classification/index.d.ts +1 -1
  18. package/es/components/classification/src/index.vue.d.ts +2 -2
  19. package/es/components/classification/style/index.css +1 -1
  20. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  21. package/es/components/fabric-chart/index.d.ts +2 -2
  22. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  23. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  24. package/es/components/field-set/index.d.ts +26 -81
  25. package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
  26. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  27. package/es/components/field-set/style/index.css +1 -1
  28. package/es/components/form-config/index.d.ts +45 -14
  29. package/es/components/form-config/src/FormConfig.vue.d.ts +45 -14
  30. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  31. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +15 -2
  32. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +24 -8
  33. package/es/components/form-render/index.d.ts +15 -2
  34. package/es/components/form-render/src/FormRender.vue.d.ts +15 -2
  35. package/es/components/form-render/src/FormRender.vue.js +1 -1
  36. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +15 -2
  37. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  38. package/es/components/form-render/src/components/renderer/date.js +1 -1
  39. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
  40. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  41. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +36 -0
  42. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  43. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
  44. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  45. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +18 -0
  46. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  47. package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
  48. package/es/components/form-render/src/components/renderer/select.js +1 -1
  49. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  50. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  51. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  52. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  53. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  54. package/es/components/form-render/src/types/fieldItem.d.ts +6 -4
  55. package/es/components/form-render/src/types/index.d.ts +1 -1
  56. package/es/components/form-render/style/index.css +1 -1
  57. package/es/components/iho-table/index.d.ts +17 -3
  58. package/es/components/iho-table/src/IhoTable.vue.d.ts +17 -3
  59. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  60. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  61. package/es/components/iho-table/src/constants/index.js +1 -1
  62. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
  63. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +19 -19
  64. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  65. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  66. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  67. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  68. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  69. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  70. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  71. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  72. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  73. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  74. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  75. package/es/components/iho-table/src/plugins/index.js +1 -1
  76. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  78. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  79. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  86. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  87. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  88. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  89. package/es/components/iho-table/src/types/index.d.ts +22 -5
  90. package/es/components/iho-table/src/types/pluginType.d.ts +11 -29
  91. package/es/components/iho-table/src/utils/index.d.ts +5 -3
  92. package/es/components/iho-table/src/utils/index.js +1 -1
  93. package/es/components/iho-table/style/iconfont.ttf +0 -0
  94. package/es/components/iho-table/style/index.css +1 -1
  95. package/es/components/index.css +1 -1
  96. package/es/components/index.d.ts +1 -0
  97. package/es/components/info-header/index.d.ts +31 -4
  98. package/es/components/info-header/src/InfoHeader.vue.d.ts +31 -4
  99. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  100. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  101. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -2
  102. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +16 -2
  103. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  104. package/es/components/info-header/style/index.css +1 -1
  105. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  106. package/es/components/map/index.d.ts +2 -14
  107. package/es/components/map/src/Map.vue.d.ts +1 -14
  108. package/es/components/map/src/types/index.d.ts +19 -0
  109. package/es/components/map/src/types/index.js +1 -0
  110. package/es/components/recommend-search/index.d.ts +13 -128
  111. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
  112. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  113. package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
  114. package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
  115. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
  116. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  117. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
  118. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  119. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
  120. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  121. package/es/components/recommend-search/src/constant/index.d.ts +3 -0
  122. package/es/components/recommend-search/src/constant/index.js +1 -1
  123. package/es/components/scale-view/index.d.ts +13 -158
  124. package/es/components/scale-view/index.js +1 -1
  125. package/es/components/scale-view/src/ScaleView.vue.d.ts +12 -158
  126. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  127. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  128. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  129. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  130. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  131. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  132. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  133. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  134. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  135. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  136. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +7 -7
  137. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  138. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  139. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  140. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  141. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  142. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  143. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  144. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  145. package/es/components/scale-view/src/hooks/use-component.d.ts +73 -3
  146. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  147. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  148. package/es/components/scale-view/src/types/index.d.ts +7 -0
  149. package/es/components/scale-view/src/types/index.js +1 -0
  150. package/es/components/scale-view/style/index.css +1 -1
  151. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  152. package/es/components/search-cascader/index.d.ts +12 -1
  153. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  154. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  155. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  156. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  157. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  158. package/es/components/search-cascader/src/constants/index.js +1 -1
  159. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  160. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  161. package/es/components/select-label/style/index.css +1 -1
  162. package/es/components/select-person/index.d.ts +15 -7
  163. package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -5
  164. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  165. package/es/components/shortcut-setter/index.d.ts +18 -4
  166. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -4
  167. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  168. package/es/components/table-filter/src/types/index.d.ts +9 -0
  169. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  170. package/es/components/vod-chunk-upload/index.d.ts +73 -3
  171. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
  172. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  173. package/es/env.d.ts +1 -0
  174. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  175. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  176. package/es/shared/hooks/useDateTime.d.ts +1 -1
  177. package/es/shared/hooks/useDateTime.js +1 -1
  178. package/es/shared/utils/anime.d.ts +1 -1
  179. package/es/shared/utils/anime.js +1 -1
  180. package/es/shared/utils/index.d.ts +3 -14
  181. package/es/shared/utils/index.js +1 -1
  182. package/es/shared/utils/vexutils.d.ts +2 -2
  183. package/es/shared/utils/vexutils.js +1 -1
  184. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  185. package/es/shared/utils/vexutilsExpand.js +1 -0
  186. package/package.json +2 -2
  187. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
  188. package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
  189. /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
  190. /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
  191. /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
  192. /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,computed as l,onMounted as i,resolveComponent as s,openBlock as t,createElementBlock as a,withDirectives as r,normalizeClass as n,unref as d,createElementVNode as u,Fragment as p,vShow as m,createCommentVNode as c,createVNode as v,withCtx as f,normalizeStyle as g,toDisplayString as h,createTextVNode as y,withModifiers as k,createBlock as b}from"vue";import C from"xe-utils";import"moment";import{getVodData as U}from"../hooks/vod-data.js";import{VodComputed as L}from"../hooks/vod-computed.js";import V from"../../../../shared/components/player-vod/video-modal.js";import _ from"../vod-upload-modal.js";import{NIcon as D,NButton as O}from"naive-ui";import{PlayCircleSharp as S,PlayCircleOutline as w,RemoveCircleSharp as x}from"@vicons/ionicons5";import j from"../../../../shared/assets/img/video_default_cover.png.js";import F from"../../../../shared/assets/img/video.png.js";import z from"../../../../shared/assets/img/success.png.js";import N from"../../../../_virtual/plugin-vue_export-helper.js";const A={class:"c-upload"},M={class:"chunk-btn-content"},J={class:"c-uploader-btn"},B=["src"],P=u("div",{class:"uploader-text"},[u("p",null,"点击上传"),u("span",{class:"guage-text"},"上传视频(不超过50M)")],-1),E=["src"],T=u("div",{class:"uploader-text"},[u("p",null,"上传视频")],-1),R={class:"vod-wrap c-uploader-preview-wrap"},G={key:0,class:"vod-def-bg vod-uploading"},H={class:"vod-def-bg vod-done"},K=["src"],$=["src"],q={class:"c-icon-wrap"},I={class:"vod-def-bg vod-error"},Q=["src"],W={class:"tooltip-wrap error-wrap"},X=["onClick"];var Y=N(e({__name:"vod-chunk-upload",props:{formData:{type:Object,default:()=>({})},defList:[Array,String],source:String,limitNum:{default:1},defFileList:{default:""},isLock:Boolean,isDetail:{type:Boolean,default:!1},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["vodFileList"],setup(e,{emit:N}){const Y=e,{VodState:Z}=U(),ee=o(Z),oe={},{isShowBtn:le,maskHeight:ie,showPercent:se,allow_format:te,defaultValue:ae,isDisabled:re,max_size:ne,maxlength:de}=L(Y,ee,{mainForm:oe});console.log(le.value,"----isShowBtn---",Y.formData.title),l((()=>ue()));const ue=()=>{const{formData:e}=Y;let o=[];if(o="guage"===Y.source?Y.defFileList:null==oe?void 0:oe.handleSysParams(oe.defaultValue[e.name]||e.default_val),o=JSON.parse(JSON.stringify(o)),!o)return[];let l=[];return Array.isArray(o)&&(l=[...o]),C.isJSON(o)&&(l=JSON.parse(o)),Array.isArray(l)?(l.forEach((e=>{e.thumbUrl=e.vodCoverUrl||void 0,e.uid=(-Math.random()).toString(),e.status="done"})),ee.fileList=l,console.log(ee.fileList,"----list---list"),pe(l),l):[]},pe=e=>{if(!Array.isArray(e))return"";const{formData:o,source:l}=Y;let i=[];e.forEach((e=>{if("done"===e.status&&(e.response&&"00000"==e.response.code||e.url)){const{data:o={}}=e.response||{};e.url||o.videoUrl;let l=e.vodCoverUrl||o.vodCoverUrl;i.push({name:e.name,size:e.size,url:e.url||o.videoUrl,vodCoverUrl:l,uid:e.id||e.uid||(-Math.random()).toString()})}})),console.log(i,"---resList---",Y.formData.title);let s=JSON.stringify(i);"guage"!==l?oe.baseForm.setFieldsValue({[o.val_key]:s}):N("vodFileList",s,Y.formData)},me=(e,o)=>{let l,i;if(e.type&&(i=e.type),e.url||e.videoUrl){if(l=e.url||e.videoUrl,!i){let e=l.split(".");i=`video/${e[e.length-1]}`}}else l=URL.createObjectURL(e.originFileObj);ee.playerOptions={sources:[{type:i,src:l}]},ee.videoVisible=!0},ce=()=>{ee.videoVisible=!1},ve=()=>{re.value||(ee.chunkUploadVisible=!0)},fe=e=>{let o=[];e.forEach((e=>{let l=e.videoCoverPic||void 0;o.push({name:e.videoName||e.name,url:e.videoUrl||e.url,size:e.size,vodCoverUrl:l,status:"done",uid:(-Math.random()).toString()})})),ee.fileList.push(...o),pe(ee.fileList)},ge=()=>{pe(ee.fileList)};return i((()=>{ue()})),(o,l)=>{const i=s("draggable");return t(),a("div",A,[e.isDetail||Y.isLock?c("v-if",!0):r((t(),a("div",{key:0,class:n(["c-chunk-uploader-btn",{"disable-upload":d(re)}]),onClick:ve},[u("div",M,[u("div",J,["guage"==Y.source?(t(),a(p,{key:0},[u("img",{src:d(F),class:"guage-img"},null,8,B),P],64)):(t(),a(p,{key:1},[u("img",{src:d(F),class:"guage-img"},null,8,E),T],64))])])],2)),[[m,d(le)]]),v(i,{modelValue:ee.fileList,"onUpdate:modelValue":l[0]||(l[0]=e=>ee.fileList=e),animation:"150",itemKey:"uid",disabled:d(re).value,options:ee.draggableOptions,onUpdate:ge,class:"drag-content"},{item:f((({element:o,index:l})=>{return[u("div",R,[c(" 上传中 "),"uploading"===o.status?(t(),a("div",G,[c(" TODO: 封面图补充 "),u("div",{class:"uploading-mask",style:g({height:d(ie)(o)})},[u("span",null,h(d(se)(o.percent))+"%",1)],4)])):"done"===o.status?(t(),a(p,{key:1},[c(" 上传完成 "),u("div",H,[u("img",{src:(i=o,i.thumbUrl?i.thumbUrl:j),class:"vod-cover-img"},null,8,K),u("div",{class:n(["tooltip-wrap",{"is-new":o.isNew}])},[u("img",{src:d(z),class:"upload-img"},null,8,$),y(" 上传成功 ")],2),c(" 播放图标 "),u("div",q,[v(d(D),{component:d(S),class:"icon-play theme_filled",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"]),v(d(D),{component:d(w),class:"icon-play theme_outlined",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"])])])],64)):"error"===o.status?(t(),a(p,{key:2},[c(" 上传失败 "),u("div",I,[u("img",{src:o.thumbUrl,class:"vod-cover-img"},null,8,Q),u("div",W,[u("span",null,h(o.message?o.message:"上传失败,继续上传?"),1),v(d(O),{size:"small",onClick:k((e=>{}),["prevent","stop"])},{default:f((()=>[y("确定")])),_:2},1032,["onClick"])])])],64)):c("v-if",!0),!["done","error"].includes(o.status)||d(re)||e.isDetail?c("v-if",!0):(t(),a("div",{key:3,onClick:k((e=>{return o=l,ee.fileList.splice(o,1),void pe(ee.fileList);var o}),["stop"]),class:"uploader-preview-delete"},[v(d(D),{class:"pre-delete",component:d(x)},null,8,["component"])],8,X))])];var i})),_:1},8,["modelValue","disabled","options"]),ee.videoVisible?(t(),b(d(V),{key:1,visible:ee.videoVisible,formData:Y.formData,playerOptions:ee.playerOptions,onCloseVideoModal:ce},null,8,["visible","formData","playerOptions"])):c("v-if",!0),v(d(_),{modelValue:ee.chunkUploadVisible,"onUpdate:modelValue":l[1]||(l[1]=e=>ee.chunkUploadVisible=e),modalTitle:Y.formData.name,max_size:d(ne),maxLength:d(de),propsCategoryMap:d(te),defaultList:ee.fileList,getChunkUploadConfig:e.getChunkUploadConfig,onGetSumbitList:fe},null,8,["modelValue","modalTitle","max_size","maxLength","propsCategoryMap","defaultList","getChunkUploadConfig"])])}}}),[["__file","vod-chunk-upload.vue"]]);export{Y as default};
1
+ import{defineComponent as e,reactive as o,computed as l,onMounted as s,openBlock as i,createElementBlock as t,withDirectives as a,normalizeClass as r,unref as n,createElementVNode as d,Fragment as u,vShow as p,createCommentVNode as m,createVNode as c,withCtx as v,normalizeStyle as f,toDisplayString as g,createTextVNode as h,withModifiers as k,createBlock as y}from"vue";import"xe-utils";import"moment";import b from"../../../../shared/utils/vexutilsExpand.js";import{getVodData as C}from"../hooks/vod-data.js";import{VodComputed as U}from"../hooks/vod-computed.js";import L from"../../../../shared/components/player-vod/video-modal.js";import V from"../vod-upload-modal.js";import{NIcon as _,NButton as D}from"naive-ui";import{PlayCircleSharp as x,PlayCircleOutline as O,RemoveCircleSharp as w}from"@vicons/ionicons5";import S from"../../../../shared/assets/img/video_default_cover.png.js";import j from"../../../../shared/assets/img/video.png.js";import F from"../../../../shared/assets/img/success.png.js";import z from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import N from"../../../../_virtual/plugin-vue_export-helper.js";const M={class:"c-upload"},A={class:"chunk-btn-content"},J={class:"c-uploader-btn"},B=["src"],E=d("div",{class:"uploader-text"},[d("p",null,"点击上传"),d("span",{class:"guage-text"},"上传视频(不超过50M)")],-1),P=["src"],T=d("div",{class:"uploader-text"},[d("p",null,"上传视频")],-1),R={class:"vod-wrap c-uploader-preview-wrap"},G={key:0,class:"vod-def-bg vod-uploading"},H={class:"vod-def-bg vod-done"},K=["src"],$=["src"],q={class:"c-icon-wrap"},I={class:"vod-def-bg vod-error"},Q=["src"],W={class:"tooltip-wrap error-wrap"},X=["onClick"];var Y=N(e({__name:"vod-chunk-upload",props:{formData:{type:Object,default:()=>({})},source:String,limitNum:{default:1},defFileList:{default:""},isLock:Boolean,isDetail:{type:Boolean,default:!1},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["vodFileList"],setup(e,{emit:N}){const Y=e,{VodState:Z}=C(),ee=o(Z),oe={},{isShowBtn:le,maskHeight:se,showPercent:ie,allow_format:te,defaultValue:ae,isDisabled:re,max_size:ne,maxlength:de}=U(Y,ee,{mainForm:oe});console.log(le.value,"----isShowBtn---",Y.formData.title),l((()=>ue()));const ue=()=>{const{formData:e}=Y;let o=[];if(o="guage"===Y.source?Y.defFileList:null==oe?void 0:oe.handleSysParams(oe.defaultValue[e.name]||e.default_val),o=JSON.parse(JSON.stringify(o)),!o)return[];let l=[];return Array.isArray(o)&&(l=[...o]),b.isJSON(o)&&(l=JSON.parse(o)),Array.isArray(l)?(l.forEach((e=>{e.thumbUrl=e.vodCoverUrl||void 0,e.uid=(-Math.random()).toString(),e.status="done"})),ee.fileList=l,console.log(ee.fileList,"----list---list"),pe(l),l):[]},pe=e=>{if(!Array.isArray(e))return"";const{formData:o,source:l}=Y;let s=[];e.forEach((e=>{if("done"===e.status&&(e.response&&"00000"==e.response.code||e.url)){const{data:o={}}=e.response||{};e.url||o.videoUrl;let l=e.vodCoverUrl||o.vodCoverUrl;s.push({name:e.name,size:e.size,url:e.url||o.videoUrl,vodCoverUrl:l,uid:e.id||e.uid||(-Math.random()).toString()})}})),console.log(s,"---resList---",Y.formData.title);let i=JSON.stringify(s);"guage"!==l?oe.baseForm.setFieldsValue({[o.val_key]:i}):N("vodFileList",i,Y.formData)},me=(e,o)=>{let l,s;if(e.type&&(s=e.type),e.url||e.videoUrl){if(l=e.url||e.videoUrl,!s){let e=l.split(".");s=`video/${e[e.length-1]}`}}else l=URL.createObjectURL(e.originFileObj);ee.playerOptions={sources:[{type:s,src:l}]},ee.videoVisible=!0},ce=()=>{ee.videoVisible=!1},ve=()=>{re.value||(ee.chunkUploadVisible=!0)},fe=e=>{let o=[];e.forEach((e=>{let l=e.videoCoverPic||void 0;o.push({name:e.videoName||e.name,url:e.videoUrl||e.url,size:e.size,vodCoverUrl:l,status:"done",uid:(-Math.random()).toString()})})),ee.fileList.push(...o),pe(ee.fileList)},ge=()=>{pe(ee.fileList)};return s((()=>{ue()})),(o,l)=>(i(),t("div",M,[e.isDetail||Y.isLock?m("v-if",!0):a((i(),t("div",{key:0,class:r(["c-chunk-uploader-btn",{"disable-upload":n(re)}]),onClick:ve},[d("div",A,[d("div",J,["guage"==Y.source?(i(),t(u,{key:0},[d("img",{src:n(j),class:"guage-img"},null,8,B),E],64)):(i(),t(u,{key:1},[d("img",{src:n(j),class:"guage-img"},null,8,P),T],64))])])],2)),[[p,n(le)]]),c(n(z),{modelValue:ee.fileList,"onUpdate:modelValue":l[0]||(l[0]=e=>ee.fileList=e),animation:"150",itemKey:"uid",disabled:n(re).value,options:ee.draggableOptions,onUpdate:ge,class:"drag-content"},{item:v((({element:o,index:l})=>{return[d("div",R,[m(" 上传中 "),"uploading"===o.status?(i(),t("div",G,[m(" TODO: 封面图补充 "),d("div",{class:"uploading-mask",style:f({height:n(se)(o)})},[d("span",null,g(n(ie)(o.percent))+"%",1)],4)])):"done"===o.status?(i(),t(u,{key:1},[m(" 上传完成 "),d("div",H,[d("img",{src:(s=o,s.thumbUrl?s.thumbUrl:S),class:"vod-cover-img"},null,8,K),d("div",{class:r(["tooltip-wrap",{"is-new":o.isNew}])},[d("img",{src:n(F),class:"upload-img"},null,8,$),h(" 上传成功 ")],2),m(" 播放图标 "),d("div",q,[c(n(_),{component:n(x),class:"icon-play theme_filled",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"]),c(n(_),{component:n(O),class:"icon-play theme_outlined",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"])])])],2112)):"error"===o.status?(i(),t(u,{key:2},[m(" 上传失败 "),d("div",I,[d("img",{src:o.thumbUrl,class:"vod-cover-img"},null,8,Q),d("div",W,[d("span",null,g(o.message?o.message:"上传失败,继续上传?"),1),c(n(D),{size:"small",onClick:k((e=>{}),["prevent","stop"])},{default:v((()=>[h("确定")])),_:2},1032,["onClick"])])])],2112)):m("v-if",!0),!["done","error"].includes(o.status)||n(re)||e.isDetail?m("v-if",!0):(i(),t("div",{key:3,onClick:k((e=>{return o=l,ee.fileList.splice(o,1),void pe(ee.fileList);var o}),["stop"]),class:"uploader-preview-delete"},[c(n(_),{class:"pre-delete",component:n(w)},null,8,["component"])],8,X))])];var s})),_:1},8,["modelValue","disabled","options"]),ee.videoVisible?(i(),y(n(L),{key:1,visible:ee.videoVisible,formData:Y.formData,playerOptions:ee.playerOptions,onCloseVideoModal:ce},null,8,["visible","formData","playerOptions"])):m("v-if",!0),c(n(V),{modelValue:ee.chunkUploadVisible,"onUpdate:modelValue":l[1]||(l[1]=e=>ee.chunkUploadVisible=e),modalTitle:Y.formData.name,max_size:n(ne),maxLength:n(de),propsCategoryMap:n(te),defaultList:ee.fileList,getChunkUploadConfig:e.getChunkUploadConfig,onGetSumbitList:fe},null,8,["modelValue","modalTitle","max_size","maxLength","propsCategoryMap","defaultList","getChunkUploadConfig"])]))}}),[["__file","vod-chunk-upload.vue"]]);export{Y as default};
package/es/env.d.ts CHANGED
@@ -22,3 +22,4 @@ declare module '*.vue' {
22
22
  }
23
23
 
24
24
  declare module '*.js';
25
+
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
41
41
  isAlias?: boolean | undefined;
42
42
  };
43
43
  isDisabledTooltip: import("vue").Ref<boolean>;
44
- curContent: import("vue").ComputedRef<string>;
44
+ curContent: import("vue").ComputedRef<string | number>;
45
45
  $refName: any;
46
46
  onMouseOver: (str: any) => void;
47
47
  onMouseOut: () => void;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as l,openBlock as o,createElementBlock as i,createVNode as a,unref as r,withCtx as n,createElementVNode as s,normalizeClass as u,renderSlot as f,toDisplayString as p,createTextVNode as m}from"vue";import{NTooltip as c}from"naive-ui";import v from"xe-utils";import"moment";import d from"../../../_virtual/plugin-vue_export-helper.js";const _={class:"text-over-tooltip-components"};var x=d(e({__name:"TextOverTooltip",props:{content:null,className:null,refName:null,effect:{default:"dark"},placement:{default:"top"},tooltipTitle:{default:""},isAlias:{type:Boolean}},setup(e){const d=e;let x=t(!1);const N=l((()=>{let e=d.tooltipTitle||d.content||"";return v.isNumber(e)?e.toString():e})),T=t(null),h=()=>{x.value=!1};return(t,l)=>(o(),i("div",_,[a(r(c),{effect:e.effect,show:r(x),placement:e.placement},{trigger:n((()=>[s("div",{class:u(["ellipsis",e.className]),onMouseover:l[0]||(l[0]=t=>(e=>{if(d.isAlias)return void(x.value=!0);let t=T.value.parentNode.offsetWidth,l=T.value.offsetWidth;x.value=l>t})(e.refName)),onMouseout:h},[s("i",{ref:e=>{e&&(T.value=e)}},[f(t.$slots,"default"),s("i",null,p(e.content),1)],512)],34)])),default:n((()=>[m(" "+p(r(N)),1)])),_:3},8,["effect","show","placement"])]))}}),[["__file","TextOverTooltip.vue"]]);export{x as default};
1
+ import{defineComponent as e,ref as t,computed as l,openBlock as o,createElementBlock as i,createVNode as a,unref as r,withCtx as s,createElementVNode as u,normalizeClass as n,renderSlot as p,toDisplayString as f,createTextVNode as m}from"vue";import{NTooltip as v}from"naive-ui";import"xe-utils";import"moment";import c from"../../utils/vexutilsExpand.js";import d from"../../../_virtual/plugin-vue_export-helper.js";const x={class:"text-over-tooltip-components"};var _=d(e({__name:"TextOverTooltip",props:{content:null,className:null,refName:null,effect:{default:"dark"},placement:{default:"top"},tooltipTitle:{default:""},isAlias:{type:Boolean}},setup(e){const d=e;let _=t(!1);const N=l((()=>{let e=d.tooltipTitle||d.content||"";return c.isNumber(e)?e.toString():e})),T=t(null),h=()=>{_.value=!1};return(t,l)=>(o(),i("div",x,[a(r(v),{effect:e.effect,show:r(_),placement:e.placement},{trigger:s((()=>[u("div",{class:n(["ellipsis",e.className]),onMouseover:l[0]||(l[0]=t=>(e=>{if(d.isAlias)return void(_.value=!0);let t=T.value.parentNode.offsetWidth,l=T.value.offsetWidth;_.value=l>t})(e.refName)),onMouseout:h},[u("i",{ref:e=>{e&&(T.value=e)}},[p(t.$slots,"default"),u("i",null,f(e.content),1)],512)],34)])),default:s((()=>[m(" "+f(r(N)),1)])),_:3},8,["effect","show","placement"])]))}}),[["__file","TextOverTooltip.vue"]]);export{_ 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 t,unref as e}from"vue";import{useDebounceFn as n,useEventListener as l}from"@vueuse/core";function o(o,c){const r=n((t=>{!function(t){const e=t.target;if(["INPUT"].includes(e.tagName)){const{selectionStart:t=0,selectionEnd:n=0}=e;t===n&&e.select()}}(t)}),200),i=t((()=>{var t;return null==(t=o.value)?void 0:t.$el}));function s(t,n,l){const o=t.value;if(!o)return;const r=t.selectionEnd||0,i=o.length;let s=0,u=0,a=0,f="",v=0;for(;s<i;){const t=o[s++];if(/\d/.test(t)&&(f+=t),s===r){a=f.length;const t=o.slice(s).match(/^\d+/);v=t?t[0].length:0}}const d=e(c),g=Array.isArray(d)?function(t){var e,n;let l=!1,o=t.parentNode||null;for(;o;){if(null==(n=null==(e=o.classList)?void 0:e.contains)?void 0:n.call(e,"n-time-picker")){l=!0;break}o=o.parentNode||null}return l}(t)?d[1]:d[0]:d;let h="",m=0,p=0;for(s=0;s<g.length&&(l||!(u>=f.length));){const t=g[s++];if(/[yMdHms]/.test(t)?h+=f[u++]||"0":h+=t,n&&u===a){a=-1,m=h.length,p=m;let t=g.slice(s).match(/^[yMdHms]+/);t?(v=Math.min(v,t[0].length),v&&(h+=f.slice(u,u+v),u+=v),s+=t[0].length):(t=g.slice(s).match(/^([^yMdHms]+)([yMdHms]*)/),t&&(m+=t[1].length,p=m+t[2].length))}}const y=h!==o;if(y){t.value=h;const e=new InputEvent("input");t.dispatchEvent(e)}return n&&(m=m||h.length+1,p=p||h.length+1,t.setSelectionRange(m,p)),y}return l(i,"input",(function(t){const e=t.target;if(!e.value||!Reflect.get(e,"_f_"))return;Reflect.set(e,"_f_",0),s(e,!0)&&(t.preventDefault(),t.stopPropagation())}),!0),l(i,"keydown",(function(t){const{key:e,target:n}=t;/\d/.test(e)&&n?Reflect.set(n,"_f_",1):"Enter"===e&&s(t.target,!1,!0)}),!0),l(i,"click",r,!0),{focus:()=>{var t,e;return null==(e=null==(t=o.value)?void 0:t.focus)?void 0:e.call(t)},blur:()=>{var t,e;return null==(e=null==(t=o.value)?void 0:t.blur)?void 0:e.call(t)}}}export{o as useDateTime};
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};
@@ -31,5 +31,5 @@ declare const animeType: {
31
31
  easeOutBounce: typeof bounceOut;
32
32
  easeInOutBounce: (x: number) => number;
33
33
  };
34
- export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType, onAnimationEnd?: ((...args: unknown[]) => void) | undefined) => void;
34
+ export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType, onAnimationEnd?: ((...args: unknown[]) => void) | undefined) => () => boolean;
35
35
  export {};
@@ -1 +1 @@
1
- const n=Math.pow,t=Math.sqrt,e=Math.sin,u=Math.cos,r=Math.PI,c=1.70158,i=1.525*c,a=2*r/3,o=2*r/4.5;function s(n){const t=7.5625,e=2.75;return n<1/e?t*n*n:n<2/e?t*(n-=1.5/e)*n+.75:n<2.5/e?t*(n-=2.25/e)*n+.9375:t*(n-=2.625/e)*n+.984375}const f={easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(t){return t<.5?2*t*t:1-n(-2*t+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(t){return 1-n(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-n(-2*t+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(t){return 1-n(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-n(-2*t+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(t){return 1-n(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-n(-2*t+2,5)/2},easeInSine:function(n){return 1-u(n*r/2)},easeOutSine:function(n){return e(n*r/2)},easeInOutSine:function(n){return-(u(r*n)-1)/2},easeInExpo:function(t){return 0===t?0:n(2,10*t-10)},easeOutExpo:function(t){return 1===t?1:1-n(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:t<.5?n(2,20*t-10)/2:(2-n(2,-20*t+10))/2},easeInCirc:function(e){return 1-t(1-n(e,2))},easeOutCirc:function(e){return t(1-n(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-t(1-n(2*e,2)))/2:(t(1-n(-2*e+2,2))+1)/2},easeInElastic:function(t){return 0===t?0:1===t?1:-n(2,10*t-10)*e((10*t-10.75)*a)},easeOutElastic:function(t){return 0===t?0:1===t?1:n(2,-10*t)*e((10*t-.75)*a)+1},easeInOutElastic:function(t){return 0===t?0:1===t?1:t<.5?-n(2,20*t-10)*e((20*t-11.125)*o)/2:n(2,-20*t+10)*e((20*t-11.125)*o)/2+1},easeInBack:function(n){return 2.70158*n*n*n-c*n*n},easeOutBack:function(t){return 1+2.70158*n(t-1,3)+c*n(t-1,2)},easeInOutBack:function(t){return t<.5?n(2*t,2)*(7.189819*t-i)/2:(n(2*t-2,2)*((i+1)*(2*t-2)+i)+2)/2},easeInBounce:function(n){return 1-s(1-n)},easeOutBounce:s,easeInOutBounce:function(n){return n<.5?(1-s(1-2*n))/2:(1+s(2*n-1))/2}},I=(n,t,e=1e3,u,r="easeInBack",c)=>{const i=t-n,a=1e3/60,o=e/a,s=window.requestAnimationFrame||function(n){setTimeout(n,a)},I=1/o;let O=0;!function e(){const a=n+i*f[r](O);u(a),O+=I,O<1?s(e):(s((()=>u(t))),null==c||c())}()};export{I as doAnimation};
1
+ const n=Math.pow,t=Math.sqrt,e=Math.sin,u=Math.cos,r=Math.PI,c=1.70158,i=1.525*c,a=2*r/3,o=2*r/4.5;function s(n){const t=7.5625,e=2.75;return n<1/e?t*n*n:n<2/e?t*(n-=1.5/e)*n+.75:n<2.5/e?t*(n-=2.25/e)*n+.9375:t*(n-=2.625/e)*n+.984375}const f={easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(t){return t<.5?2*t*t:1-n(-2*t+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(t){return 1-n(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-n(-2*t+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(t){return 1-n(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-n(-2*t+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(t){return 1-n(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-n(-2*t+2,5)/2},easeInSine:function(n){return 1-u(n*r/2)},easeOutSine:function(n){return e(n*r/2)},easeInOutSine:function(n){return-(u(r*n)-1)/2},easeInExpo:function(t){return 0===t?0:n(2,10*t-10)},easeOutExpo:function(t){return 1===t?1:1-n(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:t<.5?n(2,20*t-10)/2:(2-n(2,-20*t+10))/2},easeInCirc:function(e){return 1-t(1-n(e,2))},easeOutCirc:function(e){return t(1-n(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-t(1-n(2*e,2)))/2:(t(1-n(-2*e+2,2))+1)/2},easeInElastic:function(t){return 0===t?0:1===t?1:-n(2,10*t-10)*e((10*t-10.75)*a)},easeOutElastic:function(t){return 0===t?0:1===t?1:n(2,-10*t)*e((10*t-.75)*a)+1},easeInOutElastic:function(t){return 0===t?0:1===t?1:t<.5?-n(2,20*t-10)*e((20*t-11.125)*o)/2:n(2,-20*t+10)*e((20*t-11.125)*o)/2+1},easeInBack:function(n){return 2.70158*n*n*n-c*n*n},easeOutBack:function(t){return 1+2.70158*n(t-1,3)+c*n(t-1,2)},easeInOutBack:function(t){return t<.5?n(2*t,2)*(7.189819*t-i)/2:(n(2*t-2,2)*((i+1)*(2*t-2)+i)+2)/2},easeInBounce:function(n){return 1-s(1-n)},easeOutBounce:s,easeInOutBounce:function(n){return n<.5?(1-s(1-2*n))/2:(1+s(2*n-1))/2}},I=(n,t,e=1e3,u,r="easeInBack",c)=>{const i=t-n,a=1e3/60,o=e/a,s=window.requestAnimationFrame||function(n){setTimeout(n,a)},I=1/o;let O=0,Q=!1;return function e(){if(Q)return;const a=n+i*f[r](O);u(a),O+=I,O<1?s(e):(s((()=>u(t))),null==c||c())}(),()=>Q=!0};export{I as doAnimation};
@@ -15,20 +15,9 @@ export declare function targetStringIncludes(arr: string[], target: string): boo
15
15
  export declare const jsonParse: import("@vueuse/core").UseMemoizedFn<any, [value: string]>;
16
16
  export declare function shallowOmit<T, K extends Array<keyof T>>(target: T, keys: K): Omit<T, K[number]>;
17
17
  export declare function checkInSetupEnv(message?: string): void;
18
- export declare enum LOW_CODE_VALUE_RELATION {
19
- EQ = "EQ",
20
- NEQ = "NEQ",
21
- CL = "CL",
22
- NC = "NC",
23
- NULL = "NULL",
24
- NOT_NULL = "NOT_NULL",
25
- BIG = "BIG",
26
- BIGEQ = "BIGEQ",
27
- LESS = "LESS",
28
- LESSEQ = "LESSEQ"
29
- }
18
+ export declare type LOW_CODE_VALUE_RELATION = 'EQ' | 'NEQ' | 'CL' | 'NC' | 'NULL' | 'NOT_NULL' | 'BIG' | 'BIGEQ' | 'LESS' | 'LESSEQ';
30
19
  export declare function isMatchLowCodeCondition(value: unknown, condition: {
31
- con: LOW_CODE_VALUE_RELATION & string;
20
+ con: LOW_CODE_VALUE_RELATION;
32
21
  value: unknown;
33
22
  }): boolean;
34
- export declare function hex2rgba(hex: string): readonly [number, number, number, number];
23
+ export declare function hex2rgba(hex: string, defaultAlpha?: number): readonly [number, number, number, number];
@@ -1 +1 @@
1
- import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as c,gt as u,gte as i,lt as s,lte as a,isNumber as f,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as E}from"vue";function l(t,n,r="children",o){function c(){throw"silence break traverse"}try{L(t).forEach((t=>{n(t,c,o),L(r).forEach((o=>{e(t[o])&&l(t[o],n,r,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function m(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(r?r():t.component(n,e))}function p(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function L(t){return Array.isArray(t)?t:[t]}function h(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const N=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),w=Object.seal(Object.create(null));function S(t,n){return function t(n,r){return x(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(x(o)&&!d(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function v(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function y(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function I(t,e="px"){if(f(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function Q(t,e){return t.some((t=>e.includes(t)))}const $=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function b(t,e){if(!x(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function O(t){if(!E())throw new Error(t||"can't use this hook out of setup environment")}var U=(t=>(t.EQ="EQ",t.NEQ="NEQ",t.CL="CL",t.NC="NC",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.BIG="BIG",t.BIGEQ="BIGEQ",t.LESS="LESS",t.LESSEQ="LESSEQ",t))(U||{});const C={EQ:(t,e)=>`${t}`===e,NEQ:(t,e)=>`${t}`!==e,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:o,NOT_NULL:c(o),BIG:u,BIGEQ:i,LESS:s,LESSEQ:a};function g(t,e){return(C[e.con]||(()=>!1))(t,`${e.value}`)}function B(t){const[e,n,r,o,c]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!e)return[0,0,0,1];const u=(c?parseInt(c,16):255)/255;return[parseInt(n,16),parseInt(r,16),parseInt(o,16),+(f(u)?u.toFixed(2):1)]}export{w as DMZ,U as LOW_CODE_VALUE_RELATION,L as arrayed,O as checkInSetupEnv,S as deepOmit,y as findAncestor,p as generateTimeFormat,N as getStringWidth,B as hex2rgba,g as isMatchLowCodeCondition,$ as jsonParse,m as safeComponentRegister,v as separateMetaModule,b as shallowOmit,Q as targetStringIncludes,l as traverse,h as uuidGenerator,I as widthAppend};
1
+ import{useMemoize as t}from"@vueuse/core";import{isArray as n,isString as e,includes as r,isEmpty as o,negate as u,gt as i,gte as c,lt as s,lte as f,isNumber as a,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as l}from"vue";function m(t,n,e="children",r){let o=!1;function u(){o=!0}!function t(n,e,r="children",i){r=w(r),n=w(n);for(let c=0;c<n.length;c++){if(e(n[c],u,i),o)return;for(let u=0;u<r.length;u++){const i=n[c][r[u]];if(Array.isArray(i)&&t(i,e,r,i),o)return}}}(t,n,e,r)}function p(t,n,e=n.name,r){if(!e)throw new Error(`[CUI]: invalid component name for ${n}`);const{components:o={}}=t._context;o[e]||(r?r():t.component(e,n))}function h(t){if(!e(t))return;const n=t.match(/[Hms:]+/);return n?n[0]:void 0}function w(t){return Array.isArray(t)?t:[t]}function y(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=16*Math.random()|0;return("x"==t?n:3&n|8).toString(16)}))}`}const $=t((function(t){return t?[...t].reduce(((t,n)=>/[a-z]/.test(n)?t+8:/[A-Z]/.test(n)?t+12:/\d/.test(n)?t+9:/\./.test(n)?t+4:/[\u4e00-\u9fa5]/.test(n)?t+15:/-/.test(n)?t+4:/[()]/.test(n)?t+14:/[)(]/.test(n)?t+5:/-/.test(n)?t+10:/%/.test(n)?t+14:/‰/.test(n)?t+16:t+6),0):0})),E=Object.seal(Object.create(null));function v(t,e){return function t(e,r){return x(e)?n(e)?e.map((n=>t(n,r))):Object.entries(e).reduce(((n,[e,o])=>(r.includes(e)||(x(o)&&!d(o)?n[e]=t(o,r):n[e]=o),n)),{}):e}(t,e)}function g(t){return Object.values(t).reduce(((t,n)=>Object.assign(t,n)),{})}function I(t,n){if(!t)return t;if(n(t))return t;let e=t.parentElement;for(;e&&!n(e);)e=e.parentElement;return e}function b(t,n="px"){if(a(t))return`${t}${n}`;if(e(t))return t.endsWith(n)?t:`${t}${n}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function L(t,n){return t.some((t=>n.includes(t)))}const O=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function S(t,n){if(!x(t))return t;const e={...t};for(let t=0;t<n.length;t++)Reflect.deleteProperty(e,n[t]);return e}function N(t){if(!l())throw new Error(t||"can't use this hook out of setup environment")}const j={EQ:(t,n)=>`${t}`===n,NEQ:(t,n)=>`${t}`!==n,CL:(t,o)=>!(!n(t)&&!e(t))&&r(t,o),NC:(t,o)=>!n(t)&&!e(t)||!r(t,o),NULL:o,NOT_NULL:u(o),BIG:i,BIGEQ:c,LESS:s,LESSEQ:f};function A(t,n){return(j[n.con]||(()=>!1))(t,`${n.value}`)}function U(t,n=1){const[e,r,o,u,i]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!e)return[255,255,255,n];const c=i&&parseInt(i,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(u,16),+(a(c)?c.toFixed(2):n)]}export{E as DMZ,w as arrayed,N as checkInSetupEnv,v as deepOmit,I as findAncestor,h as generateTimeFormat,$ as getStringWidth,U as hex2rgba,A as isMatchLowCodeCondition,O as jsonParse,p as safeComponentRegister,g as separateMetaModule,S as shallowOmit,L as targetStringIncludes,m as traverse,y as uuidGenerator,b as widthAppend};
@@ -4,7 +4,7 @@ export function handleLabelColor(item: any, isSelect: any): {
4
4
  background: string;
5
5
  borderColor: string;
6
6
  };
7
- export default XEUtils;
7
+ export default vexutilsExpand;
8
8
  export { moment };
9
- import XEUtils from "xe-utils";
9
+ import vexutilsExpand from "./vexutilsExpand";
10
10
  import moment from "moment";
@@ -1 +1 @@
1
- import r from"xe-utils";export{default}from"xe-utils";export{default as moment}from"moment";function o(o,f){var e;let l="#5585f5",a={blue:"#0000ff",sky:"#87ceeb",azure:"#f0ffff",palegreen:"#98fb98",yellow:"#ffff00",darkorange:"#ff8c00",magenta:"#ff00ff",purple:"#800080",maroon:"#800000",orange:"#ffa500",green:"#008000",red:"#ff0000",grey:"#808080"};if(null==(e=null==o?void 0:o.color)?void 0:e.includes("-")){l=a[o.color.split("-")[1]]||"#5585f5"}else l=o.color||"#5585f5";const b=r.hexToRGBA(l)||{r:85,g:133,b:245,a:1};if(f)return{color:"#fff",background:`rgba(${b.r}, ${b.g}, ${b.b})`,borderColor:`rgba(${b.r}, ${b.g}, ${b.b})`};if(o.isSelect)return{color:"#fff",background:`rgba(${b.r}, ${b.g}, ${b.b})`,borderColor:`rgba(${b.r}, ${b.g}, ${b.b})`};return{color:!(o.isPublic&&1==o.isPublic)?"rgba(28, 28, 28, 1)":"rgba(33, 33, 33, 0.6)",background:"rgba(250, 250, 250, 1)",borderColor:"rgba(213, 213, 213, 0.8)"}}export{o as handleLabelColor};
1
+ import r from"xe-utils";export{default as moment}from"moment";import o from"./vexutilsExpand.js";export{default}from"./vexutilsExpand.js";function f(o,f){var e;let l="#5585f5",a={blue:"#0000ff",sky:"#87ceeb",azure:"#f0ffff",palegreen:"#98fb98",yellow:"#ffff00",darkorange:"#ff8c00",magenta:"#ff00ff",purple:"#800080",maroon:"#800000",orange:"#ffa500",green:"#008000",red:"#ff0000",grey:"#808080"};if(null==(e=null==o?void 0:o.color)?void 0:e.includes("-")){l=a[o.color.split("-")[1]]||"#5585f5"}else l=o.color||"#5585f5";const b=r.hexToRGBA(l)||{r:85,g:133,b:245,a:1};if(f)return{color:"#fff",background:`rgba(${b.r}, ${b.g}, ${b.b})`,borderColor:`rgba(${b.r}, ${b.g}, ${b.b})`};if(o.isSelect)return{color:"#fff",background:`rgba(${b.r}, ${b.g}, ${b.b})`,borderColor:`rgba(${b.r}, ${b.g}, ${b.b})`};return{color:!(o.isPublic&&1==o.isPublic)?"rgba(28, 28, 28, 1)":"rgba(33, 33, 33, 0.6)",background:"rgba(250, 250, 250, 1)",borderColor:"rgba(213, 213, 213, 0.8)"}}export{f as handleLabelColor};
@@ -0,0 +1,254 @@
1
+ declare const _default: {
2
+ parseCondition: (conList: any, data: any, fieldList: any) => boolean;
3
+ getFieldByKey: (fieldKey: any, fieldList: any) => any;
4
+ getConnection: (cObj: any, fVal: any, field: any) => boolean;
5
+ getBetween: (value: any, type: any, comVal: any) => boolean | undefined;
6
+ convertDate: (str: any) => Date | undefined;
7
+ addDate: (tempDate: any, days: any, unit: any) => Date | undefined;
8
+ addDiDate: (curDate: any, count: any, unit: string | undefined, type: any) => {
9
+ startTime: number;
10
+ endTime: number;
11
+ };
12
+ getCurSeasonFirstDay: () => Date;
13
+ isNumber: (val: any) => boolean;
14
+ isDate: (data: any) => boolean;
15
+ isJSON(str: any): boolean;
16
+ /**
17
+ * 获取按钮自定义颜色
18
+ * @param {string} v
19
+ */
20
+ getBtnStyle(v: string): {
21
+ 'border-color': any;
22
+ color: any;
23
+ 'background-color'?: undefined;
24
+ } | {
25
+ color: any;
26
+ 'border-color'?: undefined;
27
+ 'background-color'?: undefined;
28
+ } | {
29
+ 'background-color': any;
30
+ 'border-color': any;
31
+ color?: undefined;
32
+ };
33
+ oldColorMap(str: any): any;
34
+ validateBirthday(val: any, title: any, type: any): boolean;
35
+ handleImageSize(item: any, defaultHeight: any): {
36
+ display: string;
37
+ height: any;
38
+ };
39
+ /**
40
+ * 大数组复制
41
+ * @param {*} arr 复制的数据
42
+ * @param {*} size 每次操作的数据量
43
+ * @returns {Array}
44
+ */
45
+ handleBigArrayCopy(arr: any, size?: any): any[];
46
+ getAlphafloat(a: any, alpha: any): number;
47
+ hexToRGBA(hex: any, alpha: any): "" | {
48
+ r: any;
49
+ g: any;
50
+ b: any;
51
+ a: any;
52
+ };
53
+ /**
54
+ *
55
+ * 时间转换
56
+ * @param {type} type 时间戳类型
57
+ * @param {time} time 时间戳
58
+ */
59
+ formatTime(type: any, time: any): string;
60
+ formatDate(date: any, isShowYear?: boolean): any;
61
+ imgs2imgArr(imgs: any): any;
62
+ filterOption(input: any, option: any): boolean;
63
+ /**
64
+ * 转换含有###的值
65
+ * @param {*} item
66
+ * @param {*} k key
67
+ * @returns
68
+ */
69
+ stringToValue(item: any, k?: any): any;
70
+ notEmpty(text: any): boolean;
71
+ anyNotEmpty(text: any): any;
72
+ handleMultiTips(str: any, arr?: {}): any;
73
+ /**
74
+ * 变量转换
75
+ * @param {string} str
76
+ * @param {object} obj
77
+ * @param {string | number} noval // 没有值,默认赋值
78
+ */
79
+ handleSysParams(str: string, obj?: object, noval?: string | number): string;
80
+ /**
81
+ * 按钮setting中params参数解析
82
+ */
83
+ setParamsValue(paramsList: any, dbData: any): {};
84
+ isPlainObject(obj: any): boolean;
85
+ VERSION: string;
86
+ setup: typeof import("xe-utils/ctor").setup;
87
+ mixin: typeof import("xe-utils/ctor").mixin;
88
+ commafy: typeof import("xe-utils").commafy;
89
+ getDateDiff: typeof import("xe-utils").getDateDiff;
90
+ getWhatWeek: typeof import("xe-utils").getWhatWeek;
91
+ toDateString: typeof import("xe-utils").toDateString;
92
+ assign: typeof import("xe-utils").assign;
93
+ objectEach: typeof import("xe-utils").objectEach;
94
+ lastObjectEach: typeof import("xe-utils").lastObjectEach;
95
+ objectMap: typeof import("xe-utils").objectMap;
96
+ merge: typeof import("xe-utils").merge;
97
+ map: typeof import("xe-utils").map;
98
+ some: typeof import("xe-utils").some;
99
+ every: typeof import("xe-utils").every;
100
+ includeArrays: typeof import("xe-utils").includeArrays;
101
+ arrayEach: typeof import("xe-utils").arrayEach;
102
+ lastArrayEach: typeof import("xe-utils").lastArrayEach;
103
+ uniq: typeof import("xe-utils").uniq;
104
+ union: typeof import("xe-utils").union;
105
+ toArray: typeof import("xe-utils").toArray;
106
+ orderBy: typeof import("xe-utils").orderBy;
107
+ sortBy: typeof import("xe-utils").orderBy;
108
+ shuffle: typeof import("xe-utils").shuffle;
109
+ sample: typeof import("xe-utils").sample;
110
+ slice: typeof import("xe-utils").slice;
111
+ filter: typeof import("xe-utils").filter;
112
+ findKey: typeof import("xe-utils").findKey;
113
+ includes: typeof import("xe-utils").includes;
114
+ find: typeof import("xe-utils").find;
115
+ findLast: typeof import("xe-utils").findLast;
116
+ reduce: typeof import("xe-utils").reduce;
117
+ copyWithin: typeof import("xe-utils").copyWithin;
118
+ chunk: typeof import("xe-utils").chunk;
119
+ zip: typeof import("xe-utils").zip;
120
+ unzip: typeof import("xe-utils").unzip;
121
+ zipObject: typeof import("xe-utils").zipObject;
122
+ pluck: typeof import("xe-utils").pluck;
123
+ invoke: typeof import("xe-utils").invoke;
124
+ toArrayTree: typeof import("xe-utils").toArrayTree;
125
+ toTreeArray: typeof import("xe-utils").toTreeArray;
126
+ findTree: typeof import("xe-utils").findTree;
127
+ eachTree: typeof import("xe-utils").eachTree;
128
+ mapTree: typeof import("xe-utils").mapTree;
129
+ filterTree: typeof import("xe-utils").filterTree;
130
+ searchTree: typeof import("xe-utils").searchTree;
131
+ arrayIndexOf: typeof import("xe-utils").arrayIndexOf;
132
+ arrayLastIndexOf: typeof import("xe-utils").arrayLastIndexOf;
133
+ hasOwnProp: typeof import("xe-utils").hasOwnProp;
134
+ isArray: typeof import("xe-utils").isArray;
135
+ isNull: typeof import("xe-utils").isNull;
136
+ isNaN: typeof import("xe-utils").isNaN;
137
+ isUndefined: typeof import("xe-utils").isUndefined;
138
+ isFunction: typeof import("xe-utils").isFunction;
139
+ isObject: typeof import("xe-utils").isObject;
140
+ isString: typeof import("xe-utils").isString;
141
+ isLeapYear: typeof import("xe-utils").isLeapYear;
142
+ eqNull: typeof import("xe-utils").eqNull;
143
+ each: typeof import("xe-utils").each;
144
+ forOf: typeof import("xe-utils").forOf;
145
+ lastForOf: typeof import("xe-utils").lastForOf;
146
+ indexOf: typeof import("xe-utils").indexOf;
147
+ lastIndexOf: typeof import("xe-utils").lastIndexOf;
148
+ keys: typeof import("xe-utils").keys;
149
+ values: typeof import("xe-utils").values;
150
+ clone: typeof import("xe-utils").clone;
151
+ getSize: typeof import("xe-utils").getSize;
152
+ lastEach: typeof import("xe-utils").lastEach;
153
+ remove: typeof import("xe-utils").remove;
154
+ clear: typeof import("xe-utils").clear;
155
+ isFinite: typeof import("xe-utils").isFinite;
156
+ isFloat: typeof import("xe-utils").isFloat;
157
+ isInteger: typeof import("xe-utils").isInteger;
158
+ isBoolean: typeof import("xe-utils").isBoolean;
159
+ isRegExp: typeof import("xe-utils").isRegExp;
160
+ isError: typeof import("xe-utils").isError;
161
+ isTypeError: typeof import("xe-utils").isTypeError;
162
+ isEmpty: typeof import("xe-utils").isEmpty;
163
+ isSymbol: typeof import("xe-utils").isSymbol;
164
+ isArguments: typeof import("xe-utils").isArguments;
165
+ isElement: typeof import("xe-utils").isElement;
166
+ isDocument: typeof import("xe-utils").isDocument;
167
+ isWindow: typeof import("xe-utils").isWindow;
168
+ isFormData: typeof import("xe-utils").isFormData;
169
+ isMap: typeof import("xe-utils").isMap;
170
+ isWeakMap: typeof import("xe-utils").isWeakMap;
171
+ isSet: typeof import("xe-utils").isSet;
172
+ isWeakSet: typeof import("xe-utils").isWeakSet;
173
+ isMatch: typeof import("xe-utils").isMatch;
174
+ isEqual: typeof import("xe-utils").isEqual;
175
+ isEqualWith: typeof import("xe-utils").isEqualWith;
176
+ getType: typeof import("xe-utils").getType;
177
+ uniqueId: typeof import("xe-utils").uniqueId;
178
+ findIndexOf: typeof import("xe-utils").findIndexOf;
179
+ findLastIndexOf: typeof import("xe-utils").findLastIndexOf;
180
+ toStringJSON: typeof import("xe-utils").toStringJSON;
181
+ toJSONString: typeof import("xe-utils").toJSONString;
182
+ entries: typeof import("xe-utils").entries;
183
+ pick: typeof import("xe-utils").pick;
184
+ omit: typeof import("xe-utils").omit;
185
+ first: typeof import("xe-utils").first;
186
+ last: typeof import("xe-utils").last;
187
+ has: typeof import("xe-utils").has;
188
+ get: typeof import("xe-utils").get;
189
+ set: typeof import("xe-utils").set;
190
+ groupBy: typeof import("xe-utils").groupBy;
191
+ countBy: typeof import("xe-utils").countBy;
192
+ range: typeof import("xe-utils").range;
193
+ destructuring: typeof import("xe-utils").destructuring;
194
+ random: typeof import("xe-utils").random;
195
+ max: typeof import("xe-utils").max;
196
+ min: typeof import("xe-utils").min;
197
+ round: typeof import("xe-utils").round;
198
+ ceil: typeof import("xe-utils").ceil;
199
+ floor: typeof import("xe-utils").floor;
200
+ toInteger: typeof import("xe-utils").toInteger;
201
+ toNumber: typeof import("xe-utils").toNumber;
202
+ add: typeof import("xe-utils").add;
203
+ subtract: typeof import("xe-utils").subtract;
204
+ multiply: typeof import("xe-utils").multiply;
205
+ divide: typeof import("xe-utils").divide;
206
+ sum: typeof import("xe-utils").sum;
207
+ mean: typeof import("xe-utils").mean;
208
+ getWhatYear: typeof import("xe-utils").getWhatYear;
209
+ getWhatQuarter: typeof import("xe-utils").getWhatQuarter;
210
+ getWhatMonth: typeof import("xe-utils").getWhatMonth;
211
+ getWhatDay: typeof import("xe-utils").getWhatDay;
212
+ toStringDate: typeof import("xe-utils").toStringDate;
213
+ now: typeof import("xe-utils").now;
214
+ timestamp: typeof import("xe-utils").timestamp;
215
+ isValidDate: typeof import("xe-utils").isValidDate;
216
+ isDateSame: typeof import("xe-utils").isDateSame;
217
+ getYearDay: typeof import("xe-utils").getYearDay;
218
+ getYearWeek: typeof import("xe-utils").getYearWeek;
219
+ getMonthWeek: typeof import("xe-utils").getMonthWeek;
220
+ getDayOfYear: typeof import("xe-utils").getDayOfYear;
221
+ getDayOfMonth: typeof import("xe-utils").getDayOfMonth;
222
+ padEnd: typeof import("xe-utils").padEnd;
223
+ padStart: typeof import("xe-utils").padStart;
224
+ repeat: typeof import("xe-utils").repeat;
225
+ trim: typeof import("xe-utils").trim;
226
+ trimRight: typeof import("xe-utils").trimRight;
227
+ trimLeft: typeof import("xe-utils").trimLeft;
228
+ escape: typeof import("xe-utils").escape;
229
+ unescape: typeof import("xe-utils").unescape;
230
+ camelCase: typeof import("xe-utils").camelCase;
231
+ kebabCase: typeof import("xe-utils").kebabCase;
232
+ startsWith: typeof import("xe-utils").startsWith;
233
+ endsWith: typeof import("xe-utils").endsWith;
234
+ template: typeof import("xe-utils").template;
235
+ toFormatString: typeof import("xe-utils").toFormatString;
236
+ toString: typeof import("xe-utils").toString;
237
+ toValueString: typeof import("xe-utils").toValueString;
238
+ property: typeof import("xe-utils").property;
239
+ bind: typeof import("xe-utils").bind;
240
+ once: typeof import("xe-utils").once;
241
+ after: typeof import("xe-utils").after;
242
+ before: typeof import("xe-utils").before;
243
+ throttle: typeof import("xe-utils").throttle;
244
+ debounce: typeof import("xe-utils").debounce;
245
+ delay: typeof import("xe-utils").delay;
246
+ unserialize: typeof import("xe-utils").unserialize;
247
+ serialize: typeof import("xe-utils").serialize;
248
+ parseUrl: typeof import("xe-utils").parseUrl;
249
+ getBaseURL: typeof import("xe-utils").getBaseURL;
250
+ locat: typeof import("xe-utils").locat;
251
+ cookie: import("xe-utils").cookie;
252
+ browse: typeof import("xe-utils").browse;
253
+ };
254
+ export default _default;
@@ -0,0 +1 @@
1
+ import moment from"moment";import XEUtils from"xe-utils";const _toString=Object.prototype.toString;var vexutilsExpand={...XEUtils,parseCondition:function(e,t,i){if(e&&e.length>0&&t&&t.table)for(let r=0;r<e.length;r++){let l=e[r];if(l&&l.field_key&&l.con){let e=t.table[l.field_key],r=XEUtils.getFieldByKey(l.field_key,i);if(!r||!e&&"0"!==String(e))return!1;if(!XEUtils.getConnection(l,e,r))return!1}}return!0},getFieldByKey:function(e,t){if(t&&t.length>0)for(let i=0;i<t.length;i++){let r=t[i];if(r.columnName==e)return r}},getConnection:function(e,t,i){let r=e.con,l=e.value;if("NULL"==r){if(t)return!1}else if("NOT_NULL"==r&&!t)return!1;if("TEXT"==i.fieldType){if("CL"==r){if(-1==t.indexOf(l))return!1}else if("NC"==r){if(-1!=t.indexOf(l))return!1}else if("EQ"==r||"QUOTE"==r){if(-1!=l.indexOf("|#|")){for(let e in l.split("|#|"))if(-1==t.indexOf(e))return!1}else if(t!=l)return!1}else if("NEQ"==r&&t==l)return!1}else if("NUMBER"==i.fieldType){if(!XEUtils.isNumber(t))return!1;if("EQ"==r||"QUOTE"==r){if(XEUtils.isNumber(l)){if(1*t!=1*l)return!1}else if(!XEUtils.getBetween(l,"number",t))return!1}else if("NEQ"==r){if(XEUtils.isNumber(l)&&1*t==1*l)return!1}else if("BIG"==r){if(XEUtils.isNumber(l)&&1*t<=1*l)return!1}else if("LESS"==r&&XEUtils.isNumber(l)&&1*t>=1*l)return!1}else if("TODAY"==r||"TOMORROW"==r||"YESTERDAY"==r||"THIS_WEEK"==r||"NEXT_WEEK"==r||"UP_WEEK"==r||"THIS_MONTH"==r||"NEXT_MONTH"==r||"UP_MONTH"==r||"THIS_SEASON"==r||"NEXT_SEASON"==r||"UP_SEASON"==r||"THIS_YEAR"==r||"NEXT_YEAR"==r||"UP_YEAR"==r){if(!XEUtils.isDate(t))return!1;{let e,i,l=new Date,n=864e5,a=XEUtils.convertDate(t),s=XEUtils.toDateString(l,"yyyy-MM-dd");if("TODAY"==r)e=XEUtils.convertDate(s+" 00:00:00"),i=XEUtils.convertDate(s+" 23:59:59");else if("TOMORROW"==r){let t=XEUtils.addDate(l,1,"D").format("yyyy-MM-dd");e=XEUtils.convertDate(t+" 00:00:00"),i=XEUtils.convertDate(t+" 23:59:59")}else if("YESTERDAY"==r){let t=XEUtils.addDate(l,-1,"D").format("yyyy-MM-dd");e=XEUtils.convertDate(t+" 00:00:00"),i=XEUtils.convertDate(t+" 23:59:59")}else if("THIS_WEEK"==r){let t=l.getDay()||7,r=l.getTime()-(t-1)*n,a=l.getTime()+(7-t)*n;e=new Date(r),i=new Date(a)}else if("NEXT_WEEK"==r){let t=XEUtils.addDate(l,1,"W"),r=t.getDay()||7,a=t.getTime()-(r-1)*n,s=t.getTime()+(7-r)*n;e=new Date(a),i=new Date(s)}else if("UP_WEEK"==r){let t=XEUtils.addDate(l,-1,"W"),r=t.getDay()||7,a=t.getTime()-(r-1)*n,s=t.getTime()+(7-r)*n;e=new Date(a),i=new Date(s)}else if("THIS_MONTH"==r){let t=new Date;t.setDate(1),e=t,i=XEUtils.addDate(t,1,"M")}else if("NEXT_MONTH"==r){let t=new Date;t.setDate(1),e=XEUtils.addDate(t,1,"M"),i=XEUtils.addDate(t,2,"M")}else if("UP_MONTH"==r){let t=new Date;t.setDate(1),e=XEUtils.addDate(t,-1,"M"),i=t}else if("THIS_SEASON"==r)e=XEUtils.getCurSeasonFirstDay(),i=XEUtils.addDate(e,3,"M");else if("NEXT_SEASON"==r)e=XEUtils.addDate(XEUtils.getCurSeasonFirstDay(),3,"M"),i=XEUtils.addDate(e,3,"M");else if("UP_SEASON"==r)i=XEUtils.getCurSeasonFirstDay(),e=XEUtils.addDate(i,-3,"M");else if("THIS_YEAR"==r){let t=new Date;e=new Date(t.getFullYear()+"/01/01"),i=XEUtils.addDate(e,1,"Y")}else if("NEXT_YEAR"==r){let t=new Date;e=XEUtils.addDate(new Date(t.getFullYear()+"/01/01"),1,"Y"),i=XEUtils.addDate(e,1,"Y")}else if("UP_YEAR"==r){let t=new Date;i=new Date(t.getFullYear()+"/01/01"),e=XEUtils.addDate(i,-1,"Y")}if(e&&i&&!(e.getTime()<=a.getTime()&&a.getTime()<i.getTime()))return!1}}else if("L_"==r||"N_"==r||"IN_THE_PAST"==r||"IN_THE_FUTURE"==r||"IN_THE_PAST_DI"==r||"IN_THE_FUTURE_DI"==r){if(e.unit&&XEUtils.isNumber(l)){if(!XEUtils.isDate(t))return!1;{let i=XEUtils.convertDate(t),n=new Date,a=e.unit;if("DAY"==a||"WEEK"==a||"MONTH"==a||"QUARTER"==a||"YEAR"==a||"HOUR"==a){let e="D";"WEEK"==a?e="W":"MONTH"==a?e="M":"QUARTER"==a?e="Q":"YEAR"==a?e="Y":"HOUR"==a&&(e="H");let t=1*l;if("L_"==r){let r=XEUtils.addDate(new Date,-1*t,e);if(i.getTime()<r.getTime())return!1}else if("N_"==r){let r=XEUtils.addDate(new Date,t,e);if(i.getTime()>r.getTime())return!1}else if("IN_THE_PAST"==r){let r=i.getTime(),l=n.getTime();if(r<XEUtils.addDate(n,-1*t,e).getTime()||r>l)return!1}else if("IN_THE_FUTURE"==r){let r=i.getTime(),l=n.getTime(),a=XEUtils.addDate(n,t,e).getTime();if(r<l||r>a)return!1}else if("IN_THE_PAST_DI"==r||"IN_THE_FUTURE_DI"==r){let e=i.getTime(),l="IN_THE_FUTURE_DI"==r?"add":"subtract",{startTime:s,endTime:o}=XEUtils.addDiDate(n,t,a,l);if(e<s||e>o)return!1}}}}}else if("IN"==r&&XEUtils.isDate(t)){let i=XEUtils.convertDate(t);if(!l)if(e.start_val&&e.end_val){let t=e.start_val,r=e.end_val;if(!(t&&r&&XEUtils.isDate(t)&&XEUtils.isDate(r)))return!1;{let e=XEUtils.convertDate(t),l=XEUtils.convertDate(r);if(!(e.getTime()<=i.getTime()&&i.getTime()<l.getTime()))return!1}}else if(e.start_val){let t=e.start_val;if(!XEUtils.isDate(t))return!1;if(!(XEUtils.convertDate(t).getTime()<=i.getTime()))return!1}else if(e.end_val){let t=e.end_val;if(!XEUtils.isDate(t))return!1;{let e=XEUtils.convertDate(t);if(!(i.getTime()<e.getTime()))return!1}}}if("compare"==r)if("TEXT"==i.fieldType){if(-1!=l.indexOf("|#|")){for(let e in l.split("|#|"))if(-1==t.indexOf(e))return!1}else if(e.mk&&"like"==e.mk){if(-1==t.indexOf(l))return!1}else if(-1==t.indexOf(l))return!1}else if("NUMBER"==i.fieldType()){if(!XEUtils.isNumber(l)||!XEUtils.isNumber(t))return!1;if(1*t!=1*l)return!1}else if(t!=l)return!1;return!0},getBetween:function(e,t,i){if(e&&-1!=e.indexOf("~")&&2==e.split("~").length){let r=e.split("~")[0],l=e.split("~")[1];if("number"==t&&XEUtils.isNumber(r)&&XEUtils.isNumber(l))return 1*r<=1*i&&1*i<1*l}},convertDate:function(e){if(e)if(-1!=e.indexOf("-")){e=e=e.replace(/-/g,"/");try{return new Date(e)}catch(e){console.log(e)}}else try{return new Date(e)}catch(e){console.log(e)}},addDate:function(e,t,i){let r=e;if(["D","H","W"].includes(i)&&e&&XEUtils.isValidDate(e)&&(r=r.getTime()),"D"==i)return new Date(r+24*t*3600*1e3);if("W"==i)return new Date(r+7*t*24*3600*1e3);if("M"==i){let e=new Date(r);return e.setMonth(r.getMonth()+t),e}if("Q"==i){let e=new Date(r);return e.setMonth(r.getMonth()+3*t),e}if("Y"==i){let e=new Date(r);return e.setMonth(r.getMonth()+12*t),e}return"H"==i?new Date(r+3600*t*1e3):void 0},addDiDate:function(e,t,i="day",r){let l,n={},a=i.toLowerCase(),s=a+"s";return l="add"==r?moment(e).add(t,s):moment(e).subtract(t,s),n.startTime=l.startOf(a).valueOf(),n.endTime=l.endOf(a).valueOf(),n},getCurSeasonFirstDay:function(){let e=new Date,t=e.getFullYear(),i=e.getMonth()+1;return i>=1&&i<=3?new Date(t+"/01/01"):4<=i&&i<=6?new Date(t+"/04/01"):7<=i&&i<=9?new Date(t+"/07/01"):new Date(t+"/10/01")},isNumber:function(e){try{let t=1*e+100;if(t>0||t<0||0==t)return!0}catch(e){console.log(e)}return!1},isDate:function(e){return!(!isNaN(e)||isNaN(Date.parse(e)))},isJSON(e){if("string"==typeof e)try{let t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},getBtnStyle:e=>"white_bg"==e.showStyle?{"border-color":e.color,color:e.color}:"none_bg"==e.showStyle?{color:e.color}:(e.showStyle,{"background-color":e.color,"border-color":e.color}),oldColorMap(e){let t={blue:"blue",sky:"skyblue",azure:"azure",palegreen:"palegreen",yellow:"yellow",darkorange:"darkorange",magenta:"magenta",purple:"purple",maroon:"maroon",orange:"orange",green:"green",red:"red",grey:"grey"};return e&&t[e]?t[e]:""},validateBirthday(e,t,i){let r=!0;if(!i)return!1;return{DAYReg:/^([0-9]|[1-9][0-9]|[1-2][0-9][0-9]|[3][0-5][0-9]|(360|361|363|362|364|365))$/,MONTHReg:/^(?:[0-9]|1[0-2])$/,YEARReg:/^(?:[1-9]?\d|100)$/}[`${i}Reg`].test(+e)||(window.$message.warning(`${t}${this.$t("1.9.40")}`,2),r=!1),r},handleImageSize(e,t){let i={display:"inline-block",height:t};return e.h&&(i.height="adaptive"===e.h?"auto":e.h+"px"),e.w&&(i.width="adaptive"===e.w?"auto":e.w+"px"),i},handleBigArrayCopy(e,t=1e3){if(!Array.isArray(e))return e;let i=t||1e3;const r=XEUtils.chunk(e,i),l=(e=[],t="json")=>{const i={json:e=>JSON.parse(JSON.stringify(e)),clone:e=>XEUtils.clone(e,!0)};let r=[];return e.forEach((e=>{let l=i[t](e);r.push(l)})),XEUtils.flatten(r)};let n=[];try{n=l(r,"json")}catch(e){n=l(r,"clone")}return n},getAlphafloat(e,t){if(void 0!==e)return parseFloat((e/256).toFixed(2));if(void 0!==t){if(1<t&&t<=100)return parseFloat((t/100).toFixed(2));if(0<=t&&t<=1)return parseFloat(t.toFixed(2))}return 1},hexToRGBA(e,t){if(!/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))return console.log("Invalid HEX"),"";const i=Math.floor((e.length-1)/3),r=(l=e.slice(1),n=i,l.match(new RegExp(`.{${n}}`,"g")));var l,n;const[a,s,o,f]=r.map((e=>parseInt(e.repeat(2/e.length),16)));return{r:a,g:s,b:o,a:XEUtils.getAlphafloat(f,t)}},formatTime(e,t){let i="";if(!t)return"";switch(e){case"DATE":i="yyyy-MM-dd";break;case"DATETIME":i="yyyy-MM-dd HH:mm:ss";break;case"TIME":i="HH:mm:ss";break;case"MOUTH":i="MM-dd";break;case"DATETIMESTR":i="yyyy年M月dd日 HH:mm";break;case"MOUTHTIME":i="M月d日 HH:mm";break;case"HM":i=" HH:mm"}return XEUtils.toDateString(t,i)},formatDate(e,t=!1){const i=new Date,r=e||i.getTime(),l=XEUtils.formatTime("DATE",i.getTime()),n=XEUtils.convertDate(l+" 00:00:00").getTime(),a=i.getFullYear(),s=new Date(+r).getFullYear();return r>n?XEUtils.formatTime("TIME",r):t?a!==s?XEUtils.formatTime("DATETIMESTR",r):XEUtils.formatTime("MOUTHTIME",r):XEUtils.formatTime("DATETIME",r)},imgs2imgArr:e=>e?e.replace(/(,)(data|http)/g,((e,t,i)=>`|${i}`)).split("|"):[],filterOption(e,t){try{let i=t.componentOptions.children[0].text,r=i.toLowerCase(),l=e.toLowerCase(),n=!1;return"string"==typeof i&&/^[a-zA-Z]+$/.test(e)&&""._toPinYin&&(n=r._toPinYin().indexOf(l)>=0),n||r.indexOf(l)>=0}catch(e){return!1}},stringToValue(e,t="value"){if(XEUtils.isString(e)&&e&&e.startsWith("###{")){let i=JSON.parse(e.replace("###",""));e=i[t]}return e},notEmpty:e=>XEUtils.isBoolean(e)||"0"===String(e)||!!e,anyNotEmpty:e=>Array.isArray(e)?e.length>0:XEUtils.isObject(e)?Object.keys(e||{}).length>0:XEUtils.notEmpty(e),handleMultiTips(e,t={}){if(!e.includes("/*###*/"))return e;let i=e.split("/*###*/");if(3!=i.length)return e;let r=i[1],l=[...t],n=l.length>100?100:l.length,a=[],s="";const o=(e,t,i)=>e.replace(i,(function(){let e=arguments[1];return l[t][e]||""}));for(let e=0;e<n;e++)a.push(o(r,e,/\${form.selectRows.(.*?)\}/g));return s=i[0]+a.join(","),s+=l.length>100?`等${l.length}条数据吗?`:i[2],s},handleSysParams(str,obj={},noval=""){let p={...obj};const getValList=(plsList=[],obj={})=>{var l=[];return plsList.forEach((v=>{let c=v;if(v.includes("."))try{eval(`c = o.${v}`)}catch(e){c=""}XEUtils.notEmpty(c)&&l.push(c)})),l},getVal=(e,t,i)=>e.replace(t,(function(){var e=arguments[1],t=e.split("!"),i=getValList(t,p),r=i.find((e=>XEUtils.notEmpty(e))),l=r;return l=XEUtils.notEmpty(l)?l:noval}));return"string"==typeof str&&(str.includes("form")&&(str=getVal(str,/\${(.*?)\}/g)),str.includes("sys")&&(str=getVal(str,/\${(.*?)\}/g)),str.includes("db")&&(str=getVal(str,/\${(.*?)\}/g)),str.includes("table")&&(str=getVal(str,/\${(.*?)\}/g)),str.includes("result")&&(str=getVal(str,/\${(.*?)\}/g))),str},setParamsValue(e,t){const i={};return e&&e.length>0&&e.forEach((e=>{if(e.p_value)if(e.p_name=e.p_name.trim(),e.p_value.includes(".")&&2==e.p_value.split(".").length){const r=e.p_value.split(".")[0].trim(),l=e.p_value.split(".")[1].trim();if(t[r]&&(t[r][l]||0==t[r][l]))if("string"==typeof t[r][l]&&t[r][l].includes("###{"))try{t[r][l]=JSON.parse(t[r][l].split("###")[1]).value,i[e.p_name]=t[r][l]}catch(e){console.log(e)}else i[e.p_name]=t[r][l];else i[e.p_name]=""}else i[e.p_name]=e.p_value})),i},isPlainObject:e=>"[object Object]"===_toString.call(e)};export{vexutilsExpand as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.42-release.3",
3
+ "version": "3.1.42-release.5",
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": "9f9438a32997f36524f3b9bd143ff97b396be366"
64
+ "gitHead": "e1112ae6052b5e56442fb9dcac34732718d48eec"
65
65
  }