vue-devui 1.0.0-beta.2 → 1.0.0-beta.220808
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -172
- package/alert/index.d.ts +7 -0
- package/alert/index.es.js +79 -51
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.d.ts +7 -0
- package/auto-complete/index.es.js +9053 -0
- package/auto-complete/index.umd.js +40 -0
- package/auto-complete/package.json +7 -0
- package/auto-complete/style.css +1 -0
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +154 -147
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.d.ts +7 -0
- package/badge/index.es.js +46 -21
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.d.ts +7 -0
- package/button/index.es.js +5921 -146
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.d.ts +7 -0
- package/card/index.es.js +64 -36
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.d.ts +7 -0
- package/checkbox/index.es.js +8122 -255
- package/checkbox/index.umd.js +38 -1
- package/checkbox/style.css +1 -1
- package/collapse/index.d.ts +7 -0
- package/collapse/index.es.js +195 -0
- package/collapse/index.umd.js +1 -0
- package/{cascader → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.d.ts +7 -0
- package/countdown/index.es.js +217 -0
- package/countdown/index.umd.js +1 -0
- package/{accordion → countdown}/package.json +1 -1
- package/countdown/style.css +1 -0
- package/date-picker-pro/index.d.ts +7 -0
- package/date-picker-pro/index.es.js +12035 -0
- package/date-picker-pro/index.umd.js +38 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/drawer/index.d.ts +7 -0
- package/drawer/index.es.js +205 -154
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.d.ts +7 -0
- package/dropdown/index.es.js +736 -0
- package/dropdown/index.umd.js +1 -0
- package/{carousel → dropdown}/package.json +1 -1
- package/dropdown/style.css +1 -0
- package/editable-select/index.d.ts +7 -0
- package/editable-select/index.es.js +908 -461
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.d.ts +7 -0
- package/form/index.es.js +2439 -1995
- package/form/index.umd.js +29 -18
- package/form/style.css +1 -1
- package/fullscreen/index.d.ts +7 -0
- package/fullscreen/index.es.js +138 -125
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.d.ts +7 -0
- package/grid/index.es.js +271 -0
- package/grid/index.umd.js +1 -0
- package/{toast → grid}/package.json +1 -1
- package/grid/style.css +1 -0
- package/icon/index.d.ts +7 -0
- package/icon/index.es.js +200 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +154 -62
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/index.d.ts +7 -0
- package/input/index.d.ts +7 -0
- package/input/index.es.js +8269 -145
- package/input/index.umd.js +38 -1
- package/input/style.css +1 -1
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +260 -191
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +41 -26
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.d.ts +7 -0
- package/loading/index.es.js +89 -73
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/mention/index.d.ts +7 -0
- package/mention/index.es.js +8326 -0
- package/mention/index.umd.js +47 -0
- package/mention/package.json +7 -0
- package/mention/style.css +1 -0
- package/menu/index.d.ts +7 -0
- package/menu/index.es.js +891 -0
- package/menu/index.umd.js +1 -0
- package/{anchor → menu}/package.json +1 -1
- package/menu/style.css +1 -0
- package/message/index.d.ts +7 -0
- package/message/index.es.js +533 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.d.ts +7 -0
- package/modal/index.es.js +611 -877
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.d.ts +7 -0
- package/notification/index.es.js +528 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/Alert.js +3 -0
- package/nuxt/components/Aside.js +3 -0
- package/nuxt/components/AutoComplete.js +3 -0
- package/nuxt/components/Avatar.js +3 -0
- package/nuxt/components/Badge.js +3 -0
- package/nuxt/components/Button.js +3 -0
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/Card.js +3 -0
- package/nuxt/components/Checkbox.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Col.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/Column.js +3 -0
- package/nuxt/components/Content.js +3 -0
- package/nuxt/components/Countdown.js +3 -0
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/Drawer.js +3 -0
- package/nuxt/components/DrawerService.js +3 -0
- package/nuxt/components/Dropdown.js +3 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/EditableSelect.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/FixedOverlay.js +3 -0
- package/nuxt/components/FlexibleOverlay.js +3 -0
- package/nuxt/components/Footer.js +3 -0
- package/nuxt/components/Form.js +3 -0
- package/nuxt/components/FormItem.js +3 -0
- package/nuxt/components/FormOperation.js +3 -0
- package/nuxt/components/Fullscreen.js +3 -0
- package/nuxt/components/Header.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/Icon.js +3 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/ImagePreviewService.js +3 -0
- package/nuxt/components/Input.js +3 -0
- package/nuxt/components/InputNumber.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Layout.js +3 -0
- package/nuxt/components/Loading.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/LoadingService.js +3 -0
- package/nuxt/components/Mention.js +3 -0
- package/nuxt/components/Menu.js +3 -0
- package/nuxt/components/MenuItem.js +3 -0
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/Modal.js +3 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/OptionGroup.js +3 -0
- package/nuxt/components/Pagination.js +3 -0
- package/nuxt/components/Panel.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Popover.js +3 -0
- package/nuxt/components/Progress.js +3 -0
- package/nuxt/components/Radio.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/RadioGroup.js +3 -0
- package/nuxt/components/Rate.js +3 -0
- package/nuxt/components/Result.js +3 -0
- package/nuxt/components/Row.js +3 -0
- package/nuxt/components/Search.js +3 -0
- package/nuxt/components/Select.js +3 -0
- package/nuxt/components/Skeleton.js +3 -0
- package/nuxt/components/SkeletonItem.js +3 -0
- package/nuxt/components/Slider.js +3 -0
- package/nuxt/components/Splitter.js +3 -0
- package/nuxt/components/Statistic.js +3 -0
- package/nuxt/components/Status.js +3 -0
- package/nuxt/components/Step.js +3 -0
- package/nuxt/components/Steps.js +3 -0
- package/nuxt/components/SubMenu.js +3 -0
- package/nuxt/components/Switch.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/Table.js +3 -0
- package/nuxt/components/Tabs.js +3 -0
- package/nuxt/components/Tag.js +3 -0
- package/nuxt/components/Textarea.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/Tooltip.js +3 -0
- package/nuxt/components/Tree.js +3 -0
- package/nuxt/components/Upload.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/buttonProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/datePickerProCommonProps.js +3 -0
- package/nuxt/components/datePickerProPanelProps.js +3 -0
- package/nuxt/components/datePickerProProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/mentionProps.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/popoverProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/stepProps.js +3 -0
- package/nuxt/components/stepsProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/timerPickerPanelProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/treeNodeProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/nuxt/index.js +13 -0
- package/overlay/index.d.ts +7 -0
- package/overlay/index.es.js +245 -303
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +16 -84
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +333 -155
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.d.ts +7 -0
- package/panel/index.es.js +48 -35
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.d.ts +7 -0
- package/popover/index.es.js +6035 -204
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +111 -57
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +8015 -182
- package/radio/index.umd.js +38 -1
- package/radio/style.css +1 -1
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +78 -56
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.d.ts +7 -0
- package/result/index.es.js +248 -0
- package/result/index.umd.js +1 -0
- package/{sticky → result}/package.json +1 -1
- package/result/style.css +1 -0
- package/ripple/index.d.ts +7 -0
- package/ripple/index.es.js +56 -61
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +8381 -406
- package/search/index.umd.js +38 -1
- package/search/style.css +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +9331 -576
- package/select/index.umd.js +38 -1
- package/select/style.css +1 -1
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +115 -145
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.d.ts +7 -0
- package/slider/index.es.js +148 -142
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.d.ts +7 -0
- package/splitter/index.es.js +6308 -181
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +253 -0
- package/statistic/index.umd.js +1 -0
- package/statistic/package.json +7 -0
- package/statistic/style.css +1 -0
- package/status/index.d.ts +7 -0
- package/status/index.es.js +29 -8
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps/index.d.ts +7 -0
- package/steps/index.es.js +386 -0
- package/steps/index.umd.js +1 -0
- package/steps/package.json +7 -0
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.d.ts +7 -0
- package/switch/index.es.js +7819 -65
- package/switch/index.umd.js +38 -1
- package/switch/style.css +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +11435 -204
- package/table/index.umd.js +38 -1
- package/table/style.css +1 -1
- package/tabs/index.d.ts +7 -0
- package/tabs/index.es.js +356 -143
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.d.ts +7 -0
- package/tag/index.es.js +156 -0
- package/tag/index.umd.js +1 -0
- package/tag/package.json +7 -0
- package/tag/style.css +1 -0
- package/textarea/index.d.ts +7 -0
- package/textarea/index.es.js +7989 -0
- package/textarea/index.umd.js +46 -0
- package/textarea/package.json +7 -0
- package/textarea/style.css +1 -0
- package/{theme → theme/theme.scss} +0 -0
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +9126 -597
- package/time-picker/index.umd.js +38 -1
- package/time-picker/style.css +1 -1
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9606 -0
- package/time-select/index.umd.js +38 -0
- package/{breadcrumb → time-select}/package.json +1 -1
- package/time-select/style.css +1 -0
- package/timeline/index.d.ts +7 -0
- package/timeline/index.es.js +427 -0
- package/timeline/index.umd.js +1 -0
- package/timeline/package.json +7 -0
- package/timeline/style.css +1 -0
- package/tooltip/index.d.ts +7 -0
- package/tooltip/index.es.js +5870 -141
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/tree/index.d.ts +7 -0
- package/tree/index.es.js +11504 -692
- package/tree/index.umd.js +38 -1
- package/tree/style.css +1 -1
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +968 -2748
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +22816 -16568
- package/vue-devui.umd.js +42 -20
- package/accordion/index.es.js +0 -190
- package/accordion/index.umd.js +0 -1
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/style.css +0 -1
- package/carousel/index.es.js +0 -328
- package/carousel/index.umd.js +0 -1
- package/carousel/style.css +0 -1
- package/cascader/index.es.js +0 -187
- package/cascader/index.umd.js +0 -1
- package/cascader/style.css +0 -1
- package/date-picker/index.es.js +0 -1171
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/style.css +0 -1
- package/nav-sprite/index.es.js +0 -742
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/quadrant-diagram/index.es.js +0 -489
- package/quadrant-diagram/index.umd.js +0 -1
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/steps-guide/index.es.js +0 -211
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/tag-input/index.es.js +0 -341
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.es.js +0 -79
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/toast/index.es.js +0 -2059
- package/toast/index.umd.js +0 -1
- package/toast/style.css +0 -1
- package/transfer/index.es.js +0 -1446
- package/transfer/index.umd.js +0 -1
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.es.js +0 -203
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/transfer/index.es.js
DELETED
|
@@ -1,1446 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { computed, defineComponent, inject, createVNode, mergeProps, toRef, provide, ref, watch, withDirectives, resolveDirective, resolveComponent, isVNode, createTextVNode, Fragment, reactive } from "vue";
|
|
21
|
-
const transferBaseProps = {
|
|
22
|
-
sourceOption: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default() {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
targetOption: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default() {
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
type: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: () => "source"
|
|
37
|
-
},
|
|
38
|
-
title: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: () => "Source"
|
|
41
|
-
},
|
|
42
|
-
search: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: () => false
|
|
45
|
-
},
|
|
46
|
-
allChecked: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: () => false
|
|
49
|
-
},
|
|
50
|
-
query: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: () => ""
|
|
53
|
-
},
|
|
54
|
-
alltargetState: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: () => false
|
|
57
|
-
},
|
|
58
|
-
checkedNum: {
|
|
59
|
-
type: Number,
|
|
60
|
-
default: () => 0
|
|
61
|
-
},
|
|
62
|
-
checkedValues: {
|
|
63
|
-
type: Array,
|
|
64
|
-
default: () => []
|
|
65
|
-
},
|
|
66
|
-
allCount: {
|
|
67
|
-
type: Number,
|
|
68
|
-
default: () => 0
|
|
69
|
-
},
|
|
70
|
-
scopedSlots: {
|
|
71
|
-
type: Object
|
|
72
|
-
},
|
|
73
|
-
onChangeAllSource: {
|
|
74
|
-
type: Function
|
|
75
|
-
},
|
|
76
|
-
onChangeQuery: {
|
|
77
|
-
type: Function
|
|
78
|
-
},
|
|
79
|
-
onUpdateCheckeds: {
|
|
80
|
-
type: Function
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const getFilterData = (props, type) => {
|
|
84
|
-
const newModel = [];
|
|
85
|
-
const data = type === "source" ? props.sourceOption : props.targetOption;
|
|
86
|
-
const resultData = data.map((item) => {
|
|
87
|
-
const checked = props.modelValue.some((cur) => cur === item.value);
|
|
88
|
-
checked && newModel.push(item.value);
|
|
89
|
-
return item;
|
|
90
|
-
});
|
|
91
|
-
return {
|
|
92
|
-
model: newModel,
|
|
93
|
-
data: resultData
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const initState = (props, type) => {
|
|
97
|
-
const initModel = getFilterData(props, type);
|
|
98
|
-
const state = {
|
|
99
|
-
data: initModel.data,
|
|
100
|
-
allChecked: false,
|
|
101
|
-
disabled: false,
|
|
102
|
-
checkedNum: initModel.model.length,
|
|
103
|
-
query: "",
|
|
104
|
-
checkedValues: initModel.model,
|
|
105
|
-
filterData: initModel.data
|
|
106
|
-
};
|
|
107
|
-
return state;
|
|
108
|
-
};
|
|
109
|
-
const TransferBaseClass = (props) => {
|
|
110
|
-
return computed(() => {
|
|
111
|
-
return `devui-transfer-panel devui-transfer-${props.type}`;
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
var checkbox = "";
|
|
115
|
-
const commonProps = {
|
|
116
|
-
name: {
|
|
117
|
-
type: String,
|
|
118
|
-
default: void 0
|
|
119
|
-
},
|
|
120
|
-
isShowTitle: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: true
|
|
123
|
-
},
|
|
124
|
-
color: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: void 0
|
|
127
|
-
},
|
|
128
|
-
showAnimation: {
|
|
129
|
-
type: Boolean,
|
|
130
|
-
default: true
|
|
131
|
-
},
|
|
132
|
-
disabled: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false
|
|
135
|
-
},
|
|
136
|
-
beforeChange: {
|
|
137
|
-
type: Function,
|
|
138
|
-
default: void 0
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
142
|
-
halfchecked: {
|
|
143
|
-
type: Boolean,
|
|
144
|
-
default: false
|
|
145
|
-
},
|
|
146
|
-
checked: {
|
|
147
|
-
type: Boolean,
|
|
148
|
-
default: false
|
|
149
|
-
},
|
|
150
|
-
value: {
|
|
151
|
-
type: String
|
|
152
|
-
},
|
|
153
|
-
label: {
|
|
154
|
-
type: String,
|
|
155
|
-
default: void 0
|
|
156
|
-
},
|
|
157
|
-
title: {
|
|
158
|
-
type: String,
|
|
159
|
-
default: void 0
|
|
160
|
-
},
|
|
161
|
-
"onUpdate:checked": {
|
|
162
|
-
type: Function,
|
|
163
|
-
default: void 0
|
|
164
|
-
},
|
|
165
|
-
onChange: {
|
|
166
|
-
type: Function,
|
|
167
|
-
default: void 0
|
|
168
|
-
},
|
|
169
|
-
modelValue: {
|
|
170
|
-
type: Boolean
|
|
171
|
-
},
|
|
172
|
-
"onUpdate:modelValue": {
|
|
173
|
-
type: Function
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
177
|
-
modelValue: {
|
|
178
|
-
type: Array,
|
|
179
|
-
required: true
|
|
180
|
-
},
|
|
181
|
-
direction: {
|
|
182
|
-
type: String,
|
|
183
|
-
default: "column"
|
|
184
|
-
},
|
|
185
|
-
itemWidth: {
|
|
186
|
-
type: Number,
|
|
187
|
-
default: void 0
|
|
188
|
-
},
|
|
189
|
-
options: {
|
|
190
|
-
type: Array,
|
|
191
|
-
default: () => []
|
|
192
|
-
},
|
|
193
|
-
onChange: {
|
|
194
|
-
type: Function,
|
|
195
|
-
default: void 0
|
|
196
|
-
},
|
|
197
|
-
"onUpdate:modelValue": {
|
|
198
|
-
type: Function,
|
|
199
|
-
default: void 0
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
203
|
-
var DCheckbox = defineComponent({
|
|
204
|
-
name: "DCheckbox",
|
|
205
|
-
props: checkboxProps,
|
|
206
|
-
emits: ["change", "update:checked", "update:modelValue"],
|
|
207
|
-
setup(props, ctx) {
|
|
208
|
-
const checkboxGroupConf = inject(checkboxGroupInjectionKey, null);
|
|
209
|
-
const isChecked = computed(() => props.checked || props.modelValue);
|
|
210
|
-
const mergedDisabled = computed(() => {
|
|
211
|
-
return (checkboxGroupConf == null ? void 0 : checkboxGroupConf.disabled.value) || props.disabled;
|
|
212
|
-
});
|
|
213
|
-
const mergedChecked = computed(() => {
|
|
214
|
-
var _a, _b;
|
|
215
|
-
return (_b = (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.isItemChecked) == null ? void 0 : _a.call(checkboxGroupConf, props.value)) != null ? _b : isChecked.value;
|
|
216
|
-
});
|
|
217
|
-
const mergedIsShowTitle = computed(() => {
|
|
218
|
-
var _a;
|
|
219
|
-
return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.isShowTitle) != null ? _a : props.isShowTitle;
|
|
220
|
-
});
|
|
221
|
-
const mergedShowAnimation = computed(() => {
|
|
222
|
-
var _a;
|
|
223
|
-
return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.showAnimation) != null ? _a : props.showAnimation;
|
|
224
|
-
});
|
|
225
|
-
const mergedColor = computed(() => {
|
|
226
|
-
var _a;
|
|
227
|
-
return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.color) != null ? _a : props.color;
|
|
228
|
-
});
|
|
229
|
-
const itemWidth = checkboxGroupConf == null ? void 0 : checkboxGroupConf.itemWidth.value;
|
|
230
|
-
const direction = checkboxGroupConf == null ? void 0 : checkboxGroupConf.direction.value;
|
|
231
|
-
const canChange = (isChecked2, val) => {
|
|
232
|
-
var _a;
|
|
233
|
-
if (mergedDisabled.value) {
|
|
234
|
-
return Promise.resolve(false);
|
|
235
|
-
}
|
|
236
|
-
const beforeChange = (_a = props.beforeChange) != null ? _a : checkboxGroupConf == null ? void 0 : checkboxGroupConf.beforeChange;
|
|
237
|
-
if (beforeChange) {
|
|
238
|
-
const res = beforeChange(isChecked2, val);
|
|
239
|
-
if (typeof res === "boolean") {
|
|
240
|
-
return Promise.resolve(res);
|
|
241
|
-
}
|
|
242
|
-
return res;
|
|
243
|
-
}
|
|
244
|
-
return Promise.resolve(true);
|
|
245
|
-
};
|
|
246
|
-
const toggle = () => {
|
|
247
|
-
const current = !isChecked.value;
|
|
248
|
-
checkboxGroupConf == null ? void 0 : checkboxGroupConf.toggleGroupVal(props.value);
|
|
249
|
-
ctx.emit("update:checked", current);
|
|
250
|
-
ctx.emit("update:modelValue", current);
|
|
251
|
-
ctx.emit("change", current);
|
|
252
|
-
};
|
|
253
|
-
const handleClick = () => {
|
|
254
|
-
canChange(!isChecked.value, props.value).then((res) => res && toggle());
|
|
255
|
-
};
|
|
256
|
-
return {
|
|
257
|
-
itemWidth,
|
|
258
|
-
direction,
|
|
259
|
-
mergedColor,
|
|
260
|
-
mergedDisabled,
|
|
261
|
-
mergedIsShowTitle,
|
|
262
|
-
mergedChecked,
|
|
263
|
-
mergedShowAnimation,
|
|
264
|
-
handleClick
|
|
265
|
-
};
|
|
266
|
-
},
|
|
267
|
-
render() {
|
|
268
|
-
var _a;
|
|
269
|
-
const {
|
|
270
|
-
itemWidth,
|
|
271
|
-
direction,
|
|
272
|
-
mergedChecked,
|
|
273
|
-
mergedDisabled,
|
|
274
|
-
mergedIsShowTitle,
|
|
275
|
-
mergedShowAnimation,
|
|
276
|
-
halfchecked,
|
|
277
|
-
title,
|
|
278
|
-
label,
|
|
279
|
-
handleClick,
|
|
280
|
-
name,
|
|
281
|
-
value,
|
|
282
|
-
mergedColor,
|
|
283
|
-
$slots
|
|
284
|
-
} = this;
|
|
285
|
-
const wrapperCls = {
|
|
286
|
-
"devui-checkbox-column-margin": direction === "column",
|
|
287
|
-
"devui-checkbox-wrap": typeof itemWidth !== "undefined"
|
|
288
|
-
};
|
|
289
|
-
const wrapperStyle = itemWidth ? [`width: ${itemWidth}px`] : [];
|
|
290
|
-
const checkboxCls = {
|
|
291
|
-
"devui-checkbox": true,
|
|
292
|
-
active: mergedChecked,
|
|
293
|
-
halfchecked,
|
|
294
|
-
disabled: mergedDisabled,
|
|
295
|
-
unchecked: !mergedChecked
|
|
296
|
-
};
|
|
297
|
-
const labelTitle = mergedIsShowTitle ? title || label : "";
|
|
298
|
-
const bgImgStyle = mergedColor && halfchecked || mergedColor ? `linear-gradient(${mergedColor}, ${mergedColor})` : "";
|
|
299
|
-
const spanStyle = [`border-color:${(mergedChecked || halfchecked) && mergedColor ? mergedColor : ""}`, `background-image:${bgImgStyle}`, `background-color:${mergedColor && halfchecked ? mergedColor : ""}`];
|
|
300
|
-
const spanCls = {
|
|
301
|
-
"devui-checkbox-material": true,
|
|
302
|
-
"custom-color": mergedColor,
|
|
303
|
-
"devui-checkbox-no-label": !label && !$slots.default,
|
|
304
|
-
"devui-no-animation": !mergedShowAnimation,
|
|
305
|
-
"devui-checkbox-default-background": !halfchecked
|
|
306
|
-
};
|
|
307
|
-
const polygonCls = {
|
|
308
|
-
"devui-tick": true,
|
|
309
|
-
"devui-no-animation": !mergedShowAnimation
|
|
310
|
-
};
|
|
311
|
-
const stopPropagation = ($event) => $event.stopPropagation();
|
|
312
|
-
const inputProps2 = {
|
|
313
|
-
indeterminate: halfchecked
|
|
314
|
-
};
|
|
315
|
-
return createVNode("div", {
|
|
316
|
-
"class": wrapperCls,
|
|
317
|
-
"style": wrapperStyle
|
|
318
|
-
}, [createVNode("div", {
|
|
319
|
-
"class": checkboxCls
|
|
320
|
-
}, [createVNode("label", {
|
|
321
|
-
"title": labelTitle,
|
|
322
|
-
"onClick": handleClick
|
|
323
|
-
}, [createVNode("input", mergeProps({
|
|
324
|
-
"name": name || value,
|
|
325
|
-
"class": "devui-checkbox-input",
|
|
326
|
-
"type": "checkbox"
|
|
327
|
-
}, inputProps2, {
|
|
328
|
-
"checked": mergedChecked,
|
|
329
|
-
"disabled": mergedDisabled,
|
|
330
|
-
"onClick": stopPropagation,
|
|
331
|
-
"onChange": stopPropagation
|
|
332
|
-
}), null), createVNode("span", {
|
|
333
|
-
"style": spanStyle,
|
|
334
|
-
"class": spanCls
|
|
335
|
-
}, [createVNode("span", {
|
|
336
|
-
"class": "devui-checkbox-halfchecked-bg"
|
|
337
|
-
}, null), createVNode("svg", {
|
|
338
|
-
"viewBox": "0 0 16 16",
|
|
339
|
-
"version": "1.1",
|
|
340
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
341
|
-
"class": "devui-checkbox-tick"
|
|
342
|
-
}, [createVNode("g", {
|
|
343
|
-
"stroke": "none",
|
|
344
|
-
"stroke-width": "1",
|
|
345
|
-
"fill": "none",
|
|
346
|
-
"fill-rule": "evenodd"
|
|
347
|
-
}, [createVNode("polygon", {
|
|
348
|
-
"fill-rule": "nonzero",
|
|
349
|
-
"points": "5.17391304 6.56521739 7.7173913 9.10869565 11.826087 5 13 6.17391304 7.7173913 11.4565217 4 7.73913043",
|
|
350
|
-
"class": polygonCls
|
|
351
|
-
}, null)])])]), label || ((_a = $slots.default) == null ? void 0 : _a.call($slots))])])]);
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
var checkboxGroup = "";
|
|
355
|
-
var DCheckboxGroup = defineComponent({
|
|
356
|
-
name: "DCheckboxGroup",
|
|
357
|
-
props: checkboxGroupProps,
|
|
358
|
-
emits: ["change", "update:modelValue"],
|
|
359
|
-
setup(props, ctx) {
|
|
360
|
-
const valList = toRef(props, "modelValue");
|
|
361
|
-
const defaultOpt = {
|
|
362
|
-
checked: false,
|
|
363
|
-
isShowTitle: true,
|
|
364
|
-
halfchecked: false,
|
|
365
|
-
showAnimation: true,
|
|
366
|
-
disabled: false
|
|
367
|
-
};
|
|
368
|
-
const toggleGroupVal = (val) => {
|
|
369
|
-
const index2 = valList.value.findIndex((item) => item === val);
|
|
370
|
-
if (index2 === -1) {
|
|
371
|
-
const res = [...valList.value, val];
|
|
372
|
-
ctx.emit("update:modelValue", res);
|
|
373
|
-
ctx.emit("change", res);
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
|
-
valList.value.splice(index2, 1);
|
|
377
|
-
ctx.emit("update:modelValue", valList.value);
|
|
378
|
-
ctx.emit("change", valList.value);
|
|
379
|
-
};
|
|
380
|
-
const isItemChecked = (itemVal) => valList.value.includes(itemVal);
|
|
381
|
-
provide(checkboxGroupInjectionKey, {
|
|
382
|
-
disabled: toRef(props, "disabled"),
|
|
383
|
-
isShowTitle: toRef(props, "isShowTitle"),
|
|
384
|
-
color: toRef(props, "color"),
|
|
385
|
-
showAnimation: toRef(props, "showAnimation"),
|
|
386
|
-
beforeChange: props.beforeChange,
|
|
387
|
-
isItemChecked,
|
|
388
|
-
toggleGroupVal,
|
|
389
|
-
itemWidth: toRef(props, "itemWidth"),
|
|
390
|
-
direction: toRef(props, "direction")
|
|
391
|
-
});
|
|
392
|
-
return {
|
|
393
|
-
defaultOpt
|
|
394
|
-
};
|
|
395
|
-
},
|
|
396
|
-
render() {
|
|
397
|
-
var _a;
|
|
398
|
-
const {
|
|
399
|
-
direction,
|
|
400
|
-
$slots,
|
|
401
|
-
defaultOpt,
|
|
402
|
-
options
|
|
403
|
-
} = this;
|
|
404
|
-
let children = (_a = $slots.default) == null ? void 0 : _a.call($slots);
|
|
405
|
-
if ((options == null ? void 0 : options.length) > 0) {
|
|
406
|
-
children = options.map((opt) => {
|
|
407
|
-
const mergedOpt = Object.assign({}, defaultOpt, opt);
|
|
408
|
-
return createVNode(DCheckbox, mergedOpt, null);
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
return createVNode("div", {
|
|
412
|
-
"class": "devui-checkbox-group"
|
|
413
|
-
}, [createVNode("div", {
|
|
414
|
-
"class": {
|
|
415
|
-
"devui-checkbox-list-inline": direction === "row"
|
|
416
|
-
}
|
|
417
|
-
}, [children])]);
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
const searchProps = {
|
|
421
|
-
size: {
|
|
422
|
-
type: String,
|
|
423
|
-
default: ""
|
|
424
|
-
},
|
|
425
|
-
placeholder: {
|
|
426
|
-
type: String,
|
|
427
|
-
default: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
428
|
-
},
|
|
429
|
-
maxLength: {
|
|
430
|
-
type: Number,
|
|
431
|
-
default: Number.MAX_SAFE_INTEGER
|
|
432
|
-
},
|
|
433
|
-
delay: {
|
|
434
|
-
type: Number,
|
|
435
|
-
default: 300
|
|
436
|
-
},
|
|
437
|
-
disabled: {
|
|
438
|
-
type: Boolean,
|
|
439
|
-
default: false
|
|
440
|
-
},
|
|
441
|
-
autoFocus: {
|
|
442
|
-
type: Boolean,
|
|
443
|
-
default: false
|
|
444
|
-
},
|
|
445
|
-
isKeyupSearch: {
|
|
446
|
-
type: Boolean,
|
|
447
|
-
default: false
|
|
448
|
-
},
|
|
449
|
-
iconPosition: {
|
|
450
|
-
type: String,
|
|
451
|
-
default: "right"
|
|
452
|
-
},
|
|
453
|
-
noBorder: {
|
|
454
|
-
type: Boolean,
|
|
455
|
-
default: false
|
|
456
|
-
},
|
|
457
|
-
cssClass: {
|
|
458
|
-
type: String,
|
|
459
|
-
default: ""
|
|
460
|
-
},
|
|
461
|
-
modelValue: {
|
|
462
|
-
type: String,
|
|
463
|
-
default: ""
|
|
464
|
-
},
|
|
465
|
-
searchFn: {
|
|
466
|
-
type: Function,
|
|
467
|
-
default: void 0
|
|
468
|
-
},
|
|
469
|
-
"onUpdate:modelValue": {
|
|
470
|
-
type: Function,
|
|
471
|
-
default: void 0
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
const SIZE_CLASS = {
|
|
475
|
-
lg: "lg",
|
|
476
|
-
sm: "sm"
|
|
477
|
-
};
|
|
478
|
-
const ICON_POSITION = {
|
|
479
|
-
right: "right",
|
|
480
|
-
left: "left"
|
|
481
|
-
};
|
|
482
|
-
const getRootClass = (props) => {
|
|
483
|
-
return computed(() => ({
|
|
484
|
-
"devui-search": true,
|
|
485
|
-
"devui-search__disbaled": props.disabled,
|
|
486
|
-
"devui-search__no-border": props.noBorder,
|
|
487
|
-
[`devui-search__${props.size}`]: SIZE_CLASS[props.size],
|
|
488
|
-
[`devui-search__${props.iconPosition}`]: ICON_POSITION[props.iconPosition]
|
|
489
|
-
}));
|
|
490
|
-
};
|
|
491
|
-
const keywordsHandles = (ctx, props) => {
|
|
492
|
-
const keywords = ref("");
|
|
493
|
-
watch(() => props.modelValue, (val) => {
|
|
494
|
-
keywords.value = val;
|
|
495
|
-
}, { immediate: true });
|
|
496
|
-
const onClearHandle = () => {
|
|
497
|
-
keywords.value = "";
|
|
498
|
-
ctx.emit("update:modelValue", "");
|
|
499
|
-
};
|
|
500
|
-
const clearIconShow = computed(() => {
|
|
501
|
-
return keywords.value.length > 0;
|
|
502
|
-
});
|
|
503
|
-
return {
|
|
504
|
-
keywords,
|
|
505
|
-
clearIconShow,
|
|
506
|
-
onClearHandle
|
|
507
|
-
};
|
|
508
|
-
};
|
|
509
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
510
|
-
var freeGlobal$1 = freeGlobal;
|
|
511
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
512
|
-
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
513
|
-
var root$1 = root;
|
|
514
|
-
var Symbol$1 = root$1.Symbol;
|
|
515
|
-
var Symbol$2 = Symbol$1;
|
|
516
|
-
var objectProto$1 = Object.prototype;
|
|
517
|
-
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
518
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
519
|
-
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
520
|
-
function getRawTag(value) {
|
|
521
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
522
|
-
try {
|
|
523
|
-
value[symToStringTag$1] = void 0;
|
|
524
|
-
var unmasked = true;
|
|
525
|
-
} catch (e) {
|
|
526
|
-
}
|
|
527
|
-
var result = nativeObjectToString$1.call(value);
|
|
528
|
-
if (unmasked) {
|
|
529
|
-
if (isOwn) {
|
|
530
|
-
value[symToStringTag$1] = tag;
|
|
531
|
-
} else {
|
|
532
|
-
delete value[symToStringTag$1];
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
return result;
|
|
536
|
-
}
|
|
537
|
-
var objectProto = Object.prototype;
|
|
538
|
-
var nativeObjectToString = objectProto.toString;
|
|
539
|
-
function objectToString(value) {
|
|
540
|
-
return nativeObjectToString.call(value);
|
|
541
|
-
}
|
|
542
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
543
|
-
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
544
|
-
function baseGetTag(value) {
|
|
545
|
-
if (value == null) {
|
|
546
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
547
|
-
}
|
|
548
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
549
|
-
}
|
|
550
|
-
function isObjectLike(value) {
|
|
551
|
-
return value != null && typeof value == "object";
|
|
552
|
-
}
|
|
553
|
-
var symbolTag = "[object Symbol]";
|
|
554
|
-
function isSymbol(value) {
|
|
555
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
556
|
-
}
|
|
557
|
-
var reWhitespace = /\s/;
|
|
558
|
-
function trimmedEndIndex(string) {
|
|
559
|
-
var index2 = string.length;
|
|
560
|
-
while (index2-- && reWhitespace.test(string.charAt(index2))) {
|
|
561
|
-
}
|
|
562
|
-
return index2;
|
|
563
|
-
}
|
|
564
|
-
var reTrimStart = /^\s+/;
|
|
565
|
-
function baseTrim(string) {
|
|
566
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
567
|
-
}
|
|
568
|
-
function isObject(value) {
|
|
569
|
-
var type = typeof value;
|
|
570
|
-
return value != null && (type == "object" || type == "function");
|
|
571
|
-
}
|
|
572
|
-
var NAN = 0 / 0;
|
|
573
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
574
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
575
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
576
|
-
var freeParseInt = parseInt;
|
|
577
|
-
function toNumber(value) {
|
|
578
|
-
if (typeof value == "number") {
|
|
579
|
-
return value;
|
|
580
|
-
}
|
|
581
|
-
if (isSymbol(value)) {
|
|
582
|
-
return NAN;
|
|
583
|
-
}
|
|
584
|
-
if (isObject(value)) {
|
|
585
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
586
|
-
value = isObject(other) ? other + "" : other;
|
|
587
|
-
}
|
|
588
|
-
if (typeof value != "string") {
|
|
589
|
-
return value === 0 ? value : +value;
|
|
590
|
-
}
|
|
591
|
-
value = baseTrim(value);
|
|
592
|
-
var isBinary = reIsBinary.test(value);
|
|
593
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
594
|
-
}
|
|
595
|
-
var now = function() {
|
|
596
|
-
return root$1.Date.now();
|
|
597
|
-
};
|
|
598
|
-
var now$1 = now;
|
|
599
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
600
|
-
var nativeMax = Math.max, nativeMin = Math.min;
|
|
601
|
-
function debounce(func, wait, options) {
|
|
602
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
603
|
-
if (typeof func != "function") {
|
|
604
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
605
|
-
}
|
|
606
|
-
wait = toNumber(wait) || 0;
|
|
607
|
-
if (isObject(options)) {
|
|
608
|
-
leading = !!options.leading;
|
|
609
|
-
maxing = "maxWait" in options;
|
|
610
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
611
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
612
|
-
}
|
|
613
|
-
function invokeFunc(time) {
|
|
614
|
-
var args = lastArgs, thisArg = lastThis;
|
|
615
|
-
lastArgs = lastThis = void 0;
|
|
616
|
-
lastInvokeTime = time;
|
|
617
|
-
result = func.apply(thisArg, args);
|
|
618
|
-
return result;
|
|
619
|
-
}
|
|
620
|
-
function leadingEdge(time) {
|
|
621
|
-
lastInvokeTime = time;
|
|
622
|
-
timerId = setTimeout(timerExpired, wait);
|
|
623
|
-
return leading ? invokeFunc(time) : result;
|
|
624
|
-
}
|
|
625
|
-
function remainingWait(time) {
|
|
626
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
627
|
-
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
628
|
-
}
|
|
629
|
-
function shouldInvoke(time) {
|
|
630
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
631
|
-
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
632
|
-
}
|
|
633
|
-
function timerExpired() {
|
|
634
|
-
var time = now$1();
|
|
635
|
-
if (shouldInvoke(time)) {
|
|
636
|
-
return trailingEdge(time);
|
|
637
|
-
}
|
|
638
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
639
|
-
}
|
|
640
|
-
function trailingEdge(time) {
|
|
641
|
-
timerId = void 0;
|
|
642
|
-
if (trailing && lastArgs) {
|
|
643
|
-
return invokeFunc(time);
|
|
644
|
-
}
|
|
645
|
-
lastArgs = lastThis = void 0;
|
|
646
|
-
return result;
|
|
647
|
-
}
|
|
648
|
-
function cancel() {
|
|
649
|
-
if (timerId !== void 0) {
|
|
650
|
-
clearTimeout(timerId);
|
|
651
|
-
}
|
|
652
|
-
lastInvokeTime = 0;
|
|
653
|
-
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
654
|
-
}
|
|
655
|
-
function flush() {
|
|
656
|
-
return timerId === void 0 ? result : trailingEdge(now$1());
|
|
657
|
-
}
|
|
658
|
-
function debounced() {
|
|
659
|
-
var time = now$1(), isInvoking = shouldInvoke(time);
|
|
660
|
-
lastArgs = arguments;
|
|
661
|
-
lastThis = this;
|
|
662
|
-
lastCallTime = time;
|
|
663
|
-
if (isInvoking) {
|
|
664
|
-
if (timerId === void 0) {
|
|
665
|
-
return leadingEdge(lastCallTime);
|
|
666
|
-
}
|
|
667
|
-
if (maxing) {
|
|
668
|
-
clearTimeout(timerId);
|
|
669
|
-
timerId = setTimeout(timerExpired, wait);
|
|
670
|
-
return invokeFunc(lastCallTime);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
if (timerId === void 0) {
|
|
674
|
-
timerId = setTimeout(timerExpired, wait);
|
|
675
|
-
}
|
|
676
|
-
return result;
|
|
677
|
-
}
|
|
678
|
-
debounced.cancel = cancel;
|
|
679
|
-
debounced.flush = flush;
|
|
680
|
-
return debounced;
|
|
681
|
-
}
|
|
682
|
-
const KEYS_MAP = {
|
|
683
|
-
enter: "Enter"
|
|
684
|
-
};
|
|
685
|
-
const keydownHandles = (ctx, keywords, delay) => {
|
|
686
|
-
const onInputKeydown = ($event) => {
|
|
687
|
-
switch ($event.key) {
|
|
688
|
-
case KEYS_MAP.enter:
|
|
689
|
-
handleEnter($event);
|
|
690
|
-
break;
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
const handleEnter = ($event) => {
|
|
694
|
-
if ($event.target instanceof HTMLInputElement) {
|
|
695
|
-
const value = $event.target.value;
|
|
696
|
-
useEmitKeyword(value);
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
const onClickHandle = () => {
|
|
700
|
-
useEmitKeyword(keywords.value);
|
|
701
|
-
};
|
|
702
|
-
const useEmitKeyword = debounce((value) => {
|
|
703
|
-
ctx.emit("searchFn", value);
|
|
704
|
-
}, delay);
|
|
705
|
-
return {
|
|
706
|
-
onInputKeydown,
|
|
707
|
-
useEmitKeyword,
|
|
708
|
-
onClickHandle
|
|
709
|
-
};
|
|
710
|
-
};
|
|
711
|
-
const inputProps = {
|
|
712
|
-
placeholder: {
|
|
713
|
-
type: String,
|
|
714
|
-
default: void 0
|
|
715
|
-
},
|
|
716
|
-
disabled: {
|
|
717
|
-
type: Boolean,
|
|
718
|
-
default: false
|
|
719
|
-
},
|
|
720
|
-
autoFocus: {
|
|
721
|
-
type: Boolean,
|
|
722
|
-
default: false
|
|
723
|
-
},
|
|
724
|
-
maxLength: {
|
|
725
|
-
type: Number,
|
|
726
|
-
default: Number.MAX_SAFE_INTEGER
|
|
727
|
-
},
|
|
728
|
-
cssClass: {
|
|
729
|
-
type: String,
|
|
730
|
-
default: ""
|
|
731
|
-
},
|
|
732
|
-
error: {
|
|
733
|
-
type: Boolean,
|
|
734
|
-
default: false
|
|
735
|
-
},
|
|
736
|
-
size: {
|
|
737
|
-
type: String,
|
|
738
|
-
default: ""
|
|
739
|
-
},
|
|
740
|
-
showPassword: {
|
|
741
|
-
type: Boolean,
|
|
742
|
-
default: false
|
|
743
|
-
},
|
|
744
|
-
value: {
|
|
745
|
-
type: String,
|
|
746
|
-
default: ""
|
|
747
|
-
},
|
|
748
|
-
"onUpdate:value": {
|
|
749
|
-
type: Function,
|
|
750
|
-
default: void 0
|
|
751
|
-
},
|
|
752
|
-
"onChange": {
|
|
753
|
-
type: Function,
|
|
754
|
-
default: void 0
|
|
755
|
-
},
|
|
756
|
-
"onKeydown": {
|
|
757
|
-
type: Function,
|
|
758
|
-
default: void 0
|
|
759
|
-
},
|
|
760
|
-
"onFocus": {
|
|
761
|
-
type: Function,
|
|
762
|
-
default: void 0
|
|
763
|
-
},
|
|
764
|
-
"onBlur": {
|
|
765
|
-
type: Function,
|
|
766
|
-
default: void 0
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
var input = "";
|
|
770
|
-
const formItemInjectionKey = Symbol("dFormItem");
|
|
771
|
-
const dFormItemEvents = {
|
|
772
|
-
blur: "d.form.blur",
|
|
773
|
-
change: "d.form.change",
|
|
774
|
-
input: "d.form.input"
|
|
775
|
-
};
|
|
776
|
-
var DInput = defineComponent({
|
|
777
|
-
name: "DInput",
|
|
778
|
-
directives: {
|
|
779
|
-
focus: {
|
|
780
|
-
mounted: function(el, binding) {
|
|
781
|
-
if (binding.value) {
|
|
782
|
-
el.focus();
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
},
|
|
787
|
-
props: inputProps,
|
|
788
|
-
emits: ["update:value", "focus", "blur", "change", "keydown"],
|
|
789
|
-
setup(props, ctx) {
|
|
790
|
-
const formItem = inject(formItemInjectionKey, {});
|
|
791
|
-
const sizeCls = computed(() => `devui-input-${props.size}`);
|
|
792
|
-
const showPwdIcon = ref(false);
|
|
793
|
-
const inputType = ref("text");
|
|
794
|
-
const inputCls = computed(() => {
|
|
795
|
-
return {
|
|
796
|
-
error: props.error,
|
|
797
|
-
[props.cssClass]: true,
|
|
798
|
-
[sizeCls.value]: props.size !== ""
|
|
799
|
-
};
|
|
800
|
-
});
|
|
801
|
-
const showPreviewIcon = computed(() => inputType.value === "password");
|
|
802
|
-
watch(() => props.showPassword, (flg) => {
|
|
803
|
-
inputType.value = flg ? "password" : "text";
|
|
804
|
-
}, {
|
|
805
|
-
immediate: true
|
|
806
|
-
});
|
|
807
|
-
watch(() => props.value, (value) => {
|
|
808
|
-
value && value.length > 0 && showPreviewIcon.value ? showPwdIcon.value = true : showPwdIcon.value = false;
|
|
809
|
-
});
|
|
810
|
-
const onInput = ($event) => {
|
|
811
|
-
ctx.emit("update:value", $event.target.value);
|
|
812
|
-
formItem.formItemMitt.emit(dFormItemEvents.input);
|
|
813
|
-
}, onFocus = () => {
|
|
814
|
-
ctx.emit("focus");
|
|
815
|
-
}, onBlur = () => {
|
|
816
|
-
ctx.emit("blur");
|
|
817
|
-
formItem.formItemMitt.emit(dFormItemEvents.blur);
|
|
818
|
-
}, onChange = ($event) => {
|
|
819
|
-
ctx.emit("change", $event.target.value);
|
|
820
|
-
formItem.formItemMitt.emit(dFormItemEvents.change);
|
|
821
|
-
}, onKeydown = ($event) => {
|
|
822
|
-
ctx.emit("keydown", $event);
|
|
823
|
-
}, onChangeInputType = () => {
|
|
824
|
-
inputType.value = inputType.value === "password" ? "text" : "password";
|
|
825
|
-
};
|
|
826
|
-
return {
|
|
827
|
-
inputCls,
|
|
828
|
-
inputType,
|
|
829
|
-
showPreviewIcon,
|
|
830
|
-
showPwdIcon,
|
|
831
|
-
onInput,
|
|
832
|
-
onFocus,
|
|
833
|
-
onBlur,
|
|
834
|
-
onChange,
|
|
835
|
-
onKeydown,
|
|
836
|
-
onChangeInputType
|
|
837
|
-
};
|
|
838
|
-
},
|
|
839
|
-
render() {
|
|
840
|
-
const {
|
|
841
|
-
value,
|
|
842
|
-
showPreviewIcon,
|
|
843
|
-
showPwdIcon,
|
|
844
|
-
inputCls,
|
|
845
|
-
inputType,
|
|
846
|
-
maxLength,
|
|
847
|
-
autoFocus,
|
|
848
|
-
placeholder,
|
|
849
|
-
disabled,
|
|
850
|
-
onInput,
|
|
851
|
-
onFocus,
|
|
852
|
-
onBlur,
|
|
853
|
-
onChange,
|
|
854
|
-
onKeydown,
|
|
855
|
-
onChangeInputType
|
|
856
|
-
} = this;
|
|
857
|
-
return createVNode("div", {
|
|
858
|
-
"class": "devui-input__wrap"
|
|
859
|
-
}, [withDirectives(createVNode("input", mergeProps({
|
|
860
|
-
dinput: true
|
|
861
|
-
}, {
|
|
862
|
-
"value": value,
|
|
863
|
-
"disabled": disabled,
|
|
864
|
-
"type": inputType,
|
|
865
|
-
"maxlength": maxLength,
|
|
866
|
-
"placeholder": placeholder,
|
|
867
|
-
"class": inputCls,
|
|
868
|
-
"onInput": onInput,
|
|
869
|
-
"onFocus": onFocus,
|
|
870
|
-
"onBlur": onBlur,
|
|
871
|
-
"onChange": onChange,
|
|
872
|
-
"onKeydown": onKeydown
|
|
873
|
-
}), null), [[resolveDirective("focus"), autoFocus]]), showPwdIcon && createVNode("div", {
|
|
874
|
-
"class": "devui-input__preview",
|
|
875
|
-
"onClick": onChangeInputType
|
|
876
|
-
}, [showPreviewIcon ? createVNode(resolveComponent("d-icon"), {
|
|
877
|
-
"name": "preview",
|
|
878
|
-
"size": "12px",
|
|
879
|
-
"key": 1
|
|
880
|
-
}, null) : createVNode(resolveComponent("d-icon"), {
|
|
881
|
-
"name": "preview-forbidden",
|
|
882
|
-
"size": "12px",
|
|
883
|
-
"key": 2
|
|
884
|
-
}, null)])]);
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
var search = "";
|
|
888
|
-
var DSearch = defineComponent({
|
|
889
|
-
name: "DSearch",
|
|
890
|
-
props: searchProps,
|
|
891
|
-
emits: ["update:modelValue", "searchFn"],
|
|
892
|
-
setup(props, ctx) {
|
|
893
|
-
const rootClasses = getRootClass(props);
|
|
894
|
-
const {
|
|
895
|
-
keywords,
|
|
896
|
-
clearIconShow,
|
|
897
|
-
onClearHandle
|
|
898
|
-
} = keywordsHandles(ctx, props);
|
|
899
|
-
const {
|
|
900
|
-
onInputKeydown,
|
|
901
|
-
onClickHandle,
|
|
902
|
-
useEmitKeyword
|
|
903
|
-
} = keydownHandles(ctx, keywords, props.delay);
|
|
904
|
-
const onInputUpdate = (event) => {
|
|
905
|
-
if (props.isKeyupSearch) {
|
|
906
|
-
useEmitKeyword(event);
|
|
907
|
-
}
|
|
908
|
-
keywords.value = event;
|
|
909
|
-
ctx.emit("update:modelValue", event);
|
|
910
|
-
};
|
|
911
|
-
return () => {
|
|
912
|
-
return createVNode("div", {
|
|
913
|
-
"class": rootClasses.value
|
|
914
|
-
}, [props.iconPosition === "left" && createVNode("div", {
|
|
915
|
-
"class": "devui-search__icon",
|
|
916
|
-
"onClick": onClickHandle
|
|
917
|
-
}, [createVNode(resolveComponent("d-icon"), {
|
|
918
|
-
"name": "search",
|
|
919
|
-
"size": "inherit"
|
|
920
|
-
}, null)]), createVNode(DInput, {
|
|
921
|
-
"size": props.size,
|
|
922
|
-
"disabled": props.disabled,
|
|
923
|
-
"autoFocus": props.autoFocus,
|
|
924
|
-
"value": keywords.value,
|
|
925
|
-
"maxLength": props.maxLength,
|
|
926
|
-
"placeholder": props.placeholder,
|
|
927
|
-
"cssClass": props.cssClass,
|
|
928
|
-
"onKeydown": onInputKeydown,
|
|
929
|
-
"onUpdate:value": onInputUpdate
|
|
930
|
-
}, null), clearIconShow.value && createVNode("div", {
|
|
931
|
-
"class": "devui-search__clear",
|
|
932
|
-
"onClick": onClearHandle
|
|
933
|
-
}, [createVNode(resolveComponent("d-icon"), {
|
|
934
|
-
"name": "close",
|
|
935
|
-
"size": "inherit"
|
|
936
|
-
}, null)]), props.iconPosition === "right" && createVNode("div", {
|
|
937
|
-
"class": "devui-search__icon",
|
|
938
|
-
"onClick": onClickHandle
|
|
939
|
-
}, [createVNode(resolveComponent("d-icon"), {
|
|
940
|
-
"name": "search",
|
|
941
|
-
"size": "inherit"
|
|
942
|
-
}, null)])]);
|
|
943
|
-
};
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
function _isSlot(s) {
|
|
947
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
948
|
-
}
|
|
949
|
-
var DTransferBase = defineComponent({
|
|
950
|
-
name: "DTransferBase",
|
|
951
|
-
components: {
|
|
952
|
-
DSearch,
|
|
953
|
-
DCheckboxGroup,
|
|
954
|
-
DCheckbox
|
|
955
|
-
},
|
|
956
|
-
props: transferBaseProps,
|
|
957
|
-
setup(props, ctx) {
|
|
958
|
-
const modelValues = computed(() => props.checkedValues);
|
|
959
|
-
const searchQuery = computed(() => props.query);
|
|
960
|
-
const baseClass = TransferBaseClass(props);
|
|
961
|
-
const updateSearchQuery = (val) => ctx.emit("changeQuery", val);
|
|
962
|
-
return {
|
|
963
|
-
baseClass,
|
|
964
|
-
searchQuery,
|
|
965
|
-
modelValues,
|
|
966
|
-
updateSearchQuery
|
|
967
|
-
};
|
|
968
|
-
},
|
|
969
|
-
render() {
|
|
970
|
-
let _slot;
|
|
971
|
-
const {
|
|
972
|
-
title,
|
|
973
|
-
baseClass,
|
|
974
|
-
checkedNum,
|
|
975
|
-
allChecked,
|
|
976
|
-
sourceOption,
|
|
977
|
-
allCount,
|
|
978
|
-
updateSearchQuery,
|
|
979
|
-
search: search2,
|
|
980
|
-
searchQuery,
|
|
981
|
-
modelValues
|
|
982
|
-
} = this;
|
|
983
|
-
return createVNode("div", {
|
|
984
|
-
"class": baseClass
|
|
985
|
-
}, [this.$slots.header ? this.$slots.header() : createVNode("div", {
|
|
986
|
-
"class": "devui-transfer-panel-header"
|
|
987
|
-
}, [createVNode("div", {
|
|
988
|
-
"class": "devui-transfer-panel-header-allChecked"
|
|
989
|
-
}, [createVNode(DCheckbox, {
|
|
990
|
-
"modelValue": allChecked,
|
|
991
|
-
"onChange": (value) => this.$emit("changeAllSource", value)
|
|
992
|
-
}, _isSlot(title) ? title : {
|
|
993
|
-
default: () => [title]
|
|
994
|
-
})]), createVNode("div", {
|
|
995
|
-
"class": "devui-transfer-panel-header-num"
|
|
996
|
-
}, [checkedNum, createTextVNode("/"), allCount])]), this.$slots.body ? this.$slots.body() : createVNode("div", {
|
|
997
|
-
"class": "devui-transfer-panel-body"
|
|
998
|
-
}, [search2 && createVNode("div", {
|
|
999
|
-
"class": "devui-transfer-panel-body-search"
|
|
1000
|
-
}, [createVNode(DSearch, {
|
|
1001
|
-
"modelValue": searchQuery,
|
|
1002
|
-
"onUpdate:modelValue": updateSearchQuery
|
|
1003
|
-
}, null)]), createVNode("div", {
|
|
1004
|
-
"class": "devui-transfer-panel-body-list",
|
|
1005
|
-
"style": {
|
|
1006
|
-
height: `calc(100% - 40px - ${search2 ? 42 : 0}px)`
|
|
1007
|
-
}
|
|
1008
|
-
}, [sourceOption.length ? createVNode(DCheckboxGroup, {
|
|
1009
|
-
"modelValue": modelValues,
|
|
1010
|
-
"onChange": (values) => this.$emit("updateCheckeds", values)
|
|
1011
|
-
}, _isSlot(_slot = sourceOption.map((item, idx) => {
|
|
1012
|
-
return createVNode(DCheckbox, {
|
|
1013
|
-
"class": "devui-transfer-panel-body-list-item",
|
|
1014
|
-
"label": item.key,
|
|
1015
|
-
"value": item.value,
|
|
1016
|
-
"disabled": item.disabled,
|
|
1017
|
-
"key": idx
|
|
1018
|
-
}, null);
|
|
1019
|
-
})) ? _slot : {
|
|
1020
|
-
default: () => [_slot]
|
|
1021
|
-
}) : createVNode("div", {
|
|
1022
|
-
"class": "devui-transfer-panel-body-list-empty"
|
|
1023
|
-
}, [createTextVNode("\u65E0\u6570\u636E")])])])]);
|
|
1024
|
-
}
|
|
1025
|
-
});
|
|
1026
|
-
var Icon = defineComponent({
|
|
1027
|
-
name: "DIcon",
|
|
1028
|
-
props: {
|
|
1029
|
-
name: {
|
|
1030
|
-
type: String,
|
|
1031
|
-
required: true
|
|
1032
|
-
},
|
|
1033
|
-
size: {
|
|
1034
|
-
type: String,
|
|
1035
|
-
default: "inherit"
|
|
1036
|
-
},
|
|
1037
|
-
color: {
|
|
1038
|
-
type: String,
|
|
1039
|
-
default: "inherit"
|
|
1040
|
-
},
|
|
1041
|
-
classPrefix: {
|
|
1042
|
-
type: String,
|
|
1043
|
-
default: "icon"
|
|
1044
|
-
}
|
|
1045
|
-
},
|
|
1046
|
-
setup(props) {
|
|
1047
|
-
return __spreadValues({}, props);
|
|
1048
|
-
},
|
|
1049
|
-
render() {
|
|
1050
|
-
const {
|
|
1051
|
-
name,
|
|
1052
|
-
size,
|
|
1053
|
-
color,
|
|
1054
|
-
classPrefix
|
|
1055
|
-
} = this;
|
|
1056
|
-
return createVNode(Fragment, null, [/^((https?):)?\/\//.test(name) ? createVNode("img", {
|
|
1057
|
-
"src": name,
|
|
1058
|
-
"alt": name.split("/")[name.split("/").length - 1],
|
|
1059
|
-
"style": {
|
|
1060
|
-
width: size
|
|
1061
|
-
}
|
|
1062
|
-
}, null) : createVNode("i", {
|
|
1063
|
-
"class": `${classPrefix} ${classPrefix}-${name}`,
|
|
1064
|
-
"style": {
|
|
1065
|
-
fontSize: size,
|
|
1066
|
-
color
|
|
1067
|
-
}
|
|
1068
|
-
}, null)]);
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
Icon.install = function(app) {
|
|
1072
|
-
app.component(Icon.name, Icon);
|
|
1073
|
-
};
|
|
1074
|
-
const buttonProps = {
|
|
1075
|
-
type: {
|
|
1076
|
-
type: String,
|
|
1077
|
-
default: "button"
|
|
1078
|
-
},
|
|
1079
|
-
btnStyle: {
|
|
1080
|
-
type: String,
|
|
1081
|
-
default: "primary"
|
|
1082
|
-
},
|
|
1083
|
-
size: {
|
|
1084
|
-
type: String,
|
|
1085
|
-
default: "md"
|
|
1086
|
-
},
|
|
1087
|
-
position: {
|
|
1088
|
-
type: String,
|
|
1089
|
-
default: "default"
|
|
1090
|
-
},
|
|
1091
|
-
bordered: {
|
|
1092
|
-
type: Boolean,
|
|
1093
|
-
default: false
|
|
1094
|
-
},
|
|
1095
|
-
icon: {
|
|
1096
|
-
type: String,
|
|
1097
|
-
default: ""
|
|
1098
|
-
},
|
|
1099
|
-
showLoading: {
|
|
1100
|
-
type: Boolean,
|
|
1101
|
-
default: false
|
|
1102
|
-
},
|
|
1103
|
-
width: {
|
|
1104
|
-
type: String
|
|
1105
|
-
},
|
|
1106
|
-
disabled: {
|
|
1107
|
-
type: Boolean,
|
|
1108
|
-
default: false
|
|
1109
|
-
},
|
|
1110
|
-
autofocus: {
|
|
1111
|
-
type: Boolean,
|
|
1112
|
-
default: false
|
|
1113
|
-
},
|
|
1114
|
-
onClick: {
|
|
1115
|
-
type: Function
|
|
1116
|
-
}
|
|
1117
|
-
};
|
|
1118
|
-
var button = "";
|
|
1119
|
-
var DButton = defineComponent({
|
|
1120
|
-
name: "DButton",
|
|
1121
|
-
props: buttonProps,
|
|
1122
|
-
setup(props, ctx) {
|
|
1123
|
-
const buttonContent = ref(null);
|
|
1124
|
-
const onClick = (e) => {
|
|
1125
|
-
var _a;
|
|
1126
|
-
if (props.showLoading) {
|
|
1127
|
-
return;
|
|
1128
|
-
}
|
|
1129
|
-
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
1130
|
-
};
|
|
1131
|
-
const hasContent = computed(() => ctx.slots.default);
|
|
1132
|
-
const btnClass = computed(() => {
|
|
1133
|
-
const {
|
|
1134
|
-
btnStyle,
|
|
1135
|
-
size,
|
|
1136
|
-
position,
|
|
1137
|
-
bordered,
|
|
1138
|
-
icon
|
|
1139
|
-
} = props;
|
|
1140
|
-
const origin = `devui-btn devui-btn-${btnStyle} devui-btn-${size} devui-btn-${position}`;
|
|
1141
|
-
const borderedClass = bordered ? "bordered" : "";
|
|
1142
|
-
const btnIcon = !!icon && !hasContent.value && btnStyle !== "primary" ? "d-btn-icon" : "";
|
|
1143
|
-
const btnIconWrap = !!icon ? "d-btn-icon-wrap" : "";
|
|
1144
|
-
return `${origin} ${borderedClass} ${btnIcon} ${btnIconWrap}`;
|
|
1145
|
-
});
|
|
1146
|
-
const iconClass = computed(() => {
|
|
1147
|
-
if (!props.icon) {
|
|
1148
|
-
return;
|
|
1149
|
-
}
|
|
1150
|
-
const origin = "devui-icon-fix icon";
|
|
1151
|
-
if (hasContent.value) {
|
|
1152
|
-
return `${origin} clear-right-5`;
|
|
1153
|
-
} else {
|
|
1154
|
-
return origin;
|
|
1155
|
-
}
|
|
1156
|
-
});
|
|
1157
|
-
return () => {
|
|
1158
|
-
var _a, _b;
|
|
1159
|
-
const {
|
|
1160
|
-
icon,
|
|
1161
|
-
type,
|
|
1162
|
-
disabled,
|
|
1163
|
-
showLoading,
|
|
1164
|
-
width
|
|
1165
|
-
} = props;
|
|
1166
|
-
return createVNode("div", mergeProps({
|
|
1167
|
-
"class": "devui-btn-host"
|
|
1168
|
-
}, ctx.attrs), [createVNode("button", {
|
|
1169
|
-
"class": btnClass.value,
|
|
1170
|
-
"type": type,
|
|
1171
|
-
"disabled": disabled,
|
|
1172
|
-
"style": {
|
|
1173
|
-
width
|
|
1174
|
-
},
|
|
1175
|
-
"onClick": onClick
|
|
1176
|
-
}, [!!icon ? createVNode(Icon, {
|
|
1177
|
-
"name": props.icon,
|
|
1178
|
-
"class": iconClass.value
|
|
1179
|
-
}, null) : null, createVNode("span", {
|
|
1180
|
-
"class": "button-content",
|
|
1181
|
-
"ref": buttonContent
|
|
1182
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])])]);
|
|
1183
|
-
};
|
|
1184
|
-
}
|
|
1185
|
-
});
|
|
1186
|
-
const transferOperationProps = {
|
|
1187
|
-
sourceDisabled: {
|
|
1188
|
-
type: Boolean,
|
|
1189
|
-
default: () => true
|
|
1190
|
-
},
|
|
1191
|
-
targetDisabled: {
|
|
1192
|
-
type: Boolean,
|
|
1193
|
-
default: () => true
|
|
1194
|
-
},
|
|
1195
|
-
disabled: {
|
|
1196
|
-
type: Boolean,
|
|
1197
|
-
default: () => false
|
|
1198
|
-
},
|
|
1199
|
-
onUpdateSourceData: {
|
|
1200
|
-
type: Function
|
|
1201
|
-
},
|
|
1202
|
-
onUpdateTargetData: {
|
|
1203
|
-
type: Function
|
|
1204
|
-
}
|
|
1205
|
-
};
|
|
1206
|
-
var DTransferOperation = defineComponent({
|
|
1207
|
-
name: "DTransferOperation",
|
|
1208
|
-
components: {
|
|
1209
|
-
DButton
|
|
1210
|
-
},
|
|
1211
|
-
props: transferOperationProps,
|
|
1212
|
-
setup(props, ctx) {
|
|
1213
|
-
return () => {
|
|
1214
|
-
return ctx.slots.operation && ctx.slots.operation() || createVNode("div", {
|
|
1215
|
-
"class": "devui-transfer-panel-operation"
|
|
1216
|
-
}, [createVNode("div", {
|
|
1217
|
-
"class": "devui-transfer-panel-operation-group"
|
|
1218
|
-
}, [createVNode(DButton, {
|
|
1219
|
-
"class": "devui-transfer-panel-operation-group-left",
|
|
1220
|
-
"disabled": props.disabled ? props.disabled : props.sourceDisabled,
|
|
1221
|
-
"onClick": () => ctx.emit("updateSourceData")
|
|
1222
|
-
}, {
|
|
1223
|
-
default: () => [createVNode("span", {
|
|
1224
|
-
"class": "icon-collapse"
|
|
1225
|
-
}, null)]
|
|
1226
|
-
}), createVNode(DButton, {
|
|
1227
|
-
"class": "devui-transfer-panel-operation-group-right",
|
|
1228
|
-
"disabled": props.disabled ? props.disabled : props.targetDisabled,
|
|
1229
|
-
"onClick": () => ctx.emit("updateTargetData")
|
|
1230
|
-
}, {
|
|
1231
|
-
default: () => [createVNode("span", {
|
|
1232
|
-
"class": "icon-chevron-right"
|
|
1233
|
-
}, null)]
|
|
1234
|
-
})])]);
|
|
1235
|
-
};
|
|
1236
|
-
}
|
|
1237
|
-
});
|
|
1238
|
-
const transferProps = {
|
|
1239
|
-
sourceOption: {
|
|
1240
|
-
type: Array,
|
|
1241
|
-
require: true,
|
|
1242
|
-
default() {
|
|
1243
|
-
return [];
|
|
1244
|
-
}
|
|
1245
|
-
},
|
|
1246
|
-
targetOption: {
|
|
1247
|
-
type: Array,
|
|
1248
|
-
require: true,
|
|
1249
|
-
default() {
|
|
1250
|
-
return [];
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
titles: {
|
|
1254
|
-
type: Array,
|
|
1255
|
-
default: () => () => ["Source", "Target"]
|
|
1256
|
-
},
|
|
1257
|
-
modelValue: {
|
|
1258
|
-
type: Array,
|
|
1259
|
-
default: () => () => []
|
|
1260
|
-
},
|
|
1261
|
-
height: {
|
|
1262
|
-
type: String,
|
|
1263
|
-
default: "320px"
|
|
1264
|
-
},
|
|
1265
|
-
isSearch: {
|
|
1266
|
-
type: Boolean,
|
|
1267
|
-
default: false
|
|
1268
|
-
},
|
|
1269
|
-
isSourceDroppable: {
|
|
1270
|
-
type: Boolean,
|
|
1271
|
-
default: false
|
|
1272
|
-
},
|
|
1273
|
-
isTargetDroppable: {
|
|
1274
|
-
type: Boolean,
|
|
1275
|
-
default: false
|
|
1276
|
-
},
|
|
1277
|
-
disabled: {
|
|
1278
|
-
type: Boolean,
|
|
1279
|
-
default: false
|
|
1280
|
-
},
|
|
1281
|
-
showOptionTitle: {
|
|
1282
|
-
type: Boolean,
|
|
1283
|
-
default: false
|
|
1284
|
-
},
|
|
1285
|
-
slots: {
|
|
1286
|
-
type: Object
|
|
1287
|
-
}
|
|
1288
|
-
};
|
|
1289
|
-
const headerSlot = (ctx, name) => {
|
|
1290
|
-
return !ctx.slots[`${name}-header`] ? null : () => ctx.slots[`${name}-header`] && ctx.slots[`${name}-header`]();
|
|
1291
|
-
};
|
|
1292
|
-
const bodySlot = (ctx, name) => {
|
|
1293
|
-
return !ctx.slots[`${name}-body`] ? null : () => ctx.slots[`${name}-body`] && ctx.slots[`${name}-body`]();
|
|
1294
|
-
};
|
|
1295
|
-
const opeartionSlot = (ctx) => {
|
|
1296
|
-
return ctx.slots && ctx.slots.operation && ctx.slots.operation() || null;
|
|
1297
|
-
};
|
|
1298
|
-
var transfer = "";
|
|
1299
|
-
var Transfer = defineComponent({
|
|
1300
|
-
name: "DTransfer",
|
|
1301
|
-
components: {
|
|
1302
|
-
DTransferBase,
|
|
1303
|
-
DTransferOperation,
|
|
1304
|
-
DCheckbox
|
|
1305
|
-
},
|
|
1306
|
-
props: transferProps,
|
|
1307
|
-
setup(props, ctx) {
|
|
1308
|
-
const leftOptions = reactive(initState(props, "source"));
|
|
1309
|
-
const rightOptions = reactive(initState(props, "target"));
|
|
1310
|
-
const origin = ref(null);
|
|
1311
|
-
watch(() => leftOptions.query, (nVal) => {
|
|
1312
|
-
searchFilterData(leftOptions);
|
|
1313
|
-
});
|
|
1314
|
-
watch(() => leftOptions.checkedValues, (values) => {
|
|
1315
|
-
leftOptions.checkedNum = values.length;
|
|
1316
|
-
setAllCheckedState(leftOptions, values);
|
|
1317
|
-
}, {
|
|
1318
|
-
deep: true
|
|
1319
|
-
});
|
|
1320
|
-
watch(() => rightOptions.query, (nVal) => {
|
|
1321
|
-
searchFilterData(rightOptions);
|
|
1322
|
-
});
|
|
1323
|
-
watch(() => rightOptions.checkedValues, (values) => {
|
|
1324
|
-
rightOptions.checkedNum = values.length;
|
|
1325
|
-
setAllCheckedState(rightOptions, values);
|
|
1326
|
-
}, {
|
|
1327
|
-
deep: true
|
|
1328
|
-
});
|
|
1329
|
-
const setAllCheckedState = (source, value) => {
|
|
1330
|
-
if (origin.value === "click") {
|
|
1331
|
-
source.allChecked = false;
|
|
1332
|
-
} else {
|
|
1333
|
-
source.allChecked = value.length === source.data.filter((item) => !item.disabled).length ? true : false;
|
|
1334
|
-
}
|
|
1335
|
-
};
|
|
1336
|
-
const updateFilterData = (source, target) => {
|
|
1337
|
-
const newData = [];
|
|
1338
|
-
source.data = source.data.filter((item) => {
|
|
1339
|
-
const hasInclues = source.checkedValues.includes(item.value);
|
|
1340
|
-
hasInclues && newData.push(item);
|
|
1341
|
-
return !hasInclues;
|
|
1342
|
-
});
|
|
1343
|
-
target.data = target.data.concat(newData);
|
|
1344
|
-
source.checkedValues = [];
|
|
1345
|
-
target.disabled = !target.disabled;
|
|
1346
|
-
searchFilterData(source, target);
|
|
1347
|
-
searchFilterData(target, source);
|
|
1348
|
-
setOrigin("click");
|
|
1349
|
-
};
|
|
1350
|
-
const changeAllSource = (source, value) => {
|
|
1351
|
-
if (source.filterData.every((item) => item.disabled))
|
|
1352
|
-
return;
|
|
1353
|
-
source.allChecked = value;
|
|
1354
|
-
if (value) {
|
|
1355
|
-
source.checkedValues = source.filterData.filter((item) => !item.disabled).map((item) => item.value);
|
|
1356
|
-
} else {
|
|
1357
|
-
source.checkedValues = [];
|
|
1358
|
-
}
|
|
1359
|
-
setOrigin("change");
|
|
1360
|
-
};
|
|
1361
|
-
const updateLeftCheckeds = (values) => {
|
|
1362
|
-
leftOptions.checkedValues = values;
|
|
1363
|
-
setOrigin("change");
|
|
1364
|
-
};
|
|
1365
|
-
const updateRightCheckeds = (values) => {
|
|
1366
|
-
rightOptions.checkedValues = values;
|
|
1367
|
-
setOrigin("change");
|
|
1368
|
-
};
|
|
1369
|
-
const searchFilterData = (source, target) => {
|
|
1370
|
-
source.filterData = source.data.filter((item) => item.key.indexOf(source.query) !== -1);
|
|
1371
|
-
if (target) {
|
|
1372
|
-
target.allChecked = false;
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
const setOrigin = (value) => {
|
|
1376
|
-
origin.value = value;
|
|
1377
|
-
};
|
|
1378
|
-
return () => {
|
|
1379
|
-
return createVNode("div", {
|
|
1380
|
-
"class": "devui-transfer"
|
|
1381
|
-
}, [createVNode(DTransferBase, {
|
|
1382
|
-
"style": {
|
|
1383
|
-
height: props.height
|
|
1384
|
-
},
|
|
1385
|
-
"sourceOption": leftOptions.filterData,
|
|
1386
|
-
"title": props.titles[0],
|
|
1387
|
-
"type": "source",
|
|
1388
|
-
"search": props.isSearch,
|
|
1389
|
-
"allChecked": leftOptions.allChecked,
|
|
1390
|
-
"checkedNum": leftOptions.checkedNum,
|
|
1391
|
-
"query": leftOptions.query,
|
|
1392
|
-
"checkedValues": leftOptions.checkedValues,
|
|
1393
|
-
"allCount": leftOptions.data.length,
|
|
1394
|
-
"onChangeAllSource": (value) => changeAllSource(leftOptions, value),
|
|
1395
|
-
"onUpdateCheckeds": updateLeftCheckeds,
|
|
1396
|
-
"onChangeQuery": (value) => leftOptions.query = value
|
|
1397
|
-
}, {
|
|
1398
|
-
header: headerSlot(ctx, "left"),
|
|
1399
|
-
body: bodySlot(ctx, "left")
|
|
1400
|
-
}), createVNode(DTransferOperation, {
|
|
1401
|
-
"disabled": props.disabled,
|
|
1402
|
-
"sourceDisabled": rightOptions.checkedNum > 0 ? false : true,
|
|
1403
|
-
"targetDisabled": leftOptions.checkedNum > 0 ? false : true,
|
|
1404
|
-
"onUpdateSourceData": () => {
|
|
1405
|
-
updateFilterData(rightOptions, leftOptions);
|
|
1406
|
-
},
|
|
1407
|
-
"onUpdateTargetData": () => {
|
|
1408
|
-
updateFilterData(leftOptions, rightOptions);
|
|
1409
|
-
}
|
|
1410
|
-
}, {
|
|
1411
|
-
operation: opeartionSlot(ctx)
|
|
1412
|
-
}), createVNode(DTransferBase, {
|
|
1413
|
-
"style": {
|
|
1414
|
-
height: props.height
|
|
1415
|
-
},
|
|
1416
|
-
"sourceOption": rightOptions.filterData,
|
|
1417
|
-
"title": props.titles[1],
|
|
1418
|
-
"type": "target",
|
|
1419
|
-
"search": props.isSearch,
|
|
1420
|
-
"allChecked": rightOptions.allChecked,
|
|
1421
|
-
"checkedNum": rightOptions.checkedNum,
|
|
1422
|
-
"query": rightOptions.query,
|
|
1423
|
-
"checkedValues": rightOptions.checkedValues,
|
|
1424
|
-
"allCount": rightOptions.data.length,
|
|
1425
|
-
"onChangeAllSource": (value) => changeAllSource(rightOptions, value),
|
|
1426
|
-
"onUpdateCheckeds": updateRightCheckeds,
|
|
1427
|
-
"onChangeQuery": (value) => rightOptions.query = value
|
|
1428
|
-
}, {
|
|
1429
|
-
header: headerSlot(ctx, "right"),
|
|
1430
|
-
body: bodySlot(ctx, "right")
|
|
1431
|
-
})]);
|
|
1432
|
-
};
|
|
1433
|
-
}
|
|
1434
|
-
});
|
|
1435
|
-
Transfer.install = function(app) {
|
|
1436
|
-
app.component(Transfer.name, Transfer);
|
|
1437
|
-
};
|
|
1438
|
-
var index = {
|
|
1439
|
-
title: "Transfer \u7A7F\u68AD\u6846",
|
|
1440
|
-
category: "\u6570\u636E\u5F55\u5165",
|
|
1441
|
-
status: "10%",
|
|
1442
|
-
install(app) {
|
|
1443
|
-
app.use(Transfer);
|
|
1444
|
-
}
|
|
1445
|
-
};
|
|
1446
|
-
export { Transfer, index as default };
|