@vipl520/dk-ui 1.0.40 → 1.0.42
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/attributes.json +23 -3
- package/dist/index.css +1 -1
- package/dist/index.min.js +4 -13
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -13
- package/dist/index.min.mjs.map +1 -1
- package/dist/tags.json +7 -2
- package/dist/web-types.json +71 -12
- package/es/animate-select/src/animate-select.vue.mjs +1 -1
- package/es/animate-select/src/animate-select.vue2.mjs +5 -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 +7 -1
- package/es/attachment/src/attachment.vue2.mjs.map +1 -1
- package/es/attachment/src/file-icon.vue.mjs +1 -1
- package/es/attachment-dialog/index.d.ts +9 -0
- package/es/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
- package/es/attachment-dialog/src/attachment-dialog.vue.mjs +1 -1
- package/es/attachment-dialog/src/attachment-dialog.vue2.mjs +3 -2
- package/es/attachment-dialog/src/attachment-dialog.vue2.mjs.map +1 -1
- package/es/attachment-dialog/src/props.d.ts +4 -0
- package/es/attachment-dialog/src/props.mjs +4 -0
- 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 +60 -59
- 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 +11 -4
- 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 +3 -1
- package/es/dialog/src/dialog.vue2.mjs.map +1 -1
- package/es/dialog/style/index.scss +1 -0
- 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/file-list-input/style/index.css +1 -1
- package/es/file-list-input/style/index.scss +20 -16
- 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 +3 -3
- 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/icon-input/src/icon-input.vue2.mjs.map +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 +0 -10
- package/es/index.mjs.map +1 -1
- package/es/page-diy/index.mjs +0 -2
- package/es/page-diy/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 +7 -3
- package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
- package/es/page-diy/src/components/DragTool.vue.mjs +6 -2
- 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 +12 -10
- 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/DkMinBlank.mjs +9 -1
- package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs +3 -1
- package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +36 -6
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +6 -2
- 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 +8 -1
- 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 +3 -1
- 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/DkViewDialog.mjs +7 -1
- package/es/page-diy/src/config/rule/web/common/DkViewDialog.mjs.map +1 -1
- package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +9 -3
- package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
- package/es/page-diy/src/page-diy.vue.mjs +102 -34
- 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 +24 -7
- 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 +4 -2
- 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/dk-page-diy.scss +3 -3
- 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 +5 -2
- 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 +4 -2
- package/es/select/src/select.vue.mjs +1 -1
- package/es/select/src/select.vue2.mjs +9 -1
- 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/index.d.ts +2 -1
- package/es/style-background-input/src/style-background-input.vue.d.ts +2 -1
- package/es/style-background-input/src/style-background-input.vue.mjs +1 -1
- package/es/style-background-input/src/style-background-input.vue2.mjs +2 -1
- package/es/style-background-input/src/style-background-input.vue2.mjs.map +1 -1
- package/es/style-border-input/index.d.ts +2 -1
- package/es/style-border-input/src/style-border-input.vue.d.ts +2 -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 +55 -38
- package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
- package/es/style-box-input/index.d.ts +2 -1
- package/es/style-box-input/src/style-box-input.vue.d.ts +2 -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 -1
- package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
- package/es/style-font-input/index.d.ts +2 -1
- package/es/style-font-input/src/style-font-input.vue.d.ts +2 -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 +8 -7
- 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 +15 -22
- 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 +4 -1
- package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
- package/es/style-shadow-input/index.d.ts +2 -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 +144 -155
- package/es/style-shadow-input/src/style-shadow-content.vue2.mjs.map +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -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 +2 -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 +3 -1
- 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 +17 -3
- package/es/table/src/components/header.vue2.mjs.map +1 -1
- package/es/table/src/props.mjs +11 -1
- 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 +13 -3
- package/es/table/src/table.vue2.mjs.map +1 -1
- package/es/table/utils/dkTable.mjs +32 -11
- 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 +7 -3
- 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 +5 -0
- 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 +5 -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 +7 -1
- package/lib/attachment/src/attachment.vue2.js.map +1 -1
- package/lib/attachment/src/file-icon.vue.js +1 -1
- package/lib/attachment-dialog/index.d.ts +9 -0
- package/lib/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
- package/lib/attachment-dialog/src/attachment-dialog.vue.js +1 -1
- package/lib/attachment-dialog/src/attachment-dialog.vue2.js +3 -2
- package/lib/attachment-dialog/src/attachment-dialog.vue2.js.map +1 -1
- package/lib/attachment-dialog/src/props.d.ts +4 -0
- package/lib/attachment-dialog/src/props.js +4 -0
- 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 +59 -58
- 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 +11 -4
- 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 +3 -1
- package/lib/dialog/src/dialog.vue2.js.map +1 -1
- package/lib/dialog/style/index.scss +1 -0
- 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/file-list-input/style/index.css +1 -1
- package/lib/file-list-input/style/index.scss +20 -16
- 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 -2
- 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/icon-input/src/icon-input.vue2.js.map +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 +0 -10
- package/lib/index.js.map +1 -1
- package/lib/page-diy/index.js +0 -2
- package/lib/page-diy/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 +7 -3
- package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
- package/lib/page-diy/src/components/DragTool.vue.js +6 -2
- 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 +12 -10
- 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/DkMinBlank.js +9 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js +3 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +36 -6
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +6 -2
- 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 +8 -1
- 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 +3 -1
- 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/DkViewDialog.js +7 -1
- package/lib/page-diy/src/config/rule/web/common/DkViewDialog.js.map +1 -1
- package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +9 -3
- package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
- package/lib/page-diy/src/page-diy.vue.js +102 -34
- 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 +24 -7
- 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 +4 -2
- 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/dk-page-diy.scss +3 -3
- 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 +5 -2
- 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 +4 -2
- package/lib/select/src/select.vue.js +1 -1
- package/lib/select/src/select.vue2.js +9 -1
- 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/index.d.ts +2 -1
- package/lib/style-background-input/src/style-background-input.vue.d.ts +2 -1
- package/lib/style-background-input/src/style-background-input.vue.js +1 -1
- package/lib/style-background-input/src/style-background-input.vue2.js +2 -1
- package/lib/style-background-input/src/style-background-input.vue2.js.map +1 -1
- package/lib/style-border-input/index.d.ts +2 -1
- package/lib/style-border-input/src/style-border-input.vue.d.ts +2 -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 +55 -38
- package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
- package/lib/style-box-input/index.d.ts +2 -1
- package/lib/style-box-input/src/style-box-input.vue.d.ts +2 -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 -1
- package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
- package/lib/style-font-input/index.d.ts +2 -1
- package/lib/style-font-input/src/style-font-input.vue.d.ts +2 -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 +8 -7
- 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 +14 -21
- 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 +4 -1
- package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
- package/lib/style-shadow-input/index.d.ts +2 -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 +144 -155
- package/lib/style-shadow-input/src/style-shadow-content.vue2.js.map +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -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 +2 -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 +3 -1
- 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 +17 -3
- package/lib/table/src/components/header.vue2.js.map +1 -1
- package/lib/table/src/props.js +11 -1
- 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 +13 -3
- package/lib/table/src/table.vue2.js.map +1 -1
- package/lib/table/utils/dkTable.js +32 -11
- 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 +7 -3
- 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 +5 -0
- 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 -2
- package/dist/index.js +0 -34318
- package/dist/index.mjs +0 -34228
@@ -39,7 +39,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
39
39
|
const toggleFull = () => {
|
40
40
|
isFullscreen.value = !vue.unref(isFullscreen);
|
41
41
|
};
|
42
|
-
const dialogHeight = vue.ref(
|
42
|
+
const dialogHeight = vue.ref(
|
43
|
+
utils.isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight
|
44
|
+
);
|
43
45
|
vue.watch(
|
44
46
|
() => isFullscreen.value,
|
45
47
|
async (val) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div
|
1
|
+
{"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div\n class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\"\n >\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"\n isFullscreen\n ? 'radix-icons:exit-full-screen'\n : 'radix-icons:enter-full-screen'\n \"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(\n isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n)\n\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${\n windowHeight - 55 - 60 - (slots.footer ? 63 : 0)\n }px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight)\n ? `${props.maxHeight}px`\n : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","useSlots","computed","useAttrs","ref","watch","unref","isNumber","nextTick"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA6DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,QAAQ,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,MAAmB,GAAA,CAAC,YAAc,EAAA,OAAA,EAAS,WAAW,CAAA,CAAA;AAC5D,MAAA,MAAM,QAAQC,YAAS,EAAA,C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A,GAAQD,eAAS,KAAM,CAAA,SAAS,IACzC,CAAG,EAAA,KAAA,CAAM,SAAS,CAAA,EAAA,CAAA,GAClB,KAAM,CAAA,SAAA,CAAA;AAAA,SACZ;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAcL,aAAS,MAAM;AACjC,MAAO,OAAA;AAAA,QACL,SAAA,EAAWI,UAAM,YAAY,CAAA;AAAA,OAC/B,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var fileInput_vue_vue_type_script_setup_true_lang = require('./file-input.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _FileInput = /* @__PURE__ */ _pluginVue_exportHelper.default(fileInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _FileInput = /* @__PURE__ */ _pluginVue_exportHelper.default(fileInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\file-input\\src\\file-input.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _FileInput;
|
11
11
|
//# sourceMappingURL=file-input.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-input.vue2.js","sources":["../../../src/file-input/src/file-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <!--↓↓↓↓显示input框↓↓↓↓-->\n <template v-if=\"showInput\">\n <el-input v-model=\"input\" :placeholder=\"placeholder\" clearable>\n <template #append>\n <el-button @click=\"onClick\">选择</el-button>\n </template>\n </el-input>\n <!--选择的是图片-->\n <div class=\"show m-t-5px\">\n <el-image
|
1
|
+
{"version":3,"file":"file-input.vue2.js","sources":["../../../src/file-input/src/file-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <!--↓↓↓↓显示input框↓↓↓↓-->\n <template v-if=\"showInput\">\n <el-input v-model=\"input\" :placeholder=\"placeholder\" clearable>\n <template #append>\n <el-button @click=\"onClick\">选择</el-button>\n </template>\n </el-input>\n <!--选择的是图片-->\n <div class=\"show m-t-5px\">\n <el-image\n v-if=\"type === 1\"\n :src=\"input\"\n alt=\"\"\n fit=\"contain\"\n class=\"file rd-4px\"\n :preview-src-list=\"[input]\"\n >\n <template #error>\n <div class=\"image-error\">\n <dk-icon icon=\"Picture\"></dk-icon>\n </div>\n </template>\n </el-image>\n <dk-file-icon\n v-else\n :file-url=\"input\"\n class=\"file rd-4px\"\n :type=\"type\"\n />\n <em @click=\"input = ''\">\n <dk-icon icon=\"Close\"></dk-icon>\n </em>\n </div>\n </template>\n <!--↓↓↓↓不显示input框↓↓↓↓-->\n <template v-else>\n <div\n class=\"only-img flex justify-center items-center\"\n style=\"position: relative\"\n :style=\"{ width: imgSize + 'px', height: imgSize + 'px' }\"\n @click=\"onClick\"\n >\n <template v-if=\"input\">\n <!--图片附件-->\n <el-image\n v-if=\"type === 1\"\n :src=\"input\"\n alt=\"\"\n fit=\"contain\"\n style=\"width: 100%; height: 100%\"\n >\n <template #error>\n <div class=\"image-slot\">\n <div class=\"no-image\">\n <el-icon><Picture /></el-icon>\n </div>\n </div>\n </template>\n </el-image>\n <!--其他附件-->\n <template v-if=\"type !== 1 && input\">\n <dk-file-icon :file-url=\"input\" class=\"file rd-4px\" :type=\"type\" />\n </template>\n <div class=\"close\" @click.stop=\"onClear()\">\n <el-icon><Close /></el-icon>\n </div>\n </template>\n <!--没有上传的时候-->\n <template v-else>\n <div\n class=\"media\"\n :style=\"{\n lineHeight: imgSize + 'px',\n fontSize: imgSize / 2 + 'px',\n }\"\n >\n <el-icon><Plus /></el-icon>\n </div>\n </template>\n </div>\n </template>\n <dk-attachment-dialog\n ref=\"attachmentDialog\"\n :type=\"type\"\n @confirm=\"onConfirm\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileInputProps } from './props'\nimport { ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-input')\n\n\n\nconst props = defineProps(fileInputProps)\nconst input = ref(props.modelValue)\nconst attachmentDialog = ref()\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n\nconst onClear = () => {\n input.value = ''\n}\n\nconst onClick = () => {\n attachmentDialog.value.open()\n}\n// 确认选中附件\nconst onConfirm = (chooseFileList: any) => {\n input.value = chooseFileList[0].url\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","watch"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,aAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAmGD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,YAAY,CAAA,CAAA;AAK7C,IAAM,MAAA,KAAA,GAAQC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,mB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-input.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _FileListInput = /* @__PURE__ */ _pluginVue_exportHelper.default(fileListInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _FileListInput = /* @__PURE__ */ _pluginVue_exportHelper.default(fileListInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\file-list-input\\src\\file-list-input.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _FileListInput;
|
11
11
|
//# sourceMappingURL=file-list-input.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-list-input.vue2.js","sources":["../../../src/file-list-input/src/file-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileListInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <div class=\"dk-image-list\">\n <ul>\n <li v-for=\"(item, key) in input\" :key=\"key\">\n <div class=\"file\" :style=\"_style\">\n <el-image
|
1
|
+
{"version":3,"file":"file-list-input.vue2.js","sources":["../../../src/file-list-input/src/file-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileListInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <div class=\"dk-image-list\">\n <ul>\n <li v-for=\"(item, key) in input\" :key=\"key\">\n <div class=\"file\" :style=\"_style\">\n <el-image\n v-if=\"type === 1\"\n :src=\"item\"\n fit=\"contain\"\n :style=\"_style\"\n />\n <dk-file-icon\n v-else\n :file-url=\"item\"\n class=\"file rd-4px\"\n :type=\"type\"\n />\n <div v-if=\"!disabled\" class=\"close\" @click=\"deleteFile(key)\">\n <el-icon><Close /></el-icon>\n </div>\n </div>\n </li>\n <li v-if=\"limit > input.length && !disabled\">\n <div class=\"chooseImage\" :style=\"_style\" @click=\"onClick()\">\n <el-icon><Plus /></el-icon>\n </div>\n </li>\n </ul>\n </div>\n <dk-attachment-dialog ref=\"attachment\" :type=\"type\" @confirm=\"onConfirm\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileListInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-list-input')\n\n\n\nconst props = defineProps(fileListInputProps)\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nconst input: any = ref(props.modelValue)\nconst _style = computed(() => {\n return {\n width: props.imgSize + 'px',\n height: props.imgSize + 'px',\n lineHeight: props.imgSize + 'px',\n }\n})\n\nconst attachment = ref()\n\nconst onClick = () => {\n attachment.value.open()\n}\nconst onConfirm = (chooseFileList: any) => {\n chooseFileList.forEach((item: any) => {\n if (input.value.length < props.limit) {\n input.value.push(item.url)\n handleInput(input.value)\n }\n })\n}\nconst deleteFile = (index: number) => {\n input.value.splice(index, 1)\n}\n\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","computed","watch"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0CD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,iBAAiB,CAAA,CAAA;AAMlD,IAAM,MAAA,KAAA,GAAaC,OAAI,CAAA,KAAA,CA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AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
.dk-file-list-input{width:100%}.dk-file-list-input .button{text-align:center;border-top:1px solid #f5f5f5
|
1
|
+
.dk-file-list-input{width:100%}.dk-file-list-input .button{padding-top:10px;text-align:center;border-top:1px solid #f5f5f5}.dk-file-list-input .dk-image-list ul::after{display:block;clear:both;content:""}.dk-file-list-input .dk-image-list ul li{float:left;margin-right:10px;margin-bottom:10px;border:1px solid var(--el-border-color);border-radius:4px}.dk-file-list-input .dk-image-list ul li .file{position:relative;width:100px;height:100px;text-align:center}.dk-file-list-input .dk-image-list ul li .file div{position:relative}.dk-file-list-input .dk-image-list ul li .file div .other-file{font-size:80px;line-height:100px;color:#aaa}.dk-file-list-input .dk-image-list ul li .file div .el-icon-video-play{position:absolute;right:2px;bottom:2px;display:none;font-size:20px;cursor:pointer}.dk-file-list-input .dk-image-list ul li .file div:hover .el-icon-video-play{display:block;color:#409eff}.dk-file-list-input .dk-image-list ul li .file .close{position:absolute;top:0;right:0;display:none;align-items:center;justify-content:center;width:20px;height:20px;line-height:20px;color:#fff;text-align:center;cursor:pointer;background:rgba(0,0,0,.4);border-radius:100%}.dk-file-list-input .dk-image-list ul li .file:hover .close{display:flex}.dk-file-list-input .dk-image-list ul li .chooseImage{width:100px;height:100px;font-size:40px;line-height:100px;color:#999;text-align:center;cursor:pointer}.dk-file-list-input .dk-image-list ul li .chooseImage:hover{color:#409eff}
|
@@ -1,19 +1,21 @@
|
|
1
1
|
.dk-file-list-input {
|
2
2
|
width: 100%;
|
3
|
+
|
3
4
|
.button {
|
5
|
+
padding-top: 10px;
|
4
6
|
text-align: center;
|
5
7
|
border-top: 1px solid #f5f5f5;
|
6
|
-
padding-top: 10px;
|
7
8
|
}
|
8
9
|
|
9
10
|
.dk-image-list {
|
10
11
|
ul {
|
11
12
|
// 清除浮动
|
12
|
-
|
13
|
-
content: '';
|
13
|
+
&::after {
|
14
14
|
display: block;
|
15
15
|
clear: both;
|
16
|
+
content: '';
|
16
17
|
}
|
18
|
+
|
17
19
|
li {
|
18
20
|
float: left;
|
19
21
|
margin-right: 10px;
|
@@ -32,38 +34,40 @@
|
|
32
34
|
|
33
35
|
.other-file {
|
34
36
|
font-size: 80px;
|
35
|
-
color: #aaa;
|
36
37
|
line-height: 100px;
|
38
|
+
color: #aaa;
|
37
39
|
}
|
40
|
+
|
38
41
|
.el-icon-video-play {
|
39
|
-
display: none;
|
40
42
|
position: absolute;
|
41
|
-
bottom: 2px;
|
42
43
|
right: 2px;
|
44
|
+
bottom: 2px;
|
45
|
+
display: none;
|
43
46
|
font-size: 20px;
|
44
47
|
cursor: pointer;
|
45
48
|
}
|
49
|
+
|
46
50
|
&:hover .el-icon-video-play {
|
47
|
-
color: #409eff;
|
48
51
|
display: block;
|
52
|
+
color: #409eff;
|
49
53
|
}
|
50
54
|
}
|
51
55
|
|
52
56
|
.close {
|
53
|
-
display: none;
|
54
|
-
cursor: pointer;
|
55
57
|
position: absolute;
|
56
58
|
top: 0;
|
57
|
-
line-height: 20px;
|
58
59
|
right: 0;
|
60
|
+
display: none;
|
61
|
+
align-items: center;
|
62
|
+
justify-content: center;
|
59
63
|
width: 20px;
|
60
64
|
height: 20px;
|
65
|
+
line-height: 20px;
|
66
|
+
color: #fff;
|
61
67
|
text-align: center;
|
62
|
-
|
68
|
+
cursor: pointer;
|
69
|
+
background: rgb(0 0 0 / 40%);
|
63
70
|
border-radius: 100%;
|
64
|
-
color: #fff;
|
65
|
-
align-items: center;
|
66
|
-
justify-content: center;
|
67
71
|
}
|
68
72
|
|
69
73
|
&:hover .close {
|
@@ -74,10 +78,10 @@
|
|
74
78
|
.chooseImage {
|
75
79
|
width: 100px;
|
76
80
|
height: 100px;
|
77
|
-
line-height: 100px;
|
78
|
-
text-align: center;
|
79
81
|
font-size: 40px;
|
82
|
+
line-height: 100px;
|
80
83
|
color: #999;
|
84
|
+
text-align: center;
|
81
85
|
cursor: pointer;
|
82
86
|
|
83
87
|
&:hover {
|
package/lib/form/src/form.vue.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var form_vue_vue_type_script_setup_true_lang = require('./form.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(form_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(form_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\form\\src\\form.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _Form;
|
11
11
|
//# sourceMappingURL=form.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.vue2.js","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","value","isArray","config","reactive","_config","ref","computed","useWindowSize","watch","isObject","request","ElMessage","onMounted"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAACC,aAAQD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,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"form.vue2.js","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\">\n 提交</el-button\n >\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\">\n 提交</el-button\n >\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","value","isArray","config","reactive","_config","ref","computed","useWindowSize","watch","isObject","request","ElMessage","onMounted"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgED,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAACC,aAAQD,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,IAAA,CAAK,MAAS,GAAA;AAAA,UACZ,IAAM,EAAA,GAAA;AAAA,UACN,QAAUA,EAAAA,MAAAA;AAAA,UACV,KAAO,EAAA,WAAA;AAAA,SACT,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,WAAW,KAAM,EAAA,CAAA;AAIpC,IAAM,MAAAE,QAAA,GAASC,aAASC,cAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,OAAOC,OAAI,EAAA,CAAA;AACjB,IAAM,MAAA,OAAA,GAAUA,QAAI,IAAI,CAAA,CAAA;AACxB,IAAM,MAAA,aAAA,GAAgBA,QAAI,KAAK,CAAA,CAAA;AAE/B,IAAM,MAAA,UAAA,GAAaA,QAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,UAAA,GAAaC,aAAS,OAAO,EAA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MAAA,EAAQ,MAAM,GAAG,CAAA,CAAA;AACtB,UAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,SACvB,CAAA,CAAA;AAAA,OACE,MAAA;AACL,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,OACxB;AACA,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAAC,aAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var group_vue_vue_type_script_setup_true_lang = require('./group.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _Group = /* @__PURE__ */ _pluginVue_exportHelper.default(group_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _Group = /* @__PURE__ */ _pluginVue_exportHelper.default(group_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\group\\src\\group.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _Group;
|
11
11
|
//# sourceMappingURL=group.vue.js.map
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var utils = require('../utils/utils.js');
|
7
7
|
var extend = require('../utils/extend.js');
|
8
|
-
var draggable = require('vuedraggable');
|
9
8
|
var props = require('./props.js');
|
10
9
|
|
11
10
|
const _hoisted_1 = { key: 1 };
|
@@ -248,6 +247,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
248
247
|
const _component_dk_icon = vue.resolveComponent("dk-icon");
|
249
248
|
const _component_el_button_group = vue.resolveComponent("el-button-group");
|
250
249
|
const _component_el_collapse_item = vue.resolveComponent("el-collapse-item");
|
250
|
+
const _component_draggable = vue.resolveComponent("draggable");
|
251
251
|
return vue.openBlock(), vue.createElementBlock(
|
252
252
|
"div",
|
253
253
|
{
|
@@ -278,7 +278,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
278
278
|
/* STABLE */
|
279
279
|
}))
|
280
280
|
])) : vue.createCommentVNode("v-if", true),
|
281
|
-
vue.createVNode(
|
281
|
+
vue.createVNode(_component_draggable, {
|
282
282
|
tag: "el-collapse",
|
283
283
|
list: props.modelValue,
|
284
284
|
"component-data": collapseComponentData,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.vue2.js","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" @click=\"add\">\n 添加数据\n </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"\n (name: any, ...args: any) => emitEvent(name, args, index)\n \"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\" />\n <el-button\n icon=\"Delete\"\n plain\n @click=\"del(index, index + 1)\"\n />\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted, ref } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\nimport draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits([\n 'update:modelValue',\n 'change',\n 'itemMounted',\n 'remove',\n 'add',\n])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(\n props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {}\n )\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (\n props.disabled ||\n props.onBeforeRemove(props.modelValue, index) === false\n ) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","markRaw","watch","deepExtend","val","deepCopy","d","hasProperty","formData","nextTick","value","onMounted","extend"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;AA2ED,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,GAAK,EAAA,CAAA;AAAA,MACL,WAAW,EAAC;AAAA,MACZ,YAAY,EAAC;AAAA,MACb,MAAM,EAAC;AAAA,MACP,MAAMC,WAAQ,CAAA,KAAA,CAAM,gBAAiB,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,MACjD,OAAS,EAAA,IAAA;AAAA,KACV,CAAA,CAAA;AAED,IAAA,MAAM,wBAAwBD,YAAS,CAAA;AAAA,MACrC,UAAA,EAAY,CAAC,CAAC,CAAA;AAAA,KACf,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,IAAK,CAAA,IAAA,CAAA;AAElB,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA;AAAA,MACZ,CAAC,GAAG,CAAM,KAAA;AAER,QAAA,MAAA,CAAO,KAAK,IAAK,CAAA,SAAS,CAAE,CAAA,OAAA,CAAQ,CAAC,CAAM,KAAA;AAC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AA,IAAA,EAAW,KAAe,KAAA;AACtD,MAAK,IAAA,CAAA,IAAA,EAAM,GAAG,IAAM,EAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAE,IAAI,KAAK,CAAA,CAAA;AAAA,KACrD,CAAA;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,CAAW,KAAA;AAC7B,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,CAAA,EAAG,CAAK,EAAA,EAAA;AAE1B,QAAA,KAAA,CAAM,WAAW,IAAK,CAAA,KAAA,CAAM,KAAQ,GAAA,IAAA,GAAO,EAAE,CAAA,CAAA;AAAA,OAC/C;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,CAAK,GAAA,CAAA,KAAA,CAAM,MAAU,IAAA,CAAA,IAAK,MAAM,UAAW,CAAA,MAAA,CAAA;AACjD,IAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,QAAQ,CAAK,EAAA,EAAA;AAChD,MAAA,OAAA,CAAQ,CAAC,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,IAAI,CAAG,EAAA;AACT,MAAA,UAAA,CAAW,CAAC,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"group.vue2.js","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" @click=\"add\">\n 添加数据\n </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"\n (name: any, ...args: any) => emitEvent(name, args, index)\n \"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\" />\n <el-button\n icon=\"Delete\"\n plain\n @click=\"del(index, index + 1)\"\n />\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\n// import draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits([\n 'update:modelValue',\n 'change',\n 'itemMounted',\n 'remove',\n 'add',\n])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(\n props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {}\n )\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (\n props.disabled ||\n props.onBeforeRemove(props.modelValue, index) === false\n ) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","markRaw","watch","deepExtend","val","deepCopy","d","hasProperty","formData","nextTick","value","onMounted","extend"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;AA2ED,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,GAAK,EAAA,CAAA;AAAA,MACL,WAAW,EAAC;AAAA,MACZ,YAAY,EAAC;AAAA,MACb,MAAM,EAAC;AAAA,MACP,MAAMC,WAAQ,CAAA,KAAA,CAAM,gBAAiB,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,MACjD,OAAS,EAAA,IAAA;AAAA,KACV,CAAA,CAAA;AAED,IAAA,MAAM,wBAAwBD,YAAS,CAAA;AAAA,MACrC,UAAA,EAAY,CAAC,CAAC,CAAA;AAAA,KACf,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,IAAK,CAAA,IAAA,CAAA;AAElB,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA;AAAA,MACZ,CAAC,GAAG,CAAM,KAAA;AAER,QAAA,MAAA,CAAO,KAAK,IAAK,CAAA,SAAS,CAAE,C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IAAA,MAAM,SAAY,GAAA,CAAC,IAAW,EAAA,IAAA,EAAW,KAAe,KAAA;AACtD,MAAK,IAAA,CAAA,IAAA,EAAM,GAAG,IAAM,EAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAE,IAAI,KAAK,CAAA,CAAA;AAAA,KACrD,CAAA;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,CAAW,KAAA;AAC7B,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,CAAA,EAAG,CAAK,EAAA,EAAA;AAE1B,QAAA,KAAA,CAAM,WAAW,IAAK,CAAA,KAAA,CAAM,KAAQ,GAAA,IAAA,GAAO,EAAE,CAAA,CAAA;AAAA,OAC/C;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,CAAK,GAAA,CAAA,KAAA,CAAM,MAAU,IAAA,CAAA,IAAK,MAAM,UAAW,CAAA,MAAA,CAAA;AACjD,IAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,QAAQ,CAAK,EAAA,EAAA;AAChD,MAAA,OAAA,CAAQ,CAAC,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,IAAI,CAAG,EAAA;AACT,MAAA,UAAA,CAAW,CAAC,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var hotAreaContent_vue_vue_type_script_setup_true_lang = require('./hot-area-content.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var HotAreaContent = /* @__PURE__ */ _pluginVue_exportHelper.default(hotAreaContent_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var HotAreaContent = /* @__PURE__ */ _pluginVue_exportHelper.default(hotAreaContent_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\hot-area-input\\src\\component\\hot-area-content.vue"]]);
|
9
9
|
|
10
10
|
exports.default = HotAreaContent;
|
11
11
|
//# sourceMappingURL=hot-area-content.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hot-area-content.vue2.js","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div
|
1
|
+
{"version":3,"file":"hot-area-content.vue2.js","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div\n class=\"hot-item-content\"\n style=\"\n position: relative;\n width: 100%;\n height: 100%;\n background: #0003;\n \"\n >\n {{ key + 1 }}\n </div>\n </vue3-draggable-resizable>\n </div>\n <div v-else style=\"width: 500px; height: 500px\">\n <el-empty description=\"请上传图片\"></el-empty>\n </div>\n </div>\n <div class=\"hot-area-form\">\n <h3 style=\"margin-top: 0; font-size: 16px; font-weight: 500\">热区管理</h3>\n <el-form label-width=\"80px\" label-position=\"left\">\n <el-form-item label=\"背景图 \">\n <dk-image-input v-model=\"hotData.background\" />\n </el-form-item>\n <el-form-item\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n :label=\"'热区' + (key + 1)\"\n >\n <el-input v-model=\"hotData.views[key].url\" placeholder=\"填写跳转地址\">\n <template #append>\n <el-button @click=\"delView(key)\">删除</el-button>\n </template>\n </el-input>\n </el-form-item>\n </el-form>\n <el-button\n :disabled=\"!hotData.background\"\n type=\"primary\"\n @click=\"addView()\"\n >{{ hotData.background ? '添加热区' : '请先上传图片' }}</el-button\n >\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport { reactive, ref, watch, onMounted } from 'vue'\n\n\nconst props = defineProps({\n hotDataValue: {\n default: () => {\n return {\n views: [],\n width: 400,\n height: 400,\n background: null,\n }\n },\n type: Object,\n },\n})\nconst index = ref(0)\nconst hotData = reactive(props.hotDataValue)\nconst addView = () => {\n // 这里hotData可以能没有views,如果没有就添加上views\n if (!Array.isArray(hotData.views)) {\n hotData.views = []\n }\n hotData.views.push({\n css: {\n left: 0,\n top: 0,\n width: 80,\n height: 80,\n borderRadius: 0,\n borderColor: '#fff',\n },\n url: '',\n })\n}\n\nconst delView = (indexToDelete: any) => {\n if (indexToDelete >= 0 && indexToDelete < hotData.views.length) {\n hotData.views.splice(indexToDelete, 1)\n }\n}\n\nconst onDrag = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n css.width = p.w\n css.height = p.h\n}\n\nonMounted(() => {\n resetSize()\n})\n\nwatch(\n () => hotData?.background,\n () => {\n resetSize()\n }\n)\n\nconst resetSize = () => {\n if (hotData.background) {\n getImageSize(hotData.background)\n .then((image: any) => {\n hotData.width = 500\n hotData.height = (image.height * 500) / image.width\n setTimeout(() => {\n // checkParentSize()\n }, 200)\n })\n .catch(() => {})\n }\n}\n\nconst getImageSize = (url: any) => {\n return new Promise(function (resolve, reject) {\n const image = new Image()\n image.onload = function () {\n resolve({\n width: image.width,\n height: image.height,\n })\n }\n image.onerror = function () {\n reject(new Error('error'))\n }\n image.src = url\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent","ref","reactive","onMounted","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA+FD,IAAM,MAAA,KAAA,GAAQC,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,OAAA,GAAUC,YAAS,CAAA,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AAC1B,UAAO,MAAA,CAAA,IAAI,KAAM,CAAA,OAAO,CAAC,CAAA,CAAA;AAAA,SAC3B,CAAA;AACA,QAAA,KAAA,CAAM,GAAM,GAAA,GAAA,CAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var hotAreaInput_vue_vue_type_script_setup_true_lang = require('./hot-area-input.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _HotAreaInput = /* @__PURE__ */ _pluginVue_exportHelper.default(hotAreaInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _HotAreaInput = /* @__PURE__ */ _pluginVue_exportHelper.default(hotAreaInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\hot-area-input\\src\\hot-area-input.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _HotAreaInput;
|
11
11
|
//# sourceMappingURL=hot-area-input.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hot-area-input.vue2.js","sources":["../../../src/hot-area-input/src/hot-area-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkHotAreaInput',\n});\n</script>\n<template>\n <div class=\"dk-hot-area-input\">\n <el-button type=\"primary\" @click=\"dialog = true\">设置热区</el-button>\n <dk-dialog v-model=\"dialog\" width=\"1000px\" title=\"设置热区\">\n <hot-area-content :hot-data-value=\"input\"></hot-area-content>\n <template #footer>\n <div class=\"text-center\">\n <el-button
|
1
|
+
{"version":3,"file":"hot-area-input.vue2.js","sources":["../../../src/hot-area-input/src/hot-area-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkHotAreaInput',\n});\n</script>\n<template>\n <div class=\"dk-hot-area-input\">\n <el-button type=\"primary\" @click=\"dialog = true\">设置热区</el-button>\n <dk-dialog v-model=\"dialog\" width=\"1000px\" title=\"设置热区\">\n <hot-area-content :hot-data-value=\"input\"></hot-area-content>\n <template #footer>\n <div class=\"text-center\">\n <el-button\n size=\"default\"\n style=\"width: 200px\"\n type=\"primary\"\n @click=\"dialog = false\"\n >确定</el-button\n >\n </div>\n </template>\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { hotAreaInputProps } from './props'\nimport { ref, reactive } from 'vue'\nimport HotAreaContent from './component/hot-area-content.vue'\n\n\nconst props = defineProps(hotAreaInputProps)\nconst input = reactive(props.modelValue)\nconst dialog = ref(false)\n</script>\n"],"names":["__MACROS_defineComponent","reactive","ref"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA6BD,IAAM,MAAA,KAAA,GAAQC,YAAS,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACvC,IAAM,MAAA,MAAA,GAASC,QAAI,KAAK,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/icon/src/icon.vue.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var icon_vue_vue_type_script_setup_true_lang = require('./icon.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _Icon = /* @__PURE__ */ _pluginVue_exportHelper.default(icon_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _Icon = /* @__PURE__ */ _pluginVue_exportHelper.default(icon_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\icon\\src\\icon.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _Icon;
|
11
11
|
//# sourceMappingURL=icon.vue.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon.vue2.js","sources":["../../../src/icon/src/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIcon',\n});\n</script>\n<template>\n <el-icon :class=\"bem()\" :style=\"getIconifyStyle\">\n <slot>\n <Icon v-if=\"iconType === 'cloud'\" :icon=\"props.icon\" />\n <component :is=\"props.icon\" v-if=\"iconType === 'el'\" />\n <van-icon
|
1
|
+
{"version":3,"file":"icon.vue2.js","sources":["../../../src/icon/src/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIcon',\n});\n</script>\n<template>\n <el-icon :class=\"bem()\" :style=\"getIconifyStyle\">\n <slot>\n <Icon v-if=\"iconType === 'cloud'\" :icon=\"props.icon\" />\n <component :is=\"props.icon\" v-if=\"iconType === 'el'\" />\n <van-icon\n v-if=\"iconType === 'vant'\"\n :class=\"bem()\"\n :name=\"props.icon\"\n :style=\"getIconifyStyle\"\n ></van-icon>\n </slot>\n </el-icon>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Icon } from '@iconify/vue'\nimport { computed } from 'vue'\nimport { createNamespace } from '@vipl520/utils'\nimport { iconProps } from './props'\nimport * as ElementPlusIconsVue from '@element-plus/icons-vue'\nimport icons from '@vant/icons'\n\nconst [_, bem] = createNamespace('icon')\n\n\nconst props = defineProps(iconProps)\n// 获取element-plus所有图标\nconst elIcons = Object.keys(ElementPlusIconsVue).map((key) => {\n return key\n})\nconst getIconifyStyle = computed(() => {\n const { color, size, hoverColor } = props\n const style: any = {}\n if (color) style.color = color\n if (size) style.fontSize = `${size}px`\n if (hoverColor) style['--hover-color'] = hoverColor\n return style\n})\n\nconst iconType = computed(() => {\n let type = 'cloud'\n if (elIcons.includes(props.icon) && props.showEl) {\n type = 'el'\n }\n if (props.showVant) {\n // 这里类型有些问题\n if (icons.basic.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.outline.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.filled.includes(props.icon)) {\n type = 'vant'\n }\n }\n return type\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ElementPlusIconsVue","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAyBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,MAAM,CAAA,CAAA;AAKvC,IAAA,MAAM,UAAU,MAAO,CAAA,IAAA,CAAKC,8BAAmB,CAAE,CAAA,GAAA,CAAI,CAAC,GAAQ,KAAA;AAC5D,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,eAAA,GAAkBC,aAAS,MAAM;AACrC,MAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACpC,MAAA,MAAM,QAAa,EAAC,CAAA;AACpB,MAAI,IAAA,KAAA;AAAO,QAAA,KAAA,CAAM,KAAQ,GAAA,KAAA,CAAA;AACzB,MAAI,IAAA,IAAA;AAAM,QAAM,KAAA,CAAA,QAAA,GAAW,GAAG,IAAI,CAAA,EAAA,CAAA,CAAA;AAClC,MAAI,IAAA,UAAA;AAAY,QAAA,KAAA,CAAM,eAAe,CAAI,GAAA,UAAA,CAAA;AACzC,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAWA,aAAS,MAAM;AAC9B,MAAA,IAAI,IAAO,GAAA,OAAA,CAAA;AACX,MAAA,IAAI,QAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,IAAK,MAAM,MAAQ,EAAA;AAChD,QAAO,IAAA,GAAA,IAAA,CAAA;AAAA,OACT;AACA,MAAA,IAAI,MAAM,QAAU,EAAA;AAElB,QAAA,IAAI,KAAM,CAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACpC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,OAAA,CAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACtC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,MAAA,CAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACrC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AAAA,OACF;AACA,MAAO,OAAA,IAAA,CAAA;AAAA,KACR,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var iconContent_vue_vue_type_script_setup_true_lang = require('./icon-content.vue2.js');
|
6
6
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
7
|
|
8
|
-
var _IconContent = /* @__PURE__ */ _pluginVue_exportHelper.default(iconContent_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-
|
8
|
+
var _IconContent = /* @__PURE__ */ _pluginVue_exportHelper.default(iconContent_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\icon-input\\src\\icon-content.vue"]]);
|
9
9
|
|
10
10
|
exports.default = _IconContent;
|
11
11
|
//# sourceMappingURL=icon-content.vue.js.map
|
@@ -232,7 +232,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
232
232
|
128
|
233
233
|
/* KEYED_FRAGMENT */
|
234
234
|
)),
|
235
|
-
!searchIcon.value ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2, "\u5F53\u524D\u663E\u793A\u5DF2\u7F13\u5B58\u7684\u56FE\u6807")) : vue.createCommentVNode("v-if", true)
|
235
|
+
!searchIcon.value ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2, " \u5F53\u524D\u663E\u793A\u5DF2\u7F13\u5B58\u7684\u56FE\u6807 ")) : vue.createCommentVNode("v-if", true)
|
236
236
|
],
|
237
237
|
64
|
238
238
|
/* STABLE_FRAGMENT */
|