w-component-vue 2.1.57
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/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +54 -0
- package/.github/workflows/ci-test.yml +23 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/babel.config.js +14 -0
- package/dist/w-component-vue.umd.js +16 -0
- package/dist/w-component-vue.umd.js.map +1 -0
- package/docs/binarySearch.mjs.html +160 -0
- package/docs/examples/app.html +79 -0
- package/docs/examples/app.umd.js +7 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/w-aggrid-vue-dyn_defCellEditable.html +275 -0
- package/docs/examples/w-aggrid-vue-dyn_kpCellEditable_kpRowStyle.html +275 -0
- package/docs/examples/w-aggrid-vue-dyn_kpHeadTooltip_kpCellTooltip.html +275 -0
- package/docs/examples/w-aggrid-vue-dyn_large data (1,000,000 items).html +271 -0
- package/docs/examples/w-aggrid-vue-dyn_simple data.html +275 -0
- package/docs/examples/w-alert_backgroundColor.html +201 -0
- package/docs/examples/w-alert_borderColor.html +201 -0
- package/docs/examples/w-alert_borderRadius.html +201 -0
- package/docs/examples/w-alert_borderWidth.html +201 -0
- package/docs/examples/w-alert_default.html +199 -0
- package/docs/examples/w-alert_icon.html +201 -0
- package/docs/examples/w-alert_position.html +222 -0
- package/docs/examples/w-alert_recive closed event by promise.html +194 -0
- package/docs/examples/w-alert_shadowStyle.html +201 -0
- package/docs/examples/w-alert_textColor.html +201 -0
- package/docs/examples/w-alert_time (6s).html +201 -0
- package/docs/examples/w-alert_type error.html +199 -0
- package/docs/examples/w-alert_type infor.html +199 -0
- package/docs/examples/w-alert_type warning.html +199 -0
- package/docs/examples/w-badge_backgroundColor.html +182 -0
- package/docs/examples/w-badge_badgeAlign.html +202 -0
- package/docs/examples/w-badge_borderColor_textColor_backgroundColor.html +187 -0
- package/docs/examples/w-badge_borderRadius.html +182 -0
- package/docs/examples/w-badge_default.html +182 -0
- package/docs/examples/w-badge_textColor_backgroundColor.html +186 -0
- package/docs/examples/w-badge_textFontSize.html +182 -0
- package/docs/examples/w-button-chip_active_backgroundColorActive.html +259 -0
- package/docs/examples/w-button-chip_active_borderColorActive.html +259 -0
- package/docs/examples/w-button-chip_active_iconColorActive.html +259 -0
- package/docs/examples/w-button-chip_active_no shadow_no shadowActive.html +260 -0
- package/docs/examples/w-button-chip_active_shadowActiveStyle.html +259 -0
- package/docs/examples/w-button-chip_active_textColorActive.html +258 -0
- package/docs/examples/w-button-chip_backgroundColor_backgroundColorHover.html +259 -0
- package/docs/examples/w-button-chip_borderColor_borderColorHover.html +259 -0
- package/docs/examples/w-button-chip_borderRadius.html +258 -0
- package/docs/examples/w-button-chip_borderRadiusStyle.html +280 -0
- package/docs/examples/w-button-chip_borderRadiusStyle_borderWidth_borderColor_borderColorHover.html +284 -0
- package/docs/examples/w-button-chip_borderWidth.html +288 -0
- package/docs/examples/w-button-chip_close.html +259 -0
- package/docs/examples/w-button-chip_close_shiftRight.html +260 -0
- package/docs/examples/w-button-chip_default.html +254 -0
- package/docs/examples/w-button-chip_icon (fontawesome).html +257 -0
- package/docs/examples/w-button-chip_icon (material).html +257 -0
- package/docs/examples/w-button-chip_icon_iconColor_iconColorHover_close.html +262 -0
- package/docs/examples/w-button-chip_icon_no text.html +254 -0
- package/docs/examples/w-button-chip_loading.html +259 -0
- package/docs/examples/w-button-chip_loading_loadingColor.html +260 -0
- package/docs/examples/w-button-chip_loading_textColor_textColorHover.html +261 -0
- package/docs/examples/w-button-chip_modify loading by callback in click.html +259 -0
- package/docs/examples/w-button-chip_modify prog by callback in click.html +259 -0
- package/docs/examples/w-button-chip_no shadow.html +258 -0
- package/docs/examples/w-button-chip_not editable.html +262 -0
- package/docs/examples/w-button-chip_not editable_disabledColor.html +263 -0
- package/docs/examples/w-button-chip_paddingStyle (equal height to using icon).html +254 -0
- package/docs/examples/w-button-chip_paddingStyle (thin style).html +254 -0
- package/docs/examples/w-button-chip_paddingStyle_icon_iconSize_textFontSize.html +262 -0
- package/docs/examples/w-button-chip_prog.html +259 -0
- package/docs/examples/w-button-chip_prog_progColor_progBackgroundColor.html +261 -0
- package/docs/examples/w-button-chip_promiseUnlock.html +259 -0
- package/docs/examples/w-button-chip_rippleColor.html +258 -0
- package/docs/examples/w-button-chip_shadowStyle.html +258 -0
- package/docs/examples/w-button-chip_shiftLeft.html +258 -0
- package/docs/examples/w-button-chip_slot_close.html +288 -0
- package/docs/examples/w-button-chip_textColor.html +257 -0
- package/docs/examples/w-button-chip_textColor_textColorHover.html +258 -0
- package/docs/examples/w-button-chip_tooltip.html +258 -0
- package/docs/examples/w-button-circle_backgroundColor_backgroundColorHover_backgroundColorFocus.html +190 -0
- package/docs/examples/w-button-circle_icon (fontawesome).html +183 -0
- package/docs/examples/w-button-circle_icon (material).html +183 -0
- package/docs/examples/w-button-circle_iconColor_iconColorHover_iconColorFocus.html +190 -0
- package/docs/examples/w-button-circle_loading.html +186 -0
- package/docs/examples/w-button-circle_loading_loadingColor.html +187 -0
- package/docs/examples/w-button-circle_no shadow.html +183 -0
- package/docs/examples/w-button-circle_not editable.html +186 -0
- package/docs/examples/w-button-circle_not editable_disabledColor.html +187 -0
- package/docs/examples/w-button-circle_paddingStyle.html +186 -0
- package/docs/examples/w-button-circle_paddingStyle_iconSize.html +187 -0
- package/docs/examples/w-button-circle_promiseUnlock.html +187 -0
- package/docs/examples/w-button-circle_rippleColor.html +186 -0
- package/docs/examples/w-button-circle_shadowStyle.html +186 -0
- package/docs/examples/w-button-circle_tooltip.html +183 -0
- package/docs/examples/w-checkbox_checkedIconColor_uncheckedIconColor.html +177 -0
- package/docs/examples/w-checkbox_checkedIcon_uncheckedIcon.html +177 -0
- package/docs/examples/w-checkbox_default.html +173 -0
- package/docs/examples/w-checkbox_iconSize.html +173 -0
- package/docs/examples/w-checkbox_not editable.html +173 -0
- package/docs/examples/w-checkbox_not editable_checkedIconColorDisabled_uncheckedIconColorDisabled.html +180 -0
- package/docs/examples/w-checkbox_use string (y or n).html +173 -0
- package/docs/examples/w-ckeditor-vue-dyn_default.html +204 -0
- package/docs/examples/w-ckeditor-vue-dyn_height.html +205 -0
- package/docs/examples/w-ckeditor-vue-dyn_not editable.html +205 -0
- package/docs/examples/w-ckeditor-vue-dyn_settings.html +205 -0
- package/docs/examples/w-confirm_contentColor_contentIconColor_contentBackgroundColor.html +212 -0
- package/docs/examples/w-confirm_contentIcon (fontawesome).html +208 -0
- package/docs/examples/w-confirm_contentIconColor.html +208 -0
- package/docs/examples/w-confirm_contentIconSize.html +208 -0
- package/docs/examples/w-confirm_hasNoBtn_yesBtnText.html +208 -0
- package/docs/examples/w-confirm_maxWidth.html +208 -0
- package/docs/examples/w-confirm_noBtnTextColor_noBtnTextColorHover_noBtnBackgroundColor_noBtnBackgroundColorHover.html +217 -0
- package/docs/examples/w-confirm_noBtnText_yesBtnText.html +209 -0
- package/docs/examples/w-confirm_scrollable (slot content).html +236 -0
- package/docs/examples/w-confirm_scrollable.html +207 -0
- package/docs/examples/w-confirm_slot content.html +283 -0
- package/docs/examples/w-confirm_slot footer.html +226 -0
- package/docs/examples/w-confirm_slot header.html +220 -0
- package/docs/examples/w-confirm_titleColor_headerBackgroundColor_footerBackgroundColor.html +212 -0
- package/docs/examples/w-confirm_title_content.html +207 -0
- package/docs/examples/w-dialog_closeWithInterceptor.html +270 -0
- package/docs/examples/w-dialog_contentTextColor_contentBackgroundColor.html +277 -0
- package/docs/examples/w-dialog_fullscreen.html +277 -0
- package/docs/examples/w-dialog_hasSaveBtn and hasCloseBtn, no save and close button.html +273 -0
- package/docs/examples/w-dialog_hasSaveBtn, no save button.html +270 -0
- package/docs/examples/w-dialog_headerBackgroundColor.html +270 -0
- package/docs/examples/w-dialog_headerBtns.html +271 -0
- package/docs/examples/w-dialog_headerIconColor_headerTextColor_headerBackgroundColor.html +274 -0
- package/docs/examples/w-dialog_icon (fontawesome).html +270 -0
- package/docs/examples/w-dialog_maxWidth, for narrow width.html +270 -0
- package/docs/examples/w-dialog_multi dialogs.html +313 -0
- package/docs/examples/w-dialog_saveBtnTooltip_closeBtnTooltip.html +271 -0
- package/docs/examples/w-dialog_scrollable.html +270 -0
- package/docs/examples/w-dialog_separate for slot content.html +274 -0
- package/docs/examples/w-dialog_slot content.html +269 -0
- package/docs/examples/w-dialog_slot header-left_header-right.html +291 -0
- package/docs/examples/w-dialog_table in slot content.html +336 -0
- package/docs/examples/w-dialog_title.html +269 -0
- package/docs/examples/w-dropfiles_backgroundColor_backgroundColorDropIn_backgroundColorHover.html +209 -0
- package/docs/examples/w-dropfiles_borderColor_borderColorDropIn_borderColorHover_backgroundColorDropIn.html +211 -0
- package/docs/examples/w-dropfiles_borderRadius.html +205 -0
- package/docs/examples/w-dropfiles_borderWidth.html +205 -0
- package/docs/examples/w-dropfiles_default.html +204 -0
- package/docs/examples/w-dropfiles_timeTransition.html +205 -0
- package/docs/examples/w-dynamic-list_change rows.html +383 -0
- package/docs/examples/w-dynamic-list_change slot.html +397 -0
- package/docs/examples/w-dynamic-list_default.html +366 -0
- package/docs/examples/w-dynamic-list_filterKeywords_searchEmpty.html +378 -0
- package/docs/examples/w-dynamic-list_large data (1,000,000 items).html +383 -0
- package/docs/examples/w-dynamic-list_processItems.html +401 -0
- package/docs/examples/w-dynamic-list_render.html +367 -0
- package/docs/examples/w-dynamic-list_separatorColor.html +367 -0
- package/docs/examples/w-dynamic-list_separatorColor_separatorHeight.html +368 -0
- package/docs/examples/w-dynamic-list_slot item with image.html +383 -0
- package/docs/examples/w-dynamic-list_viewHeightMax.html +386 -0
- package/docs/examples/w-echarts-vue-dyn_area.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_bar3D.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_continuous.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_heatmap.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_line.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_line3D.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_parallel.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_polar heatmap.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_polar.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_radar.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_scatter.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_stack.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_surface.html +1788 -0
- package/docs/examples/w-echarts-vue-dyn_tree.html +1791 -0
- package/docs/examples/w-echarts-vue-dyn_treemap.html +1788 -0
- package/docs/examples/w-group-check_backgroundColorActive.html +313 -0
- package/docs/examples/w-group-check_backgroundColor_backgroundColorHover.html +314 -0
- package/docs/examples/w-group-check_borderColor_borderColorHover_borderColorActive.html +317 -0
- package/docs/examples/w-group-check_borderRadius.html +313 -0
- package/docs/examples/w-group-check_borderRadius_borderRadiusStyle_paddingStyle.html +317 -0
- package/docs/examples/w-group-check_borderWidth_borderColor_borderColorHover_borderColorActive.html +322 -0
- package/docs/examples/w-group-check_click (console.log).html +313 -0
- package/docs/examples/w-group-check_default.html +312 -0
- package/docs/examples/w-group-check_group (only one).html +320 -0
- package/docs/examples/w-group-check_group_borderColor_borderColorHover_borderColorActive.html +325 -0
- package/docs/examples/w-group-check_group_groupBorderRadiusStyle_groupShift_borderRadius.html +353 -0
- package/docs/examples/w-group-check_icon (fontawesome).html +312 -0
- package/docs/examples/w-group-check_icon (material).html +312 -0
- package/docs/examples/w-group-check_iconColorActive.html +313 -0
- package/docs/examples/w-group-check_iconColor_iconColorHover.html +314 -0
- package/docs/examples/w-group-check_loading.html +313 -0
- package/docs/examples/w-group-check_loading_loadingColor.html +314 -0
- package/docs/examples/w-group-check_marginStyle.html +313 -0
- package/docs/examples/w-group-check_no shadowActive.html +313 -0
- package/docs/examples/w-group-check_not editable.html +313 -0
- package/docs/examples/w-group-check_paddingStyle_borderRadius_textColor_iconColor.html +330 -0
- package/docs/examples/w-group-check_paddingStyle_iconSize_textFontSize.html +315 -0
- package/docs/examples/w-group-check_shadow.html +313 -0
- package/docs/examples/w-group-check_shadowActiveStyle.html +314 -0
- package/docs/examples/w-group-check_shadow_shadowStyle.html +315 -0
- package/docs/examples/w-group-check_shiftLeft.html +313 -0
- package/docs/examples/w-group-check_shiftLeft_shiftRight.html +314 -0
- package/docs/examples/w-group-check_slot_shadow.html +326 -0
- package/docs/examples/w-group-check_textColor.html +313 -0
- package/docs/examples/w-group-check_textColorActive.html +313 -0
- package/docs/examples/w-group-check_textColor_textColorHover.html +314 -0
- package/docs/examples/w-group-check_tooltip.html +313 -0
- package/docs/examples/w-group-dragdrop_default.html +238 -0
- package/docs/examples/w-group-dragdrop_event (dragdrop).html +241 -0
- package/docs/examples/w-group-dragdrop_items(string array).html +234 -0
- package/docs/examples/w-group-dragdrop_keyBinder.html +246 -0
- package/docs/examples/w-group-dragdrop_not draggable.html +241 -0
- package/docs/examples/w-group-dragdrop_not itemStyleInline (block).html +241 -0
- package/docs/examples/w-group-radio_backgroundColorActive.html +292 -0
- package/docs/examples/w-group-radio_backgroundColor_backgroundColorHover.html +293 -0
- package/docs/examples/w-group-radio_borderColor_borderColorHover_borderColorActive.html +296 -0
- package/docs/examples/w-group-radio_borderRadius.html +292 -0
- package/docs/examples/w-group-radio_borderRadius_borderRadiusStyle_paddingStyle.html +296 -0
- package/docs/examples/w-group-radio_borderWidth_borderColor_borderColorHover_borderColorActive.html +301 -0
- package/docs/examples/w-group-radio_click (console.log).html +292 -0
- package/docs/examples/w-group-radio_default.html +291 -0
- package/docs/examples/w-group-radio_group (only one).html +299 -0
- package/docs/examples/w-group-radio_group_borderColor_borderColorHover_borderColorActive.html +304 -0
- package/docs/examples/w-group-radio_group_groupBorderRadiusStyle_groupShift_borderRadius.html +330 -0
- package/docs/examples/w-group-radio_icon (fontawesome).html +291 -0
- package/docs/examples/w-group-radio_icon (material).html +291 -0
- package/docs/examples/w-group-radio_iconColorActive.html +292 -0
- package/docs/examples/w-group-radio_iconColor_iconColorHover.html +293 -0
- package/docs/examples/w-group-radio_loading.html +292 -0
- package/docs/examples/w-group-radio_loading_loadingColor.html +293 -0
- package/docs/examples/w-group-radio_marginStyle.html +292 -0
- package/docs/examples/w-group-radio_no shadowActive.html +292 -0
- package/docs/examples/w-group-radio_not editable.html +292 -0
- package/docs/examples/w-group-radio_paddingStyle_borderRadius_textColor_iconColor.html +309 -0
- package/docs/examples/w-group-radio_paddingStyle_iconSize_textFontSize.html +294 -0
- package/docs/examples/w-group-radio_shadow.html +292 -0
- package/docs/examples/w-group-radio_shadowActiveStyle.html +293 -0
- package/docs/examples/w-group-radio_shadow_shadowStyle.html +294 -0
- package/docs/examples/w-group-radio_shiftLeft.html +292 -0
- package/docs/examples/w-group-radio_shiftLeft_shiftRight.html +293 -0
- package/docs/examples/w-group-radio_slot_shadow.html +305 -0
- package/docs/examples/w-group-radio_textColor.html +292 -0
- package/docs/examples/w-group-radio_textColorActive.html +292 -0
- package/docs/examples/w-group-radio_textColor_textColorHover.html +293 -0
- package/docs/examples/w-group-radio_tooltip.html +292 -0
- package/docs/examples/w-group-tags_backgroundColor_backgroundColorHover.html +572 -0
- package/docs/examples/w-group-tags_borderColor_borderColorHover.html +572 -0
- package/docs/examples/w-group-tags_borderRadius.html +571 -0
- package/docs/examples/w-group-tags_closeWithInterceptor.html +572 -0
- package/docs/examples/w-group-tags_default.html +563 -0
- package/docs/examples/w-group-tags_editableClose(no close button).html +571 -0
- package/docs/examples/w-group-tags_editableInput(no slot input).html +571 -0
- package/docs/examples/w-group-tags_enableCloseEventOnly.html +567 -0
- package/docs/examples/w-group-tags_icon (fontawesome).html +566 -0
- package/docs/examples/w-group-tags_icon (material).html +566 -0
- package/docs/examples/w-group-tags_iconColor_iconColorHover_textColor_textColorHover.html +584 -0
- package/docs/examples/w-group-tags_icon_iconColor_iconColorHover.html +572 -0
- package/docs/examples/w-group-tags_inputTextButtonTooltip.html +566 -0
- package/docs/examples/w-group-tags_inputTextColor_inputTextBorderColor_inputTextBorderColorHover_inputTextBorderColorFocus.html +577 -0
- package/docs/examples/w-group-tags_inputTextWidth.html +563 -0
- package/docs/examples/w-group-tags_marginStyle.html +568 -0
- package/docs/examples/w-group-tags_modify loading by callback in click.html +567 -0
- package/docs/examples/w-group-tags_modify loading_textColor_textColorHover.html +574 -0
- package/docs/examples/w-group-tags_modify prog by callback in click.html +567 -0
- package/docs/examples/w-group-tags_no shadow_borderColor_borderColorHover.html +572 -0
- package/docs/examples/w-group-tags_not draggable.html +571 -0
- package/docs/examples/w-group-tags_not editable.html +571 -0
- package/docs/examples/w-group-tags_not editable_nodata.html +571 -0
- package/docs/examples/w-group-tags_object items.html +567 -0
- package/docs/examples/w-group-tags_object items_addButtonTextColor_addButtonTextColorHover_addButtonIconColor.html +578 -0
- package/docs/examples/w-group-tags_object items_addButtonText_addButtonTooltip.html +574 -0
- package/docs/examples/w-group-tags_object items_keyIcon.html +571 -0
- package/docs/examples/w-group-tags_object items_keyText.html +571 -0
- package/docs/examples/w-group-tags_object items_keyTooltip.html +571 -0
- package/docs/examples/w-group-tags_object items_slot item.html +603 -0
- package/docs/examples/w-group-tags_object items_slot item_editableInput(no slot input)_useActive.html +593 -0
- package/docs/examples/w-group-tags_object items_slot item_useColorsFromItem_editableInput(no slot input).html +590 -0
- package/docs/examples/w-group-tags_paddingStyle_icon_iconSize_textFontSize.html +575 -0
- package/docs/examples/w-group-tags_progColor_progBackgroundColor.html +572 -0
- package/docs/examples/w-group-tags_shadowStyle.html +570 -0
- package/docs/examples/w-group-tags_shiftLeft.html +567 -0
- package/docs/examples/w-group-tags_slot input.html +585 -0
- package/docs/examples/w-group-tags_slot item.html +602 -0
- package/docs/examples/w-group-tags_slot item_useActive_valueActive_paddingStyle.html +592 -0
- package/docs/examples/w-group-tags_suggests.html +566 -0
- package/docs/examples/w-group-tags_suggests_inputTextColor_inputExpansionIconColor.html +570 -0
- package/docs/examples/w-group-tags_suggests_placeholder_searchEmpty.html +568 -0
- package/docs/examples/w-group-tags_suggests_suggectItemFontSize_suggectItemTextColor_suggectItemTextColorHover.html +573 -0
- package/docs/examples/w-group-tags_textColor.html +570 -0
- package/docs/examples/w-group-tags_textColor_textColorHover.html +571 -0
- package/docs/examples/w-group-tags_useActive_valueActive.html +571 -0
- package/docs/examples/w-highcharts-bitmap-dyn_area.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_bar.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_change options.html +823 -0
- package/docs/examples/w-highcharts-bitmap-dyn_heatmap.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_large heatmap.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_line.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_pie.html +810 -0
- package/docs/examples/w-highcharts-bitmap-dyn_render (need w-hc2png-server) (line).html +811 -0
- package/docs/examples/w-highcharts-bitmap-dyn_scale (line).html +811 -0
- package/docs/examples/w-highcharts-vue-dyn_area.html +740 -0
- package/docs/examples/w-highcharts-vue-dyn_bar.html +740 -0
- package/docs/examples/w-highcharts-vue-dyn_heatmap.html +740 -0
- package/docs/examples/w-highcharts-vue-dyn_large heatmap.html +740 -0
- package/docs/examples/w-highcharts-vue-dyn_line.html +740 -0
- package/docs/examples/w-highcharts-vue-dyn_pie.html +740 -0
- package/docs/examples/w-highstock-vue-dyn_area.html +260 -0
- package/docs/examples/w-highstock-vue-dyn_line.html +260 -0
- package/docs/examples/w-icon-svg_path (mdi-access-point)_size.html +185 -0
- package/docs/examples/w-icon-svg_path (mdi-account-badge-horizontal)_timeTransition.html +190 -0
- package/docs/examples/w-icon-svg_path (mdi-fruit-cherries).html +185 -0
- package/docs/examples/w-icon-svg_path (mdi-graph-outline)_color_colorHover.html +191 -0
- package/docs/examples/w-icon-svg_path (use 3 paths)_sizeOriginal.html +185 -0
- package/docs/examples/w-icon-svg_path_sizeOriginal.html +185 -0
- package/docs/examples/w-image-cascading-dyn_arrangeWhenFinish.html +198 -0
- package/docs/examples/w-image-cascading-dyn_colNum.html +198 -0
- package/docs/examples/w-image-cascading-dyn_default(imageWidth=300).html +196 -0
- package/docs/examples/w-image-cascading-dyn_imageWidth.html +202 -0
- package/docs/examples/w-image-viewer-dyn_multiple image with navbar.html +202 -0
- package/docs/examples/w-image-viewer-dyn_one image.html +201 -0
- package/docs/examples/w-json-view_default.html +465 -0
- package/docs/examples/w-json-view_filterKeywords_searchEmpty.html +478 -0
- package/docs/examples/w-json-view_iconColor_keyColor_keyNumbersColor_numColor.html +477 -0
- package/docs/examples/w-json-view_large data (100,000 lines).html +465 -0
- package/docs/examples/w-json-view_valueStyleBreakAll.html +469 -0
- package/docs/examples/w-json-view_viewHeightMax.html +469 -0
- package/docs/examples/w-leaflet-vue-dyn_contourSet for rain data.html +417 -0
- package/docs/examples/w-leaflet-vue-dyn_contourSets.html +417 -0
- package/docs/examples/w-leaflet-vue-dyn_pointSets.html +417 -0
- package/docs/examples/w-leaflet-vue-dyn_polygonSets.html +417 -0
- package/docs/examples/w-list-vertical_auto scroll.html +308 -0
- package/docs/examples/w-list-vertical_default.html +296 -0
- package/docs/examples/w-list-vertical_itemActive.html +297 -0
- package/docs/examples/w-list-vertical_itemActive_itemBackgroundColor_itemBackgroundColorHover_itemBackgroundColorActive.html +304 -0
- package/docs/examples/w-list-vertical_itemActive_itemTextColor_itemTextColorHover_itemTextColorActive.html +310 -0
- package/docs/examples/w-list-vertical_keyText_keyIcon.html +298 -0
- package/docs/examples/w-list-vertical_paddingStyle.html +297 -0
- package/docs/examples/w-list-vertical_slot footer.html +310 -0
- package/docs/examples/w-list-vertical_slot header.html +309 -0
- package/docs/examples/w-list-vertical_slot item.html +331 -0
- package/docs/examples/w-list-vertical_string items.html +296 -0
- package/docs/examples/w-list-vertical_useActive (no active).html +297 -0
- package/docs/examples/w-list-vertical_useActive (no active)_itemRippleColor.html +298 -0
- package/docs/examples/w-panel-bulge_contentBackgroundColor.html +243 -0
- package/docs/examples/w-panel-bulge_contentBorderRadius.html +243 -0
- package/docs/examples/w-panel-bulge_default.html +242 -0
- package/docs/examples/w-panel-bulge_headerBorderRadius.html +243 -0
- package/docs/examples/w-panel-bulge_headerPadding.html +246 -0
- package/docs/examples/w-panel-bulge_headerTextColor_headerBackgroundColor.html +244 -0
- package/docs/examples/w-panel-bulge_no headerShadow_no contentShadow, with green outer.html +248 -0
- package/docs/examples/w-panel-bulge_slot for header_headerBorderRadius_headerBackgroundColor(linear-gradient).html +265 -0
- package/docs/examples/w-panel-bulge_with grey outer.html +244 -0
- package/docs/examples/w-panel-chart_cmpName (WEchartsVueDyn).html +322 -0
- package/docs/examples/w-panel-chart_cmpName (WHighchartsBitmapDyn).html +322 -0
- package/docs/examples/w-panel-chart_cmpName (WHighstockVueDyn).html +322 -0
- package/docs/examples/w-panel-chart_default (WHighchartsVueDyn).html +319 -0
- package/docs/examples/w-panel-chart_downloadPicture.html +322 -0
- package/docs/examples/w-panel-chart_downloadPicture_downloadPictureBtnIcon.html +323 -0
- package/docs/examples/w-panel-chart_downloadPicture_downloadPictureBtnIconColor_downloadPictureBtnIconColorHover_downloadPictureBtnIconColorFocus.html +330 -0
- package/docs/examples/w-panel-chart_downloadPicture_downloadPictureBtnTooltip.html +323 -0
- package/docs/examples/w-panel-chart_downloadPicture_downloadPictureFilenmae.html +323 -0
- package/docs/examples/w-panel-chart_scale.html +319 -0
- package/docs/examples/w-panel-chart_width_height.html +323 -0
- package/docs/examples/w-panel-divide-horizontal_barBorderSize_barBorderColor.html +202 -0
- package/docs/examples/w-panel-divide-horizontal_barColor.html +203 -0
- package/docs/examples/w-panel-divide-horizontal_barSize.html +201 -0
- package/docs/examples/w-panel-divide-horizontal_default.html +200 -0
- package/docs/examples/w-panel-divide-horizontal_min_max.html +204 -0
- package/docs/examples/w-panel-divide-horizontal_ratio.html +203 -0
- package/docs/examples/w-panel-divide-vertical_barBorderSize_barBorderColor.html +202 -0
- package/docs/examples/w-panel-divide-vertical_barColor.html +203 -0
- package/docs/examples/w-panel-divide-vertical_barSize.html +201 -0
- package/docs/examples/w-panel-divide-vertical_default.html +200 -0
- package/docs/examples/w-panel-divide-vertical_min_max.html +204 -0
- package/docs/examples/w-panel-divide-vertical_ratio.html +203 -0
- package/docs/examples/w-panel-scale_for select.html +232 -0
- package/docs/examples/w-panel-scale_for v-btn.html +241 -0
- package/docs/examples/w-panel-scale_for w-panel-bulge.html +230 -0
- package/docs/examples/w-panel-scale_for w-panel-scrolly.html +260 -0
- package/docs/examples/w-panel-scale_for w-text-suggest.html +238 -0
- package/docs/examples/w-panel-scrolly_barColor_barColorHover.html +222 -0
- package/docs/examples/w-panel-scrolly_barColor_barColorHover_barBackgroundColor_barBackgroundColorHover.html +226 -0
- package/docs/examples/w-panel-scrolly_barHeightMin.html +190 -0
- package/docs/examples/w-panel-scrolly_barWidth.html +218 -0
- package/docs/examples/w-panel-scrolly_default.html +221 -0
- package/docs/examples/w-panel-scrolly_ratio.html +226 -0
- package/docs/examples/w-panel-scrolly_scrollDelta.html +221 -0
- package/docs/examples/w-panel-stripe_borderRadius.html +194 -0
- package/docs/examples/w-panel-stripe_buttons in slot footer.html +203 -0
- package/docs/examples/w-panel-stripe_headerBackgroundColor_footerBackgroundColor.html +198 -0
- package/docs/examples/w-panel-stripe_no footer.html +194 -0
- package/docs/examples/w-panel-stripe_no header.html +194 -0
- package/docs/examples/w-panel-stripe_no shadow, with crimson outer.html +199 -0
- package/docs/examples/w-panel-stripe_only slot icon and slot title in header.html +190 -0
- package/docs/examples/w-panel-stripe_only slot title in header.html +186 -0
- package/docs/examples/w-panel-stripe_padding.html +196 -0
- package/docs/examples/w-panel-stripe_separate for slot content.html +204 -0
- package/docs/examples/w-panel-stripe_slot icon (fontawesome).html +197 -0
- package/docs/examples/w-panel-stripe_slot icon, slot title, slot description, slot content and slot footer.html +196 -0
- package/docs/examples/w-panel-stripe_table in slot content.html +261 -0
- package/docs/examples/w-panel-stripe_with grey outer.html +199 -0
- package/docs/examples/w-popup-edit-text_default.html +178 -0
- package/docs/examples/w-popup-edit-text_in table.html +191 -0
- package/docs/examples/w-popup-edit-text_minWidthForPopup.html +181 -0
- package/docs/examples/w-popup-edit-text_minWidthForValue.html +181 -0
- package/docs/examples/w-popup-edit-text_no title.html +178 -0
- package/docs/examples/w-popup-edit-text_title_contentIcon_contentIconColor_contentIconSize.html +186 -0
- package/docs/examples/w-popup-edit-text_title_footerBackgroundColor.html +182 -0
- package/docs/examples/w-popup-edit-text_title_inputTextColor_contentIconColor_contentBackgroundColor.html +189 -0
- package/docs/examples/w-popup-edit-text_title_saveBtnText_saveBtnTextColor_saveBtnTextColorHover.html +191 -0
- package/docs/examples/w-popup-edit-text_title_titleColor_titleFontSize_headerBackgroundColor.html +186 -0
- package/docs/examples/w-popup_auto flipping in scroll panel.html +295 -0
- package/docs/examples/w-popup_backgroundColor.html +279 -0
- package/docs/examples/w-popup_borderRadius.html +278 -0
- package/docs/examples/w-popup_click item by latency hiding.html +273 -0
- package/docs/examples/w-popup_default.html +273 -0
- package/docs/examples/w-popup_distY.html +278 -0
- package/docs/examples/w-popup_in dialog.html +304 -0
- package/docs/examples/w-popup_in popup.html +337 -0
- package/docs/examples/w-popup_in scroll panel.html +292 -0
- package/docs/examples/w-popup_isolated.html +281 -0
- package/docs/examples/w-popup_maxWidth.html +274 -0
- package/docs/examples/w-popup_minWidth.html +278 -0
- package/docs/examples/w-popup_no shadow_backgroundColor.html +280 -0
- package/docs/examples/w-popup_not editable.html +282 -0
- package/docs/examples/w-popup_shadowStyle.html +278 -0
- package/docs/examples/w-popup_slot for table_maxWidth.html +283 -0
- package/docs/examples/w-progress-bar_decimal.html +186 -0
- package/docs/examples/w-progress-bar_default.html +182 -0
- package/docs/examples/w-progress-bar_enableIconFinish (no iconFinish).html +186 -0
- package/docs/examples/w-progress-bar_enableIconWaiting (no iconWaiting).html +186 -0
- package/docs/examples/w-progress-bar_height.html +186 -0
- package/docs/examples/w-progress-bar_height_borderRadius.html +187 -0
- package/docs/examples/w-progress-bar_iconFinish (fontawesome).html +186 -0
- package/docs/examples/w-progress-bar_iconFinishColor.html +186 -0
- package/docs/examples/w-progress-bar_iconSize.html +186 -0
- package/docs/examples/w-progress-bar_iconWaiting (fontawesome).html +186 -0
- package/docs/examples/w-progress-bar_iconWaitingColor.html +186 -0
- package/docs/examples/w-progress-bar_progColor.html +186 -0
- package/docs/examples/w-progress-bar_progColor_progBackgroundColor.html +187 -0
- package/docs/examples/w-progress-bar_title.html +186 -0
- package/docs/examples/w-progress-bar_title_titleTextColor.html +187 -0
- package/docs/examples/w-progress-bar_title_titleTextFontSize.html +187 -0
- package/docs/examples/w-progress-bar_value=0 (waiting).html +185 -0
- package/docs/examples/w-progress-bar_value=100 (finish).html +185 -0
- package/docs/examples/w-progress-bar_valueTextColor.html +186 -0
- package/docs/examples/w-progress-bar_valueTextFontSize.html +186 -0
- package/docs/examples/w-progress-circle_color.html +182 -0
- package/docs/examples/w-progress-circle_default.html +181 -0
- package/docs/examples/w-progress-circle_small size.html +184 -0
- package/docs/examples/w-progress-circle_tooltip.html +183 -0
- package/docs/examples/w-progress-circle_very small size.html +183 -0
- package/docs/examples/w-progress-circle_width.html +178 -0
- package/docs/examples/w-progress-circle_/344/270/255/346/226/207text.html +178 -0
- package/docs/examples/w-quill-vue-dyn_default.html +201 -0
- package/docs/examples/w-quill-vue-dyn_height.html +202 -0
- package/docs/examples/w-quill-vue-dyn_not editable.html +202 -0
- package/docs/examples/w-quill-vue-dyn_settings.html +202 -0
- package/docs/examples/w-switch_default.html +173 -0
- package/docs/examples/w-switch_not editable.html +173 -0
- package/docs/examples/w-switch_text_color.html +177 -0
- package/docs/examples/w-switch_use string (y or n).html +173 -0
- package/docs/examples/w-table-dyn_default.html +517 -0
- package/docs/examples/w-table-dyn_editable.html +520 -0
- package/docs/examples/w-table-dyn_editable_checkId.html +521 -0
- package/docs/examples/w-table-dyn_editable_checkId_opt.modifyDataWhenSave_save(call cmp. method).html +533 -0
- package/docs/examples/w-table-dyn_editable_checkId_successMsgFromAddRow_errorMsgFromAddRow.html +531 -0
- package/docs/examples/w-table-dyn_editable_checkId_tooltipAddRow_tooltipDeleteSelectedRows.html +530 -0
- package/docs/examples/w-table-dyn_editable_inforPaddingStyle_menuBackgroundColor.html +526 -0
- package/docs/examples/w-table-dyn_editable_opt.beforeAddRow.html +520 -0
- package/docs/examples/w-table-dyn_editable_opt.kpConvertKeysWhenUploadData.html +520 -0
- package/docs/examples/w-table-dyn_editable_opt.optForUploadData.html +520 -0
- package/docs/examples/w-table-dyn_editable_slot btns.html +544 -0
- package/docs/examples/w-table-dyn_editable_textLabelDataName_textPlaceholderDataName_textLabelDataDescription.html +526 -0
- package/docs/examples/w-table-dyn_fixIds (fix id).html +521 -0
- package/docs/examples/w-table-dyn_hideIds (hide mappingId).html +521 -0
- package/docs/examples/w-table-dyn_name_description.html +519 -0
- package/docs/examples/w-table-dyn_opt.kpHead.html +519 -0
- package/docs/examples/w-table-dyn_removeIdsWhenDownload (remove id, mappingId, order, isActive).html +522 -0
- package/docs/examples/w-table-dyn_slot btns.html +543 -0
- package/docs/examples/w-table-dyn_slot infor (name_description).html +536 -0
- package/docs/examples/w-table-dyn_sortColIds (sort by order).html +520 -0
- package/docs/examples/w-text-int_borderRadius.html +193 -0
- package/docs/examples/w-text-int_border_backgroundColor_backgroundColorHover_backgroundColorFocus.html +205 -0
- package/docs/examples/w-text-int_border_borderRadius.html +201 -0
- package/docs/examples/w-text-int_border_buttonColor_buttonColorHover_buttonColorFocus.html +205 -0
- package/docs/examples/w-text-int_border_default.html +200 -0
- package/docs/examples/w-text-int_border_not editable.html +201 -0
- package/docs/examples/w-text-int_border_width.html +201 -0
- package/docs/examples/w-text-int_buttonColor_buttonColorHover_buttonColorFocus.html +200 -0
- package/docs/examples/w-text-int_buttonIconSize.html +193 -0
- package/docs/examples/w-text-int_default.html +193 -0
- package/docs/examples/w-text-int_not editable.html +193 -0
- package/docs/examples/w-text-int_textColor.html +193 -0
- package/docs/examples/w-text-int_textFontSize.html +193 -0
- package/docs/examples/w-text-int_width.html +193 -0
- package/docs/examples/w-text-select_a lot of items.html +270 -0
- package/docs/examples/w-text-select_borderRadius.html +271 -0
- package/docs/examples/w-text-select_border_a lot of items.html +275 -0
- package/docs/examples/w-text-select_border_backgroundColor_backgroundColorHover_backgroundColorFocus.html +280 -0
- package/docs/examples/w-text-select_border_borderRadius.html +276 -0
- package/docs/examples/w-text-select_border_default.html +274 -0
- package/docs/examples/w-text-select_border_events.html +284 -0
- package/docs/examples/w-text-select_border_expansionIconSize.html +275 -0
- package/docs/examples/w-text-select_border_fullwidth.html +275 -0
- package/docs/examples/w-text-select_border_itemPaddingStyle.html +276 -0
- package/docs/examples/w-text-select_border_itemTextColor_itemTextColorHover_itemBackgroundColor.html +281 -0
- package/docs/examples/w-text-select_border_itemTextFontSize_defItemHeight_width.html +280 -0
- package/docs/examples/w-text-select_border_items(string array).html +275 -0
- package/docs/examples/w-text-select_border_keyText.html +276 -0
- package/docs/examples/w-text-select_border_leftIcon (fontawesome).html +275 -0
- package/docs/examples/w-text-select_border_leftIcon (material).html +275 -0
- package/docs/examples/w-text-select_border_leftIcon_leftIconColor_leftIconColorHover.html +281 -0
- package/docs/examples/w-text-select_border_leftIcon_leftIconSize.html +276 -0
- package/docs/examples/w-text-select_border_not editable.html +276 -0
- package/docs/examples/w-text-select_border_paddingStyle (equal height to using icon).html +277 -0
- package/docs/examples/w-text-select_border_paddingStyle (thin style).html +275 -0
- package/docs/examples/w-text-select_border_rightIcon_rightIconColor_rightIconColorHover.html +281 -0
- package/docs/examples/w-text-select_border_rightIcon_rightIconSize.html +276 -0
- package/docs/examples/w-text-select_border_showExpansionIcon.html +276 -0
- package/docs/examples/w-text-select_border_slot item.html +282 -0
- package/docs/examples/w-text-select_border_slot select.html +283 -0
- package/docs/examples/w-text-select_border_textColor_expansionIconColor.html +276 -0
- package/docs/examples/w-text-select_border_textFontSize.html +275 -0
- package/docs/examples/w-text-select_border_with popup.html +284 -0
- package/docs/examples/w-text-select_default.html +269 -0
- package/docs/examples/w-text-select_events.html +279 -0
- package/docs/examples/w-text-select_expansionIconSize.html +270 -0
- package/docs/examples/w-text-select_fullwidth.html +270 -0
- package/docs/examples/w-text-select_itemPaddingStyle.html +271 -0
- package/docs/examples/w-text-select_itemTextColor_itemTextColorHover_itemBackgroundColor_itemBackgroundColorHover.html +276 -0
- package/docs/examples/w-text-select_itemTextFontSize_defItemHeight_width.html +273 -0
- package/docs/examples/w-text-select_items(string array).html +270 -0
- package/docs/examples/w-text-select_keyText.html +271 -0
- package/docs/examples/w-text-select_leftIcon (fontawesome).html +270 -0
- package/docs/examples/w-text-select_leftIcon (material).html +270 -0
- package/docs/examples/w-text-select_leftIcon_leftIconColor_leftIconColorHover_leftIconColorFocus.html +276 -0
- package/docs/examples/w-text-select_leftIcon_leftIconSize.html +271 -0
- package/docs/examples/w-text-select_not editable.html +271 -0
- package/docs/examples/w-text-select_paddingStyle (equal height to using icon).html +270 -0
- package/docs/examples/w-text-select_paddingStyle (thin style).html +270 -0
- package/docs/examples/w-text-select_rightIcon_rightIconColor_rightIconColorHover_rightIconColorFocus.html +276 -0
- package/docs/examples/w-text-select_rightIcon_rightIconSize.html +271 -0
- package/docs/examples/w-text-select_showExpansionIcon.html +271 -0
- package/docs/examples/w-text-select_slot item.html +277 -0
- package/docs/examples/w-text-select_slot select.html +278 -0
- package/docs/examples/w-text-select_textColor_expansionIconColor.html +271 -0
- package/docs/examples/w-text-select_textFontSize.html +270 -0
- package/docs/examples/w-text-select_with popup.html +304 -0
- package/docs/examples/w-text-suggest_a lot of items.html +296 -0
- package/docs/examples/w-text-suggest_borderRadius.html +296 -0
- package/docs/examples/w-text-suggest_border_a lot of items.html +301 -0
- package/docs/examples/w-text-suggest_border_backgroundColor_backgroundColorHover_backgroundColorFocus.html +305 -0
- package/docs/examples/w-text-suggest_border_borderRadius.html +301 -0
- package/docs/examples/w-text-suggest_border_default.html +299 -0
- package/docs/examples/w-text-suggest_border_events.html +309 -0
- package/docs/examples/w-text-suggest_border_expansionIconSize.html +300 -0
- package/docs/examples/w-text-suggest_border_fullwidth.html +300 -0
- package/docs/examples/w-text-suggest_border_itemPaddingStyle.html +301 -0
- package/docs/examples/w-text-suggest_border_itemTextColor_itemTextColorHover_itemBackgroundColor.html +306 -0
- package/docs/examples/w-text-suggest_border_itemTextFontSize_defItemHeight.html +302 -0
- package/docs/examples/w-text-suggest_border_items(string array).html +300 -0
- package/docs/examples/w-text-suggest_border_keyText.html +302 -0
- package/docs/examples/w-text-suggest_border_leftIcon (fontawesome).html +300 -0
- package/docs/examples/w-text-suggest_border_leftIcon (material).html +300 -0
- package/docs/examples/w-text-suggest_border_leftIcon_leftIconColor_leftIconColorHover.html +306 -0
- package/docs/examples/w-text-suggest_border_leftIcon_leftIconSize.html +301 -0
- package/docs/examples/w-text-suggest_border_not editable.html +301 -0
- package/docs/examples/w-text-suggest_border_paddingStyle (equal height to using icon).html +302 -0
- package/docs/examples/w-text-suggest_border_paddingStyle (thin style).html +300 -0
- package/docs/examples/w-text-suggest_border_placeholder.html +301 -0
- package/docs/examples/w-text-suggest_border_rightIcon_rightIconColor_rightIconColorHover.html +306 -0
- package/docs/examples/w-text-suggest_border_rightIcon_rightIconSize.html +301 -0
- package/docs/examples/w-text-suggest_border_searchEmpty.html +300 -0
- package/docs/examples/w-text-suggest_border_showExpansionIcon.html +301 -0
- package/docs/examples/w-text-suggest_border_showPanel(press enter to hide panel)_focused.html +322 -0
- package/docs/examples/w-text-suggest_border_slot item.html +307 -0
- package/docs/examples/w-text-suggest_border_textColor_expansionIconColor.html +301 -0
- package/docs/examples/w-text-suggest_border_textFontSize.html +300 -0
- package/docs/examples/w-text-suggest_border_with popup.html +309 -0
- package/docs/examples/w-text-suggest_default.html +294 -0
- package/docs/examples/w-text-suggest_events.html +304 -0
- package/docs/examples/w-text-suggest_expansionIconSize.html +295 -0
- package/docs/examples/w-text-suggest_fullwidth.html +295 -0
- package/docs/examples/w-text-suggest_itemPaddingStyle.html +296 -0
- package/docs/examples/w-text-suggest_itemTextColor_itemTextColorHover_itemBackgroundColor_itemBackgroundColorHover.html +301 -0
- package/docs/examples/w-text-suggest_itemTextFontSize_defItemHeight.html +297 -0
- package/docs/examples/w-text-suggest_items(string array).html +295 -0
- package/docs/examples/w-text-suggest_keyText.html +297 -0
- package/docs/examples/w-text-suggest_leftIcon (fontawesome).html +295 -0
- package/docs/examples/w-text-suggest_leftIcon (material).html +295 -0
- package/docs/examples/w-text-suggest_leftIcon_leftIconColor_leftIconColorHover_leftIconColorFocus.html +301 -0
- package/docs/examples/w-text-suggest_leftIcon_leftIconSize.html +296 -0
- package/docs/examples/w-text-suggest_not editable.html +296 -0
- package/docs/examples/w-text-suggest_paddingStyle (equal height to using icon).html +295 -0
- package/docs/examples/w-text-suggest_paddingStyle (thin style).html +295 -0
- package/docs/examples/w-text-suggest_placeholder.html +296 -0
- package/docs/examples/w-text-suggest_rightIcon_rightIconColor_rightIconColorHover_rightIconColorFocus.html +301 -0
- package/docs/examples/w-text-suggest_rightIcon_rightIconSize.html +296 -0
- package/docs/examples/w-text-suggest_searchEmpty.html +295 -0
- package/docs/examples/w-text-suggest_showExpansionIcon.html +296 -0
- package/docs/examples/w-text-suggest_showPanel(press enter to hide panel)_focused.html +315 -0
- package/docs/examples/w-text-suggest_slot item.html +302 -0
- package/docs/examples/w-text-suggest_textColor_expansionIconColor.html +296 -0
- package/docs/examples/w-text-suggest_textFontSize.html +295 -0
- package/docs/examples/w-text_border_backgroundColor_backgroundColorHover_backgroundColorFocus.html +228 -0
- package/docs/examples/w-text_border_borderRadius_paddingStyle.html +227 -0
- package/docs/examples/w-text_border_default.html +226 -0
- package/docs/examples/w-text_border_events.html +235 -0
- package/docs/examples/w-text_border_fullwidth.html +227 -0
- package/docs/examples/w-text_border_leftIcon (fontawesome).html +227 -0
- package/docs/examples/w-text_border_leftIcon (material).html +227 -0
- package/docs/examples/w-text_border_leftIcon_leftIconColor_leftIconColorHover.html +232 -0
- package/docs/examples/w-text_border_not editable.html +228 -0
- package/docs/examples/w-text_border_placeholder.html +227 -0
- package/docs/examples/w-text_border_rightIcon_rightIconColorHover_rightIconColorFocus.html +232 -0
- package/docs/examples/w-text_border_textAlign.html +265 -0
- package/docs/examples/w-text_border_textColor.html +227 -0
- package/docs/examples/w-text_bottomLineBorderColor_bottomLineBorderColorHover_bottomLineBorderColorFocus.html +219 -0
- package/docs/examples/w-text_default.html +212 -0
- package/docs/examples/w-text_events.html +223 -0
- package/docs/examples/w-text_fullwidth.html +215 -0
- package/docs/examples/w-text_leftIcon (fontawesome).html +212 -0
- package/docs/examples/w-text_leftIcon (material).html +215 -0
- package/docs/examples/w-text_leftIcon_leftIconColor_leftIconColorFocus.html +219 -0
- package/docs/examples/w-text_leftIcon_leftIconSize.html +216 -0
- package/docs/examples/w-text_leftIcon_leftIconTooltip.html +216 -0
- package/docs/examples/w-text_not editable.html +216 -0
- package/docs/examples/w-text_placeholder.html +216 -0
- package/docs/examples/w-text_rightIcon.html +212 -0
- package/docs/examples/w-text_rightIcon_rightIconColor_rightIconColorFocus.html +219 -0
- package/docs/examples/w-text_rightIcon_rightIconSize.html +216 -0
- package/docs/examples/w-text_rightIcon_rightIconTooltip.html +216 -0
- package/docs/examples/w-text_textAlign.html +220 -0
- package/docs/examples/w-text_textColor.html +212 -0
- package/docs/examples/w-text_textFontSize.html +212 -0
- package/docs/examples/w-textarea_borderColorFocus.html +195 -0
- package/docs/examples/w-textarea_default.html +192 -0
- package/docs/examples/w-textarea_fullwidth.html +192 -0
- package/docs/examples/w-textarea_not editable.html +192 -0
- package/docs/examples/w-textarea_placeholder.html +192 -0
- package/docs/examples/w-timeday-range_between.html +209 -0
- package/docs/examples/w-timeday-range_borderRadius.html +209 -0
- package/docs/examples/w-timeday-range_border_between.html +214 -0
- package/docs/examples/w-timeday-range_border_borderRadius.html +214 -0
- package/docs/examples/w-timeday-range_border_default.html +213 -0
- package/docs/examples/w-timeday-range_border_icon (fontawesome).html +214 -0
- package/docs/examples/w-timeday-range_border_icon (material).html +214 -0
- package/docs/examples/w-timeday-range_border_iconColor_iconColorFoucs_borderColor.html +216 -0
- package/docs/examples/w-timeday-range_border_iconTooltip.html +214 -0
- package/docs/examples/w-timeday-range_border_not editable.html +214 -0
- package/docs/examples/w-timeday-range_border_pickColor.html +214 -0
- package/docs/examples/w-timeday-range_border_textColor.html +214 -0
- package/docs/examples/w-timeday-range_default.html +208 -0
- package/docs/examples/w-timeday-range_icon (fontawesome).html +209 -0
- package/docs/examples/w-timeday-range_icon (material).html +209 -0
- package/docs/examples/w-timeday-range_iconColor_iconColorFoucs.html +210 -0
- package/docs/examples/w-timeday-range_iconTooltip.html +209 -0
- package/docs/examples/w-timeday-range_icon_iconSize.html +210 -0
- package/docs/examples/w-timeday-range_not editable.html +209 -0
- package/docs/examples/w-timeday-range_pickColor.html +209 -0
- package/docs/examples/w-timeday-range_textColor.html +209 -0
- package/docs/examples/w-timeday_borderRadius.html +188 -0
- package/docs/examples/w-timeday_border_borderRadius.html +196 -0
- package/docs/examples/w-timeday_border_default.html +195 -0
- package/docs/examples/w-timeday_border_icon (fontawesome).html +196 -0
- package/docs/examples/w-timeday_border_icon (material).html +196 -0
- package/docs/examples/w-timeday_border_iconColor_iconColorFoucs_borderColor.html +198 -0
- package/docs/examples/w-timeday_border_iconTooltip.html +197 -0
- package/docs/examples/w-timeday_border_not editable.html +196 -0
- package/docs/examples/w-timeday_border_pickColor.html +196 -0
- package/docs/examples/w-timeday_border_textColor.html +196 -0
- package/docs/examples/w-timeday_default.html +188 -0
- package/docs/examples/w-timeday_icon (fontawesome).html +188 -0
- package/docs/examples/w-timeday_icon (material).html +191 -0
- package/docs/examples/w-timeday_iconColor_iconColorFoucs.html +192 -0
- package/docs/examples/w-timeday_iconTooltip.html +192 -0
- package/docs/examples/w-timeday_icon_iconSize.html +192 -0
- package/docs/examples/w-timeday_not editable.html +188 -0
- package/docs/examples/w-timeday_pickColor.html +188 -0
- package/docs/examples/w-timeday_textColor.html +188 -0
- package/docs/examples/w-timeminute-range_between.html +233 -0
- package/docs/examples/w-timeminute-range_borderRadius.html +233 -0
- package/docs/examples/w-timeminute-range_border_between.html +238 -0
- package/docs/examples/w-timeminute-range_border_borderRadius.html +238 -0
- package/docs/examples/w-timeminute-range_border_default.html +237 -0
- package/docs/examples/w-timeminute-range_border_hourMin_hourMax.html +239 -0
- package/docs/examples/w-timeminute-range_border_icon (fontawesome).html +238 -0
- package/docs/examples/w-timeminute-range_border_icon (material).html +238 -0
- package/docs/examples/w-timeminute-range_border_iconColor_iconColorFoucs_borderColor.html +240 -0
- package/docs/examples/w-timeminute-range_border_iconTooltip.html +238 -0
- package/docs/examples/w-timeminute-range_border_minuteInter.html +238 -0
- package/docs/examples/w-timeminute-range_border_minutesCustom.html +238 -0
- package/docs/examples/w-timeminute-range_border_not editable.html +238 -0
- package/docs/examples/w-timeminute-range_border_pickColor.html +238 -0
- package/docs/examples/w-timeminute-range_border_textColor_expansionIconColor.html +239 -0
- package/docs/examples/w-timeminute-range_default.html +232 -0
- package/docs/examples/w-timeminute-range_hourMin_hourMax.html +234 -0
- package/docs/examples/w-timeminute-range_icon (fontawesome).html +233 -0
- package/docs/examples/w-timeminute-range_icon (material).html +233 -0
- package/docs/examples/w-timeminute-range_iconColor_iconColorFoucs.html +234 -0
- package/docs/examples/w-timeminute-range_iconTooltip.html +233 -0
- package/docs/examples/w-timeminute-range_icon_iconSize.html +234 -0
- package/docs/examples/w-timeminute-range_minuteInter.html +233 -0
- package/docs/examples/w-timeminute-range_minutesCustom.html +233 -0
- package/docs/examples/w-timeminute-range_not editable.html +233 -0
- package/docs/examples/w-timeminute-range_pickColor.html +233 -0
- package/docs/examples/w-timeminute-range_textColor_expansionIconColor.html +234 -0
- package/docs/examples/w-timeminute_borderRadius.html +201 -0
- package/docs/examples/w-timeminute_border_borderRadius.html +209 -0
- package/docs/examples/w-timeminute_border_default.html +208 -0
- package/docs/examples/w-timeminute_border_hourMin_hourMax.html +210 -0
- package/docs/examples/w-timeminute_border_icon (fontawesome).html +209 -0
- package/docs/examples/w-timeminute_border_icon (material).html +209 -0
- package/docs/examples/w-timeminute_border_iconColor_iconColorFoucs_borderColor.html +211 -0
- package/docs/examples/w-timeminute_border_iconTooltip.html +210 -0
- package/docs/examples/w-timeminute_border_minuteInter.html +209 -0
- package/docs/examples/w-timeminute_border_minutesCustom.html +209 -0
- package/docs/examples/w-timeminute_border_not editable.html +209 -0
- package/docs/examples/w-timeminute_border_pickColor.html +209 -0
- package/docs/examples/w-timeminute_border_textColor_expansionIconColor.html +210 -0
- package/docs/examples/w-timeminute_default.html +201 -0
- package/docs/examples/w-timeminute_hourMin_hourMax.html +205 -0
- package/docs/examples/w-timeminute_icon (fontawesome).html +204 -0
- package/docs/examples/w-timeminute_icon (material).html +204 -0
- package/docs/examples/w-timeminute_iconColor_iconColorFoucs.html +205 -0
- package/docs/examples/w-timeminute_iconTooltip.html +205 -0
- package/docs/examples/w-timeminute_icon_iconSize.html +205 -0
- package/docs/examples/w-timeminute_minuteInter.html +201 -0
- package/docs/examples/w-timeminute_minutesCustom.html +204 -0
- package/docs/examples/w-timeminute_not editable.html +201 -0
- package/docs/examples/w-timeminute_pickColor.html +201 -0
- package/docs/examples/w-timeminute_textColor_expansionIconColor.html +205 -0
- package/docs/examples/w-tinymce-vue-dyn_default.html +191 -0
- package/docs/examples/w-tinymce-vue-dyn_height.html +192 -0
- package/docs/examples/w-tinymce-vue-dyn_not editable.html +192 -0
- package/docs/examples/w-tinymce-vue-dyn_settings.html +192 -0
- package/docs/examples/w-tree_default.html +629 -0
- package/docs/examples/w-tree_defaultDisplayLevel.html +633 -0
- package/docs/examples/w-tree_draggable.html +637 -0
- package/docs/examples/w-tree_draggable_dgInsertLineColor_dgInsertBackgroundColor_dgBelongBackgroundColor.html +642 -0
- package/docs/examples/w-tree_draggable_dgPreviewOpacity_dgPreviewBorderWidth_dgBelongBackgroundColor.html +643 -0
- package/docs/examples/w-tree_draggable_dgTextDisabled_dgTextDisabledColor_dgTextDisabledPaddingLeft.html +644 -0
- package/docs/examples/w-tree_filterKeywords_searchEmpty_selectable.html +709 -0
- package/docs/examples/w-tree_iconToggleColor_iconToggleBackgroundColor_iconToggleBackgroundColorHover.html +637 -0
- package/docs/examples/w-tree_indent.html +633 -0
- package/docs/examples/w-tree_keyPrimary_keyText_keyChildren.html +635 -0
- package/docs/examples/w-tree_mouseenter_mouseleave_click_change-view-items.html +638 -0
- package/docs/examples/w-tree_operatable.html +638 -0
- package/docs/examples/w-tree_operatable_operateBtnBackgroundColor_operateBtnBackgroundColorHover_operateBtnBackgroundColorFocus.html +643 -0
- package/docs/examples/w-tree_operatable_operateBtnTooltip_operateItemTextForInsertBefore_perateItemTextForInsertChild.html +645 -0
- package/docs/examples/w-tree_operatable_operateItemBackgroundColor_operateItemBackgroundColorHover_operateItemTextColor.html +646 -0
- package/docs/examples/w-tree_operatable_operateItemIconSize_operateItemPaddingStyle_operatePanelWidth.html +644 -0
- package/docs/examples/w-tree_paddingStyle.html +633 -0
- package/docs/examples/w-tree_selectable.html +650 -0
- package/docs/examples/w-tree_selectable_draggable.html +655 -0
- package/docs/examples/w-tree_selectable_large data (100,000 items).html +663 -0
- package/docs/examples/w-tree_separatorColor.html +633 -0
- package/docs/examples/w-tree_separatorColor_separatorHeight.html +634 -0
- package/docs/examples/w-tree_slot.html +673 -0
- package/docs/examples/w-tree_slot_defItemHeight.html +643 -0
- package/docs/examples/w-tree_slot_iconUncheckedColor_iconUncheckedDisabledColor_iconCheckedColor.html +708 -0
- package/docs/examples/w-tree_slot_locked_selectable.html +700 -0
- package/docs/examples/w-tree_slot_operatable.html +649 -0
- package/docs/examples/w-tree_slot_selectable.html +699 -0
- package/docs/examples/w-tree_slot_selectable_draggable.html +704 -0
- package/docs/examples/w-tree_viewHeightMax.html +633 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/global.html +1036 -0
- package/docs/highchartsSetting.mjs.html +285 -0
- package/docs/index.html +81 -0
- package/docs/module-WAggridVueDyn.html +537 -0
- package/docs/module-WBadge.html +255 -0
- package/docs/module-WButtonChip.html +441 -0
- package/docs/module-WButtonCircle.html +321 -0
- package/docs/module-WCheckbox.html +249 -0
- package/docs/module-WCkeditorVueDyn.html +237 -0
- package/docs/module-WConfirm.html +345 -0
- package/docs/module-WDialog.html +297 -0
- package/docs/module-WDropfiles.html +261 -0
- package/docs/module-WDynamicList.html +261 -0
- package/docs/module-WEchartsVueDyn.html +219 -0
- package/docs/module-WGroupCheck.html +435 -0
- package/docs/module-WGroupDragdrop.html +231 -0
- package/docs/module-WGroupRadio.html +429 -0
- package/docs/module-WGroupTags.html +621 -0
- package/docs/module-WHighchartsBitmapDyn.html +219 -0
- package/docs/module-WHighchartsVueDyn.html +219 -0
- package/docs/module-WHighstockVueDyn.html +219 -0
- package/docs/module-WIcon.html +225 -0
- package/docs/module-WIconLoading.html +219 -0
- package/docs/module-WIconSvg.html +243 -0
- package/docs/module-WImageCascadingDyn.html +267 -0
- package/docs/module-WImageViewerDyn.html +237 -0
- package/docs/module-WJsonView.html +303 -0
- package/docs/module-WJsonViewCore.html +243 -0
- package/docs/module-WLeafletVueDyn.html +675 -0
- package/docs/module-WListVertical.html +315 -0
- package/docs/module-WListVerticalItem.html +303 -0
- package/docs/module-WPanelBulge.html +267 -0
- package/docs/module-WPanelDivideHorizontal.html +249 -0
- package/docs/module-WPanelDivideVertical.html +249 -0
- package/docs/module-WPanelScrolly.html +255 -0
- package/docs/module-WPanelScrollyCore.html +267 -0
- package/docs/module-WPanelStripe.html +255 -0
- package/docs/module-WPopup.html +267 -0
- package/docs/module-WPopupEditText.html +363 -0
- package/docs/module-WProgressBar.html +315 -0
- package/docs/module-WProgressCircle.html +243 -0
- package/docs/module-WQuillVueDyn.html +237 -0
- package/docs/module-WShellBottomLine.html +249 -0
- package/docs/module-WShellEllipse.html +369 -0
- package/docs/module-WShellMaterial.html +285 -0
- package/docs/module-WSwitch.html +231 -0
- package/docs/module-WTableDyn.html +697 -0
- package/docs/module-WText.html +435 -0
- package/docs/module-WTextCore.html +261 -0
- package/docs/module-WTextInt.html +387 -0
- package/docs/module-WTextIntCore.html +291 -0
- package/docs/module-WTextSelect.html +447 -0
- package/docs/module-WTextSuggest.html +465 -0
- package/docs/module-WTextSuggestCore.html +369 -0
- package/docs/module-WTextarea.html +231 -0
- package/docs/module-WTimeday.html +345 -0
- package/docs/module-WTimedayCore.html +243 -0
- package/docs/module-WTimedayRange.html +351 -0
- package/docs/module-WTimedayRangeCore.html +255 -0
- package/docs/module-WTimeminute.html +381 -0
- package/docs/module-WTimeminuteCore.html +285 -0
- package/docs/module-WTimeminuteRange.html +393 -0
- package/docs/module-WTimeminuteRangeCore.html +297 -0
- package/docs/module-WTinymceVueDyn.html +237 -0
- package/docs/module-WTree.html +573 -0
- package/docs/module-WTreeIconCheckbox.html +255 -0
- package/docs/module-WTreeIconToggle.html +231 -0
- package/docs/scripts/collapse.js +20 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +83 -0
- package/docs/styles/jsdoc.css +765 -0
- package/docs/styles/prettify.css +79 -0
- package/docs/vuetifyColor.mjs.html +157 -0
- package/gUITest.mjs +30 -0
- package/package.json +68 -0
- package/public/index.html +48 -0
- package/src/App.vue +783 -0
- package/src/AppZoneWAggridVueDyn.vue +237 -0
- package/src/AppZoneWAlert.vue +246 -0
- package/src/AppZoneWBadge.vue +180 -0
- package/src/AppZoneWButtonChip.vue +871 -0
- package/src/AppZoneWButtonCircle.vue +274 -0
- package/src/AppZoneWCheckbox.vue +139 -0
- package/src/AppZoneWCkeditorVueDyn.vue +145 -0
- package/src/AppZoneWConfirm.vue +469 -0
- package/src/AppZoneWDialog.vue +929 -0
- package/src/AppZoneWDropfiles.vue +225 -0
- package/src/AppZoneWDynamicList.vue +536 -0
- package/src/AppZoneWEchartsVueDyn.vue +1180 -0
- package/src/AppZoneWGroupCheck.vue +780 -0
- package/src/AppZoneWGroupDragdrop.vue +291 -0
- package/src/AppZoneWGroupRadio.vue +756 -0
- package/src/AppZoneWGroupTags.vue +1302 -0
- package/src/AppZoneWHighchartsBitmapDyn.vue +635 -0
- package/src/AppZoneWHighchartsVueDyn.vue +517 -0
- package/src/AppZoneWHighstockVueDyn.vue +161 -0
- package/src/AppZoneWIconSvg.vue +140 -0
- package/src/AppZoneWImageCascadingDyn.vue +140 -0
- package/src/AppZoneWImageViewerDyn.vue +106 -0
- package/src/AppZoneWJsonView.vue +222 -0
- package/src/AppZoneWLeafletVueDyn.vue +299 -0
- package/src/AppZoneWListVertical.vue +480 -0
- package/src/AppZoneWPanelBulge.vue +284 -0
- package/src/AppZoneWPanelChart.vue +343 -0
- package/src/AppZoneWPanelDivideHorizontal.vue +223 -0
- package/src/AppZoneWPanelDivideVertical.vue +223 -0
- package/src/AppZoneWPanelScale.vue +283 -0
- package/src/AppZoneWPanelScrolly.vue +171 -0
- package/src/AppZoneWPanelStripe.vue +596 -0
- package/src/AppZoneWPopup.vue +629 -0
- package/src/AppZoneWPopupEditText.vue +249 -0
- package/src/AppZoneWProgressBar.vue +356 -0
- package/src/AppZoneWProgressCircle.vue +144 -0
- package/src/AppZoneWQuillVueDyn.vue +141 -0
- package/src/AppZoneWSwitch.vue +87 -0
- package/src/AppZoneWTableDyn.vue +610 -0
- package/src/AppZoneWText.vue +740 -0
- package/src/AppZoneWTextInt.vue +269 -0
- package/src/AppZoneWTextSelect.vue +1140 -0
- package/src/AppZoneWTextSuggest.vue +1242 -0
- package/src/AppZoneWTextarea.vue +114 -0
- package/src/AppZoneWTimeday.vue +346 -0
- package/src/AppZoneWTimedayRange.vue +421 -0
- package/src/AppZoneWTimeminute.vue +462 -0
- package/src/AppZoneWTimeminuteRange.vue +548 -0
- package/src/AppZoneWTinymceVueDyn.vue +130 -0
- package/src/AppZoneWTree.vue +1364 -0
- package/src/components/WAggridVueDyn.vue +136 -0
- package/src/components/WAlert.mjs +7 -0
- package/src/components/WBadge.vue +181 -0
- package/src/components/WButtonChip.vue +947 -0
- package/src/components/WButtonCircle.vue +459 -0
- package/src/components/WCheckbox.vue +154 -0
- package/src/components/WCkeditorVueDyn.vue +86 -0
- package/src/components/WComponentVue.vue +144 -0
- package/src/components/WConfirm.vue +320 -0
- package/src/components/WDialog.vue +547 -0
- package/src/components/WDropfiles.vue +146 -0
- package/src/components/WDynamicList.vue +898 -0
- package/src/components/WEchartsVueDyn.vue +77 -0
- package/src/components/WGroupCheck.vue +685 -0
- package/src/components/WGroupDragdrop.vue +223 -0
- package/src/components/WGroupRadio.vue +254 -0
- package/src/components/WGroupTags.vue +944 -0
- package/src/components/WHighchartsBitmapDyn.vue +216 -0
- package/src/components/WHighchartsVueDyn.vue +85 -0
- package/src/components/WHighstockVueDyn.vue +81 -0
- package/src/components/WIcon.vue +129 -0
- package/src/components/WIconLoading.vue +163 -0
- package/src/components/WIconSvg.vue +118 -0
- package/src/components/WImageCascadingDyn.vue +591 -0
- package/src/components/WImageViewerDyn.vue +148 -0
- package/src/components/WJsonView.vue +1176 -0
- package/src/components/WJsonViewCore.vue +163 -0
- package/src/components/WLeafletVueDyn.vue +146 -0
- package/src/components/WListVertical.vue +306 -0
- package/src/components/WListVerticalItem.vue +261 -0
- package/src/components/WPanelBulge.vue +193 -0
- package/src/components/WPanelChart.vue +219 -0
- package/src/components/WPanelDivideHorizontal.vue +198 -0
- package/src/components/WPanelDivideVertical.vue +198 -0
- package/src/components/WPanelScale.vue +114 -0
- package/src/components/WPanelScrolly.vue +189 -0
- package/src/components/WPanelScrollyCore.vue +768 -0
- package/src/components/WPanelStripe.vue +152 -0
- package/src/components/WPopup.vue +527 -0
- package/src/components/WPopupEditText.vue +326 -0
- package/src/components/WProgressBar.vue +236 -0
- package/src/components/WProgressCircle.vue +132 -0
- package/src/components/WQuillVueDyn.vue +87 -0
- package/src/components/WShellBottomLine.vue +139 -0
- package/src/components/WShellEllipse.vue +416 -0
- package/src/components/WShellMaterial.vue +250 -0
- package/src/components/WSwitch.vue +115 -0
- package/src/components/WTableDyn.vue +1095 -0
- package/src/components/WText.vue +323 -0
- package/src/components/WTextCore.vue +227 -0
- package/src/components/WTextInt.vue +275 -0
- package/src/components/WTextIntCore.vue +288 -0
- package/src/components/WTextSelect.vue +442 -0
- package/src/components/WTextSuggest.vue +456 -0
- package/src/components/WTextSuggestCore.vue +648 -0
- package/src/components/WTextarea.vue +89 -0
- package/src/components/WTimeday.vue +228 -0
- package/src/components/WTimedayCore.vue +197 -0
- package/src/components/WTimedayRange.vue +235 -0
- package/src/components/WTimedayRangeCore.vue +142 -0
- package/src/components/WTimeminute.vue +264 -0
- package/src/components/WTimeminuteCore.vue +294 -0
- package/src/components/WTimeminuteRange.vue +277 -0
- package/src/components/WTimeminuteRangeCore.vue +192 -0
- package/src/components/WTinymceVueDyn.vue +86 -0
- package/src/components/WTree.vue +2504 -0
- package/src/components/WTreeIconCheckbox.vue +170 -0
- package/src/components/WTreeIconToggle.vue +155 -0
- package/src/components/demolink.vue +103 -0
- package/src/js/binarySearch.mjs +91 -0
- package/src/js/domDragDrop.mjs +154 -0
- package/src/js/domMutation.mjs +76 -0
- package/src/js/domResize.mjs +71 -0
- package/src/js/domRipple.mjs +120 -0
- package/src/js/getVue.mjs +30 -0
- package/src/js/globalMemory.mjs +29 -0
- package/src/js/highchartsSetting.mjs +216 -0
- package/src/js/parseSpace.mjs +83 -0
- package/src/js/vuetifyColor.mjs +88 -0
- package/src/main.js +10 -0
- package/src/plugins/vuetify.mjs +13 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/cvCasename.mjs +90 -0
- package/toolg/gDistApp.mjs +55 -0
- package/toolg/gDistRollupComps.mjs +23 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +279 -0
- package/toolg/gMergeComps.mjs +75 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +21 -0
|
@@ -0,0 +1,2504 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 拖曳區可能超過組件區域外, 故得使用overflow:hidden -->
|
|
3
|
+
<div
|
|
4
|
+
style="position:relative; overflow:hidden;"
|
|
5
|
+
:changeDefaultDisplayLevel="changeDefaultDisplayLevel"
|
|
6
|
+
:changeDraggableAndOperatable="changeDraggableAndOperatable"
|
|
7
|
+
:changeFilterKeyWords="changeFilterKeyWords"
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
<WDynamicList
|
|
11
|
+
ref="wdl"
|
|
12
|
+
:viewHeightMax="viewHeightMax"
|
|
13
|
+
:itemMinHeight="defItemHeight"
|
|
14
|
+
:itemsPreload="itemsPreload"
|
|
15
|
+
:searchEmpty="searchEmpty"
|
|
16
|
+
:separatorHeight="separatorHeight"
|
|
17
|
+
:separatorColor="separatorColor"
|
|
18
|
+
:show="show"
|
|
19
|
+
@change-view-items="changeViewItems"
|
|
20
|
+
>
|
|
21
|
+
<template v-slot="props">
|
|
22
|
+
|
|
23
|
+
<!-- 記得要:key, 使DOM可被唯一標記識別, 此為避免捲動按需顯示時, 因圖標有顯隱(2方向), 瞬間被Vue切換導致transition轉動問題 -->
|
|
24
|
+
<!-- wdl template內第1層元素高度需設定min-height不能用height, 因會偵測此元素高度來按需顯示, 用height會導致元素高度被寫死無法由slot撐開 -->
|
|
25
|
+
<!-- 要把原生拖曳功能關閉draggable=false -->
|
|
26
|
+
<div
|
|
27
|
+
:key="`wt-${props.index}`"
|
|
28
|
+
:style="`min-height:${iconHeight}px; ${draggable?'user-select:none;':''}`"
|
|
29
|
+
:dragindex="props.index"
|
|
30
|
+
v-domdragdrop="isDraggable?getDgOpt():null"
|
|
31
|
+
@domdragdrop="dragdrop"
|
|
32
|
+
draggable="false"
|
|
33
|
+
@mouseenter="(e)=>{$emit('mouseenter',getEmitData(e,props))}"
|
|
34
|
+
@mouseleave="(e)=>{$emit('mouseleave',getEmitData(e,props))}"
|
|
35
|
+
@click="(e)=>{$emit('click',getEmitData(e,props))}"
|
|
36
|
+
>
|
|
37
|
+
<div :style="`position:relative; display:table; ${usePadding}`">
|
|
38
|
+
|
|
39
|
+
<div style="position:absolute; top:2px; right:8px;" v-if="operatable">
|
|
40
|
+
|
|
41
|
+
<WPopup
|
|
42
|
+
:isolated="true"
|
|
43
|
+
>
|
|
44
|
+
|
|
45
|
+
<template v-slot:trigger>
|
|
46
|
+
<WButtonCircle
|
|
47
|
+
:icon="mdiDotsVertical"
|
|
48
|
+
:backgroundColor="operateBtnBackgroundColor"
|
|
49
|
+
:backgroundColorHover="operateBtnBackgroundColorHover"
|
|
50
|
+
:backgroundColorFocus="operateBtnBackgroundColorFocus"
|
|
51
|
+
:shadow="false"
|
|
52
|
+
:tooltip="operateBtnTooltip"
|
|
53
|
+
></WButtonCircle>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<template v-slot:content="propsOperate">
|
|
57
|
+
<!-- 因位於WDynamicList內位置太複雜popup.js無法順利計算寬高, 得由外部指定寬高 -->
|
|
58
|
+
<WListVertical
|
|
59
|
+
:style="`height:${operatePanelHeight}px; width:${operatePanelWidth}px;`"
|
|
60
|
+
:items="useOperateItems"
|
|
61
|
+
:itemTextFontSize="'0.8rem'"
|
|
62
|
+
:useActive="false"
|
|
63
|
+
:paddingStyle="operateItemPaddingStyle"
|
|
64
|
+
:itemBackgroundColor="operateItemBackgroundColor"
|
|
65
|
+
:itemBackgroundColorHover="operateItemBackgroundColorHover"
|
|
66
|
+
:itemTextColor="operateItemTextColor"
|
|
67
|
+
:itemTextColorHover="operateItemTextColorHover"
|
|
68
|
+
:itemIconSize="operateItemIconSize"
|
|
69
|
+
:itemIconColor="operateItemIconColor"
|
|
70
|
+
:itemIconColorHover="operateItemIconColorHover"
|
|
71
|
+
@click="(item)=>{propsOperate.funHide();clickOperateItem({opItem:item,rowItem:props})}"
|
|
72
|
+
></WListVertical>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
</WPopup>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- display:table內各元素需使用padding撐開寬度避免被壓縮 -->
|
|
81
|
+
|
|
82
|
+
<div :style="`display:table-cell; vertical-align:top; padding-right:${getLevel(props.row)*useIndent}px;`"></div>
|
|
83
|
+
|
|
84
|
+
<div :style="`display:table-cell; vertical-align:top; padding-right:${separation}px;`"></div>
|
|
85
|
+
|
|
86
|
+
<div :style="`display:table-cell; vertical-align:top; padding:0px ${separation}px;`">
|
|
87
|
+
<WTreeIconToggle
|
|
88
|
+
:style="`width:24px; height:${iconHeight}px;`"
|
|
89
|
+
:dir="`${props.row.unfolding?'bottom':'right'}`"
|
|
90
|
+
:iconColor="iconToggleColor"
|
|
91
|
+
:iconBackgroundColor="iconToggleBackgroundColor"
|
|
92
|
+
:iconBackgroundColorHover="iconToggleBackgroundColorHover"
|
|
93
|
+
@click.stop="toggleItems(props.row)"
|
|
94
|
+
v-if="hasChildren(props.index)"
|
|
95
|
+
></WTreeIconToggle>
|
|
96
|
+
<div style="padding-right:24px;" v-else></div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!-- 因顯隱圖標比較小而勾選圖標比較大, 讓separation全灌到padding-right處使排版比較均勻 -->
|
|
100
|
+
<div :style="`display:table-cell; vertical-align:top; padding:0px ${2*separation}px 0px 0px;`" v-if="selectable">
|
|
101
|
+
<WTreeIconCheckbox
|
|
102
|
+
:style="`height:${iconHeight}px;`"
|
|
103
|
+
:mode="props.row.checked"
|
|
104
|
+
:editable="getEditable(props.row.item)"
|
|
105
|
+
:uncheckedColor="iconUncheckedColor"
|
|
106
|
+
:uncheckedDisabledColor="iconUncheckedDisabledColor"
|
|
107
|
+
:checkedColor="iconCheckedColor"
|
|
108
|
+
:checkedDisabledColor="iconCheckedDisabledColor"
|
|
109
|
+
:checkedPartiallyColor="iconCheckedPartiallyColor"
|
|
110
|
+
:checkedPartiallyDisabledColor="iconCheckedPartiallyDisabledColor"
|
|
111
|
+
@click="checkItems(props.row)"
|
|
112
|
+
></WTreeIconCheckbox>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<!-- 給予width:100%使slot區可自動展開寬度至組件寬 -->
|
|
116
|
+
<div :style="`display:table-cell; vertical-align:top; height:${iconHeight}px; width:100%;`">
|
|
117
|
+
|
|
118
|
+
<slot
|
|
119
|
+
name="item"
|
|
120
|
+
:index="props.index"
|
|
121
|
+
:data="props.row.item"
|
|
122
|
+
:row="props.row"
|
|
123
|
+
:keyPrimary="keyPrimary"
|
|
124
|
+
:keyText="keyText"
|
|
125
|
+
:keyChildren="keyChildren"
|
|
126
|
+
:setDataByPathAndValue="setDataByPathAndValue"
|
|
127
|
+
>
|
|
128
|
+
<!-- 得使用min-height否則無法撐開高度 -->
|
|
129
|
+
<div :style="`min-height:${iconHeight}px; display:flex; align-items:center;`">
|
|
130
|
+
{{getText(props.row.item)}}
|
|
131
|
+
</div>
|
|
132
|
+
</slot>
|
|
133
|
+
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
</template>
|
|
140
|
+
</WDynamicList>
|
|
141
|
+
|
|
142
|
+
<div
|
|
143
|
+
:style="`position:absolute; z-index:1; pointer-events:none; left:${dgTipLeft}px; top:${dgTipTop}px; _width:calc( 100% - 8px ); _overflow-x:hidden;`"
|
|
144
|
+
:msg="`需使用pointer-events:none;禁用事件, 避免拖曳時因接觸此元素時出現enter與leave`"
|
|
145
|
+
v-if="dgTipMode!==''"
|
|
146
|
+
>
|
|
147
|
+
<template v-if="dgTipMode==='lineTop'">
|
|
148
|
+
<div :style="`display:inline-block; width:${dgTipWidth}px; height:${dgTipHeight}px; background-color:${useDgInsertBackgroundColor}; border-top:1px solid ${useDgInsertLineColor};`"></div>
|
|
149
|
+
</template>
|
|
150
|
+
<template v-else-if="dgTipMode==='lineBottom'">
|
|
151
|
+
<div :style="`display:inline-block; width:${dgTipWidth}px; height:${dgTipHeight}px; background-color:${useDgInsertBackgroundColor}; border-bottom:1px solid ${useDgInsertLineColor};`"></div>
|
|
152
|
+
</template>
|
|
153
|
+
<template v-else-if="dgTipMode==='block'">
|
|
154
|
+
<div :style="`display:inline-block; width:${dgTipWidth}px; height:${dgTipHeight}px; background-color:${uesDgBelongBackgroundColor};`"></div>
|
|
155
|
+
</template>
|
|
156
|
+
<template v-else-if="dgTipMode==='disabled'">
|
|
157
|
+
<div :style="`display:inline-block; width:${dgTipWidth}px; height:${dgTipHeight}px; background-color:${useDgTextDisabledBackgroundColor};`">
|
|
158
|
+
<div :style="`height:${dgTipHeight}px; display:flex; align-items:center;`">
|
|
159
|
+
<div :style="`color:${useDgTextDisabledColor}; padding-left:${dgTextDisabledPaddingLeft}px; font-size:${dgTextDisabledFontSize};`">
|
|
160
|
+
{{dgTextDisabled}}
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</template>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
</template>
|
|
169
|
+
|
|
170
|
+
<script>
|
|
171
|
+
import { mdiDotsVertical, mdiFormatVerticalAlignTop, mdiFormatHorizontalAlignRight, mdiFormatVerticalAlignBottom, mdiClose } from '@mdi/js/mdi.js'
|
|
172
|
+
import each from 'lodash/each'
|
|
173
|
+
import get from 'lodash/get'
|
|
174
|
+
import set from 'lodash/set'
|
|
175
|
+
import map from 'lodash/map'
|
|
176
|
+
import join from 'lodash/join'
|
|
177
|
+
import min from 'lodash/min'
|
|
178
|
+
import take from 'lodash/take'
|
|
179
|
+
import takeRight from 'lodash/takeRight'
|
|
180
|
+
import find from 'lodash/find'
|
|
181
|
+
import size from 'lodash/size'
|
|
182
|
+
import isEqual from 'lodash/isEqual'
|
|
183
|
+
import isNumber from 'lodash/isNumber'
|
|
184
|
+
import reverse from 'lodash/reverse'
|
|
185
|
+
import remove from 'lodash/remove'
|
|
186
|
+
import pullAt from 'lodash/pullAt'
|
|
187
|
+
import cloneDeep from 'lodash/cloneDeep'
|
|
188
|
+
import isInteger from 'lodash/isInteger'
|
|
189
|
+
import dropRight from 'lodash/dropRight'
|
|
190
|
+
import genID from 'wsemi/src/genID.mjs'
|
|
191
|
+
import sep from 'wsemi/src/sep.mjs'
|
|
192
|
+
import isarr from 'wsemi/src/isarr.mjs'
|
|
193
|
+
import isobj from 'wsemi/src/isobj.mjs'
|
|
194
|
+
import isfun from 'wsemi/src/isfun.mjs'
|
|
195
|
+
import cint from 'wsemi/src/cint.mjs'
|
|
196
|
+
import cdbl from 'wsemi/src/cdbl.mjs'
|
|
197
|
+
import replace from 'wsemi/src/replace.mjs'
|
|
198
|
+
import haskey from 'wsemi/src/haskey.mjs'
|
|
199
|
+
import genPm from 'wsemi/src/genPm.mjs'
|
|
200
|
+
import waitFun from 'wsemi/src/waitFun.mjs'
|
|
201
|
+
import debounce from 'wsemi/src/debounce.mjs'
|
|
202
|
+
import flattenTreeObj from 'wsemi/src/flattenTreeObj'
|
|
203
|
+
import globalMemory from '../js/globalMemory.mjs'
|
|
204
|
+
import parseSpace from '../js/parseSpace.mjs'
|
|
205
|
+
import color2hex from '../js/vuetifyColor.mjs'
|
|
206
|
+
import domDragDrop from '../js/domDragDrop.mjs'
|
|
207
|
+
import WDynamicList from './WDynamicList.vue'
|
|
208
|
+
import WButtonCircle from './WButtonCircle.vue'
|
|
209
|
+
import WPopup from './WPopup.vue'
|
|
210
|
+
import WListVertical from './WListVertical.vue'
|
|
211
|
+
import WTreeIconToggle from './WTreeIconToggle.vue'
|
|
212
|
+
import WTreeIconCheckbox from './WTreeIconCheckbox.vue'
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
//gm
|
|
216
|
+
let gm = globalMemory()
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @vue-prop {Array|Object} [data=[]] 輸入資料陣列,預設[],各元素配合slot顯示即可,slot內提供row與irow,對應原始rows內各元素與指標,另外各元素slot時不要用margin避免計算高度有誤差
|
|
221
|
+
* @vue-prop {Number} [viewHeightMax=400] 輸入顯示區最大高度,單位為px,預設400
|
|
222
|
+
* @vue-prop {Number} [defaultDisplayLevel=null] 輸入初始展開層數數字,若輸入1就是預設展開至第1層,第2層(含)以下則都隱藏,若輸入null就是全展開,預設null
|
|
223
|
+
* @vue-prop {Boolean} [selectable=false] 輸入是否具有勾選模式,預設false
|
|
224
|
+
* @vue-prop {Array} [selections=[]] 輸入勾選項目陣列,當selectable=true時才可使用,預設[]
|
|
225
|
+
* @vue-prop {String} [keyPrimary='id'] 輸入可選項目為物件時,主鍵之欄位字串,預設'id'
|
|
226
|
+
* @vue-prop {String} [keyText='text'] 輸入可選項目為物件時,顯示文字之欄位字串,預設'text'
|
|
227
|
+
* @vue-prop {String} [keyChildren='children'] 輸入可選項目為物件時,所屬子項目之欄位字串,預設'children'
|
|
228
|
+
* @vue-prop {String} [keyLock='locked'] 輸入可選項目為物件時,禁止勾選之欄位字串,物件給予此欄位需為布林值,預設'locked'
|
|
229
|
+
* @vue-prop {Object} [paddingStyle={v:0,h:0}] 輸入內寬距離物件,可用鍵值為v、h、left、right、top、bottom,v代表同時設定top與bottom,h代表設定left與right,若有重複設定時後面鍵值會覆蓋前面,各鍵值為寬度數字,單位為px,預設{v:0,h:0}
|
|
230
|
+
* @vue-prop {Number} [indent=1] 輸入縮排比率數字,若使用1就是1倍的圖標寬度(24px)+2*separation(3px),預設1
|
|
231
|
+
* @vue-prop {String} [iconToggleColor='grey'] 輸入顯隱icon按鈕顏色字串,預設'grey'
|
|
232
|
+
* @vue-prop {String} [iconToggleBackgroundColor='transparent'] 輸入顯隱icon按鈕背景顏色字串,預設'transparent'
|
|
233
|
+
* @vue-prop {String} [iconToggleBackgroundColorHover='rgba(128,128,128,0.15)'] 輸入滑鼠移入時顯隱icon按鈕背景顏色字串,預設'rgba(128,128,128,0.15)'
|
|
234
|
+
* @vue-prop {String} [iconUncheckedColor='grey darken-2'] 輸入未勾選時顏色字串,預設'grey darken-2'
|
|
235
|
+
* @vue-prop {String} [iconUncheckedDisabledColor='grey'] 輸入禁用時未勾選時顏色字串,預設'grey'
|
|
236
|
+
* @vue-prop {String} [iconCheckedColor='blue darken-3'] 輸入勾選時顏色字串,預設'blue darken-3'
|
|
237
|
+
* @vue-prop {String} [iconCheckedDisabledColor='grey'] 輸入禁用時勾選時顏色字串,預設'grey'
|
|
238
|
+
* @vue-prop {String} [iconCheckedPartiallyColor='blue darken-3'] 輸入部份勾選時(子節點任一有勾選但非全部勾選)顏色字串,預設'blue darken-3'
|
|
239
|
+
* @vue-prop {String} [iconCheckedPartiallyDisabledColor='grey'] 輸入禁用部份勾選時(子節點任一有勾選但非全部勾選)顏色字串,預設'grey'
|
|
240
|
+
* @vue-prop {String} [filterKeywords=''] 輸入過濾關鍵字字串,多關鍵字用空白分隔,預設''
|
|
241
|
+
* @vue-prop {Function} [filterFunction=null] 輸入過濾時呼叫處理函數,傳入為各項目物件資料,回傳布林值代表項目內是否含有關鍵字,預設null
|
|
242
|
+
* @vue-prop {String} [searchEmpty='Empty'] 輸入無過濾結果字串,預設'Empty'
|
|
243
|
+
* @vue-prop {Number} [defItemHeight=34] 輸入按需顯示時各項目預設高度值,給越準或給大部分項目的高度則渲染速度越快,單位為px,預設34
|
|
244
|
+
* @vue-prop {Number} [itemsPreload=5] 輸入上下方預先載入元素數量,預設5
|
|
245
|
+
* @vue-prop {Number} [separatorHeight=1] 輸入分隔線高度數字,預設1
|
|
246
|
+
* @vue-prop {String} [separatorColor='transparent'] 輸入分隔線顏色字串,預設'transparent'
|
|
247
|
+
* @vue-prop {Boolean} [draggable=false] 輸入是否為可拖曳編輯模式,若draggable設定true,此時所有節點皆為展開顯示並且禁止顯隱節點功能,也就是defaultDisplayLevel強制設定為null,此外也不提供過濾功能,也就是filterKeywords強制清空。開啟draggable僅適用小規模數據。draggable預設false
|
|
248
|
+
* @vue-prop {String} [dgTextDisabled='Can not drop here'] 輸入禁止拖曳文字字串,預設'Can not drop here'
|
|
249
|
+
* @vue-prop {String} [dgTextDisabledColor='#812'] 輸入禁止拖曳文字顏色字串,預設'#812'
|
|
250
|
+
* @vue-prop {Number} [dgTextDisabledPaddingLeft=15] 輸入禁止拖曳padding-left數字,單位px,預設15
|
|
251
|
+
* @vue-prop {String} [dgTextDisabledFontSize='0.9rem'] 輸入禁止拖曳文字大小字串,預設'0.9rem'
|
|
252
|
+
* @vue-prop {String} [dgTextDisabledBackgroundColor='rgba(255,220,240,0.6)'] 輸入禁止拖曳文字區背景顏色字串,預設'rgba(255,220,240,0.6)'
|
|
253
|
+
* @vue-prop {String} [dgInsertLineColor='#29f'] 輸入拖曳時顯示插入區域線顏色字串,預設'#29f'
|
|
254
|
+
* @vue-prop {String} [dgInsertBackgroundColor='rgba(80,150,255,0.15)'] 輸入拖曳時顯示插入區域背景顏色字串,預設'rgba(80,150,255,0.15)'
|
|
255
|
+
* @vue-prop {String} [dgBelongBackgroundColor='rgba(80,150,255,0.3)'] 輸入拖曳時顯示插入區域(成為目標的子節點)背景顏色字串,預設'rgba(80,150,255,0.3)'
|
|
256
|
+
* @vue-prop {Number} [dgPreviewOpacity=1] 輸入拖曳時預覽元素透明度數字,預設1
|
|
257
|
+
* @vue-prop {Number} [dgPreviewDisabledOpacity=1] 輸入無效時(位於非可拖曳元素內)拖曳時預覽元素透明度數字,預設1
|
|
258
|
+
* @vue-prop {Number} [dgPreviewBorderWidth=0] 輸入拖曳時預覽元素邊框寬度數字,預設0
|
|
259
|
+
* @vue-prop {String} [dgPreviewBorderColor='#f26'] 輸入拖曳時預覽元素邊框顏色字串,預設'#f26'
|
|
260
|
+
* @vue-prop {String} [dgPreviewBackground='transparent'] 輸入拖曳時預覽元素背景顏色字串,預設'transparent'
|
|
261
|
+
* @vue-prop {Boolean} [operatable=false] 輸入是否使用控制節點模式,若operatable設定true,將於各項目右側顯示控制按鈕,點擊可彈出選單進行插入與刪除等項目,此時會觸發事件click-operate-item,而處理相應數據則需呼叫事件提供物件內operateItem函數,詳情請見範例。此時所有節點皆為展開顯示並且禁止顯隱節點功能,也就是defaultDisplayLevel強制設定為null,此外也不提供過濾功能,也就是filterKeywords強制清空。開啟operatable僅適用小規模數據。operatable預設false
|
|
262
|
+
* @vue-prop {String} [operateItemTextForInsertBefore='Insert before'] 輸入控制選項插入前項目之文字字串,預設'Insert before'
|
|
263
|
+
* @vue-prop {String} [operateItemTextForInsertChild='Insert child'] 輸入控制選項插入子項目之文字字串,預設'Insert child'
|
|
264
|
+
* @vue-prop {String} [operateItemTextForInsertAfter='Insert after'] 輸入控制選項插入後項目之文字字串,預設'Insert after'
|
|
265
|
+
* @vue-prop {String} [operateItemTextForInsertDelete='Delete'] 輸入控制選項刪除項目之文字字串,預設'Delete'
|
|
266
|
+
* @vue-prop {Object} [operateItemPaddingStyle={v:10,h:12}] 輸入控制選項內寬距離設定物件,可用鍵值為v、h、left、right、top、bottom,v代表同時設定top與bottom,h代表設定left與right,若有重複設定時後面鍵值會覆蓋前面,各鍵值為寬度數字,單位為px,預設{v:10,h:12}
|
|
267
|
+
* @vue-prop {Number} [operatePanelWidth=150] 輸入控制選項寬度數字,預設150
|
|
268
|
+
* @vue-prop {Number} [operatePanelHeight=168] 輸入控制選項高度數字,預設168
|
|
269
|
+
* @vue-prop {String} [operateBtnTooltip='Operations'] 輸入控制按鈕之提示文字字串,預設'Operations'
|
|
270
|
+
* @vue-prop {String} [operateBtnBackgroundColor='transparent'] 輸入控制按鈕背景顏色字串,預設'transparent'
|
|
271
|
+
* @vue-prop {String} [operateBtnBackgroundColorHover='rgba(230,230,230,0.7)'] 輸入滑鼠移入時控制按鈕背景顏色字串,預設'rgba(230,230,230,0.7)'
|
|
272
|
+
* @vue-prop {String} [operateBtnBackgroundColorFocus='rgba(230,230,230,0.9)'] 輸入取得焦點時控制按鈕背景顏色字串,預設'rgba(230,230,230,0.9)'
|
|
273
|
+
* @vue-prop {String} [operateItemBackgroundColor='transparent'] 輸入控制項目背景顏色字串,預設'transparent'
|
|
274
|
+
* @vue-prop {String} [operateItemBackgroundColorHover='rgba(200,200,200,0.2)'] 輸入滑鼠移入時控制項目背景顏色字串,預設'rgba(200,200,200,0.2)'
|
|
275
|
+
* @vue-prop {String} [operateItemTextColor='#444'] 輸入控制項目文字顏色字串,預設'#444'
|
|
276
|
+
* @vue-prop {String} [operateItemTextColorHover='#222'] 輸入滑鼠移入時控制項目文字顏色字串,預設'#222'
|
|
277
|
+
* @vue-prop {Number} [operateItemIconSize=22] 輸入控制項目圖標尺寸數字,預設22
|
|
278
|
+
* @vue-prop {String} [operateItemIconColor='#444'] 輸入控制項目圖標顏色字串,預設'#444'
|
|
279
|
+
* @vue-prop {String} [operateItemIconColorHover='#222'] 輸入滑鼠移入時控制項目圖標顏色字串,預設'#222'
|
|
280
|
+
* @vue-prop {Boolean} [show=true] 輸入是否為顯示模式,預設true,供組件嵌入popup時, 因先初始化但尚未顯示不需渲染, 可給予show=false避免無限偵測與重算高度問題
|
|
281
|
+
*/
|
|
282
|
+
export default {
|
|
283
|
+
directives: {
|
|
284
|
+
domdragdrop: domDragDrop(),
|
|
285
|
+
},
|
|
286
|
+
components: {
|
|
287
|
+
WDynamicList,
|
|
288
|
+
WButtonCircle,
|
|
289
|
+
WPopup,
|
|
290
|
+
WListVertical,
|
|
291
|
+
WTreeIconToggle,
|
|
292
|
+
WTreeIconCheckbox,
|
|
293
|
+
},
|
|
294
|
+
props: {
|
|
295
|
+
data: {
|
|
296
|
+
type: [Array, Object],
|
|
297
|
+
default: () => [],
|
|
298
|
+
},
|
|
299
|
+
viewHeightMax: {
|
|
300
|
+
type: Number,
|
|
301
|
+
default: 400,
|
|
302
|
+
},
|
|
303
|
+
defaultDisplayLevel: {
|
|
304
|
+
type: Number,
|
|
305
|
+
default: null,
|
|
306
|
+
},
|
|
307
|
+
selectable: {
|
|
308
|
+
type: Boolean,
|
|
309
|
+
default: false,
|
|
310
|
+
},
|
|
311
|
+
selections: {
|
|
312
|
+
type: Array,
|
|
313
|
+
default: () => [],
|
|
314
|
+
},
|
|
315
|
+
keyPrimary: {
|
|
316
|
+
type: String,
|
|
317
|
+
default: 'id',
|
|
318
|
+
},
|
|
319
|
+
keyText: {
|
|
320
|
+
type: String,
|
|
321
|
+
default: 'text',
|
|
322
|
+
},
|
|
323
|
+
keyChildren: {
|
|
324
|
+
type: String,
|
|
325
|
+
default: 'children',
|
|
326
|
+
},
|
|
327
|
+
keyLocked: {
|
|
328
|
+
type: String,
|
|
329
|
+
default: 'locked',
|
|
330
|
+
},
|
|
331
|
+
paddingStyle: {
|
|
332
|
+
type: Object,
|
|
333
|
+
default: () => {
|
|
334
|
+
return {
|
|
335
|
+
v: 0,
|
|
336
|
+
h: 0,
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
indent: {
|
|
341
|
+
type: Number,
|
|
342
|
+
default: 1,
|
|
343
|
+
},
|
|
344
|
+
iconToggleColor: {
|
|
345
|
+
type: String,
|
|
346
|
+
default: 'grey',
|
|
347
|
+
},
|
|
348
|
+
iconToggleBackgroundColor: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: 'transparent',
|
|
351
|
+
},
|
|
352
|
+
iconToggleBackgroundColorHover: {
|
|
353
|
+
type: String,
|
|
354
|
+
default: 'rgba(128,128,128,0.15)',
|
|
355
|
+
},
|
|
356
|
+
iconUncheckedColor: {
|
|
357
|
+
type: String,
|
|
358
|
+
default: 'grey darken-2',
|
|
359
|
+
},
|
|
360
|
+
iconUncheckedDisabledColor: {
|
|
361
|
+
type: String,
|
|
362
|
+
default: 'grey',
|
|
363
|
+
},
|
|
364
|
+
iconCheckedColor: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: 'blue darken-3',
|
|
367
|
+
},
|
|
368
|
+
iconCheckedDisabledColor: {
|
|
369
|
+
type: String,
|
|
370
|
+
default: 'grey',
|
|
371
|
+
},
|
|
372
|
+
iconCheckedPartiallyColor: {
|
|
373
|
+
type: String,
|
|
374
|
+
default: 'blue darken-3',
|
|
375
|
+
},
|
|
376
|
+
iconCheckedPartiallyDisabledColor: {
|
|
377
|
+
type: String,
|
|
378
|
+
default: 'grey',
|
|
379
|
+
},
|
|
380
|
+
filterKeywords: {
|
|
381
|
+
type: String,
|
|
382
|
+
default: '',
|
|
383
|
+
},
|
|
384
|
+
filterFunction: {
|
|
385
|
+
type: Function,
|
|
386
|
+
default: null,
|
|
387
|
+
},
|
|
388
|
+
searchEmpty: {
|
|
389
|
+
type: String,
|
|
390
|
+
default: 'Empty',
|
|
391
|
+
},
|
|
392
|
+
defItemHeight: {
|
|
393
|
+
type: Number,
|
|
394
|
+
default: 34,
|
|
395
|
+
},
|
|
396
|
+
itemsPreload: {
|
|
397
|
+
type: Number,
|
|
398
|
+
default: 5,
|
|
399
|
+
},
|
|
400
|
+
separatorHeight: {
|
|
401
|
+
type: Number,
|
|
402
|
+
default: 1,
|
|
403
|
+
},
|
|
404
|
+
separatorColor: {
|
|
405
|
+
type: String,
|
|
406
|
+
default: 'transparent',
|
|
407
|
+
},
|
|
408
|
+
draggable: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: false,
|
|
411
|
+
},
|
|
412
|
+
dgTextDisabled: {
|
|
413
|
+
type: String,
|
|
414
|
+
default: 'Can not drop here', //禁止拖曳至自己子節點當中
|
|
415
|
+
},
|
|
416
|
+
dgTextDisabledColor: {
|
|
417
|
+
type: String,
|
|
418
|
+
default: '#812',
|
|
419
|
+
},
|
|
420
|
+
dgTextDisabledPaddingLeft: {
|
|
421
|
+
type: Number,
|
|
422
|
+
default: 15,
|
|
423
|
+
},
|
|
424
|
+
dgTextDisabledFontSize: {
|
|
425
|
+
type: String,
|
|
426
|
+
default: '0.9rem',
|
|
427
|
+
},
|
|
428
|
+
dgTextDisabledBackgroundColor: {
|
|
429
|
+
type: String,
|
|
430
|
+
default: 'rgba(255,220,240,0.6)',
|
|
431
|
+
},
|
|
432
|
+
dgInsertLineColor: {
|
|
433
|
+
type: String,
|
|
434
|
+
default: '#29f',
|
|
435
|
+
},
|
|
436
|
+
dgInsertBackgroundColor: {
|
|
437
|
+
type: String,
|
|
438
|
+
default: 'rgba(80,150,255,0.15)',
|
|
439
|
+
},
|
|
440
|
+
dgBelongBackgroundColor: {
|
|
441
|
+
type: String,
|
|
442
|
+
default: 'rgba(80,150,255,0.3)',
|
|
443
|
+
},
|
|
444
|
+
dgPreviewOpacity: {
|
|
445
|
+
type: Number,
|
|
446
|
+
default: 1,
|
|
447
|
+
},
|
|
448
|
+
dgPreviewDisabledOpacity: {
|
|
449
|
+
type: Number,
|
|
450
|
+
default: 1,
|
|
451
|
+
},
|
|
452
|
+
dgPreviewBorderWidth: {
|
|
453
|
+
type: Number,
|
|
454
|
+
default: 0,
|
|
455
|
+
},
|
|
456
|
+
dgPreviewBorderColor: {
|
|
457
|
+
type: String,
|
|
458
|
+
default: '#f26',
|
|
459
|
+
},
|
|
460
|
+
dgPreviewBackground: {
|
|
461
|
+
type: String,
|
|
462
|
+
default: 'transparent',
|
|
463
|
+
},
|
|
464
|
+
operatable: {
|
|
465
|
+
type: Boolean,
|
|
466
|
+
default: false,
|
|
467
|
+
},
|
|
468
|
+
operateItemTextForInsertBefore: {
|
|
469
|
+
type: String,
|
|
470
|
+
default: 'Insert before',
|
|
471
|
+
},
|
|
472
|
+
operateItemTextForInsertChild: {
|
|
473
|
+
type: String,
|
|
474
|
+
default: 'Insert child',
|
|
475
|
+
},
|
|
476
|
+
operateItemTextForInsertAfter: {
|
|
477
|
+
type: String,
|
|
478
|
+
default: 'Insert after',
|
|
479
|
+
},
|
|
480
|
+
operateItemTextForInsertDelete: {
|
|
481
|
+
type: String,
|
|
482
|
+
default: 'Delete',
|
|
483
|
+
},
|
|
484
|
+
operateItemPaddingStyle: {
|
|
485
|
+
type: Object,
|
|
486
|
+
default: () => {
|
|
487
|
+
return {
|
|
488
|
+
v: 10,
|
|
489
|
+
h: 12,
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
operatePanelWidth: {
|
|
494
|
+
type: Number,
|
|
495
|
+
default: 150,
|
|
496
|
+
},
|
|
497
|
+
operatePanelHeight: {
|
|
498
|
+
type: Number,
|
|
499
|
+
default: 42 * 4,
|
|
500
|
+
},
|
|
501
|
+
operateBtnTooltip: {
|
|
502
|
+
type: String,
|
|
503
|
+
default: 'Operations',
|
|
504
|
+
},
|
|
505
|
+
operateBtnBackgroundColor: {
|
|
506
|
+
type: String,
|
|
507
|
+
default: 'transparent', //'rgba(225,225,225,0.5)',
|
|
508
|
+
},
|
|
509
|
+
operateBtnBackgroundColorHover: {
|
|
510
|
+
type: String,
|
|
511
|
+
default: 'rgba(230,230,230,0.7)',
|
|
512
|
+
},
|
|
513
|
+
operateBtnBackgroundColorFocus: {
|
|
514
|
+
type: String,
|
|
515
|
+
default: 'rgba(230,230,230,0.9)',
|
|
516
|
+
},
|
|
517
|
+
operateItemBackgroundColor: {
|
|
518
|
+
type: String,
|
|
519
|
+
default: 'transparent',
|
|
520
|
+
},
|
|
521
|
+
operateItemBackgroundColorHover: {
|
|
522
|
+
type: String,
|
|
523
|
+
default: 'rgba(200,200,200,0.2)',
|
|
524
|
+
},
|
|
525
|
+
operateItemTextColor: {
|
|
526
|
+
type: String,
|
|
527
|
+
default: '#444',
|
|
528
|
+
},
|
|
529
|
+
operateItemTextColorHover: {
|
|
530
|
+
type: String,
|
|
531
|
+
default: '#222',
|
|
532
|
+
},
|
|
533
|
+
operateItemIconSize: {
|
|
534
|
+
type: Number,
|
|
535
|
+
default: 22,
|
|
536
|
+
},
|
|
537
|
+
operateItemIconColor: {
|
|
538
|
+
type: String,
|
|
539
|
+
default: '#444',
|
|
540
|
+
},
|
|
541
|
+
operateItemIconColorHover: {
|
|
542
|
+
type: String,
|
|
543
|
+
default: '#222',
|
|
544
|
+
},
|
|
545
|
+
show: {
|
|
546
|
+
type: Boolean,
|
|
547
|
+
default: true,
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
data: function() {
|
|
551
|
+
return {
|
|
552
|
+
mdiDotsVertical,
|
|
553
|
+
|
|
554
|
+
dbc: debounce(),
|
|
555
|
+
mmkey: null,
|
|
556
|
+
|
|
557
|
+
separation: 3,
|
|
558
|
+
iconHeight: 34,
|
|
559
|
+
selectionsTrans: [],
|
|
560
|
+
|
|
561
|
+
filterKeywordsTrans: '',
|
|
562
|
+
filterKeywordsTransTemp: '', //上次過濾關鍵字
|
|
563
|
+
filtering: false, //是否過濾中
|
|
564
|
+
|
|
565
|
+
defaultDisplayLevelTrans: null,
|
|
566
|
+
|
|
567
|
+
dgGroupKey: null,
|
|
568
|
+
// drag: null,
|
|
569
|
+
dgTipMode: '',
|
|
570
|
+
dgTipLeft: 0,
|
|
571
|
+
dgTipTop: 0,
|
|
572
|
+
dgTipWidth: 0,
|
|
573
|
+
dgTipHeight: 0,
|
|
574
|
+
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
beforeDestroy: function() {
|
|
578
|
+
//console.log('beforeMount')
|
|
579
|
+
|
|
580
|
+
let vo = this
|
|
581
|
+
|
|
582
|
+
//remove
|
|
583
|
+
if (vo.mmkey !== null) {
|
|
584
|
+
gm.remove(vo.mmkey)
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// //dragClear
|
|
588
|
+
// vo.dragClear()
|
|
589
|
+
|
|
590
|
+
},
|
|
591
|
+
watch: {
|
|
592
|
+
|
|
593
|
+
data: {
|
|
594
|
+
immediate: true,
|
|
595
|
+
deep: true,
|
|
596
|
+
handler(value) {
|
|
597
|
+
//console.log('watch data', value)
|
|
598
|
+
|
|
599
|
+
let vo = this
|
|
600
|
+
|
|
601
|
+
//setData
|
|
602
|
+
vo.setData(value)
|
|
603
|
+
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
|
|
607
|
+
},
|
|
608
|
+
computed: {
|
|
609
|
+
|
|
610
|
+
changeDefaultDisplayLevel: function() {
|
|
611
|
+
//console.log('computed changeDefaultDisplayLevel')
|
|
612
|
+
|
|
613
|
+
let vo = this
|
|
614
|
+
|
|
615
|
+
//save
|
|
616
|
+
vo.defaultDisplayLevelTrans = vo.defaultDisplayLevel
|
|
617
|
+
|
|
618
|
+
return ''
|
|
619
|
+
},
|
|
620
|
+
|
|
621
|
+
changeDraggableAndOperatable: function() {
|
|
622
|
+
//console.log('computed changeDraggableAndOperatable')
|
|
623
|
+
|
|
624
|
+
let vo = this
|
|
625
|
+
|
|
626
|
+
//trigger
|
|
627
|
+
let draggable = vo.draggable
|
|
628
|
+
let operatable = vo.operatable
|
|
629
|
+
|
|
630
|
+
//若draggable或operatable為true, 則defaultDisplayLevel強制為null, filterKeywords強制清空
|
|
631
|
+
if (draggable || operatable) {
|
|
632
|
+
vo.defaultDisplayLevelTrans = null
|
|
633
|
+
vo.filterKeywordsTrans = ''
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
return ''
|
|
637
|
+
},
|
|
638
|
+
|
|
639
|
+
changeFilterKeyWords: function() {
|
|
640
|
+
//console.log('computed changeFilterKeyWords')
|
|
641
|
+
|
|
642
|
+
let vo = this
|
|
643
|
+
|
|
644
|
+
//save
|
|
645
|
+
vo.filterKeywordsTrans = vo.filterKeywords
|
|
646
|
+
|
|
647
|
+
//filterKeyWordsDebounce
|
|
648
|
+
vo.filterKeyWordsDebounce()
|
|
649
|
+
|
|
650
|
+
return ''
|
|
651
|
+
},
|
|
652
|
+
|
|
653
|
+
useIndent: function() {
|
|
654
|
+
//console.log('computed useIndent')
|
|
655
|
+
|
|
656
|
+
let vo = this
|
|
657
|
+
|
|
658
|
+
return vo.indent * (24 + 2 * vo.separation)
|
|
659
|
+
},
|
|
660
|
+
|
|
661
|
+
usePadding: function() {
|
|
662
|
+
//console.log('computed usePadding')
|
|
663
|
+
|
|
664
|
+
let vo = this
|
|
665
|
+
|
|
666
|
+
//parseSpace
|
|
667
|
+
let cs = parseSpace(vo.paddingStyle)
|
|
668
|
+
|
|
669
|
+
//padding
|
|
670
|
+
let padding = `padding:${cs};`
|
|
671
|
+
|
|
672
|
+
return padding
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
useDgTextDisabledColor: function() {
|
|
676
|
+
//console.log('computed useDgTextDisabledColor')
|
|
677
|
+
|
|
678
|
+
let vo = this
|
|
679
|
+
|
|
680
|
+
return color2hex(vo.dgTextDisabledColor)
|
|
681
|
+
},
|
|
682
|
+
|
|
683
|
+
useDgTextDisabledBackgroundColor: function() {
|
|
684
|
+
//console.log('computed useDgTextDisabledBackgroundColor')
|
|
685
|
+
|
|
686
|
+
let vo = this
|
|
687
|
+
|
|
688
|
+
return color2hex(vo.dgTextDisabledBackgroundColor)
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
useDgInsertLineColor: function() {
|
|
692
|
+
//console.log('computed useDgInsertLineColor')
|
|
693
|
+
|
|
694
|
+
let vo = this
|
|
695
|
+
|
|
696
|
+
return color2hex(vo.dgInsertLineColor)
|
|
697
|
+
},
|
|
698
|
+
|
|
699
|
+
useDgInsertBackgroundColor: function() {
|
|
700
|
+
//console.log('computed useDgInsertBackgroundColor')
|
|
701
|
+
|
|
702
|
+
let vo = this
|
|
703
|
+
|
|
704
|
+
return color2hex(vo.dgInsertBackgroundColor)
|
|
705
|
+
},
|
|
706
|
+
|
|
707
|
+
uesDgBelongBackgroundColor: function() {
|
|
708
|
+
//console.log('computed uesDgBelongBackgroundColor')
|
|
709
|
+
|
|
710
|
+
let vo = this
|
|
711
|
+
|
|
712
|
+
return color2hex(vo.dgBelongBackgroundColor)
|
|
713
|
+
},
|
|
714
|
+
|
|
715
|
+
useOperateItems: function() {
|
|
716
|
+
//console.log('computed useOperateItems')
|
|
717
|
+
|
|
718
|
+
let vo = this
|
|
719
|
+
|
|
720
|
+
//operateItems
|
|
721
|
+
let operateItems = [
|
|
722
|
+
{
|
|
723
|
+
key: 'InsertBefore',
|
|
724
|
+
text: vo.operateItemTextForInsertBefore,
|
|
725
|
+
icon: mdiFormatVerticalAlignTop,
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
key: 'InsertChild',
|
|
729
|
+
text: vo.operateItemTextForInsertChild,
|
|
730
|
+
icon: mdiFormatHorizontalAlignRight,
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
key: 'InsertAfter',
|
|
734
|
+
text: vo.operateItemTextForInsertAfter,
|
|
735
|
+
icon: mdiFormatVerticalAlignBottom,
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
key: 'Delete',
|
|
739
|
+
text: vo.operateItemTextForInsertDelete,
|
|
740
|
+
icon: mdiClose,
|
|
741
|
+
},
|
|
742
|
+
]
|
|
743
|
+
|
|
744
|
+
return operateItems
|
|
745
|
+
},
|
|
746
|
+
|
|
747
|
+
isDraggable: function() {
|
|
748
|
+
//console.log('computed isDraggable')
|
|
749
|
+
|
|
750
|
+
let vo = this
|
|
751
|
+
|
|
752
|
+
return vo.draggable // && vo.editable
|
|
753
|
+
},
|
|
754
|
+
|
|
755
|
+
},
|
|
756
|
+
methods: {
|
|
757
|
+
|
|
758
|
+
getEmitData: function(e, props) {
|
|
759
|
+
//console.log('methods getEmitData', e, props)
|
|
760
|
+
|
|
761
|
+
// let vo = this
|
|
762
|
+
|
|
763
|
+
return { event: e, ele: e.currentTarget, row: props.row, item: props.row.item, index: props.index }
|
|
764
|
+
},
|
|
765
|
+
|
|
766
|
+
getRowsFromData: function(data) {
|
|
767
|
+
//console.log('methods getRowsFromData', data)
|
|
768
|
+
|
|
769
|
+
let vo = this
|
|
770
|
+
|
|
771
|
+
//flattenTreeObj
|
|
772
|
+
let ts = flattenTreeObj(data, { bindKey: vo.keyPrimary, bindChildren: vo.keyChildren })
|
|
773
|
+
|
|
774
|
+
//rows, lodash使用new Array建構比for+push快
|
|
775
|
+
let rows = map(ts, (v, k) => {
|
|
776
|
+
return {
|
|
777
|
+
index: k,
|
|
778
|
+
unfolding: true, //bol, 是否展開顯示此節點
|
|
779
|
+
checked: 'unchecked', //str, 節點勾選狀態, 'unchecked'代表未勾選, 'checked'代表已勾選, 'checkedPartially'代表部份勾選時(子節點任一有勾選但非全部勾選)
|
|
780
|
+
item: v,
|
|
781
|
+
}
|
|
782
|
+
})
|
|
783
|
+
|
|
784
|
+
return rows
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
setData: function(data) {
|
|
788
|
+
// console.log('methods setData', data)
|
|
789
|
+
|
|
790
|
+
let vo = this
|
|
791
|
+
|
|
792
|
+
async function core() {
|
|
793
|
+
|
|
794
|
+
//check
|
|
795
|
+
if (!isarr(data) && !isobj(data)) {
|
|
796
|
+
let msg = 'data is not array or object'
|
|
797
|
+
//console.log(msg)
|
|
798
|
+
return msg
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
//mmkey, 產生mmkey要放在資料變更的地方, 否則beforeCreate只有1次(mounted會比computed還慢), 於vue-cli編譯情況下會有部份情境有問題
|
|
802
|
+
if (vo.mmkey === null) {
|
|
803
|
+
|
|
804
|
+
//mmkey
|
|
805
|
+
vo.mmkey = genID()
|
|
806
|
+
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
|
|
810
|
+
//remove
|
|
811
|
+
gm.remove(vo.mmkey)
|
|
812
|
+
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
//cloneDeep
|
|
816
|
+
data = cloneDeep(data)
|
|
817
|
+
|
|
818
|
+
//getRowsFromData
|
|
819
|
+
let rows = vo.getRowsFromData(data)
|
|
820
|
+
|
|
821
|
+
//save
|
|
822
|
+
//vo.rows = rows
|
|
823
|
+
gm.set(vo.mmkey, rows)
|
|
824
|
+
|
|
825
|
+
//wait wdl, 組件初始化時會先觸發computed才會有實體元素出現, 故得用waitFun等待
|
|
826
|
+
await waitFun(() => {
|
|
827
|
+
return vo.$refs.wdl !== undefined
|
|
828
|
+
}, { timeInterval: 20 })
|
|
829
|
+
|
|
830
|
+
//setRows
|
|
831
|
+
await vo.$refs.wdl.setRows(rows)
|
|
832
|
+
|
|
833
|
+
//defaultToggleItems
|
|
834
|
+
vo.defaultToggleItems()
|
|
835
|
+
|
|
836
|
+
//updateSelections
|
|
837
|
+
vo.updateSelections()
|
|
838
|
+
|
|
839
|
+
//filterKeywordsTransTemp
|
|
840
|
+
vo.filterKeywordsTransTemp = '' //需清空之前暫存關鍵字才能重新搜尋
|
|
841
|
+
vo.filterKeyWords()
|
|
842
|
+
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
//core
|
|
846
|
+
core()
|
|
847
|
+
.catch((err) => {
|
|
848
|
+
console.log(err)
|
|
849
|
+
})
|
|
850
|
+
|
|
851
|
+
},
|
|
852
|
+
|
|
853
|
+
getText: function (item) {
|
|
854
|
+
//console.log('methods getText', item)
|
|
855
|
+
let vo = this
|
|
856
|
+
return get(item, vo.keyText, '')
|
|
857
|
+
},
|
|
858
|
+
|
|
859
|
+
getEditable: function (item) {
|
|
860
|
+
//console.log('methods getEditable', item)
|
|
861
|
+
let vo = this
|
|
862
|
+
return !get(item, vo.keyLocked, false)
|
|
863
|
+
},
|
|
864
|
+
|
|
865
|
+
updateSelections: function() {
|
|
866
|
+
// console.log('methods updateSelections')
|
|
867
|
+
|
|
868
|
+
let vo = this
|
|
869
|
+
|
|
870
|
+
async function core() {
|
|
871
|
+
let selectionsTrans = [] //由外部selections變更時, 直接由空的selectionsTrans進行重產
|
|
872
|
+
|
|
873
|
+
//check
|
|
874
|
+
if (!vo.selectable) {
|
|
875
|
+
return
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
//wait wdl, 組件初始化時會先觸發computed才會有實體元素出現, 故得用waitFun等待
|
|
879
|
+
await waitFun(() => {
|
|
880
|
+
return vo.$refs.wdl !== undefined
|
|
881
|
+
}, { timeInterval: 20 })
|
|
882
|
+
|
|
883
|
+
//opt
|
|
884
|
+
let opt = {
|
|
885
|
+
fun: function(items) {
|
|
886
|
+
// console.log('items', cloneDeep(items))
|
|
887
|
+
|
|
888
|
+
//kpInd, 建立各item的速查表, 由keyPrimary直接取得項目位於items陣列內的指標
|
|
889
|
+
let kpInd = {}
|
|
890
|
+
each(items, (v, ind) => {
|
|
891
|
+
|
|
892
|
+
//pk
|
|
893
|
+
let pk = get(v, `row.item.${vo.keyPrimary}`)
|
|
894
|
+
|
|
895
|
+
//build kpInd
|
|
896
|
+
if (haskey(kpInd, pk)) {
|
|
897
|
+
throw new Error(`Duplicate primary key[${vo.keyPrimary}] in items`)
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
kpInd[pk] = ind
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
//預設
|
|
904
|
+
items[ind].row.checked = 'unchecked'
|
|
905
|
+
|
|
906
|
+
})
|
|
907
|
+
|
|
908
|
+
//selections
|
|
909
|
+
let selections = cloneDeep(vo.selections)
|
|
910
|
+
|
|
911
|
+
//each, 遍歷selections進行虛擬操作取得selectionsTrans
|
|
912
|
+
each(selections, (v) => {
|
|
913
|
+
|
|
914
|
+
//pk
|
|
915
|
+
let pk = v[vo.keyPrimary]
|
|
916
|
+
|
|
917
|
+
//ind
|
|
918
|
+
let ind = kpInd[pk]
|
|
919
|
+
|
|
920
|
+
//check
|
|
921
|
+
if (ind) {
|
|
922
|
+
|
|
923
|
+
//checked
|
|
924
|
+
let checked = items[ind].row.checked
|
|
925
|
+
|
|
926
|
+
//check, 若節點原本的勾選狀態非checked, 才需要呼叫
|
|
927
|
+
if (checked !== 'checked') {
|
|
928
|
+
|
|
929
|
+
//modify
|
|
930
|
+
checked = 'checked'
|
|
931
|
+
|
|
932
|
+
//checkItemsCore
|
|
933
|
+
vo.checkItemsCore(selectionsTrans, items, ind, checked)
|
|
934
|
+
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
})
|
|
940
|
+
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
//processItems
|
|
945
|
+
await vo.$refs.wdl.processItems(opt)
|
|
946
|
+
|
|
947
|
+
//save
|
|
948
|
+
vo.selectionsTrans = selectionsTrans
|
|
949
|
+
|
|
950
|
+
//emit, 要放在wdl更新後才觸發事件
|
|
951
|
+
vo.$emit('update:selections', cloneDeep(selectionsTrans))
|
|
952
|
+
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
//core
|
|
956
|
+
core()
|
|
957
|
+
.catch((err) => {
|
|
958
|
+
console.log(err)
|
|
959
|
+
})
|
|
960
|
+
|
|
961
|
+
},
|
|
962
|
+
|
|
963
|
+
addSelection: function(selections, item) {
|
|
964
|
+
//console.log('methods addSelection', selections, item.text, item)
|
|
965
|
+
|
|
966
|
+
let vo = this
|
|
967
|
+
|
|
968
|
+
//pk
|
|
969
|
+
let pk = get(item, vo.keyPrimary, null)
|
|
970
|
+
|
|
971
|
+
//push
|
|
972
|
+
if (pk !== null) {
|
|
973
|
+
|
|
974
|
+
//find
|
|
975
|
+
let r = find(selections, { [vo.keyPrimary]: pk })
|
|
976
|
+
|
|
977
|
+
//check, 若無項目物件則新增
|
|
978
|
+
if (!r) {
|
|
979
|
+
|
|
980
|
+
//複製項目物件, 僅儲存非keyChildren的key, 避免複製父層物件時使用過多記憶體
|
|
981
|
+
let t = {}
|
|
982
|
+
each(item, (v, k) => {
|
|
983
|
+
if (k !== vo.keyChildren && k !== 'level' && k !== 'nk' && k !== 'msg') { //
|
|
984
|
+
t[k] = cloneDeep(v)
|
|
985
|
+
}
|
|
986
|
+
})
|
|
987
|
+
|
|
988
|
+
//push, 會直接修改selections的記憶體
|
|
989
|
+
selections.push(t)
|
|
990
|
+
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
},
|
|
996
|
+
|
|
997
|
+
removeSelection: function(selections, item) {
|
|
998
|
+
//console.log('methods removeSelection', selections, item.text, item)
|
|
999
|
+
|
|
1000
|
+
let vo = this
|
|
1001
|
+
|
|
1002
|
+
//pk
|
|
1003
|
+
let pk = get(item, vo.keyPrimary, null)
|
|
1004
|
+
|
|
1005
|
+
//push
|
|
1006
|
+
if (pk !== null) {
|
|
1007
|
+
|
|
1008
|
+
//find
|
|
1009
|
+
let r = find(selections, { [vo.keyPrimary]: pk })
|
|
1010
|
+
|
|
1011
|
+
//check, 若有項目物件則刪除
|
|
1012
|
+
if (r) {
|
|
1013
|
+
|
|
1014
|
+
//remove, 直接修改selections的記憶體
|
|
1015
|
+
remove(selections, { [vo.keyPrimary]: pk })
|
|
1016
|
+
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
},
|
|
1022
|
+
|
|
1023
|
+
modifySelection: function(selections, checkedOld, checkedNew, item) {
|
|
1024
|
+
//console.log('methods modifySelection', selections, checkedOld, checkedNew, item)
|
|
1025
|
+
|
|
1026
|
+
let vo = this
|
|
1027
|
+
|
|
1028
|
+
//check
|
|
1029
|
+
if (checkedOld === checkedNew) {
|
|
1030
|
+
return
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
//call
|
|
1034
|
+
if (checkedNew === 'checked') {
|
|
1035
|
+
vo.addSelection(selections, item)
|
|
1036
|
+
}
|
|
1037
|
+
else {
|
|
1038
|
+
vo.removeSelection(selections, item)
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
},
|
|
1042
|
+
|
|
1043
|
+
hasChildren: function(ind) {
|
|
1044
|
+
//console.log('methods hasChildren', ind)
|
|
1045
|
+
|
|
1046
|
+
let vo = this
|
|
1047
|
+
|
|
1048
|
+
return vo.getLevelDiff(ind) > 0
|
|
1049
|
+
},
|
|
1050
|
+
|
|
1051
|
+
hasChildrenFromItems: function(items, ind) {
|
|
1052
|
+
//console.log('methods hasChildrenFromItems', items, ind)
|
|
1053
|
+
|
|
1054
|
+
let vo = this
|
|
1055
|
+
|
|
1056
|
+
return vo.getLevelDiffFromItems(items, ind) > 0
|
|
1057
|
+
},
|
|
1058
|
+
|
|
1059
|
+
getLevelDiff: function(ind) {
|
|
1060
|
+
//console.log('methods getLevelDiff', ind)
|
|
1061
|
+
|
|
1062
|
+
let vo = this
|
|
1063
|
+
|
|
1064
|
+
//rows
|
|
1065
|
+
let rows = gm.get(vo.mmkey)
|
|
1066
|
+
|
|
1067
|
+
return vo.getLevelDiffFromRows(rows, ind)
|
|
1068
|
+
},
|
|
1069
|
+
|
|
1070
|
+
getLevelDiffFromRows: function(rows, ind) {
|
|
1071
|
+
//console.log('methods getLevelDiffFromRows', rows, ind)
|
|
1072
|
+
|
|
1073
|
+
let vo = this
|
|
1074
|
+
|
|
1075
|
+
//lev1, lev2
|
|
1076
|
+
let lev1 = get(rows, `${ind}.item.level`, null)
|
|
1077
|
+
let lev2 = get(rows, `${ind + 1}.item.level`, null)
|
|
1078
|
+
|
|
1079
|
+
return vo.calcLevelDiff(lev1, lev2)
|
|
1080
|
+
},
|
|
1081
|
+
|
|
1082
|
+
getLevelDiffFromItems: function(items, ind) {
|
|
1083
|
+
//console.log('methods getLevelDiffFromItems', items, ind)
|
|
1084
|
+
|
|
1085
|
+
let vo = this
|
|
1086
|
+
|
|
1087
|
+
//lev1, lev2
|
|
1088
|
+
let lev1 = get(items, `${ind}.row.item.level`, null)
|
|
1089
|
+
let lev2 = get(items, `${ind + 1}.row.item.level`, null)
|
|
1090
|
+
|
|
1091
|
+
return vo.calcLevelDiff(lev1, lev2)
|
|
1092
|
+
},
|
|
1093
|
+
|
|
1094
|
+
calcLevelDiff: function(lev1, lev2) {
|
|
1095
|
+
//console.log('methods calcLevelDiff', lev1, lev2)
|
|
1096
|
+
|
|
1097
|
+
// let vo = this
|
|
1098
|
+
|
|
1099
|
+
//check
|
|
1100
|
+
if (!isInteger(lev1) || !isInteger(lev2)) {
|
|
1101
|
+
return 0
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
return lev2 - lev1
|
|
1105
|
+
},
|
|
1106
|
+
|
|
1107
|
+
getLevel: function(row) {
|
|
1108
|
+
//console.log('methods getLevel', row)
|
|
1109
|
+
return get(row, `item.level`, 0)
|
|
1110
|
+
},
|
|
1111
|
+
|
|
1112
|
+
toggleItemsCore: function(items, ind, unfolding) {
|
|
1113
|
+
// console.log('methods toggleItemsCore', items, ind, unfolding)
|
|
1114
|
+
|
|
1115
|
+
let vo = this
|
|
1116
|
+
|
|
1117
|
+
//unfoldingChain
|
|
1118
|
+
let unfoldingChain = []
|
|
1119
|
+
|
|
1120
|
+
//依照unfoldingChain計算節點displayShow
|
|
1121
|
+
function getDisplayShow() {
|
|
1122
|
+
for (let i = 0; i < unfoldingChain.length; i++) {
|
|
1123
|
+
if (unfoldingChain[i] === false) {
|
|
1124
|
+
return false
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
return true
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
//本身節點變更unfolding
|
|
1131
|
+
function modifySelf(ind, unfolding) {
|
|
1132
|
+
|
|
1133
|
+
//save unfolding
|
|
1134
|
+
items[ind].row.unfolding = unfolding
|
|
1135
|
+
|
|
1136
|
+
//add unfolding
|
|
1137
|
+
unfoldingChain.push(unfolding)
|
|
1138
|
+
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
//若有子節點, 則變更所屬子節點
|
|
1142
|
+
function modifyChildren(ind, unfolding) {
|
|
1143
|
+
|
|
1144
|
+
//level
|
|
1145
|
+
let level = get(items, `${ind}.row.item.level`, null)
|
|
1146
|
+
if (level === null) {
|
|
1147
|
+
console.log('invalid level')
|
|
1148
|
+
return
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
//modify displayShow
|
|
1152
|
+
for (let i = ind + 1; i < items.length; i++) {
|
|
1153
|
+
//點擊節點後之各子節點
|
|
1154
|
+
|
|
1155
|
+
//levelNow
|
|
1156
|
+
let levelNow = get(items, `${i}.row.item.level`, null)
|
|
1157
|
+
if (levelNow === null) {
|
|
1158
|
+
console.log('invalid levelNow')
|
|
1159
|
+
return
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
//偵測至與點擊節點同層或父層之節點, 代表已處理完畢展隱所影響之全部節點, 可跳出迴圈加速
|
|
1163
|
+
if (level >= levelNow) {
|
|
1164
|
+
break
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
//displayShow, 當unfoldingChain內都是true時才能顯示, 有任一是false就得隱藏
|
|
1168
|
+
let displayShow = getDisplayShow()
|
|
1169
|
+
|
|
1170
|
+
//save displayShow
|
|
1171
|
+
items[i].displayShow = displayShow
|
|
1172
|
+
|
|
1173
|
+
//levDiff, 計算此節點與下個節點之level差值
|
|
1174
|
+
let levDiff = vo.getLevelDiffFromItems(items, i)
|
|
1175
|
+
|
|
1176
|
+
//此節點有所屬子節點
|
|
1177
|
+
if (levDiff > 0) {
|
|
1178
|
+
|
|
1179
|
+
//unfolding
|
|
1180
|
+
let unfoldingNow = get(items, `${i}.row.unfolding`, null)
|
|
1181
|
+
if (unfoldingNow === null) {
|
|
1182
|
+
console.log('invalid unfoldingNow')
|
|
1183
|
+
return
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
//add unfolding
|
|
1187
|
+
unfoldingChain.push(unfoldingNow)
|
|
1188
|
+
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
//此節點之下為父層或更上層之節點
|
|
1192
|
+
if (levDiff < 0) {
|
|
1193
|
+
|
|
1194
|
+
//dropRight, 刪除所屬各層節點的unfolding
|
|
1195
|
+
unfoldingChain = dropRight(unfoldingChain, -levDiff)
|
|
1196
|
+
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
//modifySelf
|
|
1204
|
+
modifySelf(ind, unfolding)
|
|
1205
|
+
|
|
1206
|
+
//modifyChildren
|
|
1207
|
+
modifyChildren(ind, unfolding)
|
|
1208
|
+
|
|
1209
|
+
},
|
|
1210
|
+
|
|
1211
|
+
defaultToggleItems: function() {
|
|
1212
|
+
// console.log('methods defaultToggleItems')
|
|
1213
|
+
|
|
1214
|
+
let vo = this
|
|
1215
|
+
|
|
1216
|
+
async function core() {
|
|
1217
|
+
|
|
1218
|
+
//check
|
|
1219
|
+
if (!isNumber(vo.defaultDisplayLevelTrans)) {
|
|
1220
|
+
return
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
//check
|
|
1224
|
+
if (!vo.$refs.wdl) {
|
|
1225
|
+
return
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
//opt
|
|
1229
|
+
let opt = {
|
|
1230
|
+
fun: function(items) {
|
|
1231
|
+
// console.log('items', cloneDeep(items))
|
|
1232
|
+
|
|
1233
|
+
//l, 有指定預先展開層數
|
|
1234
|
+
let l = cint(vo.defaultDisplayLevelTrans)
|
|
1235
|
+
|
|
1236
|
+
// toggleItemsCore
|
|
1237
|
+
each(items, (v, k) => {
|
|
1238
|
+
if ((v.row.item.level + 1) > l && v.row.unfolding) {
|
|
1239
|
+
vo.toggleItemsCore(items, k, false) //非指定層數則隱藏
|
|
1240
|
+
}
|
|
1241
|
+
})
|
|
1242
|
+
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
//processItems
|
|
1247
|
+
await vo.$refs.wdl.processItems(opt)
|
|
1248
|
+
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
//core
|
|
1252
|
+
core()
|
|
1253
|
+
.catch((err) => {
|
|
1254
|
+
console.log(err)
|
|
1255
|
+
})
|
|
1256
|
+
|
|
1257
|
+
},
|
|
1258
|
+
|
|
1259
|
+
toggleItems: function(item) {
|
|
1260
|
+
//console.log('methods toggleItems', item)
|
|
1261
|
+
|
|
1262
|
+
let vo = this
|
|
1263
|
+
|
|
1264
|
+
async function core() {
|
|
1265
|
+
|
|
1266
|
+
//check
|
|
1267
|
+
if (!vo.$refs.wdl) {
|
|
1268
|
+
return
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
//check draggable and operatable
|
|
1272
|
+
if (vo.draggable || vo.operatable) {
|
|
1273
|
+
// console.log('禁止顯隱節點')
|
|
1274
|
+
return
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
//opt
|
|
1278
|
+
let opt = {
|
|
1279
|
+
fun: function(items) {
|
|
1280
|
+
//console.log('items', cloneDeep(items))
|
|
1281
|
+
|
|
1282
|
+
//ind
|
|
1283
|
+
let ind = item.index
|
|
1284
|
+
|
|
1285
|
+
//unfolding
|
|
1286
|
+
let unfolding = get(items, `${ind}.row.unfolding`, null)
|
|
1287
|
+
if (unfolding === null) {
|
|
1288
|
+
console.log('invalid unfolding')
|
|
1289
|
+
return
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
//本身節點變更unfolding
|
|
1293
|
+
unfolding = !unfolding
|
|
1294
|
+
|
|
1295
|
+
//toggleItemsCore
|
|
1296
|
+
vo.toggleItemsCore(items, ind, unfolding)
|
|
1297
|
+
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
//processItems
|
|
1302
|
+
await vo.$refs.wdl.processItems(opt)
|
|
1303
|
+
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
//core
|
|
1307
|
+
core()
|
|
1308
|
+
.catch((err) => {
|
|
1309
|
+
console.log(err)
|
|
1310
|
+
})
|
|
1311
|
+
|
|
1312
|
+
},
|
|
1313
|
+
|
|
1314
|
+
getAllParentIndex: function(items, ind) {
|
|
1315
|
+
//console.log('methods getAllParentIndex', items, ind)
|
|
1316
|
+
//取得全部父層節點指標與path
|
|
1317
|
+
|
|
1318
|
+
let vo = this
|
|
1319
|
+
|
|
1320
|
+
//selfInd
|
|
1321
|
+
let selfInd = ind
|
|
1322
|
+
|
|
1323
|
+
//無限迴圈尋找
|
|
1324
|
+
let inds = []
|
|
1325
|
+
while (true) {
|
|
1326
|
+
|
|
1327
|
+
//parentInd
|
|
1328
|
+
let parentInd = vo.getParentIndex(items, selfInd)
|
|
1329
|
+
|
|
1330
|
+
//break
|
|
1331
|
+
if (parentInd === null) {
|
|
1332
|
+
break
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
//push
|
|
1336
|
+
inds.push(parentInd)
|
|
1337
|
+
|
|
1338
|
+
//save
|
|
1339
|
+
selfInd = parentInd
|
|
1340
|
+
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
//path
|
|
1344
|
+
let path = join(reverse(inds), '-')
|
|
1345
|
+
|
|
1346
|
+
return {
|
|
1347
|
+
inds,
|
|
1348
|
+
path,
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
|
|
1352
|
+
getParentIndex: function(items, ind) {
|
|
1353
|
+
//console.log('methods getParentIndex', items, ind)
|
|
1354
|
+
//取得父層節點指標
|
|
1355
|
+
|
|
1356
|
+
//level
|
|
1357
|
+
let level = get(items, `${ind}.row.item.level`, null)
|
|
1358
|
+
if (level === null) {
|
|
1359
|
+
return null
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
//往前偵測
|
|
1363
|
+
for (let i = ind - 1; i >= 0; i--) {
|
|
1364
|
+
|
|
1365
|
+
//levelNow
|
|
1366
|
+
let levelNow = get(items, `${i}.row.item.level`, null)
|
|
1367
|
+
if (levelNow === null) {
|
|
1368
|
+
return null
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
//若已出現父層節點, 繼續算則不可能出現同層節點, 可跳出迴圈加速
|
|
1372
|
+
if (level > levelNow) {
|
|
1373
|
+
return i
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return null //找不到父層節點
|
|
1379
|
+
},
|
|
1380
|
+
|
|
1381
|
+
checkItemsCore: function(selections, items, ind, checked) {
|
|
1382
|
+
//console.log('methods checkItemsCore', selections, items, ind, checked)
|
|
1383
|
+
//由外部傳入selections並直接修改記憶體, 外部selections需先cloneDeep用以計算本次操作所增減項目
|
|
1384
|
+
|
|
1385
|
+
let vo = this
|
|
1386
|
+
|
|
1387
|
+
//本身節點變更checked
|
|
1388
|
+
function modifySelf(selections, ind, checked) {
|
|
1389
|
+
|
|
1390
|
+
//checkedOld
|
|
1391
|
+
let checkedOld = items[ind].row.checked
|
|
1392
|
+
|
|
1393
|
+
//save checked
|
|
1394
|
+
items[ind].row.checked = checked
|
|
1395
|
+
|
|
1396
|
+
//modifySelection
|
|
1397
|
+
vo.modifySelection(selections, checkedOld, checked, items[ind].row.item)
|
|
1398
|
+
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
//若有子節點, 則變更所屬子節點
|
|
1402
|
+
function modifyChildren(selections, ind, checked) {
|
|
1403
|
+
if (vo.hasChildrenFromItems(items, ind)) {
|
|
1404
|
+
|
|
1405
|
+
//level
|
|
1406
|
+
let level = get(items, `${ind}.row.item.level`, null)
|
|
1407
|
+
if (level === null) {
|
|
1408
|
+
console.log('invalid level')
|
|
1409
|
+
return
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
//modify checked
|
|
1413
|
+
for (let i = ind + 1; i < items.length; i++) {
|
|
1414
|
+
//點擊節點後之各子節點
|
|
1415
|
+
|
|
1416
|
+
//levelNow
|
|
1417
|
+
let levelNow = get(items, `${i}.row.item.level`, null)
|
|
1418
|
+
if (levelNow === null) {
|
|
1419
|
+
console.log('invalid levelNow')
|
|
1420
|
+
return
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
//偵測至與點擊節點同層或父層之節點, 代表已處理完畢全部所屬子節點, 可跳出迴圈加速
|
|
1424
|
+
if (level >= levelNow) {
|
|
1425
|
+
break
|
|
1426
|
+
}
|
|
1427
|
+
//console.log(`[${items[i].row.item.name}]`, 'level', level, 'levelNow', levelNow)
|
|
1428
|
+
|
|
1429
|
+
//checkedOld
|
|
1430
|
+
let checkedOld = items[i].row.checked
|
|
1431
|
+
|
|
1432
|
+
//save checked
|
|
1433
|
+
items[i].row.checked = checked
|
|
1434
|
+
|
|
1435
|
+
//modifySelection
|
|
1436
|
+
vo.modifySelection(selections, checkedOld, checked, items[i].row.item)
|
|
1437
|
+
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
//偵測全部同層的checked狀態, 回傳為父層節點的checked狀態
|
|
1444
|
+
function detectSameLevelChecked(ind) {
|
|
1445
|
+
|
|
1446
|
+
//level
|
|
1447
|
+
let level = get(items, `${ind}.row.item.level`, null)
|
|
1448
|
+
if (level === null) {
|
|
1449
|
+
console.log('invalid level')
|
|
1450
|
+
return null
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
//sameLevelInds, 把點擊節點先加入至偵測清單
|
|
1454
|
+
let sameLevelInds = [{
|
|
1455
|
+
ind,
|
|
1456
|
+
checked: get(items, `${ind}.row.checked`, ''),
|
|
1457
|
+
}]
|
|
1458
|
+
|
|
1459
|
+
//往前偵測
|
|
1460
|
+
for (let i = ind - 1; i >= 0; i--) {
|
|
1461
|
+
|
|
1462
|
+
//levelNow
|
|
1463
|
+
let levelNow = get(items, `${i}.row.item.level`, null)
|
|
1464
|
+
if (levelNow === null) {
|
|
1465
|
+
console.log('invalid levelNow')
|
|
1466
|
+
return
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
//若已出現父層節點, 繼續算則不可能出現同層節點, 可跳出迴圈加速
|
|
1470
|
+
if (level > levelNow) {
|
|
1471
|
+
break
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
//若為同層節點才加入偵測清單
|
|
1475
|
+
if (level === levelNow) {
|
|
1476
|
+
|
|
1477
|
+
//push
|
|
1478
|
+
sameLevelInds.push({
|
|
1479
|
+
ind: i,
|
|
1480
|
+
checked: get(items, `${i}.row.checked`, ''),
|
|
1481
|
+
})
|
|
1482
|
+
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
//往後偵測
|
|
1488
|
+
for (let i = ind + 1; i < items.length; i++) {
|
|
1489
|
+
|
|
1490
|
+
//levelNow
|
|
1491
|
+
let levelNow = get(items, `${i}.row.item.level`, null)
|
|
1492
|
+
if (levelNow === null) {
|
|
1493
|
+
console.log('invalid levelNow')
|
|
1494
|
+
return
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
//若已出現父層節點, 繼續算不可能出現同層節點, 可跳出迴圈加速
|
|
1498
|
+
if (level > levelNow) {
|
|
1499
|
+
break
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
//若為同層節點才加入偵測清單
|
|
1503
|
+
if (level === levelNow) {
|
|
1504
|
+
|
|
1505
|
+
//push
|
|
1506
|
+
sameLevelInds.push({
|
|
1507
|
+
ind: i,
|
|
1508
|
+
checked: get(items, `${i}.row.checked`, ''),
|
|
1509
|
+
})
|
|
1510
|
+
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
//count
|
|
1516
|
+
let nAll = size(sameLevelInds)
|
|
1517
|
+
let nChecked = 0
|
|
1518
|
+
let nUnchecked = 0
|
|
1519
|
+
each(sameLevelInds, (v) => {
|
|
1520
|
+
if (v.checked === 'checked') {
|
|
1521
|
+
nChecked += 1
|
|
1522
|
+
}
|
|
1523
|
+
else if (v.checked === 'unchecked') {
|
|
1524
|
+
nUnchecked += 1
|
|
1525
|
+
}
|
|
1526
|
+
})
|
|
1527
|
+
|
|
1528
|
+
if (nChecked === nAll) {
|
|
1529
|
+
return 'checked'
|
|
1530
|
+
}
|
|
1531
|
+
else if (nUnchecked === nAll) {
|
|
1532
|
+
return 'unchecked'
|
|
1533
|
+
}
|
|
1534
|
+
return 'checkedPartially'
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
//調整全部父層節點的checked狀態
|
|
1538
|
+
function modifyParent(selections, ind) {
|
|
1539
|
+
|
|
1540
|
+
//parentInd, 父層節點指標
|
|
1541
|
+
let parentInd = vo.getParentIndex(items, ind)
|
|
1542
|
+
|
|
1543
|
+
//check
|
|
1544
|
+
if (parentInd === null) {
|
|
1545
|
+
return
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
//取得父層節點與checked資訊
|
|
1549
|
+
let parent = get(items, parentInd, null)
|
|
1550
|
+
let parentCheckedOld = get(parent, 'row.checked', '')
|
|
1551
|
+
let parentCheckedNew = detectSameLevelChecked(ind) //偵測與自己同層節點的checked資訊, 代表父層應該的checked
|
|
1552
|
+
|
|
1553
|
+
//比對父層現在與應該checked是否不同, 若不同則覆寫
|
|
1554
|
+
if (parentCheckedOld !== parentCheckedNew) {
|
|
1555
|
+
|
|
1556
|
+
//parentCheckedOld
|
|
1557
|
+
let parentCheckedOld = items[parentInd].row.checked
|
|
1558
|
+
|
|
1559
|
+
//save checked
|
|
1560
|
+
items[parentInd].row.checked = parentCheckedNew
|
|
1561
|
+
|
|
1562
|
+
//modifySelection
|
|
1563
|
+
vo.modifySelection(selections, parentCheckedOld, parentCheckedNew, items[parentInd].row.item)
|
|
1564
|
+
|
|
1565
|
+
//modifyParent, 遞迴繼續查找父層節點
|
|
1566
|
+
modifyParent(selections, parentInd)
|
|
1567
|
+
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
//modifySelf
|
|
1573
|
+
modifySelf(selections, ind, checked)
|
|
1574
|
+
// console.log(vo.mmkey, 'modifySelf selections', cloneDeep(selections))
|
|
1575
|
+
|
|
1576
|
+
//modifyChildren
|
|
1577
|
+
modifyChildren(selections, ind, checked)
|
|
1578
|
+
// console.log(vo.mmkey, 'modifyChildren selections', cloneDeep(selections))
|
|
1579
|
+
|
|
1580
|
+
//modifyParent
|
|
1581
|
+
modifyParent(selections, ind)
|
|
1582
|
+
// console.log(vo.mmkey, 'modifyParent selections', cloneDeep(selections))
|
|
1583
|
+
|
|
1584
|
+
},
|
|
1585
|
+
|
|
1586
|
+
checkItems: function(item) {
|
|
1587
|
+
//console.log('methods checkItems', item)
|
|
1588
|
+
|
|
1589
|
+
let vo = this
|
|
1590
|
+
|
|
1591
|
+
async function core() {
|
|
1592
|
+
|
|
1593
|
+
//由內部selectionsTrans當初始值, cloneDeep後進行修改
|
|
1594
|
+
let selectionsTrans = cloneDeep(vo.selectionsTrans)
|
|
1595
|
+
|
|
1596
|
+
//check
|
|
1597
|
+
if (!vo.$refs.wdl) {
|
|
1598
|
+
return
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
//opt
|
|
1602
|
+
let opt = {
|
|
1603
|
+
fun: function(items) {
|
|
1604
|
+
//console.log('items', cloneDeep(items))
|
|
1605
|
+
|
|
1606
|
+
//ind
|
|
1607
|
+
let ind = item.index
|
|
1608
|
+
|
|
1609
|
+
//checked
|
|
1610
|
+
let checked = get(items, `${ind}.row.checked`, null)
|
|
1611
|
+
if (checked === null) {
|
|
1612
|
+
console.log('invalid checked')
|
|
1613
|
+
return
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
//本身節點變更checked
|
|
1617
|
+
if (checked === 'checked') {
|
|
1618
|
+
checked = 'unchecked'
|
|
1619
|
+
}
|
|
1620
|
+
else if (checked === 'unchecked') {
|
|
1621
|
+
checked = 'checked'
|
|
1622
|
+
}
|
|
1623
|
+
else {
|
|
1624
|
+
checked = 'checked'
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
//checkItemsCore
|
|
1628
|
+
vo.checkItemsCore(selectionsTrans, items, ind, checked)
|
|
1629
|
+
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
//processItems
|
|
1634
|
+
await vo.$refs.wdl.processItems(opt)
|
|
1635
|
+
|
|
1636
|
+
//save
|
|
1637
|
+
vo.selectionsTrans = selectionsTrans
|
|
1638
|
+
|
|
1639
|
+
//emit, 要放在wdl更新後才觸發事件
|
|
1640
|
+
vo.$emit('update:selections', cloneDeep(selectionsTrans))
|
|
1641
|
+
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
//core
|
|
1645
|
+
core()
|
|
1646
|
+
.catch((err) => {
|
|
1647
|
+
console.log(err)
|
|
1648
|
+
})
|
|
1649
|
+
|
|
1650
|
+
},
|
|
1651
|
+
|
|
1652
|
+
filterKeyWordsCore: function(items) {
|
|
1653
|
+
//console.log('methods filterKeyWordsCore', items)
|
|
1654
|
+
|
|
1655
|
+
let vo = this
|
|
1656
|
+
|
|
1657
|
+
//check draggable and operatable
|
|
1658
|
+
if (vo.draggable || vo.operatable) {
|
|
1659
|
+
return
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
//check filterKeywordsTransTemp
|
|
1663
|
+
if (vo.filterKeywordsTransTemp === vo.filterKeywordsTrans) {
|
|
1664
|
+
return
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
//filterKeywordsTransTemp
|
|
1668
|
+
vo.filterKeywordsTransTemp = vo.filterKeywordsTrans //因為函數為同步故可以先覆寫至temp
|
|
1669
|
+
|
|
1670
|
+
//check
|
|
1671
|
+
if (size(vo.filterKeywordsTrans) === 0) {
|
|
1672
|
+
|
|
1673
|
+
//預設可見
|
|
1674
|
+
for (let i = 0; i < items.length; i++) {
|
|
1675
|
+
items[i].filterShow = true
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
}
|
|
1679
|
+
else {
|
|
1680
|
+
|
|
1681
|
+
//kws
|
|
1682
|
+
let kws = sep(vo.filterKeywordsTrans.toLowerCase(), ' ')
|
|
1683
|
+
|
|
1684
|
+
//針對各項目偵測過濾
|
|
1685
|
+
let pathHasShow = {} //儲存已經強制顯示的父層鏈
|
|
1686
|
+
for (let i = 0; i < items.length; i++) {
|
|
1687
|
+
|
|
1688
|
+
//預設不可見
|
|
1689
|
+
let b = false
|
|
1690
|
+
|
|
1691
|
+
//filter
|
|
1692
|
+
if (isfun(vo.filterFunction)) {
|
|
1693
|
+
|
|
1694
|
+
//filterFunction
|
|
1695
|
+
b = vo.filterFunction(items[i].row.item)
|
|
1696
|
+
|
|
1697
|
+
}
|
|
1698
|
+
else {
|
|
1699
|
+
|
|
1700
|
+
//預設取得項目文字供關鍵字過濾
|
|
1701
|
+
let c = vo.getText(items[i].row.item)
|
|
1702
|
+
// console.log('vo.getText', items[i].row.item, 'c=', c)
|
|
1703
|
+
|
|
1704
|
+
//toLowerCase
|
|
1705
|
+
c = c.toLowerCase()
|
|
1706
|
+
|
|
1707
|
+
//若值含有關建字
|
|
1708
|
+
for (let k = 0; k < kws.length; k++) {
|
|
1709
|
+
let kw = kws[k]
|
|
1710
|
+
if (c.indexOf(kw) >= 0) {
|
|
1711
|
+
b = true
|
|
1712
|
+
break
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
//若項目有關鍵字, 則需設定全部父層節點為可見, 不能被過濾掉
|
|
1719
|
+
if (b) {
|
|
1720
|
+
|
|
1721
|
+
//此節點顯示
|
|
1722
|
+
items[i].filterShow = true
|
|
1723
|
+
|
|
1724
|
+
//getAllParentIndex, 取得全部父層資訊
|
|
1725
|
+
let pai = vo.getAllParentIndex(items, i)
|
|
1726
|
+
|
|
1727
|
+
//若有找到一個以上的父層
|
|
1728
|
+
if (pai.path !== '') {
|
|
1729
|
+
|
|
1730
|
+
//若尚未處理過此父層鏈
|
|
1731
|
+
if (!haskey(pathHasShow, pai.path)) {
|
|
1732
|
+
|
|
1733
|
+
//針對各父層設定filterShow=true
|
|
1734
|
+
each(pai.inds, (ind) => {
|
|
1735
|
+
items[ind].filterShow = true
|
|
1736
|
+
})
|
|
1737
|
+
|
|
1738
|
+
//儲存此父層鏈, 避免下次重複設定減少功耗
|
|
1739
|
+
pathHasShow[pai.path] = pai
|
|
1740
|
+
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
|
|
1748
|
+
//此節點隱藏
|
|
1749
|
+
items[i].filterShow = false
|
|
1750
|
+
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
},
|
|
1758
|
+
|
|
1759
|
+
filterKeyWords: function() {
|
|
1760
|
+
//console.log('methods filterKeyWords')
|
|
1761
|
+
|
|
1762
|
+
let vo = this
|
|
1763
|
+
|
|
1764
|
+
async function core() {
|
|
1765
|
+
|
|
1766
|
+
//check
|
|
1767
|
+
if (!vo.$refs.wdl) {
|
|
1768
|
+
return
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
//check
|
|
1772
|
+
if (vo.filtering) {
|
|
1773
|
+
return
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
//filtering
|
|
1777
|
+
vo.filtering = true
|
|
1778
|
+
|
|
1779
|
+
//opt
|
|
1780
|
+
let opt = {
|
|
1781
|
+
fun: function(items) {
|
|
1782
|
+
//console.log('items', cloneDeep(items))
|
|
1783
|
+
|
|
1784
|
+
//filterKeyWordsCore
|
|
1785
|
+
vo.filterKeyWordsCore(items)
|
|
1786
|
+
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
//processItems
|
|
1791
|
+
await vo.$refs.wdl.processItems(opt)
|
|
1792
|
+
|
|
1793
|
+
//filtering
|
|
1794
|
+
vo.filtering = false
|
|
1795
|
+
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
//core
|
|
1799
|
+
core()
|
|
1800
|
+
.catch((err) => {
|
|
1801
|
+
console.log(err)
|
|
1802
|
+
})
|
|
1803
|
+
|
|
1804
|
+
},
|
|
1805
|
+
|
|
1806
|
+
filterKeyWordsDebounce: function() {
|
|
1807
|
+
//console.log('methods filterKeyWordsDebounce')
|
|
1808
|
+
|
|
1809
|
+
let vo = this
|
|
1810
|
+
|
|
1811
|
+
//dbc
|
|
1812
|
+
vo.dbc(() => {
|
|
1813
|
+
|
|
1814
|
+
//filterKeyWords
|
|
1815
|
+
vo.filterKeyWords()
|
|
1816
|
+
|
|
1817
|
+
})
|
|
1818
|
+
|
|
1819
|
+
},
|
|
1820
|
+
|
|
1821
|
+
changeViewItems: function(msg) {
|
|
1822
|
+
// console.log('methods changeViewItems', msg)
|
|
1823
|
+
|
|
1824
|
+
let vo = this
|
|
1825
|
+
|
|
1826
|
+
//emit
|
|
1827
|
+
vo.$emit('change-view-items', msg)
|
|
1828
|
+
|
|
1829
|
+
// //draggable
|
|
1830
|
+
// if (vo.draggable) {
|
|
1831
|
+
|
|
1832
|
+
// //$nextTick, 因WDynamicList為按需顯示, 為使domDrag能抓到元素, 需等WDynamicList內觸發change-view-items結束後dom才會更新, 故得延遲執行
|
|
1833
|
+
// vo.$nextTick(() => {
|
|
1834
|
+
|
|
1835
|
+
// //dragInit
|
|
1836
|
+
// vo.dragInit()
|
|
1837
|
+
|
|
1838
|
+
// })
|
|
1839
|
+
|
|
1840
|
+
// }
|
|
1841
|
+
|
|
1842
|
+
},
|
|
1843
|
+
|
|
1844
|
+
deleteItem: function (data, nk) {
|
|
1845
|
+
//console.log('methods deleteItem', data, nk)
|
|
1846
|
+
//刪除節點, 因會使用nk操作, 故需確保節點順序問題
|
|
1847
|
+
|
|
1848
|
+
if (size(nk) === 0) {
|
|
1849
|
+
throw new Error('invalid nk')
|
|
1850
|
+
}
|
|
1851
|
+
else if (size(nk) === 1) {
|
|
1852
|
+
|
|
1853
|
+
//pullAt, 若節點為頂層(size(nk)===1)就不取父節點, data就是父節點
|
|
1854
|
+
pullAt(data, nk)
|
|
1855
|
+
|
|
1856
|
+
}
|
|
1857
|
+
else {
|
|
1858
|
+
|
|
1859
|
+
//ks, 當前節點的父節點的keys
|
|
1860
|
+
let ks = dropRight(nk)
|
|
1861
|
+
|
|
1862
|
+
//ind, 當前節點位於父節點的指標
|
|
1863
|
+
let ind = takeRight(nk)
|
|
1864
|
+
|
|
1865
|
+
//tar, 節點的父節點
|
|
1866
|
+
let tar = get(data, ks, [])
|
|
1867
|
+
|
|
1868
|
+
//pullAt
|
|
1869
|
+
pullAt(tar, [ind])
|
|
1870
|
+
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
},
|
|
1874
|
+
|
|
1875
|
+
dragItem: function(startInd, endInd, modeDir, modeInsert) {
|
|
1876
|
+
//console.log('methods dragItem', startInd, endInd, modeDir, modeInsert)
|
|
1877
|
+
|
|
1878
|
+
let vo = this
|
|
1879
|
+
|
|
1880
|
+
//rows
|
|
1881
|
+
let rows = gm.get(vo.mmkey)
|
|
1882
|
+
// console.log('rows', JSON.parse(JSON.stringify(rows)))
|
|
1883
|
+
|
|
1884
|
+
//data
|
|
1885
|
+
let data = cloneDeep(vo.data)
|
|
1886
|
+
// console.log('data1', JSON.parse(JSON.stringify(data)))
|
|
1887
|
+
|
|
1888
|
+
//itemSelf, itemEnter
|
|
1889
|
+
let itemSelf = rows[startInd]
|
|
1890
|
+
let itemEnter = rows[endInd]
|
|
1891
|
+
// console.log('itemSelf', startInd, itemSelf)
|
|
1892
|
+
// console.log('itemEnter', endInd, itemEnter)
|
|
1893
|
+
|
|
1894
|
+
//src, 來源節點
|
|
1895
|
+
let nkSelf = itemSelf.item.nk
|
|
1896
|
+
let nkEnter = itemEnter.item.nk
|
|
1897
|
+
let dataSelf = get(data, itemSelf.item.nk)
|
|
1898
|
+
// let dataEnter = get(data, itemEnter.item.nk)
|
|
1899
|
+
// console.log('dataSelf', nkSelf, dataSelf)
|
|
1900
|
+
// console.log('dataEnter', nkEnter, dataEnter)
|
|
1901
|
+
|
|
1902
|
+
//modeDir
|
|
1903
|
+
if (modeDir === 'forward') {
|
|
1904
|
+
//若為由後往前移動, 則需先刪除來源節點
|
|
1905
|
+
vo.deleteItem(data, nkSelf)
|
|
1906
|
+
// console.log('data2', JSON.parse(JSON.stringify(data)))
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
if (modeInsert === 'before' || modeInsert === 'after') {
|
|
1910
|
+
|
|
1911
|
+
//ind, 依照mode決定ind, before是直接splice對目標節點ind位置塞入, 就能把目標往後移動, after就需+1
|
|
1912
|
+
let ind = takeRight(nkEnter)[0]
|
|
1913
|
+
|
|
1914
|
+
//tar, 目標的父節點, 待移入對象
|
|
1915
|
+
let tar
|
|
1916
|
+
if (size(nkEnter) === 1) {
|
|
1917
|
+
tar = data //因目標是第1層內元素, 故要取得的父節點就是原本數據
|
|
1918
|
+
}
|
|
1919
|
+
else {
|
|
1920
|
+
let ks = dropRight(nkEnter) //目標父節點的keys, dropRight後就是其上的keyChildren
|
|
1921
|
+
tar = get(data, ks, []) //取得要移入的父節點
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
if (modeInsert === 'before') {
|
|
1925
|
+
// ind = ind
|
|
1926
|
+
}
|
|
1927
|
+
else if (modeInsert === 'after') {
|
|
1928
|
+
ind += 1
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
//array insert
|
|
1932
|
+
tar.splice(ind, 0, dataSelf)
|
|
1933
|
+
|
|
1934
|
+
}
|
|
1935
|
+
else if (modeInsert === 'belongto') {
|
|
1936
|
+
|
|
1937
|
+
//ks, 所屬儲存子節點欄位, 也就是keyChildren
|
|
1938
|
+
let ks = [...nkEnter, vo.keyChildren]
|
|
1939
|
+
|
|
1940
|
+
//tar, 取得子節點, 若無則預設空陣列[]
|
|
1941
|
+
let tar = get(data, ks, [])
|
|
1942
|
+
|
|
1943
|
+
//push
|
|
1944
|
+
tar.push(dataSelf)
|
|
1945
|
+
|
|
1946
|
+
//set
|
|
1947
|
+
set(data, ks, tar)
|
|
1948
|
+
|
|
1949
|
+
}
|
|
1950
|
+
// console.log('data3', JSON.parse(JSON.stringify(data)))
|
|
1951
|
+
|
|
1952
|
+
//modeDir
|
|
1953
|
+
if (modeDir === 'backward') {
|
|
1954
|
+
//若為由前往後移動, 則需於來源節點複製進目標節點處後, 才能刪除來源節點
|
|
1955
|
+
vo.deleteItem(data, nkSelf)
|
|
1956
|
+
// console.log('data4', JSON.parse(JSON.stringify(data)))
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
//$nextTick
|
|
1960
|
+
vo.$nextTick(() => {
|
|
1961
|
+
|
|
1962
|
+
//emit
|
|
1963
|
+
vo.$emit('update:data', cloneDeep(data))
|
|
1964
|
+
|
|
1965
|
+
})
|
|
1966
|
+
|
|
1967
|
+
},
|
|
1968
|
+
|
|
1969
|
+
operateItem: function(targetInd, mode, fun) {
|
|
1970
|
+
//console.log('methods operateItem', targetInd, mode, fun)
|
|
1971
|
+
|
|
1972
|
+
let vo = this
|
|
1973
|
+
|
|
1974
|
+
async function core() {
|
|
1975
|
+
|
|
1976
|
+
//rows
|
|
1977
|
+
let rows = gm.get(vo.mmkey)
|
|
1978
|
+
// console.log('rows', JSON.parse(JSON.stringify(rows)))
|
|
1979
|
+
|
|
1980
|
+
//data
|
|
1981
|
+
let data = cloneDeep(vo.data)
|
|
1982
|
+
// console.log('data1', JSON.parse(JSON.stringify(data)))
|
|
1983
|
+
|
|
1984
|
+
//itemTarget
|
|
1985
|
+
let itemTarget = rows[targetInd]
|
|
1986
|
+
// console.log('itemTarget', targetInd, itemTarget)
|
|
1987
|
+
|
|
1988
|
+
//src, 來源節點
|
|
1989
|
+
let nkTarget = itemTarget.item.nk
|
|
1990
|
+
// console.log('dataEnter', nkTarget, itemTarget.item)
|
|
1991
|
+
|
|
1992
|
+
//mode for Delete
|
|
1993
|
+
if (mode === 'Delete') {
|
|
1994
|
+
|
|
1995
|
+
//deleteItem
|
|
1996
|
+
vo.deleteItem(data, nkTarget)
|
|
1997
|
+
|
|
1998
|
+
return data
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
//check
|
|
2002
|
+
if (!isfun(fun)) {
|
|
2003
|
+
throw new Error('invalid fun')
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
//dataNew
|
|
2007
|
+
let dataNew = await fun()
|
|
2008
|
+
// console.log('dataNew', dataNew)
|
|
2009
|
+
|
|
2010
|
+
//modeInsert and convert for InsertBefore, InsertAfter, InsertChild
|
|
2011
|
+
let modeInsert = mode
|
|
2012
|
+
if (modeInsert === 'InsertBefore') {
|
|
2013
|
+
modeInsert = 'before'
|
|
2014
|
+
}
|
|
2015
|
+
else if (modeInsert === 'InsertAfter') {
|
|
2016
|
+
modeInsert = 'after'
|
|
2017
|
+
}
|
|
2018
|
+
else if (modeInsert === 'InsertChild') {
|
|
2019
|
+
modeInsert = 'belongto'
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
if (modeInsert === 'before' || modeInsert === 'after') {
|
|
2023
|
+
|
|
2024
|
+
//ind, 依照mode決定ind, before是直接splice對目標節點ind位置塞入, 就能把目標往後移動, after就需+1
|
|
2025
|
+
let ind = takeRight(nkTarget)[0]
|
|
2026
|
+
|
|
2027
|
+
//tar, 目標的父節點, 待移入對象
|
|
2028
|
+
let tar
|
|
2029
|
+
if (size(nkTarget) === 1) {
|
|
2030
|
+
tar = data //因目標是第1層內元素, 故要取得的父節點就是原本數據
|
|
2031
|
+
}
|
|
2032
|
+
else {
|
|
2033
|
+
let ks = dropRight(nkTarget) //目標父節點的keys, dropRight後就是其上的keyChildren
|
|
2034
|
+
tar = get(data, ks, []) //取得要移入的父節點
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
if (modeInsert === 'before') {
|
|
2038
|
+
// ind = ind
|
|
2039
|
+
}
|
|
2040
|
+
else if (modeInsert === 'after') {
|
|
2041
|
+
ind += 1
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
//array insert
|
|
2045
|
+
tar.splice(ind, 0, dataNew)
|
|
2046
|
+
|
|
2047
|
+
}
|
|
2048
|
+
else if (modeInsert === 'belongto') {
|
|
2049
|
+
|
|
2050
|
+
//ks, 所屬儲存子節點欄位, 也就是keyChildren
|
|
2051
|
+
let ks = [...nkTarget, vo.keyChildren]
|
|
2052
|
+
|
|
2053
|
+
//tar, 取得子節點, 若無則預設空陣列[]
|
|
2054
|
+
let tar = get(data, ks, [])
|
|
2055
|
+
|
|
2056
|
+
//push
|
|
2057
|
+
tar.push(dataNew)
|
|
2058
|
+
|
|
2059
|
+
//set
|
|
2060
|
+
set(data, ks, tar)
|
|
2061
|
+
|
|
2062
|
+
}
|
|
2063
|
+
else {
|
|
2064
|
+
throw new Error('invalid modeInsert')
|
|
2065
|
+
}
|
|
2066
|
+
// console.log('data3', JSON.parse(JSON.stringify(data)))
|
|
2067
|
+
|
|
2068
|
+
return data
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
//pm, 提供外部呼叫時能知道已觸發data變更
|
|
2072
|
+
let pm = genPm()
|
|
2073
|
+
|
|
2074
|
+
//core
|
|
2075
|
+
core()
|
|
2076
|
+
.then((data) => {
|
|
2077
|
+
|
|
2078
|
+
//$nextTick
|
|
2079
|
+
vo.$nextTick(() => {
|
|
2080
|
+
|
|
2081
|
+
//emit
|
|
2082
|
+
vo.$emit('update:data', cloneDeep(data))
|
|
2083
|
+
|
|
2084
|
+
//resolve
|
|
2085
|
+
pm.resolve()
|
|
2086
|
+
|
|
2087
|
+
})
|
|
2088
|
+
|
|
2089
|
+
})
|
|
2090
|
+
.catch((err) => {
|
|
2091
|
+
console.log(err)
|
|
2092
|
+
})
|
|
2093
|
+
|
|
2094
|
+
return pm
|
|
2095
|
+
},
|
|
2096
|
+
|
|
2097
|
+
getDgGroupKey: function() {
|
|
2098
|
+
//console.log('methods getDgGroupKey')
|
|
2099
|
+
|
|
2100
|
+
let vo = this
|
|
2101
|
+
|
|
2102
|
+
//dgGroupKey
|
|
2103
|
+
if (vo.dgGroupKey === null) {
|
|
2104
|
+
vo.dgGroupKey = `r${genID()}`
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
return vo.dgGroupKey
|
|
2108
|
+
},
|
|
2109
|
+
|
|
2110
|
+
getDgOpt: function() {
|
|
2111
|
+
//console.log('methods getDgOpt')
|
|
2112
|
+
|
|
2113
|
+
let vo = this
|
|
2114
|
+
|
|
2115
|
+
//opt, 使用vue directive初始化時於mounted之前就需要group值, 此代表此組件內可互相拖曳之DOM群組識別碼, 故通過function自動取得group
|
|
2116
|
+
let opt = {
|
|
2117
|
+
group: vo.getDgGroupKey(),
|
|
2118
|
+
//attIdentify
|
|
2119
|
+
attIndex: 'dragindex',
|
|
2120
|
+
attGroup: 'draggroup',
|
|
2121
|
+
previewOpacity: vo.dgPreviewOpacity,
|
|
2122
|
+
previewDisabledOpacity: vo.dgPreviewDisabledOpacity,
|
|
2123
|
+
previewBorderWidth: vo.dgPreviewBorderWidth,
|
|
2124
|
+
previewBorderColor: vo.dgPreviewBorderColor,
|
|
2125
|
+
previewBackground: vo.dgPreviewBackground,
|
|
2126
|
+
timeDragStartDelay: 1,
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
return opt
|
|
2130
|
+
},
|
|
2131
|
+
|
|
2132
|
+
isBelong: function(arEnter, arSelf) {
|
|
2133
|
+
function isArrayOverlap(ar1, ar2) {
|
|
2134
|
+
|
|
2135
|
+
//n
|
|
2136
|
+
let n = min([size(ar1), size(ar2)])
|
|
2137
|
+
|
|
2138
|
+
//先截成同長度陣列, 為共有父層資訊
|
|
2139
|
+
let tr1 = take(ar1, n)
|
|
2140
|
+
let tr2 = take(ar2, n)
|
|
2141
|
+
|
|
2142
|
+
//isEqual
|
|
2143
|
+
let b = isEqual(tr1, tr2)
|
|
2144
|
+
|
|
2145
|
+
return b
|
|
2146
|
+
}
|
|
2147
|
+
if (size(arEnter) >= size(arSelf)) { //若enter要為self的子節點, 其enter size會大於等於 self size
|
|
2148
|
+
return isArrayOverlap(arEnter, arSelf) //若有共同父層資訊, 就代表enter為self的子節點
|
|
2149
|
+
}
|
|
2150
|
+
return false
|
|
2151
|
+
},
|
|
2152
|
+
|
|
2153
|
+
dragdrop: function(msg) {
|
|
2154
|
+
// console.log('methods dragdrop', msg)
|
|
2155
|
+
|
|
2156
|
+
let vo = this
|
|
2157
|
+
|
|
2158
|
+
if (msg.evName === 'move') {
|
|
2159
|
+
|
|
2160
|
+
//rows
|
|
2161
|
+
let rows = gm.get(vo.mmkey)
|
|
2162
|
+
// console.log('rows', JSON.parse(JSON.stringify(rows)))
|
|
2163
|
+
|
|
2164
|
+
//itemSelf, itemEnter
|
|
2165
|
+
let itemSelf = rows[msg.startInd]
|
|
2166
|
+
let itemEnter = rows[msg.endInd]
|
|
2167
|
+
// console.log('itemSelf', itemSelf, msg.startInd, itemSelf.item.nk)
|
|
2168
|
+
// console.log('itemEnter', itemEnter, msg.endInd, itemEnter.item.nk)
|
|
2169
|
+
|
|
2170
|
+
//belong
|
|
2171
|
+
let belong = vo.isBelong(itemEnter.item.nk, itemSelf.item.nk)
|
|
2172
|
+
// console.log('belong', belong)
|
|
2173
|
+
|
|
2174
|
+
//ele, 因WDynamicList會重新封裝按需顯示, 故顯示拖曳指標區為上2層的父節點, 取top才會正確
|
|
2175
|
+
let ele = get(msg, `endEle.parentNode.parentNode`)
|
|
2176
|
+
|
|
2177
|
+
//location
|
|
2178
|
+
vo.dgTipTop = cdbl(replace(ele.style.top, 'px', ''))
|
|
2179
|
+
vo.dgTipLeft = cdbl(replace(ele.style.left, 'px', ''))
|
|
2180
|
+
vo.dgTipWidth = ele.offsetWidth
|
|
2181
|
+
vo.dgTipHeight = ele.offsetHeight
|
|
2182
|
+
|
|
2183
|
+
//dgTipMode
|
|
2184
|
+
if (belong) {
|
|
2185
|
+
vo.dgTipMode = 'disabled'
|
|
2186
|
+
}
|
|
2187
|
+
else if (msg.ry <= 0.3) {
|
|
2188
|
+
vo.dgTipMode = 'lineTop'
|
|
2189
|
+
}
|
|
2190
|
+
else if (msg.ry >= 0.7) {
|
|
2191
|
+
vo.dgTipMode = 'lineBottom'
|
|
2192
|
+
}
|
|
2193
|
+
else if (msg.ry > 0.3 && msg.ry < 0.7) {
|
|
2194
|
+
vo.dgTipMode = 'block'
|
|
2195
|
+
}
|
|
2196
|
+
else {
|
|
2197
|
+
//不會有此狀況
|
|
2198
|
+
vo.dgTipMode = ''
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
}
|
|
2202
|
+
else if (msg.evName === 'leave') {
|
|
2203
|
+
vo.dgTipMode = ''
|
|
2204
|
+
}
|
|
2205
|
+
else if (msg.evName === 'drop') {
|
|
2206
|
+
|
|
2207
|
+
//check, 拖曳至原始拖曳項目上, 無有效拖曳模式
|
|
2208
|
+
if (msg.startInd === msg.endInd) {
|
|
2209
|
+
vo.dgTipMode = ''
|
|
2210
|
+
return
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
//check, 多層組件觸發時可能會因leave觸發導致dgTipMode=''
|
|
2214
|
+
if (vo.dgTipMode === '') {
|
|
2215
|
+
return
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
//modeDir
|
|
2219
|
+
let modeDir
|
|
2220
|
+
if (msg.startInd < msg.endInd) {
|
|
2221
|
+
modeDir = 'backward'
|
|
2222
|
+
}
|
|
2223
|
+
else if (msg.startInd > msg.endInd) {
|
|
2224
|
+
modeDir = 'forward'
|
|
2225
|
+
}
|
|
2226
|
+
else {
|
|
2227
|
+
throw new Error('invalid modeDir')
|
|
2228
|
+
}
|
|
2229
|
+
// console.log('modeDir', modeDir)
|
|
2230
|
+
|
|
2231
|
+
//modeInsert
|
|
2232
|
+
let modeInsert
|
|
2233
|
+
if (vo.dgTipMode === 'disabled') {
|
|
2234
|
+
vo.dgTipMode = ''
|
|
2235
|
+
}
|
|
2236
|
+
else if (vo.dgTipMode === 'lineTop') {
|
|
2237
|
+
modeInsert = 'before'
|
|
2238
|
+
}
|
|
2239
|
+
else if (vo.dgTipMode === 'lineBottom') {
|
|
2240
|
+
modeInsert = 'after'
|
|
2241
|
+
}
|
|
2242
|
+
else if (vo.dgTipMode === 'block') {
|
|
2243
|
+
modeInsert = 'belongto'
|
|
2244
|
+
}
|
|
2245
|
+
else {
|
|
2246
|
+
console.log('dgTipMode', vo.dgTipMode)
|
|
2247
|
+
throw new Error('invalid dgTipMode')
|
|
2248
|
+
}
|
|
2249
|
+
// console.log('modeInsert', modeInsert)
|
|
2250
|
+
|
|
2251
|
+
//check, 純點擊時無move, 或拖曳至禁止對象內(通常是拖入自己子節點內)
|
|
2252
|
+
if (vo.dgTipMode === '') {
|
|
2253
|
+
return
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
//clear, 已由dgTipMode換算出modeInsert, 拖曳完需清除dgTipMode使拖曳時指示對象隱藏
|
|
2257
|
+
vo.dgTipMode = ''
|
|
2258
|
+
|
|
2259
|
+
//dragItem
|
|
2260
|
+
vo.dragItem(msg.startInd, msg.endInd, modeDir, modeInsert)
|
|
2261
|
+
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
},
|
|
2265
|
+
|
|
2266
|
+
// dragInit: function() {
|
|
2267
|
+
// // console.log('methods dragInit')
|
|
2268
|
+
|
|
2269
|
+
// let vo = this
|
|
2270
|
+
|
|
2271
|
+
// function isBelong(arEnter, arSelf) {
|
|
2272
|
+
// function isArrayOverlap(ar1, ar2) {
|
|
2273
|
+
|
|
2274
|
+
// //n
|
|
2275
|
+
// let n = min([size(ar1), size(ar2)])
|
|
2276
|
+
|
|
2277
|
+
// //先截成同長度陣列, 為共有父層資訊
|
|
2278
|
+
// let tr1 = take(ar1, n)
|
|
2279
|
+
// let tr2 = take(ar2, n)
|
|
2280
|
+
|
|
2281
|
+
// //isEqual
|
|
2282
|
+
// let b = isEqual(tr1, tr2)
|
|
2283
|
+
|
|
2284
|
+
// return b
|
|
2285
|
+
// }
|
|
2286
|
+
// if (size(arEnter) >= size(arSelf)) { //若enter要為self的子節點, 其enter size會大於等於 self size
|
|
2287
|
+
// return isArrayOverlap(arEnter, arSelf) //若有共同父層資訊, 就代表enter為self的子節點
|
|
2288
|
+
// }
|
|
2289
|
+
// return false
|
|
2290
|
+
// }
|
|
2291
|
+
|
|
2292
|
+
// async function core() {
|
|
2293
|
+
|
|
2294
|
+
// //check
|
|
2295
|
+
// if (!vo.draggable) {
|
|
2296
|
+
// return
|
|
2297
|
+
// }
|
|
2298
|
+
|
|
2299
|
+
// //wait $el
|
|
2300
|
+
// await waitFun(() => {
|
|
2301
|
+
// return vo.$el !== undefined
|
|
2302
|
+
// })
|
|
2303
|
+
|
|
2304
|
+
// //check
|
|
2305
|
+
// if (!vo.$refs.wdl) {
|
|
2306
|
+
// return
|
|
2307
|
+
// }
|
|
2308
|
+
|
|
2309
|
+
// //check
|
|
2310
|
+
// if (vo.drag !== null) {
|
|
2311
|
+
// vo.dragClear()
|
|
2312
|
+
// }
|
|
2313
|
+
|
|
2314
|
+
// //domDrag
|
|
2315
|
+
// let drag = domDrag(vo.$el, {
|
|
2316
|
+
// attIndex: 'dragindex',
|
|
2317
|
+
// attGroup: 'draggroup',
|
|
2318
|
+
// selectors: '[dragtag]',
|
|
2319
|
+
// // previewOpacity: 0.4,
|
|
2320
|
+
// // previewBorderWidth: 1,
|
|
2321
|
+
// // previewBorderColor: '#f26',
|
|
2322
|
+
// // previewBackground: '#fff',
|
|
2323
|
+
// previewOpacity: vo.dgPreviewOpacity,
|
|
2324
|
+
// previewBorderWidth: vo.dgPreviewBorderWidth,
|
|
2325
|
+
// previewBorderColor: vo.dgPreviewBorderColor,
|
|
2326
|
+
// previewBackground: vo.dgPreviewBackground,
|
|
2327
|
+
// })
|
|
2328
|
+
// drag.on('change', (msg) => {
|
|
2329
|
+
// // console.log('onchange', msg)
|
|
2330
|
+
// })
|
|
2331
|
+
// drag.on('move', (msg) => {
|
|
2332
|
+
// // console.log('move', msg)
|
|
2333
|
+
|
|
2334
|
+
// //rows
|
|
2335
|
+
// let rows = gm.get(vo.mmkey)
|
|
2336
|
+
// // console.log('rows', JSON.parse(JSON.stringify(rows)))
|
|
2337
|
+
|
|
2338
|
+
// //itemSelf, itemEnter
|
|
2339
|
+
// let itemSelf = rows[msg.startInd]
|
|
2340
|
+
// let itemEnter = rows[msg.endInd]
|
|
2341
|
+
// // console.log('itemSelf', itemSelf, msg.startInd, itemSelf.item.nk)
|
|
2342
|
+
// // console.log('itemEnter', itemEnter, msg.endInd, itemEnter.item.nk)
|
|
2343
|
+
|
|
2344
|
+
// //belong
|
|
2345
|
+
// let belong = isBelong(itemEnter.item.nk, itemSelf.item.nk)
|
|
2346
|
+
// // console.log('belong', belong)
|
|
2347
|
+
|
|
2348
|
+
// //ele, 因WDynamicList會重新封裝按需顯示, 故顯示拖曳指標區為上2層的父節點, 取top才會正確
|
|
2349
|
+
// let ele = get(msg, `endEle.parentNode.parentNode`)
|
|
2350
|
+
|
|
2351
|
+
// //location
|
|
2352
|
+
// vo.dgTipTop = cdbl(replace(ele.style.top, 'px', ''))
|
|
2353
|
+
// vo.dgTipLeft = cdbl(replace(ele.style.left, 'px', ''))
|
|
2354
|
+
// vo.dgTipWidth = ele.offsetWidth
|
|
2355
|
+
// vo.dgTipHeight = ele.offsetHeight
|
|
2356
|
+
|
|
2357
|
+
// //dgTipMode
|
|
2358
|
+
// if (belong) {
|
|
2359
|
+
// vo.dgTipMode = 'disabled'
|
|
2360
|
+
// }
|
|
2361
|
+
// else if (msg.ry <= 0.3) {
|
|
2362
|
+
// vo.dgTipMode = 'lineTop'
|
|
2363
|
+
// }
|
|
2364
|
+
// else if (msg.ry >= 0.7) {
|
|
2365
|
+
// vo.dgTipMode = 'lineBottom'
|
|
2366
|
+
// }
|
|
2367
|
+
// else if (msg.ry > 0.3 && msg.ry < 0.7) {
|
|
2368
|
+
// vo.dgTipMode = 'block'
|
|
2369
|
+
// }
|
|
2370
|
+
// else {
|
|
2371
|
+
// //不會有此狀況
|
|
2372
|
+
// vo.dgTipMode = ''
|
|
2373
|
+
// }
|
|
2374
|
+
|
|
2375
|
+
// })
|
|
2376
|
+
// drag.on('enter', (msg) => {
|
|
2377
|
+
// //console.log('enter', msg)
|
|
2378
|
+
// })
|
|
2379
|
+
// drag.on('leave', (msg) => {
|
|
2380
|
+
// //console.log('leave', msg)
|
|
2381
|
+
// vo.dgTipMode = ''
|
|
2382
|
+
// })
|
|
2383
|
+
// drag.on('drop', (msg) => {
|
|
2384
|
+
// // console.log('ondrop', msg.startInd, msg.endInd)
|
|
2385
|
+
|
|
2386
|
+
// //check, 拖曳至原始拖曳項目上, 無有效拖曳模式
|
|
2387
|
+
// if (msg.startInd === msg.endInd) {
|
|
2388
|
+
// vo.dgTipMode = ''
|
|
2389
|
+
// return
|
|
2390
|
+
// }
|
|
2391
|
+
|
|
2392
|
+
// //check, 多層組件觸發時可能會因leave觸發導致dgTipMode=''
|
|
2393
|
+
// if (vo.dgTipMode === '') {
|
|
2394
|
+
// return
|
|
2395
|
+
// }
|
|
2396
|
+
|
|
2397
|
+
// //modeDir
|
|
2398
|
+
// let modeDir
|
|
2399
|
+
// if (msg.startInd < msg.endInd) {
|
|
2400
|
+
// modeDir = 'backward'
|
|
2401
|
+
// }
|
|
2402
|
+
// else if (msg.startInd > msg.endInd) {
|
|
2403
|
+
// modeDir = 'forward'
|
|
2404
|
+
// }
|
|
2405
|
+
// else {
|
|
2406
|
+
// throw new Error('invalid modeDir')
|
|
2407
|
+
// }
|
|
2408
|
+
// // console.log('modeDir', modeDir)
|
|
2409
|
+
|
|
2410
|
+
// //modeInsert
|
|
2411
|
+
// let modeInsert
|
|
2412
|
+
// if (vo.dgTipMode === 'disabled') {
|
|
2413
|
+
// vo.dgTipMode = ''
|
|
2414
|
+
// }
|
|
2415
|
+
// else if (vo.dgTipMode === 'lineTop') {
|
|
2416
|
+
// modeInsert = 'before'
|
|
2417
|
+
// }
|
|
2418
|
+
// else if (vo.dgTipMode === 'lineBottom') {
|
|
2419
|
+
// modeInsert = 'after'
|
|
2420
|
+
// }
|
|
2421
|
+
// else if (vo.dgTipMode === 'block') {
|
|
2422
|
+
// modeInsert = 'belongto'
|
|
2423
|
+
// }
|
|
2424
|
+
// else {
|
|
2425
|
+
// console.log('dgTipMode', vo.dgTipMode)
|
|
2426
|
+
// throw new Error('invalid dgTipMode')
|
|
2427
|
+
// }
|
|
2428
|
+
// // console.log('modeInsert', modeInsert)
|
|
2429
|
+
|
|
2430
|
+
// //check, 純點擊時無move, 或拖曳至禁止對象內(通常是拖入自己子節點內)
|
|
2431
|
+
// if (vo.dgTipMode === '') {
|
|
2432
|
+
// return
|
|
2433
|
+
// }
|
|
2434
|
+
|
|
2435
|
+
// //clear, 已由dgTipMode換算出modeInsert, 拖曳完需清除dgTipMode使拖曳時指示對象隱藏
|
|
2436
|
+
// vo.dgTipMode = ''
|
|
2437
|
+
|
|
2438
|
+
// //dragItem
|
|
2439
|
+
// vo.dragItem(msg.startInd, msg.endInd, modeDir, modeInsert)
|
|
2440
|
+
|
|
2441
|
+
// })
|
|
2442
|
+
|
|
2443
|
+
// //save
|
|
2444
|
+
// vo.drag = drag
|
|
2445
|
+
|
|
2446
|
+
// }
|
|
2447
|
+
|
|
2448
|
+
// //$nextTick, 因value變更時需驅動dom更新, 才能使domDrag抓到元素, 故需延遲執行
|
|
2449
|
+
// vo.$nextTick(() => {
|
|
2450
|
+
|
|
2451
|
+
// //core
|
|
2452
|
+
// core()
|
|
2453
|
+
// .catch(() => {})
|
|
2454
|
+
|
|
2455
|
+
// })
|
|
2456
|
+
|
|
2457
|
+
// },
|
|
2458
|
+
|
|
2459
|
+
// dragClear: function() {
|
|
2460
|
+
// //console.log('methods dragClear')
|
|
2461
|
+
|
|
2462
|
+
// let vo = this
|
|
2463
|
+
|
|
2464
|
+
// //clear
|
|
2465
|
+
// if (vo.drag) {
|
|
2466
|
+
// vo.drag.clear()
|
|
2467
|
+
// vo.drag = null
|
|
2468
|
+
// }
|
|
2469
|
+
|
|
2470
|
+
// },
|
|
2471
|
+
|
|
2472
|
+
clickOperateItem: function(msg) {
|
|
2473
|
+
// console.log('clickOperateItem', msg)
|
|
2474
|
+
|
|
2475
|
+
let vo = this
|
|
2476
|
+
|
|
2477
|
+
//add operateItem function and set from lodash
|
|
2478
|
+
msg.operateItem = vo.operateItem
|
|
2479
|
+
|
|
2480
|
+
//emit
|
|
2481
|
+
vo.$emit('click-operate-item', msg)
|
|
2482
|
+
|
|
2483
|
+
},
|
|
2484
|
+
|
|
2485
|
+
setDataByPathAndValue: function(data, path, value) {
|
|
2486
|
+
// console.log('setDataByPathAndValue', data, path, value)
|
|
2487
|
+
|
|
2488
|
+
let vo = this
|
|
2489
|
+
|
|
2490
|
+
//set
|
|
2491
|
+
set(data, path, value)
|
|
2492
|
+
|
|
2493
|
+
//setData
|
|
2494
|
+
vo.setData(data)
|
|
2495
|
+
|
|
2496
|
+
},
|
|
2497
|
+
|
|
2498
|
+
},
|
|
2499
|
+
}
|
|
2500
|
+
</script>
|
|
2501
|
+
|
|
2502
|
+
<style scoped>
|
|
2503
|
+
</style>
|
|
2504
|
+
|