@vipl520/dk-ui 1.0.42 → 1.0.45
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.js +26101 -0
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +26012 -0
- package/dist/web-types.json +1 -1
- package/es/animate-select/src/animate-select.vue.mjs +1 -1
- package/es/animate-select/src/animate-select.vue2.mjs.map +1 -1
- package/es/api/attachment.mjs.map +1 -1
- package/es/attachment/src/attachment.vue.mjs +1 -1
- package/es/attachment/src/attachment.vue2.mjs +1 -7
- package/es/attachment/src/attachment.vue2.mjs.map +1 -1
- package/es/attachment/src/file-icon.vue.mjs +1 -1
- package/es/attachment-dialog/src/attachment-dialog.vue.mjs +1 -1
- package/es/attachment-dialog/src/attachment-dialog.vue2.mjs.map +1 -1
- package/es/attachment-dialog/src/props.mjs.map +1 -1
- package/es/audio-input/src/audio-input.vue.mjs +1 -1
- package/es/audio-list-input/src/audio-list-input.vue.mjs +1 -1
- package/es/audio-list-input/src/audio-list-input.vue2.mjs.map +1 -1
- package/es/box-size-input/src/box-size-input.vue.mjs +1 -1
- package/es/box-size-input/src/box-size-input.vue2.mjs +2 -2
- package/es/box-size-input/src/box-size-input.vue2.mjs.map +1 -1
- package/es/box-size-input/style/index.css +1 -1
- package/es/box-size-input/style/index.scss +1 -1
- package/es/color-input/src/color-input.vue.mjs +1 -1
- package/es/dialog/src/dialog.vue.mjs +1 -1
- package/es/dialog/src/dialog.vue2.mjs +1 -3
- package/es/dialog/src/dialog.vue2.mjs.map +1 -1
- package/es/dialog/style/index.css +1 -1
- package/es/dialog/style/index.scss +1 -1
- package/es/file-input/src/file-input.vue.mjs +1 -1
- package/es/file-input/src/file-input.vue2.mjs.map +1 -1
- package/es/file-list-input/src/file-list-input.vue.mjs +1 -1
- package/es/file-list-input/src/file-list-input.vue2.mjs.map +1 -1
- package/es/form/src/form.vue.mjs +1 -1
- package/es/form/src/form.vue2.mjs.map +1 -1
- package/es/group/src/group.vue.mjs +1 -1
- package/es/group/src/group.vue2.mjs +2 -10
- package/es/group/src/group.vue2.mjs.map +1 -1
- package/es/hot-area-input/src/component/hot-area-content.vue.mjs +1 -1
- package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
- package/es/hot-area-input/src/hot-area-input.vue.mjs +1 -1
- package/es/hot-area-input/src/hot-area-input.vue2.mjs.map +1 -1
- package/es/icon/src/icon.vue.mjs +1 -1
- package/es/icon/src/icon.vue2.mjs.map +1 -1
- package/es/icon-input/src/icon-content.vue.mjs +1 -1
- package/es/icon-input/src/icon-content.vue2.mjs +1 -1
- package/es/icon-input/src/icon-content.vue2.mjs.map +1 -1
- package/es/icon-input/src/icon-dialog.vue.mjs +1 -1
- package/es/icon-input/src/icon-input.vue.mjs +1 -1
- package/es/image-input/src/image-input.vue.mjs +1 -1
- package/es/image-list-input/src/image-list-input.vue.mjs +1 -1
- package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
- package/es/index.mjs +7 -2
- package/es/index.mjs.map +1 -1
- package/es/page-diy/src/components/DiyCloud.vue.mjs +1 -1
- package/es/page-diy/src/components/DiyCloud.vue.mjs.map +1 -1
- package/es/page-diy/src/components/DragBox.vue.mjs +2 -6
- package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
- package/es/page-diy/src/components/DragTool.vue.mjs +2 -6
- package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
- package/es/page-diy/src/components/PreviewPhone.vue.mjs +1 -1
- package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
- package/es/page-diy/src/components/forms/DkEventCreateInput.vue.mjs +1 -1
- package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +10 -12
- package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs.map +1 -1
- package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +1 -3
- package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/index.mjs +1 -8
- package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
- package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs +1 -3
- package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs.map +1 -1
- package/es/page-diy/src/config/rule/web/common/DkViewBulletChat.mjs.map +1 -1
- package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +3 -9
- package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
- package/es/page-diy/src/page-diy.vue.mjs +32 -100
- package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
- package/es/page-diy/src/utils/eventData.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinBlank.vue.mjs +1 -1
- package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +6 -19
- package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs +1 -1
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinTextarea.vue.mjs +1 -1
- package/es/page-diy/src/views/min/DkMinTitle.vue.mjs +1 -1
- package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinVideo.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewCell.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewCell.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +2 -4
- package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewDialog.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewImage.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewImage.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewMusic.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewNavBar.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewTabbar.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewTextarea.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewTitle.vue.mjs +1 -1
- package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
- package/es/page-diy/src/views/web/DkViewVideo.vue.mjs +1 -1
- package/es/page-diy/style/dk-page-diy.css +1 -1
- package/es/page-diy/style/index.css +1 -1
- package/es/poster-input/src/component/poster.vue.mjs +1 -1
- package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewAvatar.vue.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewImage.vue.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewName.vue.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewName.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewQrcode.vue.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewText.vue.mjs +1 -1
- package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/quick-action.vue.mjs +1 -1
- package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +1 -1
- package/es/poster-input/src/poster-input.vue.mjs +1 -1
- package/es/poster-input/src/poster-input.vue2.mjs.map +1 -1
- package/es/poster-input/style/index.scss +2 -4
- package/es/select/src/select.vue.mjs +1 -1
- package/es/select/src/select.vue2.mjs +1 -9
- package/es/select/src/select.vue2.mjs.map +1 -1
- package/es/style-animation-input/src/props.mjs.map +1 -1
- package/es/style-animation-input/src/style-animation-input.vue.mjs +1 -1
- package/es/style-animation-input/src/style-animation-input.vue2.mjs +1 -1
- package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -1
- package/es/style-background-input/src/style-background-input.vue.mjs +1 -1
- package/es/style-border-input/src/style-border-input.vue.mjs +1 -1
- package/es/style-border-input/src/style-border-input.vue2.mjs +1 -1
- package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
- package/es/style-border-input/style/index.css +1 -1
- package/es/style-box-input/src/style-box-input.vue.mjs +1 -1
- package/es/style-box-input/src/style-box-input.vue2.mjs +2 -6
- package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
- package/es/style-font-input/src/style-font-input.vue.mjs +1 -1
- package/es/style-font-input/src/style-font-input.vue2.mjs +3 -21
- package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
- package/es/style-input/src/style-input.vue.mjs +1 -1
- package/es/style-input/src/style-input.vue2.mjs +1 -6
- package/es/style-input/src/style-input.vue2.mjs.map +1 -1
- package/es/style-number-input/src/style-number-input.vue.mjs +1 -1
- package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
- package/es/style-position-input/src/style-position-input.vue.mjs +1 -1
- package/es/style-position-input/src/style-position-input.vue2.mjs +1 -4
- package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
- package/es/style-shadow-input/src/style-shadow-content.vue.mjs +1 -1
- package/es/style-shadow-input/src/style-shadow-content.vue2.mjs +2 -6
- package/es/style-shadow-input/src/style-shadow-content.vue2.mjs.map +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue.mjs +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
- package/es/table/src/components/ComSearch.vue.mjs +1 -1
- package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
- package/es/table/src/components/FieldRender.vue.mjs +1 -1
- package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
- package/es/table/src/components/RecycleDialog.vue.mjs +1 -1
- package/es/table/src/components/RecycleDialog.vue2.mjs +1 -3
- package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
- package/es/table/src/components/header.vue.mjs +1 -1
- package/es/table/src/components/header.vue2.mjs +3 -17
- package/es/table/src/components/header.vue2.mjs.map +1 -1
- package/es/table/src/props.mjs +1 -11
- package/es/table/src/props.mjs.map +1 -1
- package/es/table/src/table.vue.mjs +1 -1
- package/es/table/src/table.vue2.mjs +3 -13
- package/es/table/src/table.vue2.mjs.map +1 -1
- package/es/table/utils/dkTable.mjs +8 -31
- package/es/table/utils/dkTable.mjs.map +1 -1
- package/es/table/utils/dkTableApi.mjs.map +1 -1
- package/es/test/src/test.vue.mjs +1 -1
- package/es/tiny-editor/src/tiny-editor.vue.mjs +1 -1
- package/es/tiny-editor/src/tiny-editor.vue2.mjs +2 -4
- package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
- package/es/tiny-editor/style/index.css +1 -1
- package/es/tiny-editor/style/index.scss +3 -2
- package/es/video-input/src/video-input.vue.mjs +1 -1
- package/es/video-list-input/src/video-list-input.vue.mjs +1 -1
- package/es/video-list-input/src/video-list-input.vue2.mjs.map +1 -1
- package/lib/animate-select/src/animate-select.vue.js +1 -1
- package/lib/animate-select/src/animate-select.vue2.js.map +1 -1
- package/lib/api/attachment.js.map +1 -1
- package/lib/attachment/src/attachment.vue.js +1 -1
- package/lib/attachment/src/attachment.vue2.js +1 -7
- package/lib/attachment/src/attachment.vue2.js.map +1 -1
- package/lib/attachment/src/file-icon.vue.js +1 -1
- package/lib/attachment-dialog/src/attachment-dialog.vue.js +1 -1
- package/lib/attachment-dialog/src/attachment-dialog.vue2.js.map +1 -1
- package/lib/attachment-dialog/src/props.js.map +1 -1
- package/lib/audio-input/src/audio-input.vue.js +1 -1
- package/lib/audio-list-input/src/audio-list-input.vue.js +1 -1
- package/lib/audio-list-input/src/audio-list-input.vue2.js.map +1 -1
- package/lib/box-size-input/src/box-size-input.vue.js +1 -1
- package/lib/box-size-input/src/box-size-input.vue2.js +2 -2
- package/lib/box-size-input/src/box-size-input.vue2.js.map +1 -1
- package/lib/box-size-input/style/index.css +1 -1
- package/lib/box-size-input/style/index.scss +1 -1
- package/lib/color-input/src/color-input.vue.js +1 -1
- package/lib/dialog/src/dialog.vue.js +1 -1
- package/lib/dialog/src/dialog.vue2.js +1 -3
- package/lib/dialog/src/dialog.vue2.js.map +1 -1
- package/lib/dialog/style/index.css +1 -1
- package/lib/dialog/style/index.scss +1 -1
- package/lib/file-input/src/file-input.vue.js +1 -1
- package/lib/file-input/src/file-input.vue2.js.map +1 -1
- package/lib/file-list-input/src/file-list-input.vue.js +1 -1
- package/lib/file-list-input/src/file-list-input.vue2.js.map +1 -1
- package/lib/form/src/form.vue.js +1 -1
- package/lib/form/src/form.vue2.js.map +1 -1
- package/lib/group/src/group.vue.js +1 -1
- package/lib/group/src/group.vue2.js +2 -10
- package/lib/group/src/group.vue2.js.map +1 -1
- package/lib/hot-area-input/src/component/hot-area-content.vue.js +1 -1
- package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
- package/lib/hot-area-input/src/hot-area-input.vue.js +1 -1
- package/lib/hot-area-input/src/hot-area-input.vue2.js.map +1 -1
- package/lib/icon/src/icon.vue.js +1 -1
- package/lib/icon/src/icon.vue2.js.map +1 -1
- package/lib/icon-input/src/icon-content.vue.js +1 -1
- package/lib/icon-input/src/icon-content.vue2.js +1 -1
- package/lib/icon-input/src/icon-content.vue2.js.map +1 -1
- package/lib/icon-input/src/icon-dialog.vue.js +1 -1
- package/lib/icon-input/src/icon-input.vue.js +1 -1
- package/lib/image-input/src/image-input.vue.js +1 -1
- package/lib/image-list-input/src/image-list-input.vue.js +1 -1
- package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
- package/lib/index.js +7 -2
- package/lib/index.js.map +1 -1
- package/lib/page-diy/src/components/DiyCloud.vue.js +1 -1
- package/lib/page-diy/src/components/DiyCloud.vue.js.map +1 -1
- package/lib/page-diy/src/components/DragBox.vue.js +2 -6
- package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
- package/lib/page-diy/src/components/DragTool.vue.js +2 -6
- package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
- package/lib/page-diy/src/components/PreviewPhone.vue.js +1 -1
- package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
- package/lib/page-diy/src/components/forms/DkEventCreateInput.vue.js +1 -1
- package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +10 -12
- package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js.map +1 -1
- package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +1 -3
- package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/index.js +1 -8
- package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
- package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js +1 -3
- package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js.map +1 -1
- package/lib/page-diy/src/config/rule/web/common/DkViewBulletChat.js.map +1 -1
- package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +3 -9
- package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
- package/lib/page-diy/src/page-diy.vue.js +32 -100
- package/lib/page-diy/src/page-diy.vue.js.map +1 -1
- package/lib/page-diy/src/utils/eventData.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinBlank.vue.js +1 -1
- package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +6 -19
- package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js +1 -1
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinTextarea.vue.js +1 -1
- package/lib/page-diy/src/views/min/DkMinTitle.vue.js +1 -1
- package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinVideo.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewCell.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewCell.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +2 -4
- package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewDialog.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewImage.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewImage.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewMusic.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewNavBar.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewSwipe.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewSwipe.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewTabbar.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewTextarea.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewTitle.vue.js +1 -1
- package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
- package/lib/page-diy/src/views/web/DkViewVideo.vue.js +1 -1
- package/lib/page-diy/style/dk-page-diy.css +1 -1
- package/lib/page-diy/style/index.css +1 -1
- package/lib/poster-input/src/component/poster.vue.js +1 -1
- package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewImage.vue.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewName.vue.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewName.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewText.vue.js +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/quick-action.vue.js +1 -1
- package/lib/poster-input/src/component/views/quick-action.vue2.js.map +1 -1
- package/lib/poster-input/src/poster-input.vue.js +1 -1
- package/lib/poster-input/src/poster-input.vue2.js.map +1 -1
- package/lib/poster-input/style/index.scss +2 -4
- package/lib/select/src/select.vue.js +1 -1
- package/lib/select/src/select.vue2.js +1 -9
- package/lib/select/src/select.vue2.js.map +1 -1
- package/lib/style-animation-input/src/props.js.map +1 -1
- package/lib/style-animation-input/src/style-animation-input.vue.js +1 -1
- package/lib/style-animation-input/src/style-animation-input.vue2.js +1 -1
- package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -1
- package/lib/style-background-input/src/style-background-input.vue.js +1 -1
- package/lib/style-border-input/src/style-border-input.vue.js +1 -1
- package/lib/style-border-input/src/style-border-input.vue2.js +1 -1
- package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
- package/lib/style-border-input/style/index.css +1 -1
- package/lib/style-box-input/src/style-box-input.vue.js +1 -1
- package/lib/style-box-input/src/style-box-input.vue2.js +2 -6
- package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
- package/lib/style-font-input/src/style-font-input.vue.js +1 -1
- package/lib/style-font-input/src/style-font-input.vue2.js +3 -21
- package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
- package/lib/style-input/src/style-input.vue.js +1 -1
- package/lib/style-input/src/style-input.vue2.js +0 -5
- package/lib/style-input/src/style-input.vue2.js.map +1 -1
- package/lib/style-number-input/src/style-number-input.vue.js +1 -1
- package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
- package/lib/style-position-input/src/style-position-input.vue.js +1 -1
- package/lib/style-position-input/src/style-position-input.vue2.js +1 -4
- package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
- package/lib/style-shadow-input/src/style-shadow-content.vue.js +1 -1
- package/lib/style-shadow-input/src/style-shadow-content.vue2.js +2 -6
- package/lib/style-shadow-input/src/style-shadow-content.vue2.js.map +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue.js +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
- package/lib/table/src/components/ComSearch.vue.js +1 -1
- package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
- package/lib/table/src/components/FieldRender.vue.js +1 -1
- package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
- package/lib/table/src/components/RecycleDialog.vue.js +1 -1
- package/lib/table/src/components/RecycleDialog.vue2.js +1 -3
- package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
- package/lib/table/src/components/header.vue.js +1 -1
- package/lib/table/src/components/header.vue2.js +3 -17
- package/lib/table/src/components/header.vue2.js.map +1 -1
- package/lib/table/src/props.js +1 -11
- package/lib/table/src/props.js.map +1 -1
- package/lib/table/src/table.vue.js +1 -1
- package/lib/table/src/table.vue2.js +3 -13
- package/lib/table/src/table.vue2.js.map +1 -1
- package/lib/table/utils/dkTable.js +8 -31
- package/lib/table/utils/dkTable.js.map +1 -1
- package/lib/table/utils/dkTableApi.js.map +1 -1
- package/lib/test/src/test.vue.js +1 -1
- package/lib/tiny-editor/src/tiny-editor.vue.js +1 -1
- package/lib/tiny-editor/src/tiny-editor.vue2.js +2 -4
- package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
- package/lib/tiny-editor/style/index.css +1 -1
- package/lib/tiny-editor/style/index.scss +3 -2
- package/lib/video-input/src/video-input.vue.js +1 -1
- package/lib/video-list-input/src/video-list-input.vue.js +1 -1
- package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
- package/package.json +3 -3
@@ -100,12 +100,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
100
100
|
}
|
101
101
|
};
|
102
102
|
vue.watch(position, () => {
|
103
|
-
form.x = parseInt(
|
104
|
-
|
105
|
-
);
|
106
|
-
form.y = parseInt(
|
107
|
-
String((position.top - props.boxSize / 2) / props.boxSize * props.max)
|
108
|
-
);
|
103
|
+
form.x = parseInt(String((position.left - props.boxSize / 2) / props.boxSize * props.max));
|
104
|
+
form.y = parseInt(String((position.top - props.boxSize / 2) / props.boxSize * props.max));
|
109
105
|
});
|
110
106
|
vue.watch(form, () => {
|
111
107
|
let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-shadow-content.vue2.js","sources":["../../../src/style-shadow-input/src/style-shadow-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowContent',\n});\n</script>\n<template>\n <div\n ref=\"el\"\n class=\"dk-style-shadow-content\"\n :style=\"{ '--shadow-box-width': boxSize + 'px' }\"\n >\n <el-form\n label-width=\"60px\"\n label-position=\"left\"\n class=\"shadow-form-content\"\n :size=\"size\"\n >\n <el-form-item label=\"模式\">\n <el-radio-group v-model=\"form.type\">\n <el-radio-button value=\"external\">外部</el-radio-button>\n <el-radio-button value=\"inset\">内部</el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <dk-color-input v-model=\"form.color\" show-alpha></dk-color-input>\n </el-form-item>\n <el-form-item label=\"x轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.x\" type=\"number\"> </el-input>\n <el-select v-model=\"form.x_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"y轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.y\" type=\"number\"> </el-input>\n <el-select v-model=\"form.y_unit\" placeholder=\"请选择\" class=\"w-40px\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"模糊\">\n <div class=\"flex\">\n <el-input v-model=\"form.vague\" type=\"number\"> </el-input>\n <el-select v-model=\"form.vague_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"扩展\">\n <div class=\"flex\">\n <el-input v-model=\"form.extend\" type=\"number\"> </el-input>\n <el-select v-model=\"form.extend_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n </el-form>\n <div class=\"shadow-content-shortcut\">\n <div class=\"default-css m-b-10px\">\n <div class=\"m-b-10px\">常用样式</div>\n <el-button\n v-for=\"(item, key) in props.defaultStyles\"\n :key=\"key\"\n size=\"small\"\n @click=\"setStyle(item)\"\n >{{ item.label }}</el-button\n >\n </div>\n <div\n ref=\"box\"\n class=\"shadow-content-box\"\n :class=\"down ? 'down' : ''\"\n :style=\"{ height: boxSize + 'px', width: boxSize + 'px' }\"\n @click=\"getMouseXY($event, 1)\"\n @mousedown=\"onMousedown\"\n @mouseup=\"down = false\"\n @mousemove=\"getMouseXY($event, 0)\"\n >\n <span id=\"spot\" :style=\"spotStyle\">\n <i id=\"center\" />\n </span>\n <span\n id=\"center-spot\"\n :style=\"{ top: boxSize / 2 + 'px', left: boxSize / 2 + 'px' }\"\n />\n <div class=\"x-hr\" :style=\"{ top: boxSize / 2 + 'px' }\" />\n <div class=\"y-hr\" :style=\"{ left: boxSize / 2 + 'px' }\" />\n <div class=\"line\" :style=\"lineStyle\" />\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\n\n// interface StyleOption {\n// label: string\n// value: string\n// }\nconst props = defineProps({\n boxSize: {\n default: 180,\n type: Number,\n },\n size: {\n default: 'small',\n type: String,\n },\n max: {\n default: 24,\n type: Number,\n },\n modelValue: {\n default: '0px 0px 0px rgba(0, 0, 0, 0)',\n type: String,\n },\n defaultStyles: {\n default: () => {\n return [\n { label: '经典', value: '3px 5px 7px 2px #CBCBCBFF' },\n { label: '扁平', value: '4px 4px 3px -2px #E7E5E5FF' },\n { label: '立体', value: '1px 2px 4px 2px #979797FF' },\n ]\n },\n type: Array as () => any,\n },\n})\nconst form = reactive({\n color: '',\n type: 'external',\n x: 0,\n y: 0,\n vague: 0,\n extend: 0,\n x_unit: 'px',\n y_unit: 'px',\n vague_unit: 'px',\n extend_unit: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst down = ref(false)\nconst position: any = reactive({\n left: 0,\n top: 0,\n})\n\nconst lineStyle = ref('')\nconst box = ref()\nconst spotStyle = computed(() => {\n return {\n left: position.left + 'px',\n top: position.top + 'px',\n }\n})\n\nconst getMouseXY = (e: any, force: any) => {\n if (down.value || force) {\n const _box = box.value.getBoundingClientRect()\n position.left = parseInt(String(e.clientX - _box.x))\n position.top = parseInt(String(e.clientY - _box.y))\n }\n}\n\nwatch(position, () => {\n form.x = parseInt(\n String(((position.left - props.boxSize / 2) / props.boxSize) * props.max)\n )\n form.y = parseInt(\n String(((position.top - props.boxSize / 2) / props.boxSize) * props.max)\n )\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(form, () => {\n let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`\n if (form.type === 'inset') {\n value = value + ' inset'\n }\n emit('update:modelValue', value)\n})\nconst onMousedown = (e: any) => {\n getMouseXY(e, 1)\n down.value = true\n}\n\nconst initStyle = (modelValue: any) => {\n if (modelValue?.indexOf(' inset') > -1) {\n form.type = 'inset'\n modelValue = modelValue.replace(' inset', '')\n }\n const shadowData = modelValue.split('rgba')\n let color, shadowValues: any\n\n if (shadowData.length > 1) {\n // 将颜色值和其他阴影值进行分离\n color = 'rgba' + shadowData[1].trim()\n shadowValues = shadowData[0].trim().split(' ')\n } else {\n shadowValues = shadowData[0].trim().split(' ')\n color = shadowValues.pop()\n }\n form.color = color || '#000'\n form.x = parseInt(shadowValues[0]) || 0\n form.y = parseInt(shadowValues[1]) || 0\n form.vague = parseInt(shadowValues[2]) || 0\n form.extend = parseInt(shadowValues[3]) || 0\n\n const getUnit = (value: any) => {\n let unit = value?.replace(/[-\\d.]/g, '') || 'px'\n if (units.indexOf(unit) === -1) {\n unit = 'px'\n }\n return unit\n }\n form.x_unit = getUnit(shadowValues[0])\n form.y_unit = getUnit(shadowValues[1])\n form.vague_unit = getUnit(shadowValues[2])\n form.extend_unit = getUnit(shadowValues[3])\n position.left = props.boxSize / 2 + (form.x / props.max) * props.boxSize || 0\n position.top = props.boxSize / 2 + (form.y / props.max) * props.boxSize || 0\n}\n\nconst setStyle = (item: any) => {\n const style = item.value\n initStyle(style)\n}\n\nonMounted(() => {\n // let modelValue = props.modelValue\n initStyle(props.modelValue)\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","watch","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHD,IAAM,MAAA,EAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AAmCnC,IAAA,MAAM,OAAOC,YAAS,CAAA;AAAA,MACpB,KAAO,EAAA,EAAA;AAAA,MACP,IAAM,EAAA,UAAA;AAAA,MACN,CAAG,EAAA,CAAA;AAAA,MACH,CAAG,EAAA,CAAA;AAAA,MACH,KAAO,EAAA,CAAA;AAAA,MACP,MAAQ,EAAA,CAAA;AAAA,MACR,MAAQ,EAAA,IAAA;AAAA,MACR,MAAQ,EAAA,IAAA;AAAA,MACR,UAAY,EAAA,IAAA;AAAA,MACZ,WAAa,EAAA,IAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,KAAK,KAAO,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA,CAAA;AACjD,IAAM,MAAA,IAAA,GAAOF,QAAI,KAAK,CAAA,CAAA;AACtB,IA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":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowContent',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-shadow-content\" :style=\"{ '--shadow-box-width': boxSize + 'px' }\">\n <el-form label-width=\"60px\" label-position=\"left\" class=\"shadow-form-content\" :size=\"size\">\n <el-form-item label=\"模式\">\n <el-radio-group v-model=\"form.type\">\n <el-radio-button value=\"external\">外部</el-radio-button>\n <el-radio-button value=\"inset\">内部</el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <dk-color-input v-model=\"form.color\" show-alpha></dk-color-input>\n </el-form-item>\n <el-form-item label=\"x轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.x\" type=\"number\"> </el-input>\n <el-select v-model=\"form.x_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"y轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.y\" type=\"number\"> </el-input>\n <el-select v-model=\"form.y_unit\" placeholder=\"请选择\" class=\"w-40px\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"模糊\">\n <div class=\"flex\">\n <el-input v-model=\"form.vague\" type=\"number\"> </el-input>\n <el-select v-model=\"form.vague_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"扩展\">\n <div class=\"flex\">\n <el-input v-model=\"form.extend\" type=\"number\"> </el-input>\n <el-select v-model=\"form.extend_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n </el-form>\n <div class=\"shadow-content-shortcut\">\n <div class=\"default-css m-b-10px\">\n <div class=\"m-b-10px\">常用样式</div>\n <el-button v-for=\"(item, key) in props.defaultStyles\" :key=\"key\" size=\"small\" @click=\"setStyle(item)\">{{\n item.label\n }}</el-button>\n </div>\n <div\n ref=\"box\"\n class=\"shadow-content-box\"\n :class=\"down ? 'down' : ''\"\n :style=\"{ height: boxSize + 'px', width: boxSize + 'px' }\"\n @click=\"getMouseXY($event, 1)\"\n @mousedown=\"onMousedown\"\n @mouseup=\"down = false\"\n @mousemove=\"getMouseXY($event, 0)\"\n >\n <span id=\"spot\" :style=\"spotStyle\">\n <i id=\"center\" />\n </span>\n <span id=\"center-spot\" :style=\"{ top: boxSize / 2 + 'px', left: boxSize / 2 + 'px' }\" />\n <div class=\"x-hr\" :style=\"{ top: boxSize / 2 + 'px' }\" />\n <div class=\"y-hr\" :style=\"{ left: boxSize / 2 + 'px' }\" />\n <div class=\"line\" :style=\"lineStyle\" />\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\n\n// interface StyleOption {\n// label: string\n// value: string\n// }\nconst props = defineProps({\n boxSize: {\n default: 180,\n type: Number,\n },\n size: {\n default: 'small',\n type: String,\n },\n max: {\n default: 24,\n type: Number,\n },\n modelValue: {\n default: '0px 0px 0px rgba(0, 0, 0, 0)',\n type: String,\n },\n defaultStyles: {\n default: () => {\n return [\n { label: '经典', value: '3px 5px 7px 2px #CBCBCBFF' },\n { label: '扁平', value: '4px 4px 3px -2px #E7E5E5FF' },\n { label: '立体', value: '1px 2px 4px 2px #979797FF' },\n ]\n },\n type: Array as () => any,\n },\n})\nconst form = reactive({\n color: '',\n type: 'external',\n x: 0,\n y: 0,\n vague: 0,\n extend: 0,\n x_unit: 'px',\n y_unit: 'px',\n vague_unit: 'px',\n extend_unit: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst down = ref(false)\nconst position: any = reactive({\n left: 0,\n top: 0,\n})\n\nconst lineStyle = ref('')\nconst box = ref()\nconst spotStyle = computed(() => {\n return {\n left: position.left + 'px',\n top: position.top + 'px',\n }\n})\n\nconst getMouseXY = (e: any, force: any) => {\n if (down.value || force) {\n const _box = box.value.getBoundingClientRect()\n position.left = parseInt(String(e.clientX - _box.x))\n position.top = parseInt(String(e.clientY - _box.y))\n }\n}\n\nwatch(position, () => {\n form.x = parseInt(String(((position.left - props.boxSize / 2) / props.boxSize) * props.max))\n form.y = parseInt(String(((position.top - props.boxSize / 2) / props.boxSize) * props.max))\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(form, () => {\n let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`\n if (form.type === 'inset') {\n value = value + ' inset'\n }\n emit('update:modelValue', value)\n})\nconst onMousedown = (e: any) => {\n getMouseXY(e, 1)\n down.value = true\n}\n\nconst initStyle = (modelValue: any) => {\n if (modelValue?.indexOf(' inset') > -1) {\n form.type = 'inset'\n modelValue = modelValue.replace(' inset', '')\n }\n const shadowData = modelValue.split('rgba')\n let color, shadowValues: any\n\n if (shadowData.length > 1) {\n // 将颜色值和其他阴影值进行分离\n color = 'rgba' + shadowData[1].trim()\n shadowValues = shadowData[0].trim().split(' ')\n } else {\n shadowValues = shadowData[0].trim().split(' ')\n color = shadowValues.pop()\n }\n form.color = color || '#000'\n form.x = parseInt(shadowValues[0]) || 0\n form.y = parseInt(shadowValues[1]) || 0\n form.vague = parseInt(shadowValues[2]) || 0\n form.extend = parseInt(shadowValues[3]) || 0\n\n const getUnit = (value: any) => {\n let unit = value?.replace(/[-\\d.]/g, '') || 'px'\n if (units.indexOf(unit) === -1) {\n unit = 'px'\n }\n return unit\n }\n form.x_unit = getUnit(shadowValues[0])\n form.y_unit = getUnit(shadowValues[1])\n form.vague_unit = getUnit(shadowValues[2])\n form.extend_unit = getUnit(shadowValues[3])\n position.left = props.boxSize / 2 + (form.x / props.max) * props.boxSize || 0\n position.top = props.boxSize / 2 + (form.y / props.max) * props.boxSize || 0\n}\n\nconst setStyle = (item: any) => {\n const style = item.value\n initStyle(style)\n}\n\nonMounted(() => {\n // let modelValue = props.modelValue\n initStyle(props.modelValue)\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","watch","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8ED,IAAM,MAAA,EAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AAmCnC,IAAA,MAAM,OAAOC,YAAS,CAAA;AAAA,MACpB,KAAO,EAAA,EAAA;AAAA,MACP,IAAM,EAAA,UAAA;AAAA,MACN,CAAG,EAAA,CAAA;AAAA,MACH,CAAG,EAAA,CAAA;AAAA,MACH,KAAO,EAAA,CAAA;AAAA,MACP,MAAQ,EAAA,CAAA;AAAA,MACR,MAAQ,EAAA,IAAA;AAAA,MACR,MAAQ,EAAA,IAAA;AAAA,MACR,UAAY,EAAA,IAAA;AAAA,MACZ,WAAa,EAAA,IAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,KAAK,KAAO,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA,CAAA;AACjD,IAAM,MAAA,IAAA,GAAOF,QAAI,KAAK,CAAA,CAAA;AACtB,IAAA,MAAM,WAAgBE,YAAS,CAAA;AAAA,MAC7B,IAAM,EAAA,CAAA;AAAA,MACN,GAAK,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;AAED,IAAM,MAA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K,WAAc,GAAA,OAAA,CAAQ,YAAa,CAAA,CAAC,CAAC,CAAA,CAAA;AAC1C,MAAS,QAAA,CAAA,IAAA,GAAO,MAAM,OAAU,GAAA,CAAA,GAAK,KAAK,CAAI,GAAA,KAAA,CAAM,GAAO,GAAA,KAAA,CAAM,OAAW,IAAA,CAAA,CAAA;AAC5E,MAAS,QAAA,CAAA,GAAA,GAAM,MAAM,OAAU,GAAA,CAAA,GAAK,KAAK,CAAI,GAAA,KAAA,CAAM,GAAO,GAAA,KAAA,CAAM,OAAW,IAAA,CAAA,CAAA;AAAA,KAC7E,CAAA;AAEA,IAAM,MAAA,QAAA,GAAW,CAAC,IAAc,KAAA;AAC9B,MAAA,MAAM,QAAQ,IAAK,CAAA,KAAA,CAAA;AACnB,MAAA,SAAA,CAAU,KAAK,CAAA,CAAA;AAAA,KACjB,CAAA;AAEA,IAAAC,aAAA,CAAU,MAAM;AAEd,MAAA,SAAA,CAAU,MAAM,UAAU,CAAA,CAAA;AAAA,KAC3B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var styleShadowInput_vue_vue_type_script_setup_true_lang = require('./style-shadow-input.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _StyleShadowInput = /* @__PURE__ */ _pluginVue_exportHelper.default(styleShadowInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _StyleShadowInput = /* @__PURE__ */ _pluginVue_exportHelper.default(styleShadowInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\style-shadow-input\\src\\style-shadow-input.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _StyleShadowInput;
|
11
11
|
//# sourceMappingURL=style-shadow-input.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-shadow-input.vue2.js","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item
|
1
|
+
{"version":3,"file":"style-shadow-input.vue2.js","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item v-for=\"(item, key) in shadows\" :key=\"key\" :title=\"item\" :name=\"key + ''\">\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-collapse-item>\n </el-collapse>\n <ul v-else class=\"shadow-list\">\n <li v-for=\"(item, key) in shadows\" :key=\"key\">\n <el-input v-model=\"shadows[key]\" disabled>\n <template #append>\n <el-popover placement=\"right-start\" title=\"\" width=\"380\" trigger=\"click\">\n <template #reference>\n <el-button>设置</el-button>\n </template>\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-popover>\n </template>\n </el-input>\n <dk-icon class=\"close-shadow\" icon=\"Close\" hover-color=\"#f00\" @click=\"delShadow(key)\"></dk-icon>\n </li>\n </ul>\n <el-button class=\"m-t-10px w-100%\" @click=\"addShadow\">\n <dk-icon icon=\"Plus\"></dk-icon>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shadowInputProps } from './props'\nimport { computed, onMounted, ref, watch } from 'vue'\n\n\n\nconst props = defineProps(shadowInputProps)\n\nconst shadows: any = ref([])\n\nconst activeName = ref('1')\nconst addShadow = () => {\n shadows.value.push('1px 1px 1px 1px #000')\n activeName.value = shadows.value.length - 1 + ''\n}\n\nconst delShadow = (index: number) => {\n shadows.value.splice(index, 1)\n}\n\nconst init = () => {\n if (props.modelValue.boxShadow) {\n shadows.value = props.modelValue.boxShadow.split(',')\n }\n}\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst boxShadow = computed(() => {\n return shadows.value.join(',')\n})\n\nwatch(boxShadow, (n, o) => {\n emit('update:modelValue', { boxShadow: boxShadow.value })\n emit('change', { boxShadow: boxShadow.value })\n})\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n { deep: true }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","computed","watch","onMounted"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAsCD,IAAM,MAAA,OAAA,GAAeC,OAAI,CAAA,EAAE,CAAA,CAAA;AAE3B,IAAM,MAAA,UAAA,GAAaA,QAAI,GAAG,CAAA,CAAA;AAC1B,IAAA,MAAM,YAAY,MAAM;AACtB,MAAQ,OAAA,CAAA,KAAA,CAAM,KAAK,sBAAsB,CAAA,CAAA;AACzC,MAAA,UA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;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var ComSearch_vue_vue_type_script_setup_true_lang = require('./ComSearch.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var ComSearch = /* @__PURE__ */ _pluginVue_exportHelper.default(ComSearch_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var ComSearch = /* @__PURE__ */ _pluginVue_exportHelper.default(ComSearch_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\ComSearch.vue"]]);
|
9
9
|
|
10
10
|
exports.default = ComSearch;
|
11
11
|
//# sourceMappingURL=ComSearch.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ComSearch.vue2.js","sources":["../../../../src/table/src/components/ComSearch.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"table-com-search\">\n <el-form\n label-position=\"top\"\n :model=\"DkTable.comSearch.form\"\n @submit.prevent=\"\"\n @keyup.enter=\"onComSearch\"\n >\n <el-row>\n <template v-for=\"(item, idx) in DkTable.table.column\" :key=\"idx\">\n <template v-if=\"item.operator !== false\">\n <!-- 自定义渲染 component、slot -->\n <el-col\n v-if=\"\n item.comSearchRender == 'customRender' ||\n item.comSearchRender == 'slot'\n \"\n :span=\"spans.common\"\n >\n <!-- 外部可以使用 :deep() 选择器修改css样式 -->\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input\">\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"item.comSearchComponent\"\n v-if=\"item.comSearchRender == 'customRender'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n v-bind=\"item.comSearchProps\"\n :placeholder=\"item.operatorPlaceholder\"\n ></component>\n\n <!-- 自定义渲染-slot -->\n <slot\n v-else-if=\"item.comSearchRender == 'slot'\"\n :name=\"item.comSearchSlotName\"\n ></slot>\n </div>\n </div>\n </el-col>\n\n <!-- 时间范围 -->\n <el-col\n v-else-if=\"\n item.render == 'datetime' &&\n (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\n \"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-date-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : [new Date(), new Date()]\n \"\n :type=\"\n item.comSearchRender == 'date'\n ? 'daterange'\n : 'datetimerange'\n \"\n range-separator=\"到\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n :value-format=\"\n item.comSearchRender == 'date'\n ? 'YYYY-MM-DD'\n : 'YYYY-MM-DD HH:mm:ss'\n \"\n :teleported=\"false\"\n />\n </div>\n </div>\n </el-col>\n <!--时间范围-->\n <el-col\n v-else-if=\"\n item.render == 'time' &&\n (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\n \"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-time-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n is-range\n range-separator=\"到\"\n format=\"HH:mm:ss\"\n value-format=\"HH:mm:ss\"\n start-placeholder=\"开始时间\"\n end-placeholder=\"结束时间\"\n ></el-time-picker>\n </div>\n </div>\n </el-col>\n <el-col v-else :span=\"spans.common\">\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <!-- 数字范围 -->\n <div\n v-if=\"\n item.operator == 'RANGE' || item.operator == 'NOT RANGE'\n \"\n class=\"com-search-col-input-range\"\n >\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-start']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n <div class=\"range-separator\">到</div>\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-end']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n <!-- 是否 [NOT] NULL -->\n <div\n v-else-if=\"\n item.operator == 'NULL' || item.operator == 'NOT NULL'\n \"\n class=\"com-search-col-input\"\n >\n <el-checkbox\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :label=\"item.operator\"\n size=\"large\"\n ></el-checkbox>\n </div>\n <div v-else-if=\"item.operator\" class=\"com-search-col-input\">\n <!-- 时间筛选 -->\n <el-date-picker\n v-if=\"\n item.render == 'datetime' ||\n item.comSearchRender == 'date'\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :type=\"item.comSearchRender == 'date' ? 'date' : 'datetime'\"\n :value-format=\"\n item.comSearchRender == 'date'\n ? 'YYYY-MM-DD'\n : 'YYYY-MM-DD HH:mm:ss'\n \"\n :placeholder=\"item.operatorPlaceholder\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : new Date()\n \"\n :teleported=\"false\"\n />\n <!-- 年筛选 -->\n <el-date-picker\n v-if=\"item.render == 'year'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n type=\"year\"\n value-format=\"YYYY\"\n style=\"width: 100%\"\n :placeholder=\"item.operatorPlaceholder\"\n />\n <!-- tag、tags、select -->\n <el-select\n v-else-if=\"\n (item.render == 'tag' ||\n item.render == 'tags' ||\n item.comSearchRender == 'select') &&\n item.replaceValue\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </el-select>\n\n <!-- 远程 select -->\n <dk-select\n v-else-if=\"item.comSearchRender == 'remoteSelect'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n filterable\n :placeholder=\"item.operatorPlaceholder\"\n :remote-url=\"item.remoteUrl\"\n ></dk-select>\n\n <!-- 开关 -->\n <el-select\n v-else-if=\"item.render == 'switch'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <template v-if=\"!isEmpty(item.replaceValue)\">\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </template>\n <template v-else>\n <el-option label=\"开\" value=\"1\" />\n <el-option label=\"关\" value=\"0\" />\n </template>\n </el-select>\n\n <!-- 字符串 -->\n <el-input\n v-else\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n </div>\n </el-col>\n </template>\n </template>\n <el-col :xs=\"24\" :sm=\"6\">\n <div class=\"com-search-col pl-20\">\n <el-button v-blur type=\"primary\" @click=\"onComSearch\">\n 搜索</el-button\n >\n <el-button @click=\"onResetForm()\">重置</el-button>\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, ref, computed } from 'vue'\nimport { isEmpty } from 'lodash-es'\nimport { useElementSize } from '@vueuse/core'\nimport DkTableClass from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as DkTableClass\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\nconst spans = computed(() => {\n if (width.value < 768) {\n return {\n common: 24,\n datetime: 24,\n }\n }\n if (width.value < 900) {\n return {\n common: 12,\n datetime: 24,\n }\n }\n if (width.value < 1200) {\n return {\n common: 8,\n datetime: 16,\n }\n }\n return {\n common: 6,\n datetime: 12,\n }\n})\nconst onComSearch = () => {\n const comSearchData: comSearchData[] = []\n for (const key in DkTable.comSearch.form) {\n if (!DkTable.comSearch.fieldData.has(key)) {\n continue\n }\n let val = ''\n const fieldDataTemp = DkTable.comSearch.fieldData.get(key)\n if (\n fieldDataTemp.render == 'datetime' &&\n (fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (\n DkTable.comSearch.form[key] &&\n DkTable.comSearch.form[key].length >= 2\n ) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n if (fieldDataTemp.comSearchRender == 'date') {\n val =\n DkTable.comSearch.form[key][0] +\n ' 00:00:00' +\n ',' +\n DkTable.comSearch.form[key][1] +\n ' 23:59:59'\n } else {\n val =\n DkTable.comSearch.form[key][0] +\n ',' +\n DkTable.comSearch.form[key][1]\n }\n }\n } else if (\n fieldDataTemp.render == 'time' &&\n (fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (\n DkTable.comSearch.form[key] &&\n DkTable.comSearch.form[key].length >= 2\n ) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n // if (fieldDataTemp.comSearchRender == 'date') {\n // val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n // } else {\n val =\n DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n // console.log('val', val, DkTable.comSearch.form[key])\n // }\n }\n } else if (\n fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE'\n ) {\n // 普通的范围筛选,DkTable在初始化时已准备好start和end字段\n if (\n !DkTable.comSearch.form[key + '-start'] &&\n !DkTable.comSearch.form[key + '-end']\n ) {\n continue\n }\n val =\n DkTable.comSearch.form[key + '-start'] +\n ',' +\n DkTable.comSearch.form[key + '-end']\n } else if (DkTable.comSearch.form[key]) {\n val = DkTable.comSearch.form[key]\n }\n\n if (val) {\n comSearchData.push({\n field: key,\n val,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n\n // console.log('comSearchData', comSearchData)\n DkTable.onTableAction('com-search', comSearchData)\n}\n\nconst onResetForm = () => {\n // 封装好的onResetForm在此处不能使用\n for (const key in DkTable.comSearch.form) {\n DkTable.comSearch.form[key] = ''\n }\n onComSearch()\n}\n</script>\n"],"names":["inject","ref","useElementSize","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiRA,IAAM,MAAA,OAAA,GAAUA,WAAO,SAAS,CAAA,CAAA;AAChC,IAAM,MAAA,EAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAM,MAAA,KAAA,GAAQC,aAAS,MAAM;AAC3B,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,IAAM,EAAA;AACtB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,CAAA;AAAA,UACR,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YACP,GAAA;AAAA,YACA,UAAU,aAAc,CAAA,QAAA;AAAA,YACxB,QAAQ,aAAc,CAAA,MAAA;AAAA,WACvB,CAAA,CAAA;AAAA,SACH;AAAA,OACF;AAGA,MAAQ,OAAA,CAAA,aAAA,CAAc,cAAc,aAAa,CAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AAExB,MAAW,KAAA,MAAA,GAAA,IAAO,OAAQ,CAAA,SAAA,CAAU,IAAM,EAAA;AACxC,QAAQ,OAAA,CAAA,SAAA,CAAU,IAAK,CAAA,GAAG,CAAI,GAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAY,WAAA,EAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"ComSearch.vue2.js","sources":["../../../../src/table/src/components/ComSearch.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"table-com-search\">\n <el-form label-position=\"top\" :model=\"DkTable.comSearch.form\" @submit.prevent=\"\" @keyup.enter=\"onComSearch\">\n <el-row>\n <template v-for=\"(item, idx) in DkTable.table.column\" :key=\"idx\">\n <template v-if=\"item.operator !== false\">\n <!-- 自定义渲染 component、slot -->\n <el-col\n v-if=\"item.comSearchRender == 'customRender' || item.comSearchRender == 'slot'\"\n :span=\"spans.common\"\n >\n <!-- 外部可以使用 :deep() 选择器修改css样式 -->\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input\">\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"item.comSearchComponent\"\n v-if=\"item.comSearchRender == 'customRender'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n v-bind=\"item.comSearchProps\"\n :placeholder=\"item.operatorPlaceholder\"\n ></component>\n\n <!-- 自定义渲染-slot -->\n <slot v-else-if=\"item.comSearchRender == 'slot'\" :name=\"item.comSearchSlotName\"></slot>\n </div>\n </div>\n </el-col>\n\n <!-- 时间范围 -->\n <el-col\n v-else-if=\"item.render == 'datetime' && (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-date-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : [new Date(), new Date()]\n \"\n :type=\"item.comSearchRender == 'date' ? 'daterange' : 'datetimerange'\"\n range-separator=\"到\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n :value-format=\"item.comSearchRender == 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss'\"\n :teleported=\"false\"\n />\n </div>\n </div>\n </el-col>\n <!--时间范围-->\n <el-col\n v-else-if=\"item.render == 'time' && (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-time-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n is-range\n range-separator=\"到\"\n format=\"HH:mm:ss\"\n value-format=\"HH:mm:ss\"\n start-placeholder=\"开始时间\"\n end-placeholder=\"结束时间\"\n ></el-time-picker>\n </div>\n </div>\n </el-col>\n <el-col v-else :span=\"spans.common\">\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <!-- 数字范围 -->\n <div v-if=\"item.operator == 'RANGE' || item.operator == 'NOT RANGE'\" class=\"com-search-col-input-range\">\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-start']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n <div class=\"range-separator\">到</div>\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-end']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n <!-- 是否 [NOT] NULL -->\n <div v-else-if=\"item.operator == 'NULL' || item.operator == 'NOT NULL'\" class=\"com-search-col-input\">\n <el-checkbox\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :label=\"item.operator\"\n size=\"large\"\n ></el-checkbox>\n </div>\n <div v-else-if=\"item.operator\" class=\"com-search-col-input\">\n <!-- 时间筛选 -->\n <el-date-picker\n v-if=\"item.render == 'datetime' || item.comSearchRender == 'date'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :type=\"item.comSearchRender == 'date' ? 'date' : 'datetime'\"\n :value-format=\"item.comSearchRender == 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss'\"\n :placeholder=\"item.operatorPlaceholder\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : new Date()\n \"\n :teleported=\"false\"\n />\n <!-- 年筛选 -->\n <el-date-picker\n v-if=\"item.render == 'year'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n type=\"year\"\n value-format=\"YYYY\"\n style=\"width: 100%\"\n :placeholder=\"item.operatorPlaceholder\"\n />\n <!-- tag、tags、select -->\n <el-select\n v-else-if=\"\n (item.render == 'tag' || item.render == 'tags' || item.comSearchRender == 'select') &&\n item.replaceValue\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </el-select>\n\n <!-- 远程 select -->\n <dk-select\n v-else-if=\"item.comSearchRender == 'remoteSelect'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n filterable\n :placeholder=\"item.operatorPlaceholder\"\n :remote-url=\"item.remoteUrl\"\n ></dk-select>\n\n <!-- 开关 -->\n <el-select\n v-else-if=\"item.render == 'switch'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <template v-if=\"!isEmpty(item.replaceValue)\">\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </template>\n <template v-else>\n <el-option label=\"开\" value=\"1\" />\n <el-option label=\"关\" value=\"0\" />\n </template>\n </el-select>\n\n <!-- 字符串 -->\n <el-input\n v-else\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n </div>\n </el-col>\n </template>\n </template>\n <el-col :xs=\"24\" :sm=\"6\">\n <div class=\"com-search-col pl-20\">\n <el-button v-blur type=\"primary\" @click=\"onComSearch\"> 搜索</el-button>\n <el-button @click=\"onResetForm()\">重置</el-button>\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, ref, computed } from 'vue'\nimport { isEmpty } from 'lodash-es'\nimport { useElementSize } from '@vueuse/core'\nimport DkTableClass from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as DkTableClass\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\nconst spans = computed(() => {\n if (width.value < 768) {\n return {\n common: 24,\n datetime: 24,\n }\n }\n if (width.value < 900) {\n return {\n common: 12,\n datetime: 24,\n }\n }\n if (width.value < 1200) {\n return {\n common: 8,\n datetime: 16,\n }\n }\n return {\n common: 6,\n datetime: 12,\n }\n})\nconst onComSearch = () => {\n const comSearchData: comSearchData[] = []\n for (const key in DkTable.comSearch.form) {\n if (!DkTable.comSearch.fieldData.has(key)) {\n continue\n }\n let val = ''\n const fieldDataTemp = DkTable.comSearch.fieldData.get(key)\n if (\n fieldDataTemp.render == 'datetime' &&\n (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (DkTable.comSearch.form[key] && DkTable.comSearch.form[key].length >= 2) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n if (fieldDataTemp.comSearchRender == 'date') {\n val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n } else {\n val = DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n }\n }\n } else if (\n fieldDataTemp.render == 'time' &&\n (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (DkTable.comSearch.form[key] && DkTable.comSearch.form[key].length >= 2) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n // if (fieldDataTemp.comSearchRender == 'date') {\n // val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n // } else {\n val = DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n // console.log('val', val, DkTable.comSearch.form[key])\n // }\n }\n } else if (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE') {\n // 普通的范围筛选,DkTable在初始化时已准备好start和end字段\n if (!DkTable.comSearch.form[key + '-start'] && !DkTable.comSearch.form[key + '-end']) {\n continue\n }\n val = DkTable.comSearch.form[key + '-start'] + ',' + DkTable.comSearch.form[key + '-end']\n } else if (DkTable.comSearch.form[key]) {\n val = DkTable.comSearch.form[key]\n }\n\n if (val) {\n comSearchData.push({\n field: key,\n val,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n\n // console.log('comSearchData', comSearchData)\n DkTable.onTableAction('com-search', comSearchData)\n}\n\nconst onResetForm = () => {\n // 封装好的onResetForm在此处不能使用\n for (const key in DkTable.comSearch.form) {\n DkTable.comSearch.form[key] = ''\n }\n onComSearch()\n}\n</script>\n"],"names":["inject","ref","useElementSize","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuNA,IAAM,MAAA,OAAA,GAAUA,WAAO,SAAS,CAAA,CAAA;AAChC,IAAM,MAAA,EAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAM,MAAA,KAAA,GAAQC,aAAS,MAAM;AAC3B,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAA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,CAAK,GAAG,CAAA,CAAA;AAAA,SAClC;AAEA,QAAA,IAAI,GAAK,EAAA;AACP,UAAA,aAAA,CAAc,IAAK,CAAA;AAAA,YACjB,KAAO,EAAA,GAAA;AAAA,YACP,GAAA;AAAA,YACA,UAAU,aAAc,CAAA,QAAA;AAAA,YACxB,QAAQ,aAAc,CAAA,MAAA;AAAA,WACvB,CAAA,CAAA;AAAA,SACH;AAAA,OACF;AAGA,MAAQ,OAAA,CAAA,aAAA,CAAc,cAAc,aAAa,CAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AAExB,MAAW,KAAA,MAAA,GAAA,IAAO,OAAQ,CAAA,SAAA,CAAU,IAAM,EAAA;AACxC,QAAQ,OAAA,CAAA,SAAA,CAAU,IAAK,CAAA,GAAG,CAAI,GAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAY,WAAA,EAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var FieldRender_vue_vue_type_script_setup_true_lang = require('./FieldRender.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var DkFieldRender = /* @__PURE__ */ _pluginVue_exportHelper.default(FieldRender_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var DkFieldRender = /* @__PURE__ */ _pluginVue_exportHelper.default(FieldRender_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\FieldRender.vue"]]);
|
9
9
|
|
10
10
|
exports.default = DkFieldRender;
|
11
11
|
//# sourceMappingURL=FieldRender.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FieldRender.vue2.js","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon\n v-if=\"fieldValue || field.default\"\n :icon=\"fieldValue ? fieldValue : field.default\"\n />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{\n field.replaceValue ? field.replaceValue[tag] ?? tag : tag\n }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{\n field.replaceValue\n ? field.replaceValue[fieldValue] ?? fieldValue\n : fieldValue\n }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime'\">\n {{\n !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined)\n }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'tipButton' &&\n ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' &&\n ((btn.name == 'delete' && DkTable.auth('del')) ||\n btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip\n :disabled=\"!btn.title\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) ||\n btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { openUrl, timeFormat } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : ''\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name, props)\n}\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent","inject","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;AAqQD,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AAUhC,IAAA,MAAM,SAAiB,GAAAC,OAAA,CAAI,KAAM,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC3C,IAAA,MAAM,aAAaA,OAAI,CAAA,KAAA,CAAM,IAAI,SAAU,CAAA,KAAK,KAAK,EAAE,CAAA,CAAA;AAEvD,IAAA,IAAI,UAAU,KAAS,IAAA,SAAA,CAAU,MAAM,OAAQ,CAAA,GAAG,IAAI,CAAI,CAAA,EAAA;AACxD,MAAA,MAAM,YAAe,GAAA,SAAA,CAAU,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAC9C,MAAA,MAAM,MAAWA,OAAI,CAAA,KAAA,CAAM,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"FieldRender.vue2.js","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon v-if=\"fieldValue || field.default\" :icon=\"fieldValue ? fieldValue : field.default\" />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[tag] ?? tag : tag }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] ?? fieldValue : fieldValue }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime'\">\n {{ !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined) }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"btn.render == 'tipButton' && ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' && ((btn.name == 'delete' && DkTable.auth('del')) || btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip :disabled=\"!btn.title\" :content=\"btn.title ?? ''\" placement=\"top\">\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) || btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { openUrl, timeFormat } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : ''\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name, props)\n}\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent","inject","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;AAgPD,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AAUhC,IAAA,MAAM,SAAiB,GAAAC,OAAA,CAAI,KAAM,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC3C,IAAA,MAAM,aAAaA,OAAI,CAAA,KAAA,CAAM,IAAI,SAAU,CAAA,KAAK,KAAK,EAAE,CAAA,CAAA;AAEvD,IAAA,IAAI,UAAU,KAAS,IAAA,SAAA,CAAU,MAAM,OAAQ,CAAA,GAAG,IAAI,CAAI,CAAA,EAAA;AACxD,MAAA,MAAM,YAAe,GAAA,SAAA,CAAU,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAC9C,MAAA,MAAM,MAAWA,OAAI,CAAA,KAAA,CAAM,IAAI,YAAa,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAC/C,MAAA,KAAA,IAAS,KAAQ,GAAA,CAAA,EAAG,KAAQ,GAAA,YAAA,CAAa,QAAQ,KAAS,EAAA,EAAA;AACxD,QAAI,GAAA,CAAA,KAAA,GAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var RecycleDialog_vue_vue_type_script_setup_true_lang = require('./RecycleDialog.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var RecycleDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(RecycleDialog_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var RecycleDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(RecycleDialog_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\RecycleDialog.vue"]]);
|
9
9
|
|
10
10
|
exports.default = RecycleDialog;
|
11
11
|
//# sourceMappingURL=RecycleDialog.vue.js.map
|
@@ -75,9 +75,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
75
75
|
const destroySelect = () => {
|
76
76
|
destroy(getSelectionIds());
|
77
77
|
};
|
78
|
-
const enableBatchOpt = vue.computed(
|
79
|
-
() => DkTable.recycleTable.selection.length > 0
|
80
|
-
);
|
78
|
+
const enableBatchOpt = vue.computed(() => DkTable.recycleTable.selection.length > 0);
|
81
79
|
return (_ctx, _cache) => {
|
82
80
|
const _component_dk_icon = vue.resolveComponent("dk-icon");
|
83
81
|
const _component_el_button = vue.resolveComponent("el-button");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RecycleDialog.vue2.js","sources":["../../../../src/table/src/components/RecycleDialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'RecycleDialog',\n});\n</script>\n<template>\n <dk-dialog
|
1
|
+
{"version":3,"file":"RecycleDialog.vue2.js","sources":["../../../../src/table/src/components/RecycleDialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'RecycleDialog',\n});\n</script>\n<template>\n <dk-dialog v-model=\"DkTable.recycleTable.showDialog\" title=\"回收站\" width=\"1000px\" class=\"dk-table\">\n <div class=\"dk-table-header\">\n <el-button class=\"table-header-operate\" type=\"info\" @click=\"DkTable.onTableHeaderAction('refreshRecycle')\">\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n <el-button class=\"table-header-operate\" type=\"primary\" :disabled=\"!enableBatchOpt\" @click=\"restoreSelect()\">\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原</span>\n </el-button>\n <el-button class=\"table-header-operate\" type=\"danger\" :disabled=\"!enableBatchOpt\" @click=\"destroySelect()\">\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">销毁</span>\n </el-button>\n <el-popconfirm\n confirm-button-text=\"还原\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要还原全部?\"\n @confirm=\"restore(null)\"\n >\n <template #reference>\n <div class=\"m-l-6px\">\n <el-button class=\"table-header-operate\" type=\"success\">\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <el-popconfirm\n confirm-button-text=\"清空\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要清空全部?\"\n @confirm=\"destroy(null)\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-button class=\"table-header-operate\" type=\"danger\">\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">清空全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <div class=\"table-search\">\n <el-input\n v-model=\"DkTable.recycleTable.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n </div>\n <!--表格s-->\n <el-table\n v-loading=\"DkTable.recycleTable.loading\"\n :data=\"DkTable.recycleTable.data\"\n class=\"dk-data-table\"\n @selection-change=\"onSelectionChange\"\n >\n <el-table-column\n v-for=\"(item, key) in DkTable.recycleTable.column\"\n v-bind=\"{ ...item }\"\n :key=\"key\"\n ></el-table-column>\n <!-- </template>-->\n <el-table-column label=\"操作\" align=\"right\">\n <template #default=\"{ row }\">\n <el-button icon=\"RefreshLeft\" type=\"primary\" size=\"small\" @click=\"restore([row.id])\"> 还原 </el-button>\n <el-button icon=\"CloseBold\" type=\"danger\" size=\"small\" @click=\"destroy([row.id])\"> 销毁 </el-button>\n </template>\n </el-table-column>\n </el-table>\n <!--表格e-->\n </dk-dialog>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport { debounce } from '@vipl520/utils'\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-recycle-search', {\n keyword: DkTable.recycleTable.filter!.quickSearch,\n })\n}\n\n/*\n * 记录选择的项\n */\nconst onSelectionChange = (selection: TableRow[]) => {\n DkTable.onTableAction('selection-recycle-change', selection)\n}\n\n/**\n * 销毁\n */\nconst destroy = (ids: any) => {\n DkTable.api.destroy(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\n/**\n * 还原\n */\nconst restore = (ids: any) => {\n DkTable.api.restore(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\nconst getSelectionIds = () => {\n const ids: string[] = []\n DkTable.recycleTable.selection?.forEach((item) => {\n ids.push(item[DkTable.recycleTable.pk!])\n })\n return ids\n}\n\nconst restoreSelect = () => {\n restore(getSelectionIds())\n}\n\nconst destroySelect = () => {\n destroy(getSelectionIds())\n}\n\nconst enableBatchOpt = computed(() => DkTable.recycleTable.selection!.length > 0)\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent","inject","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;AAsFD,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AAEhC,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,oBAAoB,sBAAwB,EAAA;AAAA,QAClD,OAAA,EAAS,OAAQ,CAAA,YAAA,CAAa,MAAQ,CAAA,WAAA;AAAA,OACvC,CAAA,CAAA;AAAA,KACH,CAAA;AAKA,IAAM,MAAA,iBAAA,GAAoB,CAAC,SAA0B,KAAA;AACnD,MAAQ,OAAA,CAAA,aAAA,CAAc,4BAA4B,SAAS,CAAA,CAAA;AAAA,KAC7D,CAAA;AAKA,IAAM,MAAA,OAAA,GAAU,CAAC,GAAa,KAAA;AAC5B,MAAA,OAAA,CAAQ,IAAI,OAAQ,CAAA,GAAG,CAAE,CAAA,IAAA,CAAK,CAAC,GAAQ,KAAA;AACrC,QAAA,OAAA,CAAQ,oBAAoB,gBAAgB,CAAA,CAAA;AAAA,OAC7C,CAAA,CAAA;AAAA,KACH,CAAA;AAKA,IAAM,MAAA,OAAA,GAAU,CAAC,GAAa,KAAA;AAC5B,MAAA,OAAA,CAAQ,IAAI,OAAQ,CAAA,GAAG,CAAE,CAAA,IAAA,CAAK,CAAC,GAAQ,KAAA;AACrC,QAAA,OAAA,CAAQ,oBAAoB,gBAAgB,CAAA,CAAA;AAAA,OAC7C,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAA,MAAM,kBAAkB,MAAM;AAC5B,MAAA,MAAM,MAAgB,EAAC,CAAA;AACvB,MAAA,OAAA,CAAQ,YAAa,CAAA,SAAA,EAAW,OAAQ,CAAA,CAAC,IAAS,KAAA;AAChD,QAAA,GAAA,CAAI,IAAK,CAAA,IAAA,CAAK,OAAQ,CAAA,YAAA,CAAa,EAAG,CAAC,CAAA,CAAA;AAAA,OACxC,CAAA,CAAA;AACD,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,iBAAiB,CAAA,CAAA;AAAA,KAC3B,CAAA;AAEA,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,iBAAiB,CAAA,CAAA;AAAA,KAC3B,CAAA;AAEA,IAAA,MAAM,iBAAiBC,YAAS,CAAA,MAAM,QAAQ,YAAa,CAAA,SAAA,CAAW,SAAS,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var header_vue_vue_type_script_setup_true_lang = require('./header.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var DkTableHeader = /* @__PURE__ */ _pluginVue_exportHelper.default(header_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var DkTableHeader = /* @__PURE__ */ _pluginVue_exportHelper.default(header_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\header.vue"]]);
|
9
9
|
|
10
10
|
exports.default = DkTableHeader;
|
11
11
|
//# sourceMappingURL=header.vue.js.map
|
@@ -59,16 +59,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
59
59
|
},
|
60
60
|
buttons: {
|
61
61
|
default: () => {
|
62
|
-
return [
|
63
|
-
"refresh",
|
64
|
-
"add",
|
65
|
-
"export_csv",
|
66
|
-
"edit",
|
67
|
-
"delete",
|
68
|
-
"comSearch",
|
69
|
-
"quickSearch",
|
70
|
-
"columnDisplay"
|
71
|
-
];
|
62
|
+
return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"];
|
72
63
|
},
|
73
64
|
type: Array
|
74
65
|
},
|
@@ -84,9 +75,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
84
75
|
const columnDisplayArr = [];
|
85
76
|
let cachedTableData = {};
|
86
77
|
if (DkTable.url) {
|
87
|
-
cachedTableData = JSON.parse(
|
88
|
-
utils.storage.get(DkTable.url + "show_column") || "{}"
|
89
|
-
);
|
78
|
+
cachedTableData = JSON.parse(utils.storage.get(DkTable.url + "show_column") || "{}");
|
90
79
|
}
|
91
80
|
for (const item of DkTable.table.column) {
|
92
81
|
if (cachedTableData[item.prop] !== void 0) {
|
@@ -148,10 +137,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
148
137
|
1536
|
149
138
|
/* NEED_PATCH, DYNAMIC_SLOTS */
|
150
139
|
), [
|
151
|
-
[
|
152
|
-
vue.vShow,
|
153
|
-
props.buttons.includes("comSearch") && vue.unref(DkTable).table.showComSearch
|
154
|
-
]
|
140
|
+
[vue.vShow, props.buttons.includes("comSearch") && vue.unref(DkTable).table.showComSearch]
|
155
141
|
])
|
156
142
|
]),
|
157
143
|
_: 3
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"header.vue2.js","sources":["../../../../src/table/src/components/header.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTableHeader',\n});\n</script>\n<template>\n <el-collapse-transition>\n <ComSearch\n v-show=\"\n props.buttons.includes('comSearch') && DkTable.table.showComSearch\n \"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </ComSearch>\n </el-collapse-transition>\n <div class=\"dk-table-header\">\n <slot name=\"refreshPrepend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('refresh')\"\n content=\"刷新\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n type=\"info\"\n @click=\"onAction('refresh', { loading: true })\"\n >\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n </el-tooltip>\n <slot name=\"refreshAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('add') && DkTable.auth('add')\"\n content=\"新增\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('add')\"\n >\n <dk-icon icon=\"typcn:plus\"></dk-icon>\n <span class=\"m-l-5px\">新增</span>\n </el-button>\n </el-tooltip>\n <slot name=\"AddButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('export_csv') && DkTable.auth('export_csv')\"\n content=\"导出选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('export_csv')\"\n >\n <dk-icon icon=\"typcn:download\"></dk-icon>\n <span class=\"m-l-5px\">导出</span>\n </el-button>\n </el-tooltip>\n <slot name=\"ExportButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('edit') && DkTable.auth('edit')\"\n content=\"编辑选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('edit')\"\n >\n <dk-icon icon=\"typcn:edit\"></dk-icon>\n <span class=\"m-l-5px\">编辑</span>\n </el-button>\n </el-tooltip>\n <slot name=\"EditButtonAppend\"></slot>\n <el-popconfirm\n v-if=\"props.buttons.includes('delete') && DkTable.auth('del')\"\n confirm-button-text=\"删除\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要删除所选记录吗?\"\n :disabled=\"!enableBatchOpt\"\n @confirm=\"onAction('delete')\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-tooltip content=\"删除所选行\" placement=\"top\">\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"danger\"\n >\n <!-- <Icon name=\"fa fa-trash\" />-->\n <dk-icon icon=\"typcn:trash\"></dk-icon>\n <span class=\"m-l-5px\">删除</span>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n <slot name=\"DeleteButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('unfold')\"\n :content=\"(DkTable.table.expandAll ? '收缩' : '展开') + '所有子菜单'\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n :type=\"DkTable.table.expandAll ? 'danger' : 'warning'\"\n @click=\"\n DkTable.onTableHeaderAction('unfold', {\n unfold: !DkTable.table.expandAll,\n })\n \"\n >\n <span class=\"table-header-operate-text\">\n {{ DkTable.table.expandAll ? '收缩所有' : '展开所有' }}\n </span>\n </el-button>\n </el-tooltip>\n <slot name=\"UnfoldButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('recycle') && DkTable.auth('recycle')\"\n content=\"打开回收站\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate m-l-5px\"\n type=\"warning\"\n :loading=\"DkTable.recycleTable.showDialogLoading\"\n @click=\"onAction('recycle')\"\n >\n <span class=\"table-header-operate-text\"> 回收站 </span>\n </el-button>\n </el-tooltip>\n <slot name=\"RecycleButtonAppend\"></slot>\n <div class=\"table-search\">\n <div class=\"mr-1\">\n <el-input\n v-model=\"DkTable.table.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n :size=\"size\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n <div class=\"table-search-button-group\">\n <el-dropdown\n v-if=\"props.buttons.includes('columnDisplay')\"\n :max-height=\"380\"\n :hide-on-click=\"false\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n :class=\"props.buttons.includes('comSearch') ? 'right-border' : ''\"\n >\n <dk-icon icon=\"Grid\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item v-for=\"(item, idx) in columnDisplay\" :key=\"idx\">\n <el-checkbox\n v-if=\"item.prop\"\n :checked=\"!item.show\"\n :model-value=\"item.show\"\n :size=\"size\"\n :label=\"item.label\"\n @change=\"onChangeShowColumn($event, item.prop!)\"\n />\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <div>\n <el-tooltip\n v-if=\"props.buttons.includes('comSearch')\"\n :disabled=\"DkTable.table.showComSearch\"\n content=\"展开常规搜索\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n @click=\"\n DkTable.table.showComSearch = !DkTable.table.showComSearch\n \"\n >\n <dk-icon icon=\"Search\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, computed } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport ComSearch from './ComSearch.vue'\nimport { debounce, storage } from '@vipl520/utils'\n\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst props = defineProps({\n size: {\n default: 'small',\n type: String,\n },\n buttons: {\n default: () => {\n return [\n 'refresh',\n 'add',\n 'export_csv',\n 'edit',\n 'delete',\n 'comSearch',\n 'quickSearch',\n 'columnDisplay',\n ]\n },\n type: Array,\n },\n quickSearchPlaceholder: {\n default: '快捷搜索',\n type: String,\n },\n})\n\nconst columnDisplay = computed(() => {\n const columnDisplayArr = []\n let cachedTableData: any = {}\n if (DkTable.url) {\n cachedTableData = JSON.parse(\n storage.get(DkTable.url + 'show_column') || '{}'\n )\n }\n for (const item of DkTable.table.column) {\n if (cachedTableData[item.prop] !== undefined) {\n item.show = cachedTableData[item.prop]\n }\n // eslint-disable-next-line no-unused-expressions\n item.type === 'selection' ||\n item.render === 'buttons' ||\n item.enableColumnDisplayControl === false\n ? ''\n : columnDisplayArr.push(item)\n }\n return columnDisplayArr\n})\n\nconst enableBatchOpt = computed(() => DkTable.table.selection!.length > 0)\n\nconst onAction = (event: string, data: anyObj = {}) => {\n DkTable.onTableHeaderAction(event, data)\n}\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-search', {\n keyword: DkTable.table.filter!.quickSearch,\n })\n}\n\nconst onChangeShowColumn = (\n value: string | number | boolean,\n field: string\n) => {\n DkTable.onTableHeaderAction('change-show-column', {\n field,\n value,\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent","inject","computed","storage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuND,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AA4BhC,IAAM,MAAA,aAAA,GAAgBC,aAAS,MAAM;AACnC,MAAA,MAAM,mBAAmB,EAAC,CAAA;AAC1B,MAAA,IAAI,kBAAuB,EAAC,CAAA;AAC5B,MAAA,IAAI,QAAQ,GAAK,EAAA;AACf,QAAA,eAAA,GAAkB,IAAK,CAAA,KAAA;AAAA,UACrBC,aAAQ,CAAA,GAAA,CAAI,OAAQ,CAAA,GAAA,GAAM,aAAa,CAAK,IAAA,IAAA;AAAA,SAC9C,CAAA;AAAA,OACF;AACA,MAAW,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"header.vue2.js","sources":["../../../../src/table/src/components/header.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTableHeader',\n});\n</script>\n<template>\n <el-collapse-transition>\n <ComSearch v-show=\"props.buttons.includes('comSearch') && DkTable.table.showComSearch\">\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </ComSearch>\n </el-collapse-transition>\n <div class=\"dk-table-header\">\n <slot name=\"refreshPrepend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('refresh')\" content=\"刷新\" placement=\"top\">\n <el-button v-blur class=\"table-header-operate\" type=\"info\" @click=\"onAction('refresh', { loading: true })\">\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n </el-tooltip>\n <slot name=\"refreshAppend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('add') && DkTable.auth('add')\" content=\"新增\" placement=\"top\">\n <el-button v-blur class=\"table-header-operate\" type=\"primary\" @click=\"onAction('add')\">\n <dk-icon icon=\"typcn:plus\"></dk-icon>\n <span class=\"m-l-5px\">新增</span>\n </el-button>\n </el-tooltip>\n <slot name=\"AddButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('export_csv') && DkTable.auth('export_csv')\"\n content=\"导出选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('export_csv')\"\n >\n <dk-icon icon=\"typcn:download\"></dk-icon>\n <span class=\"m-l-5px\">导出</span>\n </el-button>\n </el-tooltip>\n <slot name=\"ExportButtonAppend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('edit') && DkTable.auth('edit')\" content=\"编辑选中行\" placement=\"top\">\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('edit')\"\n >\n <dk-icon icon=\"typcn:edit\"></dk-icon>\n <span class=\"m-l-5px\">编辑</span>\n </el-button>\n </el-tooltip>\n <slot name=\"EditButtonAppend\"></slot>\n <el-popconfirm\n v-if=\"props.buttons.includes('delete') && DkTable.auth('del')\"\n confirm-button-text=\"删除\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要删除所选记录吗?\"\n :disabled=\"!enableBatchOpt\"\n @confirm=\"onAction('delete')\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-tooltip content=\"删除所选行\" placement=\"top\">\n <el-button v-blur :disabled=\"!enableBatchOpt\" class=\"table-header-operate\" type=\"danger\">\n <!-- <Icon name=\"fa fa-trash\" />-->\n <dk-icon icon=\"typcn:trash\"></dk-icon>\n <span class=\"m-l-5px\">删除</span>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n <slot name=\"DeleteButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('unfold')\"\n :content=\"(DkTable.table.expandAll ? '收缩' : '展开') + '所有子菜单'\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n :type=\"DkTable.table.expandAll ? 'danger' : 'warning'\"\n @click=\"\n DkTable.onTableHeaderAction('unfold', {\n unfold: !DkTable.table.expandAll,\n })\n \"\n >\n <span class=\"table-header-operate-text\">\n {{ DkTable.table.expandAll ? '收缩所有' : '展开所有' }}\n </span>\n </el-button>\n </el-tooltip>\n <slot name=\"UnfoldButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('recycle') && DkTable.auth('recycle')\"\n content=\"打开回收站\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate m-l-5px\"\n type=\"warning\"\n :loading=\"DkTable.recycleTable.showDialogLoading\"\n @click=\"onAction('recycle')\"\n >\n <span class=\"table-header-operate-text\"> 回收站 </span>\n </el-button>\n </el-tooltip>\n <slot name=\"RecycleButtonAppend\"></slot>\n <div class=\"table-search\">\n <div class=\"mr-1\">\n <el-input\n v-model=\"DkTable.table.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n :size=\"size\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n <div class=\"table-search-button-group\">\n <el-dropdown v-if=\"props.buttons.includes('columnDisplay')\" :max-height=\"380\" :hide-on-click=\"false\">\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n :class=\"props.buttons.includes('comSearch') ? 'right-border' : ''\"\n >\n <dk-icon icon=\"Grid\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item v-for=\"(item, idx) in columnDisplay\" :key=\"idx\">\n <el-checkbox\n v-if=\"item.prop\"\n :checked=\"!item.show\"\n :model-value=\"item.show\"\n :size=\"size\"\n :label=\"item.label\"\n @change=\"onChangeShowColumn($event, item.prop!)\"\n />\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <div>\n <el-tooltip\n v-if=\"props.buttons.includes('comSearch')\"\n :disabled=\"DkTable.table.showComSearch\"\n content=\"展开常规搜索\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n @click=\"DkTable.table.showComSearch = !DkTable.table.showComSearch\"\n >\n <dk-icon icon=\"Search\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, computed } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport ComSearch from './ComSearch.vue'\nimport { debounce, storage } from '@vipl520/utils'\n\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst props = defineProps({\n size: {\n default: 'small',\n type: String,\n },\n buttons: {\n default: () => {\n return ['refresh', 'add', 'export_csv', 'edit', 'delete', 'comSearch', 'quickSearch', 'columnDisplay']\n },\n type: Array,\n },\n quickSearchPlaceholder: {\n default: '快捷搜索',\n type: String,\n },\n})\n\nconst columnDisplay = computed(() => {\n const columnDisplayArr = []\n let cachedTableData: any = {}\n if (DkTable.url) {\n cachedTableData = JSON.parse(storage.get(DkTable.url + 'show_column') || '{}')\n }\n for (const item of DkTable.table.column) {\n if (cachedTableData[item.prop] !== undefined) {\n item.show = cachedTableData[item.prop]\n }\n // eslint-disable-next-line no-unused-expressions\n item.type === 'selection' || item.render === 'buttons' || item.enableColumnDisplayControl === false\n ? ''\n : columnDisplayArr.push(item)\n }\n return columnDisplayArr\n})\n\nconst enableBatchOpt = computed(() => DkTable.table.selection!.length > 0)\n\nconst onAction = (event: string, data: anyObj = {}) => {\n DkTable.onTableHeaderAction(event, data)\n}\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-search', {\n keyword: DkTable.table.filter!.quickSearch,\n })\n}\n\nconst onChangeShowColumn = (value: string | number | boolean, field: string) => {\n DkTable.onTableHeaderAction('change-show-column', {\n field,\n value,\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent","inject","computed","storage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;AAkLD,IAAM,MAAA,OAAA,GAAUC,WAAO,SAAS,CAAA,CAAA;AAmBhC,IAAM,MAAA,aAAA,GAAgBC,aAAS,MAAM;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AkC,KAAkB,KAAA;AAC9E,MAAA,OAAA,CAAQ,oBAAoB,oBAAsB,EAAA;AAAA,QAChD,KAAA;AAAA,QACA,KAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/table/src/props.js
CHANGED
@@ -23,17 +23,7 @@ const tableProps = {
|
|
23
23
|
},
|
24
24
|
buttons: {
|
25
25
|
default: () => {
|
26
|
-
return [
|
27
|
-
"refresh",
|
28
|
-
"add",
|
29
|
-
"export_csv",
|
30
|
-
"edit",
|
31
|
-
"delete",
|
32
|
-
"comSearch",
|
33
|
-
"quickSearch",
|
34
|
-
"columnDisplay",
|
35
|
-
"recycle"
|
36
|
-
];
|
26
|
+
return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay", "recycle"];
|
37
27
|
},
|
38
28
|
type: Array
|
39
29
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../src/table/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n// import ElTableNext from 'el-table-next'\n\nexport const tableProps = {\n tableApi: {\n default: '',\n type: String,\n },\n cacheTable: {\n default: true,\n type: Boolean,\n },\n tableBefore: {\n default: () => {\n return {}\n },\n type: Object,\n },\n tableAfter: {\n default: () => {\n return {}\n },\n type: Object,\n },\n buttons: {\n default: () => {\n return [
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../src/table/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n// import ElTableNext from 'el-table-next'\n\nexport const tableProps = {\n tableApi: {\n default: '',\n type: String,\n },\n cacheTable: {\n default: true,\n type: Boolean,\n },\n tableBefore: {\n default: () => {\n return {}\n },\n type: Object,\n },\n tableAfter: {\n default: () => {\n return {}\n },\n type: Object,\n },\n buttons: {\n default: () => {\n return ['refresh', 'add', 'export_csv', 'edit', 'delete', 'comSearch', 'quickSearch', 'columnDisplay', 'recycle']\n },\n type: Array,\n },\n hideButtons: {\n default: () => {\n return []\n },\n type: Array,\n },\n}\n\nexport type TableProps = ExtractPropTypes<typeof tableProps>\n"],"names":[],"mappings":";;AAGO,MAAM,UAAa,GAAA;AAAA,EACxB,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAO,OAAA,CAAC,WAAW,KAAO,EAAA,YAAA,EAAc,QAAQ,QAAU,EAAA,WAAA,EAAa,aAAe,EAAA,eAAA,EAAiB,SAAS,CAAA,CAAA;AAAA,KAClH;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AACF;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var table_vue_vue_type_script_setup_true_lang = require('./table.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(table_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(table_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\table.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _Table;
|
11
11
|
//# sourceMappingURL=table.vue.js.map
|
@@ -21,11 +21,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
21
|
const props = __props;
|
22
22
|
const FormRef = vue.ref();
|
23
23
|
const TableRef = vue.ref();
|
24
|
-
const DkTable = new dkTable.default(
|
25
|
-
props.tableApi,
|
26
|
-
props.tableBefore,
|
27
|
-
props.tableAfter
|
28
|
-
);
|
24
|
+
const DkTable = new dkTable.default(props.tableApi, props.tableBefore, props.tableAfter);
|
29
25
|
vue.provide("DkTable", DkTable);
|
30
26
|
vue.onMounted(() => {
|
31
27
|
DkTable.getTable(props.cacheTable)?.then(() => {
|
@@ -40,11 +36,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
40
36
|
DkTable.form.ref = FormRef.value;
|
41
37
|
});
|
42
38
|
const effectiveButtons = vue.computed(() => {
|
43
|
-
return [
|
44
|
-
...new Set(
|
45
|
-
props.buttons.filter((button) => !props.hideButtons.includes(button))
|
46
|
-
)
|
47
|
-
];
|
39
|
+
return [...new Set(props.buttons.filter((button) => !props.hideButtons.includes(button)))];
|
48
40
|
});
|
49
41
|
const onTableSizeChange = (val) => {
|
50
42
|
DkTable.onTableAction("page-size-change", { size: val });
|
@@ -84,9 +76,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
84
76
|
}
|
85
77
|
};
|
86
78
|
const onSelectAll = (selection) => {
|
87
|
-
if (isSelectAll(
|
88
|
-
selection.map((row) => row[DkTable.table.pk].toString())
|
89
|
-
)) {
|
79
|
+
if (isSelectAll(selection.map((row) => row[DkTable.table.pk].toString()))) {
|
90
80
|
selection.map((row) => {
|
91
81
|
if (row.children) {
|
92
82
|
selectChildren(row.children, true);
|