cnhis-design-vue 3.2.3-release.1 → 3.2.3-release.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +87 -87
- package/es/components/big-table/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/biunique-chat/index.d.ts +26 -3
- package/es/components/biunique-chat/src/Index.vue.d.ts +26 -3
- package/es/components/biunique-chat/src/Index.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +2 -0
- package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +10 -3
- package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +2 -0
- package/es/components/biunique-chat/src/components/MessageTemplate.vue.d.ts +2 -1
- package/es/components/biunique-chat/src/components/MessageTemplate.vue2.js +1 -1
- package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/biunique-chat/src/hooks/useScrollLoading.d.ts +2 -0
- package/es/components/biunique-chat/src/hooks/useScrollLoading.js +1 -0
- package/es/components/biunique-chat/src/hooks/useSession.d.ts +1 -0
- package/es/components/biunique-chat/src/hooks/useSession.js +1 -1
- package/es/components/biunique-chat/src/hooks/useState.js +1 -1
- package/es/components/biunique-chat/src/utils/index.d.ts +1 -1
- package/es/components/biunique-chat/src/utils/index.js +1 -1
- package/es/components/biunique-chat/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +5 -2
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +5 -2
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +14 -0
- package/es/components/classification/index.d.ts +6 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +6 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -0
- package/es/components/classification/src/index.vue.d.ts +6 -3
- package/es/components/date-picker/index.d.ts +2 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +2 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +5 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +2 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +5 -1
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +2 -0
- package/es/components/form-config/index.d.ts +41 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +41 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +20 -0
- package/es/components/form-render/index.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +21 -8
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +20 -7
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEditCell.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +21 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +33 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +33 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +2 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +4 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +4 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +4 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +8 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +8 -0
- package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_168.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_169.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_170.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_171.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_172.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_173.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_174.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_175.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_176.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_177.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_178.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_179.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_180.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_181.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_182.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_183.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_184.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_185.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_186.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_187.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_188.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_189.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_190.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_191.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_192.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_193.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_194.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_195.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_196.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
# 安装
|
2
|
-
|
3
|
-
```shell
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
5
|
-
# or
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
-
```
|
8
|
-
|
9
|
-
## 1.全局引入
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
// main.ts
|
13
|
-
import { createApp } from 'vue';
|
14
|
-
import App from './App.vue';
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
-
import cui from 'cnhis-design-vue';
|
17
|
-
|
18
|
-
const app = createApp(App);
|
19
|
-
app.use(cui).mount('#app');
|
20
|
-
```
|
21
|
-
|
22
|
-
## 2. 按需引入
|
23
|
-
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
-
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
-
|
28
|
-
```shell
|
29
|
-
# 安装自动导入样式的插件
|
30
|
-
npm i -d vite-plugin-style-import
|
31
|
-
```
|
32
|
-
|
33
|
-
```typescript
|
34
|
-
// vite.config.ts
|
35
|
-
import { defineConfig } from 'vite';
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
-
|
38
|
-
export default defineConfig({
|
39
|
-
plugins: [
|
40
|
-
// ...otherPlugins
|
41
|
-
createStyleImportPlugin({
|
42
|
-
libs: [
|
43
|
-
{
|
44
|
-
libraryName: 'cnhis-design-vue',
|
45
|
-
esModule: true,
|
46
|
-
ensureStyleFile: true,
|
47
|
-
resolveStyle: name => {
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
]
|
52
|
-
})
|
53
|
-
]
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
-
|
59
|
-
```typescript
|
60
|
-
// main.ts
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
62
|
-
```
|
63
|
-
|
64
|
-
## 3.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
1
|
+
# 安装
|
2
|
+
|
3
|
+
```shell
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
5
|
+
# or
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
+
```
|
8
|
+
|
9
|
+
## 1.全局引入
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
// main.ts
|
13
|
+
import { createApp } from 'vue';
|
14
|
+
import App from './App.vue';
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
+
import cui from 'cnhis-design-vue';
|
17
|
+
|
18
|
+
const app = createApp(App);
|
19
|
+
app.use(cui).mount('#app');
|
20
|
+
```
|
21
|
+
|
22
|
+
## 2. 按需引入
|
23
|
+
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
+
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# 安装自动导入样式的插件
|
30
|
+
npm i -d vite-plugin-style-import
|
31
|
+
```
|
32
|
+
|
33
|
+
```typescript
|
34
|
+
// vite.config.ts
|
35
|
+
import { defineConfig } from 'vite';
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
+
|
38
|
+
export default defineConfig({
|
39
|
+
plugins: [
|
40
|
+
// ...otherPlugins
|
41
|
+
createStyleImportPlugin({
|
42
|
+
libs: [
|
43
|
+
{
|
44
|
+
libraryName: 'cnhis-design-vue',
|
45
|
+
esModule: true,
|
46
|
+
ensureStyleFile: true,
|
47
|
+
resolveStyle: name => {
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
]
|
52
|
+
})
|
53
|
+
]
|
54
|
+
});
|
55
|
+
```
|
56
|
+
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
+
|
59
|
+
```typescript
|
60
|
+
// main.ts
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
62
|
+
```
|
63
|
+
|
64
|
+
## 3.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -610,7 +610,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
610
610
|
setGroupTreeExpand: () => void;
|
611
611
|
resetTableInlineEditStatus: () => false | undefined;
|
612
612
|
renderAnnotation: (columnConfig: import("../../shared/types").AnyObject) => JSX.Element | null;
|
613
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
613
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
614
614
|
triggerExpand: (e: any, isExpand: any) => void;
|
615
615
|
getOtherConfigInit: () => any;
|
616
616
|
refreshTable: () => void;
|
@@ -612,7 +612,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
612
612
|
setGroupTreeExpand: () => void;
|
613
613
|
resetTableInlineEditStatus: () => false | undefined;
|
614
614
|
renderAnnotation: (columnConfig: AnyObject) => JSX.Element | null;
|
615
|
-
toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[]
|
615
|
+
toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
|
616
616
|
triggerExpand: (e: any, isExpand: any) => void;
|
617
617
|
getOtherConfigInit: () => any;
|
618
618
|
refreshTable: () => void;
|
@@ -1,5 +1,9 @@
|
|
1
1
|
import { SFCWithInstall } from '../../shared/types';
|
2
2
|
declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
3
|
+
token: {
|
4
|
+
type: StringConstructor;
|
5
|
+
required: true;
|
6
|
+
};
|
3
7
|
userId: {
|
4
8
|
type: StringConstructor;
|
5
9
|
required: true;
|
@@ -10,6 +14,10 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
10
14
|
};
|
11
15
|
}, {
|
12
16
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
17
|
+
token: {
|
18
|
+
type: StringConstructor;
|
19
|
+
required: true;
|
20
|
+
};
|
13
21
|
userId: {
|
14
22
|
type: StringConstructor;
|
15
23
|
required: true;
|
@@ -39,6 +47,8 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
39
47
|
isUpdateSession: boolean;
|
40
48
|
};
|
41
49
|
reConnention: number;
|
50
|
+
entrySession: (item: import("../../shared/types").AnyObject) => void;
|
51
|
+
setSessionList: (list: import("../../shared/types").AnyObject[]) => void;
|
42
52
|
init: () => Promise<void>;
|
43
53
|
initWebSocket: () => void;
|
44
54
|
subscribeSessionList: () => void;
|
@@ -1091,6 +1101,7 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1091
1101
|
datePickerRef: import("vue").Ref<import("../../shared/types").AnyObject | null>;
|
1092
1102
|
panelInstRef: import("vue").Ref<null>;
|
1093
1103
|
placeholderRef: import("vue").Ref<any>;
|
1104
|
+
oldValue: string;
|
1094
1105
|
currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
|
1095
1106
|
isDateTime: import("vue").ComputedRef<boolean>;
|
1096
1107
|
formatRef: import("vue").ComputedRef<string>;
|
@@ -1101,6 +1112,7 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1101
1112
|
onUpdateShow: (show: boolean) => Promise<void>;
|
1102
1113
|
onConfirm: (...args: any[]) => Promise<void>;
|
1103
1114
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
1115
|
+
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
1104
1116
|
NDatePicker: any;
|
1105
1117
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1106
1118
|
updateUnchangedValue: {
|
@@ -1129,13 +1141,19 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1129
1141
|
chatMainRef: import("vue").Ref<HTMLElement | undefined>;
|
1130
1142
|
state: import("./src/types").IState;
|
1131
1143
|
setMsgList: (list?: import("../../shared/types").AnyObject[]) => void;
|
1132
|
-
|
1144
|
+
currentInfo: {
|
1145
|
+
page: number;
|
1146
|
+
hasMore: boolean;
|
1147
|
+
};
|
1133
1148
|
getHistoryRecord: () => Promise<void>;
|
1134
1149
|
accessSession: () => Promise<void>;
|
1135
|
-
|
1150
|
+
showMessage: (item: import("../../shared/types").AnyObject) => boolean;
|
1151
|
+
showTemplateMsg: (item: import("../../shared/types").AnyObject, type: "template" | "system") => boolean | undefined;
|
1152
|
+
isTemplate3: (content: import("../../shared/types").AnyObject) => boolean;
|
1136
1153
|
needShowTime: (item: import("../../shared/types").AnyObject, index: number) => boolean;
|
1137
1154
|
setScrollToButtom: () => Promise<void>;
|
1138
1155
|
getIntervalMsgTime: (time: string) => string;
|
1156
|
+
resetInfo: () => void;
|
1139
1157
|
NAvatar: any;
|
1140
1158
|
NImageGroup: import("vue").DefineComponent<{
|
1141
1159
|
showToolbar: {
|
@@ -1411,7 +1429,8 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1411
1429
|
contentList: import("vue").ComputedRef<any>;
|
1412
1430
|
toolbarButton: import("vue").ComputedRef<any>;
|
1413
1431
|
bottomButton: import("vue").ComputedRef<any>;
|
1414
|
-
|
1432
|
+
dbParamsList: import("vue").ComputedRef<any>;
|
1433
|
+
messageTemplateData: import("vue").ComputedRef<any>;
|
1415
1434
|
getSystemMsgContent: () => any;
|
1416
1435
|
handleTemplateClick: (data: import("../../shared/types").AnyObject) => void;
|
1417
1436
|
NButton: any;
|
@@ -1502,6 +1521,10 @@ declare const BiuniqueChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1502
1521
|
MESSAGE_TYPE: typeof import("./src/constants").MESSAGE_TYPE;
|
1503
1522
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1504
1523
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("template-click" | "unread-message-update")[], "template-click" | "unread-message-update", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1524
|
+
token: {
|
1525
|
+
type: StringConstructor;
|
1526
|
+
required: true;
|
1527
|
+
};
|
1505
1528
|
userId: {
|
1506
1529
|
type: StringConstructor;
|
1507
1530
|
required: true;
|
@@ -3,6 +3,10 @@ import { ChatSock } from './utils/chatSock';
|
|
3
3
|
import { AnyObject } from '../../../shared/types';
|
4
4
|
import { IState } from './types';
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
6
|
+
token: {
|
7
|
+
type: StringConstructor;
|
8
|
+
required: true;
|
9
|
+
};
|
6
10
|
userId: {
|
7
11
|
type: StringConstructor;
|
8
12
|
required: true;
|
@@ -13,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
17
|
};
|
14
18
|
}, {
|
15
19
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
20
|
+
token: {
|
21
|
+
type: StringConstructor;
|
22
|
+
required: true;
|
23
|
+
};
|
16
24
|
userId: {
|
17
25
|
type: StringConstructor;
|
18
26
|
required: true;
|
@@ -42,6 +50,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
50
|
isUpdateSession: boolean;
|
43
51
|
};
|
44
52
|
reConnention: number;
|
53
|
+
entrySession: (item: AnyObject) => void;
|
54
|
+
setSessionList: (list: AnyObject[]) => void;
|
45
55
|
init: () => Promise<void>;
|
46
56
|
initWebSocket: () => void;
|
47
57
|
subscribeSessionList: () => void;
|
@@ -1094,6 +1104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1094
1104
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
1095
1105
|
panelInstRef: import("vue").Ref<null>;
|
1096
1106
|
placeholderRef: import("vue").Ref<any>;
|
1107
|
+
oldValue: string;
|
1097
1108
|
currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
|
1098
1109
|
isDateTime: import("vue").ComputedRef<boolean>;
|
1099
1110
|
formatRef: import("vue").ComputedRef<string>;
|
@@ -1104,6 +1115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1104
1115
|
onUpdateShow: (show: boolean) => Promise<void>;
|
1105
1116
|
onConfirm: (...args: any[]) => Promise<void>;
|
1106
1117
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
1118
|
+
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
1107
1119
|
NDatePicker: any;
|
1108
1120
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1109
1121
|
updateUnchangedValue: {
|
@@ -1132,13 +1144,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
1132
1144
|
chatMainRef: import("vue").Ref<HTMLElement | undefined>;
|
1133
1145
|
state: IState;
|
1134
1146
|
setMsgList: (list?: AnyObject[]) => void;
|
1135
|
-
|
1147
|
+
currentInfo: {
|
1148
|
+
page: number;
|
1149
|
+
hasMore: boolean;
|
1150
|
+
};
|
1136
1151
|
getHistoryRecord: () => Promise<void>;
|
1137
1152
|
accessSession: () => Promise<void>;
|
1138
|
-
|
1153
|
+
showMessage: (item: AnyObject) => boolean;
|
1154
|
+
showTemplateMsg: (item: AnyObject, type: "template" | "system") => boolean | undefined;
|
1155
|
+
isTemplate3: (content: AnyObject) => boolean;
|
1139
1156
|
needShowTime: (item: AnyObject, index: number) => boolean;
|
1140
1157
|
setScrollToButtom: () => Promise<void>;
|
1141
1158
|
getIntervalMsgTime: (time: string) => string;
|
1159
|
+
resetInfo: () => void;
|
1142
1160
|
NAvatar: any;
|
1143
1161
|
NImageGroup: import("vue").DefineComponent<{
|
1144
1162
|
showToolbar: {
|
@@ -1414,7 +1432,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
1414
1432
|
contentList: import("vue").ComputedRef<any>;
|
1415
1433
|
toolbarButton: import("vue").ComputedRef<any>;
|
1416
1434
|
bottomButton: import("vue").ComputedRef<any>;
|
1417
|
-
|
1435
|
+
dbParamsList: import("vue").ComputedRef<any>;
|
1436
|
+
messageTemplateData: import("vue").ComputedRef<any>;
|
1418
1437
|
getSystemMsgContent: () => any;
|
1419
1438
|
handleTemplateClick: (data: AnyObject) => void;
|
1420
1439
|
NButton: any;
|
@@ -1505,6 +1524,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1505
1524
|
MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
|
1506
1525
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1507
1526
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("template-click" | "unread-message-update")[], "template-click" | "unread-message-update", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1527
|
+
token: {
|
1528
|
+
type: StringConstructor;
|
1529
|
+
required: true;
|
1530
|
+
};
|
1508
1531
|
userId: {
|
1509
1532
|
type: StringConstructor;
|
1510
1533
|
required: true;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as s,reactive as t,provide as o,onBeforeUnmount as
|
1
|
+
import{defineComponent as e,ref as s,reactive as t,provide as o,onBeforeUnmount as r,openBlock as n,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as u,withCtx as d,createBlock as m,Fragment as p,createElementVNode as l,renderSlot as h}from"vue";import{NConfigProvider as f,NSpin as S,NLayout as v,NLayoutContent as b}from"naive-ui";import g from"./components/SiderList.vue.js";import y from"./components/ChatHeader.vue.js";import k from"./components/ChatMain.vue.js";import j from"./components/ChatFooter.vue.js";import{ChatSock as I}from"./utils/chatSock.js";import{instanceAxios as _}from"./api/index.js";import{useTheme as L}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as U}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{SUBSCRIBE_MESSAGE_TYPE as x}from"./constants/index.js";import{InjectionIChatState as M,InjectionIChatStompClient as C,InjectionIChatEmits as N}from"./types/index.js";import"./utils/emoji.js";import{useSession as q}from"./hooks/useSession.js";const T={class:"c-biunique-chat__header"},A={class:"toolbar"};var E=e({__name:"Index",props:{token:{type:String,required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"}},emits:["template-click","unread-message-update"],setup(e,{expose:E,emit:O}){const V=e;_.defaults.baseURL=V.baseURL+"/chat",_.defaults.headers.Authorization="bearer"+V.token;const w=L(),J=s(!1),R=s(),F=t({currentSessionItem:{},id:"",userInfo:{},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1});o(M,F),o(C,R),o(N,O);const{entrySession:H,setSessionList:$}=q(F);function z(){const e={headers:{AccessToken:V.token,UserId:V.userId},heartbeatFn:()=>{try{R.value.send("test")}catch(e){R.value.disconnect(),z()}},connectCb:()=>{console.log("连接成功"),R.value.subscribe("/user/topic/single",(({body:e})=>{try{console.log(JSON.parse(e),"订阅新增消息");const s=JSON.parse(e),{messageVo:t,sessionVo:o}=s;switch(s.event){case x.MESSAGE:if(s.messageVo.sender===F.userInfo.id)return;t.sender===F.currentSessionItem.receiver&&(F.currentMsg=t,F.isAppendMsg=!0),F.updateSessionItem={receiver:t.sender,lastMessageSendTime:t.sendTime,sortTime:t.sendTime,lastMessage:t.content},F.isUpdateSession=!0;break;case x.NEW_SESSION:F.updateSessionItem=o,F.isUpdateSession=!0}}catch(e){console.log(e)}})),R.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{currentUser:t,sessionVos:o}=s;if(F.userInfo=t,!(null==o?void 0:o.length))return;$(o)}catch(e){console.log(e)}}))},errorCb:(e,s)=>{console.log("断线了,正在重连...")}};R.value=new I("/fdp-chat/websocket",e)}return async function(){z()}(),r((()=>{var e;null==(e=R.value)||e.disconnect()})),E({getUnreadData:function(){return F.sessionList.filter((e=>U(e.unreadNum)&&e.unreadNum>0))},entrySession:H}),(e,s)=>(n(),i("div",{class:"c-biunique-chat",style:a(c(w))},[u(c(f),{abstract:"",namespace:"c-biunique-chat__popover"},{default:d((()=>[J.value?(n(),m(c(S),{key:0,stroke:"#5585f5"})):(n(),i(p,{key:1},[l("div",T,[l("div",A,[h(e.$slots,"toolbar")])]),u(c(v),{class:"c-biunique-chat__body","has-sider":""},{default:d((()=>[u(g),u(c(b),{class:"chat-content"},{default:d((()=>[u(y),u(k),u(j)])),_:1}),h(e.$slots,"external")])),_:3})],64))])),_:3})],4))}});export{E as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,withDirectives as n,openBlock as s,createElementBlock as i,normalizeStyle as a,unref as o,createElementVNode as l,createVNode as c,withCtx as r,createCommentVNode as u,Fragment as d,renderList as
|
1
|
+
import{defineComponent as t,ref as e,withDirectives as n,openBlock as s,createElementBlock as i,normalizeStyle as a,unref as o,createElementVNode as l,createVNode as c,withCtx as r,createCommentVNode as u,Fragment as d,renderList as f,createBlock as p,createTextVNode as m,toDisplayString as g,vShow as h}from"vue";import{NPopover as v,NTooltip as y,NUpload as M,NUploadTrigger as k,NButton as x}from"naive-ui";import{format as C}from"date-fns";import{useState as T}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import{images as E,alt as I}from"../utils/emoji.js";import{MESSAGE_TYPE as w}from"../constants/index.js";import{uploadFileApi as _}from"../api/index.js";const S={class:"tool-box"},j=l("span",null,[l("i",{class:"chat--iconfont chat--icon-face"})],-1),L={class:"emoji-box"},F=l("span",null,"默认表情",-1),K={class:"list-box"},D=["onClick"],H=["src"],J=[l("i",{class:"chat--iconfont chat--icon-good"},null,-1)],N=["onClick"],O=[l("i",{class:"chat--iconfont chat--icon-image"},null,-1)],A=["onClick"],G=[l("i",{class:"chat--iconfont chat--icon-folder"},null,-1)],X={class:"btn-box"},z=l("span",{class:"tip"},"Enter 发送, Shift + Enter 换行",-1);var B=t({__name:"ChatFooter",setup(t){const B=e(),R=e(""),{state:U,stompClient:q}=T(),{setCurrentSessionItem:P}=b(U);function Q(t){["Enter"].includes(t.key)&&(function(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}(t)||(t.preventDefault(),Y()))}function V(){var t,e;R.value=(null==(e=null==(t=B.value)?void 0:t.innerText)?void 0:e.trim())||""}async function W(t,e){console.log(W,t);const{file:n,name:s}=t.file,i=new FormData;i.append("sender",U.userInfo.id),i.append("file",n);const a=await _(i);if(!a)return console.log("上传失败");Z({chatMessageType:e,msg:e===w.FILE?s:a,url:a})}function Y(){if(!(R.value.length>2e3))return R.value?void Z({msg:R.value}):console.log("请输入内容");console.log("请控制在2000字以内")}async function Z(t){const{chatMessageType:e=w.TEXT,msg:n,url:s}=t,i={msg:n,chatMessageType:e};e===w.FILE&&(i.fileUrl=s),[w.TEXT,w.BLEND].includes(e)&&(B.value.innerHTML="",R.value="");const a=C(new Date,"yyyy-MM-dd HH:mm:ss");U.currentMsg={content:i,sender:U.userInfo.id,id:"",sendTime:a,sending:!0,fail:!1},U.isAppendMsg=!0,P({lastMessageSendTime:a,lastMessage:i,sortTime:a}),U.isChangeSession=!0;try{q.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:i,receiver:U.currentSessionItem.receiver})),U.currentMsg={...U.currentMsg,fail:!1}}catch(t){U.currentMsg={...U.currentMsg,fail:!0}}finally{U.currentMsg={...U.currentMsg,sending:!1}}}return(t,e)=>n((s(),i("section",{class:"chat-footer",style:a({cursor:o(U).id?"default":"not-allowed"})},[l("div",S,[c(o(v),{placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show"},{trigger:r((()=>[j])),default:r((()=>[l("div",L,[u(' <span>最近使用</span>\n\t\t\t\t\t<div class="list-box">\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\n\t\t\t\t\t\t\t<i>\n\t\t\t\t\t\t\t\t<img :src="img" />\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</div> '),F,l("div",K,[(s(!0),i(d,null,f(o(E),((t,e)=>(s(),i(d,{key:e},[e>0?(s(),p(o(y),{key:0,"show-arrow":!1,trigger:"hover"},{trigger:r((()=>[l("i",{onClick:()=>Z({chatMessageType:o(w).EMOJI,msg:e})},[l("img",{src:t},null,8,H)],8,D)])),default:r((()=>[m(" "+g(o(I)[e-1]||"微笑"),1)])),_:2},1024)):u("v-if",!0)],64)))),128))])])])),_:1}),l("span",{onClick:e[0]||(e[0]=()=>Z({chatMessageType:o(w).EMOJI,msg:0}))},J),c(o(M),{abstract:"",multiple:"",accept:"image/*",onChange:e[1]||(e[1]=t=>W(t,o(w).IMAGE))},{default:r((()=>[c(o(k),{abstract:""},{default:r((({handleClick:t})=>[l("span",{onClick:t},O,8,N)])),_:1})])),_:1}),c(o(M),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:e[2]||(e[2]=t=>W(t,o(w).FILE))},{default:r((()=>[c(o(k),{abstract:""},{default:r((({handleClick:t})=>[l("span",{onClick:t},G,8,A)])),_:1})])),_:1})]),n(l("div",{ref_key:"inputRef",ref:B,class:"input-box",contenteditable:"",onKeydown:Q,onInput:V},null,544),[[h,o(U).id]]),l("div",X,[z,c(o(x),{type:"primary",round:"",disabled:!R.value,onClick:Y},{default:r((()=>[m("发送")])),_:1},8,["disabled"])])],4)),[[h,o(U).id]])}});export{B as default};
|
@@ -609,6 +609,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
609
609
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
610
610
|
panelInstRef: import("vue").Ref<null>;
|
611
611
|
placeholderRef: import("vue").Ref<any>;
|
612
|
+
oldValue: string;
|
612
613
|
currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
|
613
614
|
isDateTime: import("vue").ComputedRef<boolean>;
|
614
615
|
formatRef: import("vue").ComputedRef<string>;
|
@@ -619,6 +620,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
619
620
|
onUpdateShow: (show: boolean) => Promise<void>;
|
620
621
|
onConfirm: (...args: any[]) => Promise<void>;
|
621
622
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
623
|
+
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
622
624
|
NDatePicker: any;
|
623
625
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
624
626
|
updateUnchangedValue: {
|
@@ -4,13 +4,19 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
4
4
|
chatMainRef: import("vue").Ref<HTMLElement | undefined>;
|
5
5
|
state: import("../types").IState;
|
6
6
|
setMsgList: (list?: AnyObject[]) => void;
|
7
|
-
|
7
|
+
currentInfo: {
|
8
|
+
page: number;
|
9
|
+
hasMore: boolean;
|
10
|
+
};
|
8
11
|
getHistoryRecord: () => Promise<void>;
|
9
12
|
accessSession: () => Promise<void>;
|
10
|
-
|
13
|
+
showMessage: (item: AnyObject) => boolean;
|
14
|
+
showTemplateMsg: (item: AnyObject, type: 'system' | 'template') => boolean | undefined;
|
15
|
+
isTemplate3: (content: AnyObject) => boolean;
|
11
16
|
needShowTime: (item: AnyObject, index: number) => boolean;
|
12
17
|
setScrollToButtom: () => Promise<void>;
|
13
18
|
getIntervalMsgTime: (time: string) => string;
|
19
|
+
resetInfo: () => void;
|
14
20
|
NAvatar: any;
|
15
21
|
NImageGroup: import("vue").DefineComponent<{
|
16
22
|
showToolbar: {
|
@@ -286,7 +292,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
286
292
|
contentList: import("vue").ComputedRef<any>;
|
287
293
|
toolbarButton: import("vue").ComputedRef<any>;
|
288
294
|
bottomButton: import("vue").ComputedRef<any>;
|
289
|
-
|
295
|
+
dbParamsList: import("vue").ComputedRef<any>;
|
296
|
+
messageTemplateData: import("vue").ComputedRef<any>;
|
290
297
|
getSystemMsgContent: () => any;
|
291
298
|
handleTemplateClick: (data: AnyObject) => void;
|
292
299
|
NButton: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,watch as s,openBlock as n,createElementBlock as i,
|
1
|
+
import{defineComponent as e,ref as t,watch as s,openBlock as n,createElementBlock as i,normalizeClass as o,unref as a,createVNode as r,withCtx as l,Fragment as m,renderList as c,toDisplayString as u,createCommentVNode as d,createBlock as f}from"vue";import{NImageGroup as p,NAvatar as g,NImage as y}from"naive-ui";import{isToday as v,format as M,isYesterday as T}from"date-fns";import{getHistoryRecordApi as h}from"../api/index.js";import{useState as _}from"../hooks/useState.js";import{isNumber as k}from"lodash-es";import E from"./PersonProfile.vue.js";import L from"./MessageTemplate.vue.js";import{images as H}from"../utils/emoji.js";import{MESSAGE_TYPE as j}from"../constants/index.js";import{useScrollLoading as A}from"../hooks/useScrollLoading.js";const I={key:0,class:"time"},w={key:2,class:"message-box"},P=["data-time"],b=["innerHTML"],D=["src"],x=["href"];var F=e({__name:"ChatMain",setup(e){const F=t(),{state:O,setMsgList:S}=_(),J={page:0,hasMore:!0};async function K(){try{if(!J.hasMore)return;J.page++;const e=await h({sessionKey:O.currentSessionItem.sessionKey,page:J.page});if(!Array.isArray(e)||0===e.length)return J.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");S(J.page>1?[...e,...O.msgList]:e)}catch(e){console.log(e)}}function Y(e){const{chatMessageType:t,messageTemplate:s}=e.content;return t!==j.TEMPLATE||!!s}function z(e,t){var s,n;const{chatMessageType:i,messageTemplate:o}=e.content;if(i===j.TEMPLATE)return"system"===t?2==(null==(s=null==o?void 0:o.setting)?void 0:s.style.id):2!=(null==(n=null==o?void 0:o.setting)?void 0:n.style.id)}function C(e){var t,s;const{chatMessageType:n,messageTemplate:i}=e;return n===j.TEMPLATE&&3==(null==(s=null==(t=null==i?void 0:i.setting)?void 0:t.style)?void 0:s.id)}function G(e,t){var s;const n=k(e.sendTime)?e.sendTime:Date.parse(e.sendTime),i=null==(s=O.msgList[t-1])?void 0:s.sendTime;return n-(0===t?0:k(i)?i:Date.parse(i))>3e5}function R(e){const t=new Date(e),s=Date.now()-t.getTime();if(s<6e4)return"刚刚";if(s<36e5)return Math.ceil(s/1e3/60)+"分钟前";if(v(t))return"今天 "+M(t,"HH:mm");if(T(t))return"昨天 "+M(t,"HH:mm");{const e=t.getFullYear(),s=(new Date).getFullYear();return M(t,e<s?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}return A(F,(()=>{K()}),"top"),s((()=>O.id),(e=>{e&&(Object.assign(J,{page:0,hasMore:!0}),K())}),{immediate:!0}),s((()=>O.isAppendMsg),(e=>{e&&(S([...O.msgList,O.currentMsg]),O.isAppendMsg=!1,async function(){var e,t,s;const n=null!=(t=null==(e=F.value)?void 0:e.scrollHeight)?t:0;null==(s=F.value)||s.scrollTo({top:n,behavior:"auto"})}())}),{immediate:!0}),(e,t)=>(n(),i("div",{class:o(["chat-main",{"home-bg":!a(O).id}]),ref_key:"chatMainRef",ref:F},[r(a(p),{"show-toolbar-tooltip":""},{default:l((()=>[(n(!0),i(m,null,c(a(O).msgList,((e,t)=>(n(),i(m,{key:t},[Y(e)?(n(),i("div",{key:0,class:o(["message-item",{"message-item--mine":e.sender==a(O).userInfo.id}])},[G(e,t)?(n(),i("p",I,u(R(e.sendTime)),1)):d("v-if",!0),z(e,"system")?(n(),f(L,{key:1,data:e},null,8,["data"])):(n(),i("div",w,[r(E,{"user-info":e.sender==a(O).userInfo.id?a(O).userInfo:e},{trigger:l((()=>[r(a(g),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-info"]),e.content?(n(),i("div",{key:0,class:o(["content",{emoji:e.content.chatMessageType===a(j).EMOJI,template:e.content.chatMessageType===a(j).TEMPLATE,"template--3":C(e.content)}]),"data-time":e.__time},[e.content.chatMessageType===a(j).TEXT?(n(),i("pre",{key:0,innerHTML:e.__content},null,8,b)):d("v-if",!0),e.content.chatMessageType===a(j).EMOJI?(n(),i("img",{key:1,src:a(H)[e.__content]},null,8,D)):d("v-if",!0),z(e,"template")?(n(),f(L,{key:2,data:e},null,8,["data"])):d("v-if",!0),e.content.chatMessageType===a(j).IMAGE?(n(),f(a(y),{key:3,width:"240",src:e.__content},null,8,["src"])):d("v-if",!0),e.content.chatMessageType===a(j).FILE?(n(),i("a",{key:4,href:e.content.fileUrl},u(e.__content),9,x)):d("v-if",!0)],10,P)):d("v-if",!0)]))],2)):d("v-if",!0)],64)))),128))])),_:1})],2))}});export{F as default};
|
@@ -65,6 +65,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
65
65
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
66
66
|
panelInstRef: import("vue").Ref<null>;
|
67
67
|
placeholderRef: import("vue").Ref<any>;
|
68
|
+
oldValue: string;
|
68
69
|
currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
|
69
70
|
isDateTime: import("vue").ComputedRef<boolean>;
|
70
71
|
formatRef: import("vue").ComputedRef<string>;
|
@@ -75,6 +76,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
75
76
|
onUpdateShow: (show: boolean) => Promise<void>;
|
76
77
|
onConfirm: (...args: any[]) => Promise<void>;
|
77
78
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
79
|
+
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
78
80
|
NDatePicker: any;
|
79
81
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
80
82
|
updateUnchangedValue: {
|
@@ -19,7 +19,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
contentList: import("vue").ComputedRef<any>;
|
20
20
|
toolbarButton: import("vue").ComputedRef<any>;
|
21
21
|
bottomButton: import("vue").ComputedRef<any>;
|
22
|
-
|
22
|
+
dbParamsList: import("vue").ComputedRef<any>;
|
23
|
+
messageTemplateData: import("vue").ComputedRef<any>;
|
23
24
|
getSystemMsgContent: () => any;
|
24
25
|
handleTemplateClick: (data: AnyObject) => void;
|
25
26
|
NButton: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,openBlock as
|
1
|
+
import{defineComponent as e,computed as t,openBlock as s,createElementBlock as l,Fragment as a,unref as o,createElementVNode as i,toDisplayString as n,withModifiers as c,createBlock as m,createCommentVNode as r,renderList as d,withCtx as p,createTextVNode as u,createVNode as v}from"vue";import{NIcon as f,NButton as y}from"naive-ui";import{ChevronForwardOutline as g,AlertCircleSharp as k}from"@vicons/ionicons5";import _ from"../../../../shared/components/SvgIcon/SvgIcon.vue.js";import{useState as b}from"../hooks/useState.js";const h={class:"default-msg-template__header"},C={class:"title"},T={class:"default-msg-template__body"},j=["src"],S={class:"template-content"},L={key:0,class:"default-msg-template__btn-group"},M=i("i",{class:"chat--iconfont chat--icon-more"},null,-1),x={key:1,class:"describe-msg-template"},B={class:"describe-msg-template__header"},H={class:"describe-msg-template__body"},I={class:"title"},q={class:"txt"},z=i("div",{class:"describe-msg-template__footer"},[u(" 展开全部 "),i("i",{class:"chat--iconfont chat--icon-more"})],-1),D={key:2,class:"system-msg-template"},O=["innerHTML"],P=["onClick"];var R=e({__name:"MessageTemplate",props:{data:{type:Object,required:!0}},setup(e){const R=e,{emit:w}=b(),A=t((()=>R.data.content.messageTemplate.setting)),E=t((()=>A.value.serverSetting)),F=t((()=>(E.value.topRightButton||[])[0])),G=t((()=>(A.value.content||"").split("##").filter((e=>e)))),J=t((()=>E.value.toolbar_button)),K=t((()=>(E.value.bottomButton||[])[0])),N=t((()=>A.value.dbParamsList)),Q=t((()=>R.data.content.messageTemplateData));function U(e){w("template-click",e,R.data)}return(e,t)=>(s(),l(a,null,[1==o(A).style.id?(s(),l("div",{key:0,class:"default-msg-template",onClick:t[2]||(t[2]=()=>U(o(E)))},[i("div",h,[i("span",C,n(o(A).title),1),o(F)?(s(),l("span",{key:0,class:"btn",onClick:t[0]||(t[0]=c((()=>U(o(F))),["stop"]))},n(o(F).title),1)):o(E).address?(s(),m(o(f),{key:1,component:o(g),color:"#969696"},null,8,["component"])):r("v-if",!0)]),i("div",T,[o(A).style.icon?(s(),m(o(_),{key:0,class:"logo","icon-class":o(A).style.icon},null,8,["icon-class"])):o(A).style.image?(s(),l("img",{key:1,class:"logo",src:o(A).style.image},null,8,j)):r("v-if",!0),i("div",S,[(s(!0),l(a,null,d(o(G),(e=>(s(),l("div",{key:e},n(e),1)))),128))])]),o(J)?(s(),l("div",L,[(s(!0),l(a,null,d(o(J),((e,t)=>(s(),m(o(y),{type:"primary",round:"",ghost:"",onClick:c((()=>U(e)),["stop"]),key:t},{default:p((()=>[u(n(e.title),1)])),_:2},1032,["onClick"])))),128))])):r("v-if",!0),o(K)?(s(),l("div",{key:1,class:"default-msg-template__footer",onClick:t[1]||(t[1]=c((()=>U(o(K))),["stop"]))},[u(n(o(K).title)+" ",1),M])):r("v-if",!0)])):r("v-if",!0),3==o(A).style.id?(s(),l("div",x,[i("div",B,n(o(A).title),1),i("div",H,[(s(!0),l(a,null,d(o(N),((e,t)=>(s(),l(a,{key:t},[i("div",I,n(e.desc),1),i("div",q,n(o(Q)[e.p_name]),1)],64)))),128))]),z])):r("v-if",!0),2==o(A).style.id?(s(),l("div",D,[v(o(f),{component:o(k),color:"#ffc200",size:18},null,8,["component"]),i("span",{innerHTML:G.value.join("<br>")},null,8,O),(s(!0),l(a,null,d(o(J),((e,t)=>(s(),l("span",{class:"btn",onClick:()=>U(e),key:t},n(e.title),9,P)))),128))])):r("v-if",!0)],64))}});export{R as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as s,computed as i,watch as
|
1
|
+
import{defineComponent as e,ref as s,computed as i,watch as n,withDirectives as a,openBlock as t,createElementBlock as l,normalizeStyle as r,unref as o,createBlock as u,createCommentVNode as d,createElementVNode as v,Fragment as c,renderList as m,withCtx as p,createTextVNode as f,toDisplayString as k,normalizeClass as h,createVNode as y,vShow as _}from"vue";import{NSpin as S,NTag as g,NAvatar as b,NBadge as x}from"naive-ui";import{useState as M}from"../hooks/useState.js";import{useSession as C}from"../hooks/useSession.js";import{vFlexibleResize as L}from"../../../../shared/directive/flexibleResize.js";import{listSort as j,formatTime as T}from"../utils/index.js";const w={class:"sider-list__filter box-shadow"},I=["onClick"],N={class:"avatar-right"},R={class:"name"},z={class:"msg-tip"},H={class:"msg-tip__content"},U=["innerHTML"];var B=e({__name:"SiderList",setup(e){const B="all",E="unread",O=s(300),V=s();s("");const q=s(!1),A=s([{label:"全部",key:B},{label:"未读",key:E}]),D=s("all"),{state:F,emit:G}=M(),{entrySession:J,unreadTotal:K}=C(F),P=i((()=>Math.min(Math.max(O.value,240),360))),Q=i((()=>j(F.sessionList)));function W(e){!e.id||F.sessionList.map((e=>e.id)).includes(e.id)?F.sessionList.forEach((s=>{s.receiver===e.receiver&&(Object.assign(s,e),e.receiver!==F.currentSessionItem.receiver&&s.unreadNum++)})):F.sessionList.push(e)}function X({distance:e}){O.value=O.value+e}function Y(e,s=o(D)){var i;return s===B||(s===E?(null!=(i=e.unreadNum)?i:0)>0:void 0)}return n([()=>F.isChangeSession,()=>F.isUpdateSession],(([e,s])=>{e&&(W(F.currentSessionItem),F.isChangeSession=!1),s&&(W(F.updateSessionItem),F.isUpdateSession=!1)}),{immediate:!0}),n((()=>K.value),(e=>{const s=Q.value.filter((e=>Y(e,E)));G("unread-message-update",e,s)})),(e,s)=>a((t(),l("section",{class:"sider-list",style:r({width:o(P)+"px"})},[q.value?(t(),u(o(S),{key:0,stroke:"#5585f5"})):d("v-if",!0),d(' <n-input v-else placeholder="输入用户名模糊搜索" v-model:value="keyword" @keyup.enter="handleSearch"></n-input> '),v("div",w,[(t(!0),l(c,null,m(A.value,(e=>(t(),u(o(g),{type:D.value===e.key?"info":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return s=e.key,void(D.value=s);var s}},{default:p((()=>[f(k(e.label)+"("+k(o(K))+") ",1)])),_:2},1032,["type","onClick"])))),128))]),v("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:V},[(t(!0),l(c,null,m(o(Q),((e,s)=>a((t(),l("div",{key:s,onClick:()=>o(J)(e),class:h(["sider-list__box__item",{active:e.id===o(F).id}])},[y(o(b),{round:"",size:"large",src:e.avatar},null,8,["src"]),v("div",N,[v("div",R,[v("h4",null,k(e.name),1),v("span",null,k(o(T)(e.lastMessageSendTime).siderMsgTime),1)]),v("div",z,[v("div",H,[v("div",{innerHTML:e.lastMessageContent},null,8,U)]),y(o(x),{value:e.unreadNum},null,8,["value"])])])],10,I)),[[_,Y(e)]]))),128))],512)],4)),[[o(L),{mode:"VR",onMove:X}]])}});export{B as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{onMounted as e}from"vue";import{useThrottleFn as t}from"@vueuse/core";const o=t((({target:e},t,o)=>{const{clientHeight:r,scrollTop:l,scrollHeight:i}=e;if("top"===o){if(0===l)return;r-l>=i-5&&t()}else r+l>=i-10&&t()}),500);function r(t,r,l="bottom"){e((()=>{t.value&&t.value.addEventListener("scroll",(e=>o(e,r,l)))}))}export{r as useScrollLoading};
|
@@ -1 +1 @@
|
|
1
|
-
import{computed as
|
1
|
+
import{computed as s}from"vue";import{transformLastMessage as e}from"../utils/index.js";function t(t){function n(s){Object.assign(t.currentSessionItem,s,{lastMessageContent:s.lastMessage?e(s.lastMessage):""}),t.id!==t.currentSessionItem.id&&(t.msgList=[],t.id=t.currentSessionItem.id)}return{entrySession:function(s){s.unreadNum=0,n(s),t.isChangeSession=!0},setCurrentSessionItem:n,unreadTotal:s((()=>t.sessionList.reduce(((s,e)=>s+ +e.unreadNum),0))),setSessionList:function(s){t.sessionList=s.map((s=>{const{lastMessage:t}=s;return{...s,lastMessageContent:t?e(t):""}}))}}}export{t as useSession};
|
@@ -1 +1 @@
|
|
1
|
-
import{inject as t}from"vue";import{formatTime as e,transformMessage as n}from"../utils/index.js";import{InjectionIChatState as s,InjectionIChatStompClient as i,InjectionIChatEmits as m}from"../types/index.js";import{MESSAGE_TYPE as o}from"../constants/index.js";function r(){const r=t(s),c=t(i),T=t(m);return{state:r,setMsgList:function(t=[]){r.msgList=t.map((t=>{var s,i,m;return Object.assign(t,{__time:e(t.sendTime).msgTime,__content:(m=t.content.chatMessageType,[o.TEXT,o.TEXT].includes(m)?n(null==(s=t.content)?void 0:s.msg):null==(i=t.content)?void 0:i.msg)}),t})).sort(((t,e)=>new Date(
|
1
|
+
import{inject as t}from"vue";import{formatTime as e,transformMessage as n}from"../utils/index.js";import{InjectionIChatState as s,InjectionIChatStompClient as i,InjectionIChatEmits as m}from"../types/index.js";import{MESSAGE_TYPE as o}from"../constants/index.js";function r(){const r=t(s),c=t(i),T=t(m);return{state:r,setMsgList:function(t=[]){r.msgList=t.map((t=>{var s,i,m;return Object.assign(t,{__time:e(t.sendTime).msgTime,__content:(m=t.content.chatMessageType,[o.TEXT,o.TEXT].includes(m)?n(null==(s=t.content)?void 0:s.msg):null==(i=t.content)?void 0:i.msg)}),t})).sort(((t,e)=>new Date(e.sendTime).getTime()-new Date(t.sendTime).getTime()))},stompClient:c,emit:T}}export{r as useState};
|
@@ -5,4 +5,4 @@ export declare function formatTime(dateStr: string): {
|
|
5
5
|
};
|
6
6
|
export declare function listSort(list: AnyObject[]): AnyObject[];
|
7
7
|
export declare function transformMessage(content: string): string;
|
8
|
-
export declare function transformLastMessage(
|
8
|
+
export declare function transformLastMessage(lastMessage: AnyObject): any;
|