@vipl520/dk-ui 1.0.41 → 1.0.44
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.js +3634 -12985
- 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/index.mjs +785 -10135
- package/dist/tags.json +7 -2
- package/dist/web-types.json +71 -12
- 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.vue2.mjs +7 -1
- package/es/attachment/src/attachment.vue2.mjs.map +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.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-list-input/src/audio-list-input.vue2.mjs.map +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/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.vue2.mjs.map +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.vue2.mjs.map +1 -1
- package/es/group/src/group.vue2.mjs +5 -13
- package/es/group/src/group.vue2.mjs.map +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.vue2.mjs.map +1 -1
- package/es/icon/src/icon.vue2.mjs.map +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-input.vue2.mjs.map +1 -1
- package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
- package/es/index.mjs +4 -9
- 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.map +1 -1
- package/es/page-diy/src/components/DragBox.vue.mjs +1 -1
- package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
- package/es/page-diy/src/components/DragTool.vue.mjs +5 -1
- package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
- package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
- package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +11 -9
- 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 +1 -2
- 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/DkMinHotArea.vue.mjs +23 -6
- package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +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.map +1 -1
- package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +3 -1
- package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +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.map +1 -1
- package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +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.map +1 -1
- package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
- package/es/page-diy/style/dk-page-diy.css +1 -1
- package/es/page-diy/style/dk-page-diy.scss +1 -1
- package/es/page-diy/style/index.css +1 -1
- package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +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.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
- package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +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.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.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.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.vue2.mjs +56 -39
- package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
- package/es/style-border-input/style/index.css +1 -1
- package/es/style-box-input/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.vue2.mjs +4 -7
- 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.vue2.mjs +10 -27
- package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
- package/es/style-input/src/style-input.vue2.mjs +10 -22
- package/es/style-input/src/style-input.vue2.mjs.map +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.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.vue2.mjs +138 -153
- 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.vue2.mjs +2 -1
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
- package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
- package/es/table/src/components/FieldRender.vue2.mjs.map +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.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.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/tiny-editor/src/tiny-editor.vue2.mjs +4 -2
- 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 +6 -0
- package/es/video-list-input/src/video-list-input.vue2.mjs.map +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.vue2.js +7 -1
- package/lib/attachment/src/attachment.vue2.js.map +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.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-list-input/src/audio-list-input.vue2.js.map +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/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.vue2.js.map +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.vue2.js.map +1 -1
- package/lib/group/src/group.vue2.js +4 -12
- package/lib/group/src/group.vue2.js.map +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.vue2.js.map +1 -1
- package/lib/icon/src/icon.vue2.js.map +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-input.vue2.js.map +1 -1
- package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
- package/lib/index.js +4 -9
- 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.map +1 -1
- package/lib/page-diy/src/components/DragBox.vue.js +1 -1
- package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
- package/lib/page-diy/src/components/DragTool.vue.js +5 -1
- package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
- package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
- package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +11 -9
- 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 +1 -2
- 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/DkMinHotArea.vue.js +23 -6
- package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +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.map +1 -1
- package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +3 -1
- package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +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.map +1 -1
- package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +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.map +1 -1
- package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
- package/lib/page-diy/style/dk-page-diy.css +1 -1
- package/lib/page-diy/style/dk-page-diy.scss +1 -1
- package/lib/page-diy/style/index.css +1 -1
- package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +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.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
- package/lib/poster-input/src/component/views/quick-action.vue2.js.map +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.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.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.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.vue2.js +56 -39
- package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
- package/lib/style-border-input/style/index.css +1 -1
- package/lib/style-box-input/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.vue2.js +4 -7
- 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.vue2.js +10 -27
- package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
- package/lib/style-input/src/style-input.vue2.js +9 -21
- package/lib/style-input/src/style-input.vue2.js.map +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.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.vue2.js +138 -153
- 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.vue2.js +2 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
- package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
- package/lib/table/src/components/FieldRender.vue2.js.map +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.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.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/tiny-editor/src/tiny-editor.vue2.js +4 -2
- 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 +6 -0
- package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
- package/package.json +3 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-box-input.vue2.js","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover\n ref=\"popover\"\n placement=\"bottom\"\n title=\"说明\"\n :width=\"280\"\n trigger=\"hover\"\n :content=\"props.help\"\n >\n <template #reference>\n <dk-icon\n icon=\"QuestionFilled\"\n class=\"m-l-5px vertical-text-top\"\n ></dk-icon>\n </template>\n </el-popover>\n </label>\n <div class=\"float-right cursor-pointer\">\n <div class=\"name-header-operations\">\n <el-tooltip\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置高宽\"\n placement=\"top-start\"\n >\n <dk-icon\n icon=\"Refresh\"\n color=\"var(--el-color-primary)\"\n @click=\"onRefresh('widthHeight')\"\n ></dk-icon>\n </el-tooltip>\n </div>\n <div class=\"name-header-operations\">\n <el-tooltip\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置内边距\"\n placement=\"top-start\"\n >\n <dk-icon\n icon=\"Refresh\"\n color=\"var(--el-color-success)\"\n @click=\"onRefresh('padding')\"\n ></dk-icon>\n </el-tooltip>\n </div>\n <div class=\"name-header-operations\">\n <el-tooltip\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置外边距\"\n placement=\"top-start\"\n >\n <dk-icon\n icon=\"Refresh\"\n color=\"var(--el-color-warning)\"\n @click=\"onRefresh('margin')\"\n ></dk-icon>\n </el-tooltip>\n </div>\n </div>\n\n <div\n tabindex=\"0\"\n class=\"wrapper\"\n style=\"margin-top: 10px\"\n :style=\"{ height: props.height + 'px' }\"\n >\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n {{ getValue(styles[item.value]) }}\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"\n 'input-box anchor-tip-' +\n item.position +\n (showStyles[item.value] ? ' show' : '')\n \"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div\n style=\"position: absolute; display: none; width: 100%; height: 100%\"\n ></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n {{ getValue(styles[item.value]) }}\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"\n 'input-box anchor-tip-' +\n item.position +\n (showStyles[item.value] ? ' show' : '')\n \"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span\n class=\"content-unit left-0\"\n @dblclick=\"onDblclick('width', 9)\"\n >\n {{ getValue(styles['width']) }}\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span\n class=\"content-unit right-0\"\n @dblclick=\"onDblclick('height', 9)\"\n >\n {{ getValue(styles['height']) }}\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue'])\n\nconst height = ref(props.height)\n\nwatch(\n () => props.height,\n () => {\n console.log('height', props.height)\n }\n)\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n// const handleMouseMove = (event: any) => {\n// // 处理鼠标移动事件\n// if (dragging.value) {\n// const p = dragPosition.position\n// const type = dragPosition.type\n// const value = type + upper(p)\n// if (p === 'left' || p === 'right') {\n// // 说明是左右移动\n// positionStyle.left = event.clientX + 'px'\n// // 根据移动的距离,增加或者减少margin/padding-left/right 的大小\n// let difference = event.clientX - startPosition.x\n// if (p === 'left') {\n// difference = -difference\n// }\n// styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n// startPosition.x = event.clientX\n// } else if (p === 'top' || p === 'bottom') {\n// positionStyle.top = event.clientY + 'px'\n// let difference = event.clientY - startPosition.y\n// if (p === 'top') {\n// difference = -difference\n// }\n// styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n// startPosition.y = event.clientY\n// }\n// }\n// }\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (\n axis: 'x' | 'y',\n position: 'top' | 'bottom' | 'left' | 'right'\n ) => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\n// const handleMouseDown = (type: string, position: string, event: any) => {\n// // 处理鼠标按下事件\n// console.log('handleMouseDown', event)\n// dragPosition.position = position\n// dragPosition.type = type\n// trackMouseBound.value = handleMouseMove.bind(this)\n// document.addEventListener('mousemove', trackMouseBound.value)\n// stopChangeBound.value = handleMouseUp.bind(this)\n// document.addEventListener('mouseup', stopChangeBound.value)\n// dragging.value = true\n// const height = props.height\n// // 宽度 为.wrapper的宽度\n// const wrapperElement: any = document.querySelector('.wrapper')\n// const width = wrapperElement ? wrapperElement.offsetWidth : 0\n// const multiples: any = {\n// margin: 0.9,\n// padding: 0.9 * 0.7,\n// }\n// positionStyle.display = 'block'\n// startPosition.x = event.clientX\n// startPosition.y = event.clientY\n// if (position === 'left' || position === 'right') {\n// document.body.style.cursor = 'ew-resize'\n// positionStyle.left = event.clientX + 'px'\n// positionStyle.top = event.clientY - height * 0.5 * multiples[type] + 'px'\n// positionStyle.width = '0.1px'\n// positionStyle.height = height * multiples[type] + 'px'\n// } else {\n// document.body.style.cursor = 'ns-resize'\n// positionStyle.left = event.clientX - width * 0.5 * multiples[type] + 'px'\n// positionStyle.top = event.clientY + 'px'\n// positionStyle.width = width * multiples[type] + 'px'\n// positionStyle.height = '0.1px'\n// }\n// }\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (\n cursor: string,\n left: string,\n top: string,\n width: string,\n height: string\n ) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height * 0.5 * multiples[type] + 'px',\n '0.1px',\n height * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","ref","watch","upper","height","width","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4OD,IAAA,MAAM,QAAaC,YAAS,CAAA;AAAA,MAC1B,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA,KAAA;AAAA,MACT,WAAa,EAAA,KAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,aAAaA,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAcA,OAAI,EAAA,CAAA;AAExB,IAAA,MAAM,SAAcD,YAAS,CAAA;AAAA,MAC3B,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,MAC/C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAA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A,EAAA,CAAA;AACrB,QAAA,MAAA,CAAO,SAAY,GAAA,EAAA,CAAA;AACnB,QAAA,MAAA,CAAO,YAAe,GAAA,EAAA,CAAA;AAAA,OACxB,MAAA,IAAW,SAAS,SAAW,EAAA;AAC7B,QAAA,MAAA,CAAO,WAAc,GAAA,EAAA,CAAA;AACrB,QAAA,MAAA,CAAO,YAAe,GAAA,EAAA,CAAA;AACtB,QAAA,MAAA,CAAO,UAAa,GAAA,EAAA,CAAA;AACpB,QAAA,MAAA,CAAO,aAAgB,GAAA,EAAA,CAAA;AAAA,OACzB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"style-box-input.vue2.js","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover ref=\"popover\" placement=\"bottom\" title=\"说明\" :width=\"280\" trigger=\"hover\" :content=\"props.help\">\n <template #reference>\n <dk-icon icon=\"QuestionFilled\" class=\"m-l-5px vertical-text-top\"></dk-icon>\n </template>\n </el-popover>\n </label>\n <div class=\"float-right cursor-pointer\">\n <div class=\"name-header-operations\">\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置高宽\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"var(--el-color-primary)\" @click=\"onRefresh('widthHeight')\"></dk-icon>\n </el-tooltip>\n </div>\n <div class=\"name-header-operations\">\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置内边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"var(--el-color-success)\" @click=\"onRefresh('padding')\"></dk-icon>\n </el-tooltip>\n </div>\n <div class=\"name-header-operations\">\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"var(--el-color-warning)\" @click=\"onRefresh('margin')\"></dk-icon>\n </el-tooltip>\n </div>\n </div>\n\n <div tabindex=\"0\" class=\"wrapper\" style=\"margin-top: 10px\" :style=\"{ height: props.height + 'px' }\">\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n {{ getValue(styles[item.value]) }}\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div style=\"position: absolute; display: none; width: 100%; height: 100%\"></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n {{ getValue(styles[item.value]) }}\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span class=\"content-unit left-0\" @dblclick=\"onDblclick('width', 9)\">\n {{ getValue(styles['width']) }}\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span class=\"content-unit right-0\" @dblclick=\"onDblclick('height', 9)\">\n {{ getValue(styles['height']) }}\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst height = ref(props.height)\n\nwatch(\n () => props.height,\n () => {\n console.log('height', props.height)\n }\n)\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n// const handleMouseMove = (event: any) => {\n// // 处理鼠标移动事件\n// if (dragging.value) {\n// const p = dragPosition.position\n// const type = dragPosition.type\n// const value = type + upper(p)\n// if (p === 'left' || p === 'right') {\n// // 说明是左右移动\n// positionStyle.left = event.clientX + 'px'\n// // 根据移动的距离,增加或者减少margin/padding-left/right 的大小\n// let difference = event.clientX - startPosition.x\n// if (p === 'left') {\n// difference = -difference\n// }\n// styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n// startPosition.x = event.clientX\n// } else if (p === 'top' || p === 'bottom') {\n// positionStyle.top = event.clientY + 'px'\n// let difference = event.clientY - startPosition.y\n// if (p === 'top') {\n// difference = -difference\n// }\n// styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n// startPosition.y = event.clientY\n// }\n// }\n// }\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (axis: 'x' | 'y', position: 'top' | 'bottom' | 'left' | 'right') => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\n// const handleMouseDown = (type: string, position: string, event: any) => {\n// // 处理鼠标按下事件\n// console.log('handleMouseDown', event)\n// dragPosition.position = position\n// dragPosition.type = type\n// trackMouseBound.value = handleMouseMove.bind(this)\n// document.addEventListener('mousemove', trackMouseBound.value)\n// stopChangeBound.value = handleMouseUp.bind(this)\n// document.addEventListener('mouseup', stopChangeBound.value)\n// dragging.value = true\n// const height = props.height\n// // 宽度 为.wrapper的宽度\n// const wrapperElement: any = document.querySelector('.wrapper')\n// const width = wrapperElement ? wrapperElement.offsetWidth : 0\n// const multiples: any = {\n// margin: 0.9,\n// padding: 0.9 * 0.7,\n// }\n// positionStyle.display = 'block'\n// startPosition.x = event.clientX\n// startPosition.y = event.clientY\n// if (position === 'left' || position === 'right') {\n// document.body.style.cursor = 'ew-resize'\n// positionStyle.left = event.clientX + 'px'\n// positionStyle.top = event.clientY - height * 0.5 * multiples[type] + 'px'\n// positionStyle.width = '0.1px'\n// positionStyle.height = height * multiples[type] + 'px'\n// } else {\n// document.body.style.cursor = 'ns-resize'\n// positionStyle.left = event.clientX - width * 0.5 * multiples[type] + 'px'\n// positionStyle.top = event.clientY + 'px'\n// positionStyle.width = width * multiples[type] + 'px'\n// positionStyle.height = '0.1px'\n// }\n// }\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (cursor: string, left: string, top: string, width: string, height: string) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height * 0.5 * multiples[type] + 'px',\n '0.1px',\n height * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","ref","watch","upper","height","width","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAkLD,IAAA,MAAM,QAAaC,YAAS,CAAA;AAAA,MAC1B,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA,KAAA;AAAA,MACT,WAAa,EAAA,KAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,aAAaA,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAcA,OAAI,EAAA,CAAA;AAExB,IAAA,MAAM,SAAcD,YAAS,CAAA;AAAA,MAC3B,UAAA,EAAY,KAAM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default: () => {};
|
5
5
|
};
|
6
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
7
|
modelValue: {
|
8
8
|
type: ObjectConstructor;
|
9
9
|
default: () => {};
|
10
10
|
};
|
11
11
|
}>> & {
|
12
12
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
13
14
|
}, {
|
14
15
|
modelValue: Record<string, any>;
|
15
16
|
}, {}>>;
|
@@ -3,13 +3,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
type: ObjectConstructor;
|
4
4
|
default: () => {};
|
5
5
|
};
|
6
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
7
|
modelValue: {
|
8
8
|
type: ObjectConstructor;
|
9
9
|
default: () => {};
|
10
10
|
};
|
11
11
|
}>> & {
|
12
12
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
13
14
|
}, {
|
14
15
|
modelValue: Record<string, any>;
|
15
16
|
}, {}>;
|
@@ -25,7 +25,7 @@ const __default__ = vue.defineComponent({
|
|
25
25
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
26
26
|
...__default__,
|
27
27
|
props: props.styleFontInputProps,
|
28
|
-
emits: ["update:modelValue"],
|
28
|
+
emits: ["update:modelValue", "change"],
|
29
29
|
setup(__props, { emit }) {
|
30
30
|
const props = __props;
|
31
31
|
const showAfter = 400;
|
@@ -45,17 +45,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
45
45
|
return acc;
|
46
46
|
}, {});
|
47
47
|
emit("update:modelValue", _styles);
|
48
|
+
emit("change", _styles);
|
48
49
|
});
|
49
50
|
vue.watch(
|
50
51
|
() => props.modelValue,
|
51
52
|
() => {
|
52
|
-
const propertiesToWatch = [
|
53
|
-
"color",
|
54
|
-
"fontSize",
|
55
|
-
"fontWeight",
|
56
|
-
"fontStyle",
|
57
|
-
"textDecoration"
|
58
|
-
];
|
53
|
+
const propertiesToWatch = ["color", "fontSize", "fontWeight", "fontStyle", "textDecoration"];
|
59
54
|
propertiesToWatch.forEach((property) => {
|
60
55
|
styles[property] = props.modelValue[property] || "";
|
61
56
|
});
|
@@ -167,19 +162,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
167
162
|
(vue.openBlock(), vue.createElementBlock(
|
168
163
|
vue.Fragment,
|
169
164
|
null,
|
170
|
-
vue.renderList([
|
171
|
-
"12px",
|
172
|
-
"14px",
|
173
|
-
"16px",
|
174
|
-
"18px",
|
175
|
-
"20px",
|
176
|
-
"24px",
|
177
|
-
"28px",
|
178
|
-
"32px",
|
179
|
-
"36px",
|
180
|
-
"40px",
|
181
|
-
"48px"
|
182
|
-
], (item) => {
|
165
|
+
vue.renderList(["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "40px", "48px"], (item) => {
|
183
166
|
return vue.createVNode(_component_el_option, {
|
184
167
|
key: item,
|
185
168
|
label: item,
|
@@ -282,7 +265,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
282
265
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => styles.fontWeight = $event)
|
283
266
|
}, {
|
284
267
|
default: vue.withCtx(() => [
|
285
|
-
vue.createVNode(_component_el_radio_button, {
|
268
|
+
vue.createVNode(_component_el_radio_button, { value: "bold" }, {
|
286
269
|
default: vue.withCtx(() => [
|
287
270
|
vue.createVNode(_component_dk_icon, {
|
288
271
|
icon: "radix-icons:font-bold",
|
@@ -292,7 +275,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
292
275
|
_: 1
|
293
276
|
/* STABLE */
|
294
277
|
}),
|
295
|
-
vue.createVNode(_component_el_radio_button, {
|
278
|
+
vue.createVNode(_component_el_radio_button, { value: "lighter" }, {
|
296
279
|
default: vue.withCtx(() => [
|
297
280
|
vue.createVNode(_component_dk_icon, {
|
298
281
|
icon: "clarity:font-size-line",
|
@@ -341,7 +324,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
341
324
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => styles.fontStyle = $event)
|
342
325
|
}, {
|
343
326
|
default: vue.withCtx(() => [
|
344
|
-
vue.createVNode(_component_el_radio_button, {
|
327
|
+
vue.createVNode(_component_el_radio_button, { value: "italic" }, {
|
345
328
|
default: vue.withCtx(() => [
|
346
329
|
vue.createVNode(_component_dk_icon, {
|
347
330
|
icon: "radix-icons:font-italic",
|
@@ -389,7 +372,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
389
372
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => styles.textDecoration = $event)
|
390
373
|
}, {
|
391
374
|
default: vue.withCtx(() => [
|
392
|
-
vue.createVNode(_component_el_radio_button, {
|
375
|
+
vue.createVNode(_component_el_radio_button, { value: "underline" }, {
|
393
376
|
default: vue.withCtx(() => [
|
394
377
|
vue.createVNode(_component_dk_icon, {
|
395
378
|
icon: "radix-icons:underline",
|
@@ -399,7 +382,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
399
382
|
_: 1
|
400
383
|
/* STABLE */
|
401
384
|
}),
|
402
|
-
vue.createVNode(_component_el_radio_button, {
|
385
|
+
vue.createVNode(_component_el_radio_button, { value: "line-through" }, {
|
403
386
|
default: vue.withCtx(() => [
|
404
387
|
vue.createVNode(_component_dk_icon, {
|
405
388
|
icon: "radix-icons:strikethrough",
|
@@ -409,7 +392,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
409
392
|
_: 1
|
410
393
|
/* STABLE */
|
411
394
|
}),
|
412
|
-
vue.createVNode(_component_el_radio_button, {
|
395
|
+
vue.createVNode(_component_el_radio_button, { value: "wavy underline" }, {
|
413
396
|
default: vue.withCtx(() => [
|
414
397
|
vue.createVNode(_component_dk_icon, {
|
415
398
|
icon: "mdi:format-underline-wavy",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-font-input.vue2.js","sources":["../../../src/style-font-input/src/style-font-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleFontInput',\n});\n</script>\n<template>\n <div class=\"dk-style-font-input\">\n <!-- 颜色、字号、粗细、风格、装饰-->\n <div style=\"display: flex; flex-flow: row wrap\">\n <el-tooltip\n placement=\"top-end\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 文字颜色\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.color === ''\"\n @click=\"clear('color')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-color-picker v-model=\"styles.color\"></el-color-picker>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top-end\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 字号\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontSize === ''\"\n @click=\"clear('fontSize')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-b-5px\">\n <el-select\n v-model=\"styles.fontSize\"\n :remote-show-suffix=\"false\"\n placeholder=\"字号\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in [\n '12px',\n '14px',\n '16px',\n '18px',\n '20px',\n '24px',\n '28px',\n '32px',\n '36px',\n '40px',\n '48px',\n ]\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top-end\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-r-5px m-b-5px\">\n <el-select\n v-model=\"styles.fontWeight\"\n :remote-show-suffix=\"false\"\n placeholder=\"粗细\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in WeightValues\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\"\n ></el-option>\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top-end\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 文字粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontWeight\">\n <el-radio-button label=\"bold\">\n <dk-icon\n icon=\"radix-icons:font-bold\"\n title=\"文字加粗\"\n ></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"lighter\">\n <dk-icon\n icon=\"clarity:font-size-line\"\n title=\"文字默认\"\n ></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top-end\"\n class=\"m-r-5px\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 文字风格\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontStyle === ''\"\n @click=\"clear('fontStyle')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontStyle\">\n <el-radio-button label=\"italic\">\n <dk-icon\n icon=\"radix-icons:font-italic\"\n title=\"文字倾斜\"\n ></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top-end\"\n trigger=\"hover\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #content>\n 文字装饰\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.textDecoration === ''\"\n @click=\"clear('textDecoration')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-radio-group v-model=\"styles.textDecoration\">\n <el-radio-button label=\"underline\">\n <dk-icon icon=\"radix-icons:underline\" title=\"下划线\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"line-through\">\n <dk-icon\n icon=\"radix-icons:strikethrough\"\n title=\"删除线\"\n ></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"wavy underline\">\n <dk-icon\n icon=\"mdi:format-underline-wavy\"\n title=\"波浪线\"\n ></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip\n placement=\"top\"\n trigger=\"hover\"\n content=\"全部重置\"\n :show-after=\"showAfter\"\n :hide-after=\"hideAfter\"\n >\n <template #default>\n <el-button\n type=\"danger\"\n plain\n icon=\"Delete\"\n class=\"m-l-5px m-b-5px\"\n @click=\"clear('all')\"\n ></el-button>\n </template>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleFontInputProps } from './props'\nimport { reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleFontInputProps)\n\nconst showAfter = 400\nconst hideAfter = 100\n\nconst styles: any = reactive({\n color: props.modelValue.color || '',\n fontSize: props.modelValue.fontSize || '',\n fontWeight: props.modelValue.fontWeight || '',\n fontStyle: props.modelValue.fontStyle || '',\n textDecoration: props.modelValue.textDecoration || '',\n})\n\nconst emit = defineEmits(['update:modelValue'])\nwatch(styles, (val) => {\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n})\n\nwatch(\n () => props.modelValue,\n () => {\n // styles.color = props.modelValue.color || ''\n // styles.fontSize = props.modelValue.fontSize || ''\n // styles.fontWeight = props.modelValue.fontWeight || ''\n // styles.fontStyle = props.modelValue.fontStyle || ''\n // styles.textDecoration = props.modelValue.textDecoration || ''\n const propertiesToWatch = [\n 'color',\n 'fontSize',\n 'fontWeight',\n 'fontStyle',\n 'textDecoration',\n ]\n propertiesToWatch.forEach((property) => {\n styles[property] = props.modelValue[property] || ''\n })\n },\n { deep: true }\n)\n\nconst WeightValues = [\n { label: '普通', value: 'normal' },\n { label: '加粗', value: 'bold' },\n { label: '更粗', value: 'bolder' },\n { label: '更细', value: 'lighter' },\n { label: '100', value: '100' },\n { label: '200', value: '200' },\n { label: '300', value: '300' },\n { label: '400', value: '400' },\n { label: '500', value: '500' },\n { label: '600', value: '600' },\n { label: '700', value: '700' },\n { label: '800', value: '800' },\n { label: '900', value: '900' },\n]\n\nconst clear = (type: string) => {\n if (type === 'all') {\n Object.keys(styles).forEach((key) => {\n styles[key] = ''\n })\n } else {\n styles[type] = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA8PD,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAClB,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAElB,IAAA,MAAM,SAAcC,YAAS,CAAA;AAAA,MAC3B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,QAAA,EAAU,KAAM,CAAA,UAAA,CAAW,QAAY,IAAA,EAAA;AAAA,MACvC,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,cAAA,EAAgB,KAAM,CAAA,UAAA,CAAW,cAAkB,IAAA,EAAA;AAAA,KACpD,CAAA,CAAA;AAGD,IAAMC,SAAA,CAAA,MAAA,EAAQ,CAAC,GAAQ,KAAA;AACrB,MAAM,MAAA,OAAA,GAAU,OAAO,IAAK,CAAA,MAAM,EAAE,MAAO,CAAA,CAAC,KAAU,GAAQ,KAAA;AAC5D,QAAI,IAAA,MAAA,CAAO,GAAG,CAAA,KAAM,EAAI,EAAA;AACtB,UAAI,GAAA,CAAA,GAAG,CAAI,GAAA,MAAA,CAAO,GAAG,CAAA,CAAA;AAAA,SACvB;AACA,QAAO,OAAA,GAAA,CAAA;AAAA,OACT,EAAG,EAAE,CAAA,CAAA;AACL,MAAA,I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KAAA,EAAO,KAAO,EAAA,KAAA,EAAO,KAAM,EAAA;AAAA,MAC7B,EAAE,KAAA,EAAO,KAAO,EAAA,KAAA,EAAO,KAAM,EAAA;AAAA,MAC7B,EAAE,KAAA,EAAO,KAAO,EAAA,KAAA,EAAO,KAAM,EAAA;AAAA,KAC/B,CAAA;AAEA,IAAM,MAAA,KAAA,GAAQ,CAAC,IAAiB,KAAA;AAC9B,MAAA,IAAI,SAAS,KAAO,EAAA;AAClB,QAAA,MAAA,CAAO,IAAK,CAAA,MAAM,CAAE,CAAA,OAAA,CAAQ,CAAC,GAAQ,KAAA;AACnC,UAAA,MAAA,CAAO,GAAG,CAAI,GAAA,EAAA,CAAA;AAAA,SACf,CAAA,CAAA;AAAA,OACI,MAAA;AACL,QAAA,MAAA,CAAO,IAAI,CAAI,GAAA,EAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"style-font-input.vue2.js","sources":["../../../src/style-font-input/src/style-font-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleFontInput',\n});\n</script>\n<template>\n <div class=\"dk-style-font-input\">\n <!-- 颜色、字号、粗细、风格、装饰-->\n <div style=\"display: flex; flex-flow: row wrap\">\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字颜色\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.color === ''\"\n @click=\"clear('color')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-color-picker v-model=\"styles.color\"></el-color-picker>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 字号\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontSize === ''\"\n @click=\"clear('fontSize')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-b-5px\">\n <el-select\n v-model=\"styles.fontSize\"\n :remote-show-suffix=\"false\"\n placeholder=\"字号\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in ['12px', '14px', '16px', '18px', '20px', '24px', '28px', '32px', '36px', '40px', '48px']\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-r-5px m-b-5px\">\n <el-select\n v-model=\"styles.fontWeight\"\n :remote-show-suffix=\"false\"\n placeholder=\"粗细\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in WeightValues\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\"\n ></el-option>\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontWeight\">\n <el-radio-button value=\"bold\">\n <dk-icon icon=\"radix-icons:font-bold\" title=\"文字加粗\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"lighter\">\n <dk-icon icon=\"clarity:font-size-line\" title=\"文字默认\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" class=\"m-r-5px\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字风格\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontStyle === ''\"\n @click=\"clear('fontStyle')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontStyle\">\n <el-radio-button value=\"italic\">\n <dk-icon icon=\"radix-icons:font-italic\" title=\"文字倾斜\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字装饰\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.textDecoration === ''\"\n @click=\"clear('textDecoration')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-radio-group v-model=\"styles.textDecoration\">\n <el-radio-button value=\"underline\">\n <dk-icon icon=\"radix-icons:underline\" title=\"下划线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"line-through\">\n <dk-icon icon=\"radix-icons:strikethrough\" title=\"删除线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"wavy underline\">\n <dk-icon icon=\"mdi:format-underline-wavy\" title=\"波浪线\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top\" trigger=\"hover\" content=\"全部重置\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #default>\n <el-button type=\"danger\" plain icon=\"Delete\" class=\"m-l-5px m-b-5px\" @click=\"clear('all')\"></el-button>\n </template>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleFontInputProps } from './props'\nimport { reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleFontInputProps)\n\nconst showAfter = 400\nconst hideAfter = 100\n\nconst styles: any = reactive({\n color: props.modelValue.color || '',\n fontSize: props.modelValue.fontSize || '',\n fontWeight: props.modelValue.fontWeight || '',\n fontStyle: props.modelValue.fontStyle || '',\n textDecoration: props.modelValue.textDecoration || '',\n})\n\nconst emit = defineEmits(['update:modelValue', 'change'])\nwatch(styles, (val) => {\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nwatch(\n () => props.modelValue,\n () => {\n // styles.color = props.modelValue.color || ''\n // styles.fontSize = props.modelValue.fontSize || ''\n // styles.fontWeight = props.modelValue.fontWeight || ''\n // styles.fontStyle = props.modelValue.fontStyle || ''\n // styles.textDecoration = props.modelValue.textDecoration || ''\n const propertiesToWatch = ['color', 'fontSize', 'fontWeight', 'fontStyle', 'textDecoration']\n propertiesToWatch.forEach((property) => {\n styles[property] = props.modelValue[property] || ''\n })\n },\n { deep: true }\n)\n\nconst WeightValues = [\n { label: '普通', value: 'normal' },\n { label: '加粗', value: 'bold' },\n { label: '更粗', value: 'bolder' },\n { label: '更细', value: 'lighter' },\n { label: '100', value: '100' },\n { label: '200', value: '200' },\n { label: '300', value: '300' },\n { label: '400', value: '400' },\n { label: '500', value: '500' },\n { label: '600', value: '600' },\n { label: '700', value: '700' },\n { label: '800', value: '800' },\n { label: '900', value: '900' },\n]\n\nconst clear = (type: string) => {\n if (type === 'all') {\n Object.keys(styles).forEach((key) => {\n styles[key] = ''\n })\n } else {\n styles[type] = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAwLD,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAClB,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAElB,IAAA,MAAM,SAAcC,YAAS,CAAA;AAAA,MAC3B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,QAAA,EAAU,KAAM,CAAA,UAAA,CAAW,QAAY,IAAA,EAAA;AAAA,MACvC,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,cAAA,EAAgB,KAAM,CAAA,UAAA,CAAW,cAAkB,IAAA,EAAA;AAAA,KACpD,CAAA,CAAA;AAGD,IAAMC,SAAA,CAAA,MAAA,EAAQ,CAAC,GAAQ,KAAA;AACrB,MAAM,MAAA,OAAA,GAAU,OAAO,IAAK,CAAA,MAAM,EAAE,MAAO,CAAA,CAAC,KAAU,GAAQ,KAAA;AAC5D,QAAI,IAAA,MAAA,CA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 vue.defineComponent({
|
|
22
22
|
const activeNames = vue.ref([0]);
|
23
23
|
const values = vue.ref({});
|
24
24
|
const loading = vue.ref(true);
|
25
|
-
|
26
|
-
|
27
|
-
() => {
|
28
|
-
|
29
|
-
|
30
|
-
Object.keys(values.value[key]).forEach((k) => {
|
31
|
-
obj[k] = values.value[key][k];
|
32
|
-
});
|
25
|
+
const onChange = () => {
|
26
|
+
const obj = {};
|
27
|
+
Object.keys(values.value).forEach((key) => {
|
28
|
+
Object.keys(values.value[key]).forEach((k) => {
|
29
|
+
obj[k] = values.value[key][k];
|
33
30
|
});
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
deep: true
|
38
|
-
}
|
39
|
-
);
|
40
|
-
vue.watch(
|
41
|
-
() => props.modelValue,
|
42
|
-
() => {
|
43
|
-
init();
|
44
|
-
}
|
45
|
-
);
|
31
|
+
});
|
32
|
+
emit("update:modelValue", obj);
|
33
|
+
};
|
46
34
|
const init = () => {
|
47
35
|
const components = props.components;
|
48
36
|
const obj = {};
|
@@ -94,7 +82,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
94
82
|
key: 0,
|
95
83
|
modelValue: values.value[item.name],
|
96
84
|
"onUpdate:modelValue": ($event) => values.value[item.name] = $event
|
97
|
-
}, item.props), null, 16, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
|
85
|
+
}, item.props, { onChange }), null, 16, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
|
98
86
|
]),
|
99
87
|
_: 2
|
100
88
|
/* DYNAMIC */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-input.vue2.js","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item
|
1
|
+
{"version":3,"file":"style-input.vue2.js","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in props.components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleInputProps } from './props'\nimport { onMounted, ref, watch } from 'vue'\n\n\nconst props = defineProps(styleInputProps)\nconst activeNames = ref([0])\nconst values: any = ref({})\nconst loading = ref(true)\n\nconst emit = defineEmits(['update:modelValue'])\nconst onChange = () => {\n const obj: any = {}\n Object.keys(values.value).forEach((key) => {\n Object.keys(values.value[key]).forEach((k) => {\n obj[k] = values.value[key][k]\n })\n })\n emit('update:modelValue', obj)\n}\nconst init = () => {\n const components: any = props.components\n const obj: any = {}\n components.forEach((item: any) => {\n const params = item.params\n const paramsObj: any = {}\n Object.keys(params).forEach((key) => {\n const param = params[key]\n if (props.modelValue[param]) {\n paramsObj[param] = props.modelValue[param]\n }\n })\n obj[item.name] = paramsObj\n })\n values.value = obj\n loading.value = false\n}\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","onMounted"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6BD,IAAA,MAAM,WAAc,GAA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,QAAI,GAAA,CAAA,IAAA,CAAK,IAAI,CAAI,GAAA,SAAA,CAAA;AAAA,OAClB,CAAA,CAAA;AACD,MAAA,MAAA,CAAO,KAAQ,GAAA,GAAA,CAAA;AACf,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,KAClB,CAAA;AACA,IAAAC,aAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-number-input.vue2.js","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input
|
1
|
+
{"version":3,"file":"style-number-input.vue2.js","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input\n v-model=\"form.number\"\n type=\"text\"\n :controls=\"false\"\n @input=\"emit('input', $event)\"\n >\n <template #prefix>\n <span\n class=\"w-resize\"\n :class=\"[`${props.direction}-resize`]\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :disabled=\"!props.tooltipContent\"\n :content=\"props.tooltipContent\"\n placement=\"top\"\n :open-delay=\"500\"\n >\n <dk-icon :icon=\"props.icon || 'Rank'\"></dk-icon>\n </el-tooltip>\n </span>\n </template>\n <template v-if=\"showUnit\" #append>\n <el-select v-model=\"form.unit\" style=\"width: 40px\" suffix-icon=\"\">\n <el-option\n v-for=\"(item, index) in units\"\n :key=\"index\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </template>\n </el-input>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { styleNumberInputProps } from './props'\nimport { reactive, ref, watch } from 'vue'\nimport { splitUnit } from '@vipl520/utils'\n\n\nconst props = defineProps(styleNumberInputProps)\nconst values = splitUnit(props.modelValue, props.units)\nconst form: any = reactive({\n number: values.number,\n unit: values.unit || 'px',\n})\n\nconst isDragging = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst startY = ref(0) // 开始的Y坐标\nconst startX = ref(0) // 开始的X坐标\nconst handleMouseDown = (event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n startY.value = event.clientY\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n let increment\n if (props.direction === 'horizontal') {\n const dx = event.clientX - startX.value\n increment = Math.floor(dx / 10)\n startX.value += increment * 10\n } else if (props.direction === 'vertical') {\n const dy = event.clientY - startY.value\n increment = Math.floor(dy / 10)\n startY.value += increment * 10\n }\n form.number = parseInt(form.number + increment)\n }\n}\n\nconst handleMouseUp = () => {\n console.log('up')\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n}\nconst emit = defineEmits(['input', 'update:modelValue'])\n\nwatch(\n () => form,\n () => {\n if (form.number === '') {\n emit('update:modelValue', '')\n } else {\n emit('update:modelValue', form.number + form.unit)\n }\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n const values = splitUnit(props.modelValue, props.units)\n form.number = values.number\n form.unit = values.unit || 'px'\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","splitUnit","reactive","ref","watch","values"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAmDD,IAAA,MAAM,MAAS,GAAAC,eAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,QAAQ,MAAO,CAAA,MAAA;AAAA,MACf,IAAA,EAAM,OAAO,IAAQ,IAAA,IAAA;AAAA,KACtB,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAaC,QAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,eAAA,GAAuBA,QAAI,IAAI,CAAA,CAAA;AACrC,IAAM,MAAA,eAAA,GAAuBA,QAAI,IAAI,CAAA,CAAA;AACrC,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,eAAA,GAAkB,CAAC,KAAe,KAAA;AACtC,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AACnB,MAAA,MAAA,CAAO,QAAQ,KAAM,CAAA,OAAA,CAAA;AACrB,MAAA,MAAA,CAAO,QAAQ,KAAM,CAAA,OAAA,CAAA;AACrB,MAAgB,eAAA,CAAA,KAAA,GAAQ,eAAgB,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAClD,MAAgB,eAAA,CAAA,KAAA,GAAQ,aAAc,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAChD,MAAS,QAAA,CAAA,gBAAA,CAAiB,WAAa,EAAA,eAAA,CAAgB,KAAK,CAAA,CAAA;AAC5D,MAAS,QAAA,CAAA,gBAAA,CAAiB,SAAW,EAAA,eAAA,CA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AQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAGA,IAAAC,SAAA;AAAA,MACE,MAAM,IAAA;AAAA,MACN,MAAM;AACJ,QAAI,IAAA,IAAA,CAAK,WAAW,EAAI,EAAA;AACtB,UAAA,IAAA,CAAK,qBAAqB,EAAE,CAAA,CAAA;AAAA,SACvB,MAAA;AACL,UAAA,IAAA,CAAK,mBAAqB,EAAA,IAAA,CAAK,MAAS,GAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,SACnD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAMC,OAAS,GAAAJ,eAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,QAAA,IAAA,CAAK,SAASI,OAAO,CAAA,MAAA,CAAA;AACrB,QAAK,IAAA,CAAA,IAAA,GAAOA,QAAO,IAAQ,IAAA,IAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -185,7 +185,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
185
185
|
}, {
|
186
186
|
default: vue.withCtx(() => [
|
187
187
|
vue.createElementVNode("span", {
|
188
|
-
style: vue.normalizeStyle([
|
188
|
+
style: vue.normalizeStyle([
|
189
|
+
{ "cursor": "pointer" },
|
190
|
+
form.value[item.value] ? "color:var(--el-color-primary)" : ""
|
191
|
+
]),
|
189
192
|
onClick: ($event) => form.value[item.value] = ""
|
190
193
|
}, vue.toDisplayString(item.label) + "\uFF1A", 13, _hoisted_2)
|
191
194
|
]),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-position-input.vue2.js","sources":["../../../src/style-position-input/src/style-position-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStylePositionInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-position-input\">\n <el-form label-width=\"50px\" label-position=\"left\">\n <div>\n <el-form-item label=\"常用\">\n <el-radio-group @change=\"positionChange\">\n <el-radio-button
|
1
|
+
{"version":3,"file":"style-position-input.vue2.js","sources":["../../../src/style-position-input/src/style-position-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStylePositionInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-position-input\">\n <el-form label-width=\"50px\" label-position=\"left\">\n <div>\n <el-form-item label=\"常用\">\n <el-radio-group @change=\"positionChange\">\n <el-radio-button\n v-for=\"(item, key) in positions\"\n :key=\"key\"\n :label=\"item.value\"\n >\n {{ item.label }}\n </el-radio-button>\n </el-radio-group>\n </el-form-item>\n </div>\n <div class=\"m-t-10px\">\n <el-row :gutter=\"20\">\n <el-col\n v-for=\"(item, key) in custom\"\n :key=\"key\"\n :span=\"span\"\n class=\"m-b-5px\"\n >\n <el-form-item :label=\"item.label\">\n <template #label>\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :content=\"item.tip\"\n placement=\"top\"\n >\n <span\n style=\"cursor: pointer\"\n :style=\"\n form[item.value] ? 'color:var(--el-color-primary)' : ''\n \"\n @click=\"form[item.value] = ''\"\n >\n {{ item.label }}:</span\n >\n </el-tooltip>\n </template>\n <dk-style-number-input\n v-model=\"form[item.value]\"\n @input=\"change = false\"\n ></dk-style-number-input>\n </el-form-item>\n </el-col>\n </el-row>\n </div>\n </el-form>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { stylePositionInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\nconst span = computed(() => {\n if (width.value <= 300) {\n return 24\n } else if (width.value < 800) {\n return 12\n } else {\n return 6\n }\n})\n\n\n\nconst props = defineProps(stylePositionInputProps)\n\nconst form: any = ref({\n left: props.modelValue.left || '',\n top: props.modelValue.top || '',\n right: props.modelValue.right || '',\n bottom: props.modelValue.bottom || '',\n})\n\nconst custom = [\n { label: '上', value: 'top', tip: '当前距离顶部距离,点击清除' },\n { label: '右', value: 'right', tip: '当前距离右侧的距离,点击清除' },\n { label: '下', value: 'bottom', tip: '当前距离底部的距离,点击清除' },\n { label: '左', value: 'left', tip: '当前距离左侧的距离,点击清除' },\n]\n\nconst positions = [\n { label: '左上', value: 'left-top' },\n { label: '左下', value: 'left-down' },\n { label: '右上', value: 'right-top' },\n { label: '右下', value: 'right-down' },\n { label: '下居中', value: 'down-center' },\n { label: '上居中', value: 'up-center' },\n]\nconst emit = defineEmits(['update:modelValue'])\n\nconst change = ref(false)\n\nconst positionChange = (value: string) => {\n change.value = true\n switch (value) {\n case 'left-top':\n form.value = { left: '1px', top: '1px', right: '', bottom: '' }\n break\n case 'left-down':\n form.value = { left: '1px', bottom: '1px', right: '', up: '' }\n break\n case 'right-top':\n form.value = { top: '1px', right: '1px', left: '', bottom: '' }\n break\n case 'right-down':\n form.value = { right: '1px', bottom: '1px', left: '', up: '' }\n break\n case 'down-center':\n form.value = { left: '1px', right: '1px', bottom: '1px', up: '' }\n break\n case 'up-center':\n form.value = { left: '1px', top: '1px', right: '1px', bottom: '' }\n break\n }\n // emitValue()\n}\nconst emitValue = () => {\n const data = Object.keys(form.value).reduce((prev: any, cur) => {\n // 当 change.value 存在时检查是否不等于 '0px',否则只检查当前 key 是否不等于 'position'\n if (\n (change.value && form.value[cur] != '0px') ||\n (!change.value && cur !== 'position')\n ) {\n if (form.value[cur]) {\n prev[cur] = form.value[cur]\n }\n }\n return prev\n }, {})\n emit('update:modelValue', data)\n}\nwatch(\n () => form.value,\n () => {\n emitValue()\n },\n { deep: true }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n Object.keys(props.modelValue).reduce((prev: any, cur) => {\n if (cur !== 'position') {\n prev[cur] = props.modelValue[cur]\n }\n return prev\n }, form.value)\n },\n { deep: true }\n)\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","computed","watch"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA8DD,IAAM,MAAA,EAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AAEnC,IAAM,MAAA,IAAA,GAAOC,aAAS,MAAM;AAC1B,MAAI,IAAA,KAAA,CAAM,SAAS,GAAK,EAAA;AACtB,QAAO,OAAA,EAAA,CAAA;AAAA,OACT,MAAA,IAAW,KAAM,CAAA,KAAA,GAAQ,GAAK,EAAA;AAC5B,QAAO,OAAA,EAAA,CAAA;AAAA,OACF,MAAA;AACL,QAAO,OAAA,CAAA,CAAA;AAAA,OACT;AAAA,KACD,CAAA,CAAA;AAMD,IAAA,MAAM,OAAYF,OAAI,CAAA;AAAA,MACpB,IAAA,EAAM,KAAM,CAAA,UAAA,CAAW,IAAQ,IAAA,EAAA;AAAA,MAC/B,GAAA,EAAK,KAAM,CAAA,UAAA,CAAW,GAAO,IAAA,EAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,MAAA,EAAQ,KAAM,CAAA,UAAA,CAAW,MAAU,IAAA,EAAA;AAAA,KACpC,CAAA,CAAA;AAED,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAAE,KAAO,EAAA,QAAA,EAAK,KAAO,EAA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AK,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAAA,WAC5B;AAAA,SACF;AACA,QAAO,OAAA,IAAA,CAAA;AAAA,OACT,EAAG,EAAE,CAAA,CAAA;AACL,MAAA,IAAA,CAAK,qBAAqB,IAAI,CAAA,CAAA;AAAA,KAChC,CAAA;AACA,IAAAG,SAAA;AAAA,MACE,MAAM,IAAK,CAAA,KAAA;AAAA,MACX,MAAM;AACJ,QAAU,SAAA,EAAA,CAAA;AAAA,OACZ;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAA,CAAO,KAAK,KAAM,CAAA,UAAU,EAAE,MAAO,CAAA,CAAC,MAAW,GAAQ,KAAA;AACvD,UAAA,IAAI,QAAQ,UAAY,EAAA;AACtB,YAAA,IAAA,CAAK,GAAG,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AAAA,WAClC;AACA,UAAO,OAAA,IAAA,CAAA;AAAA,SACT,EAAG,KAAK,KAAK,CAAA,CAAA;AAAA,OACf;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -7,7 +7,7 @@ export declare const StyleShadowInput: import("@vipl520/utils").WithInstall<impo
|
|
7
7
|
default: () => void;
|
8
8
|
type: ObjectConstructor;
|
9
9
|
};
|
10
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
10
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
11
11
|
type: {
|
12
12
|
default: string;
|
13
13
|
type: () => "input" | "collapse";
|
@@ -18,6 +18,7 @@ export declare const StyleShadowInput: import("@vipl520/utils").WithInstall<impo
|
|
18
18
|
};
|
19
19
|
}>> & {
|
20
20
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
21
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
21
22
|
}, {
|
22
23
|
modelValue: Record<string, any>;
|
23
24
|
type: "input" | "collapse";
|