@sdata/web-vue 1.11.1 → 1.12.0
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/dist/sd.css +177 -6
- package/dist/sd.min.css +1 -1
- package/es/_components/select-view/style/index.css +13 -6
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +2 -2
- package/es/_hooks/use-allow-search.d.ts +10 -0
- package/es/_hooks/use-allow-search.js +31 -0
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.js +7 -1
- package/es/_utils/dom.js +1 -1
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_utils/vue-utils.js +4 -18
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_lang.js +31 -3
- package/es/alert/alert.vue_vue_type_script_lang.js +55 -0
- package/es/anchor/anchor-link.vue_vue_type_script_lang.js +8 -0
- package/es/anchor/anchor.vue_vue_type_script_lang.js +32 -0
- package/es/auto-complete/auto-complete.js +102 -0
- package/es/avatar/avatar-group.js +31 -0
- package/es/avatar/avatar.vue_vue_type_script_lang.js +51 -1
- package/es/back-top/back-top.vue_vue_type_script_lang.js +16 -0
- package/es/badge/badge.js +34 -1
- package/es/breadcrumb/breadcrumb-item.js +27 -0
- package/es/breadcrumb/breadcrumb.js +39 -0
- package/es/button/button-group.vue_vue_type_script_lang.js +22 -0
- package/es/button/button.vue_vue_type_script_lang.js +58 -1
- package/es/calendar/calendar.js +47 -0
- package/es/calendar/month.js +1 -1
- package/es/calendar/year.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_lang.js +6 -1
- package/es/card/card-meta.js +23 -0
- package/es/card/card.js +54 -0
- package/es/carousel/carousel.js +68 -1
- package/es/cascader/cascader-panel.js +2 -28
- package/es/cascader/cascader-panel.vue.d.ts +24 -306
- package/es/cascader/{cascader-panel.vue_vue_type_script_lang.js → cascader-panel.vue_vue_type_script_setup_true_lang.js} +92 -101
- package/es/cascader/cascader.js +2 -145
- package/es/cascader/cascader.vue.d.ts +53 -1289
- package/es/cascader/{cascader.vue_vue_type_script_lang.js → cascader.vue_vue_type_script_setup_true_lang.js} +236 -172
- package/es/cascader/index.d.ts +4 -2986
- package/es/cascader/types.d.ts +79 -0
- package/es/checkbox/checkbox-group.js +48 -0
- package/es/checkbox/checkbox.js +35 -0
- package/es/collapse/collapse-item.js +36 -0
- package/es/collapse/collapse.vue_vue_type_script_lang.js +47 -0
- package/es/color-picker/color-picker.js +90 -1
- package/es/color-picker/panel.js +5 -2
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.js +47 -1
- package/es/components.d.ts +132 -127
- package/es/config-provider/config-provider.vue.d.ts +9 -0
- package/es/config-provider/config-provider.vue_vue_type_script_lang.js +72 -1
- package/es/config-provider/context.d.ts +1 -0
- package/es/config-provider/index.d.ts +15 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.js +5 -0
- package/es/copy/copy.vue.d.ts +15 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +95 -0
- package/es/copy/index.d.ts +15 -0
- package/es/copy/index.js +10 -0
- package/es/copy/style/css.js +2 -0
- package/es/copy/style/index.css +25 -0
- package/es/copy/style/index.d.ts +2 -0
- package/es/copy/style/index.js +2 -0
- package/es/copy/style/index.scss +15 -0
- package/es/copy/style/token.scss +3 -0
- package/es/copy/types.d.ts +21 -0
- package/es/cropper/cropper.js +5 -0
- package/es/cropper/cropper.vue.d.ts +45 -0
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +266 -0
- package/es/cropper/index.d.ts +130 -0
- package/es/cropper/index.js +10 -0
- package/es/cropper/interface.d.ts +59 -0
- package/es/cropper/style/css.js +2 -0
- package/es/cropper/style/index.css +51 -0
- package/es/cropper/style/index.d.ts +2 -0
- package/es/cropper/style/index.js +2 -0
- package/es/cropper/style/index.scss +43 -0
- package/es/cropper/style/token.scss +8 -0
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +54 -576
- package/es/date-picker/panels/date/index.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/footer.vue.d.ts +55 -577
- package/es/date-picker/panels/footer.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/month/index.js +1 -1
- package/es/date-picker/panels/quarter/index.js +1 -1
- package/es/date-picker/panels/year/index.js +1 -1
- package/es/date-picker/picker-panel.vue.d.ts +54 -576
- package/es/date-picker/picker.js +1 -1
- package/es/date-picker/picker.vue.d.ts +54 -576
- package/es/date-picker/picker.vue_vue_type_script_lang.js +193 -1
- package/es/date-picker/pickers/date-picker.js +42 -0
- package/es/date-picker/pickers/month-picker.js +12 -0
- package/es/date-picker/pickers/quarter-picker.js +17 -0
- package/es/date-picker/pickers/week-picker.js +23 -0
- package/es/date-picker/pickers/year-picker.js +12 -0
- package/es/date-picker/range-picker-panel.vue.d.ts +54 -576
- package/es/date-picker/range-picker-panel.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/range-picker.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +54 -576
- package/es/date-picker/range-picker.vue_vue_type_script_lang.js +120 -1
- package/es/descriptions/descriptions-item.vue_vue_type_script_lang.js +16 -0
- package/es/descriptions/descriptions.js +65 -1
- package/es/divider/divider.js +24 -0
- package/es/drawer/drawer.vue_vue_type_script_lang.js +161 -2
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_lang.js +70 -0
- package/es/dropdown/dropdown-group.vue_vue_type_script_lang.js +12 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_lang.js +20 -1
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_lang.js +57 -0
- package/es/dropdown/dropdown.vue_vue_type_script_lang.js +55 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +25 -2
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +24 -1
- package/es/empty/empty.js +18 -0
- package/es/form/form-item.vue_vue_type_script_lang.js +146 -3
- package/es/form/form.vue_vue_type_script_lang.js +108 -0
- package/es/grid/grid-col.vue_vue_type_script_lang.js +42 -1
- package/es/grid/grid-item.vue_vue_type_script_lang.js +13 -1
- package/es/grid/grid-row.vue_vue_type_script_lang.js +21 -0
- package/es/grid/grid.vue_vue_type_script_lang.js +20 -0
- package/es/icon.js +5 -5
- package/es/image/image.js +1 -1
- package/es/image/image.vue_vue_type_script_lang.js +82 -0
- package/es/image/preview-action.js +8 -0
- package/es/image/preview-group.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_lang.js +48 -0
- package/es/image/preview-toolbar.vue_vue_type_script_lang.js +1 -0
- package/es/image/preview.vue_vue_type_script_lang.js +56 -1
- package/es/index.css +177 -6
- package/es/index.d.ts +9 -1
- package/es/index.js +6 -2
- package/es/index.scss +4 -0
- package/es/input/input-password.vue_vue_type_script_lang.js +13 -0
- package/es/input/input-search.js +35 -1
- package/es/input/input.js +129 -1
- package/es/input-number/index.d.ts +35 -23
- package/es/input-number/input-number.d.ts +19 -10
- package/es/input-number/input-number.js +205 -23
- package/es/input-tag/input-tag.js +137 -1
- package/es/input-tag/style/index.css +13 -6
- package/es/input-tag/utils.js +1 -1
- package/es/layout/content.js +5 -0
- package/es/layout/footer.js +5 -0
- package/es/layout/header.js +5 -0
- package/es/layout/layout.vue_vue_type_script_lang.js +6 -1
- package/es/layout/sider.vue_vue_type_script_lang.js +46 -0
- package/es/link/index.d.ts +44 -564
- package/es/link/interface.d.ts +15 -0
- package/es/link/link.js +2 -17
- package/es/link/link.vue.d.ts +31 -286
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +112 -0
- package/es/link/style/index.css +6 -0
- package/es/link/style/index.scss +10 -0
- package/es/list/list-item-meta.vue_vue_type_script_lang.js +23 -0
- package/es/list/list-item.js +21 -1
- package/es/list/list.js +104 -2
- package/es/mention/mention.js +87 -1
- package/es/menu/base-menu.vue_vue_type_script_lang.js +102 -0
- package/es/menu/item-group.vue_vue_type_script_lang.js +11 -1
- package/es/menu/item.d.ts +1 -1
- package/es/menu/item.js +13 -2
- package/es/menu/menu.js +2 -1
- package/es/menu/sub-menu-pop.vue.d.ts +1 -1
- package/es/menu/sub-menu.js +40 -1
- package/es/message/index.js +1 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_lang.js +193 -2
- package/es/notification/index.js +1 -1
- package/es/overflow-list/overflow-list.js +25 -1
- package/es/page-header/page-header.vue_vue_type_script_lang.js +38 -0
- package/es/pagination/page-jumper.vue.d.ts +35 -22
- package/es/pagination/pagination.js +122 -0
- package/es/popconfirm/popconfirm.vue_vue_type_script_lang.js +95 -1
- package/es/popover/popover.vue_vue_type_script_lang.js +62 -0
- package/es/progress/line.vue_vue_type_script_lang.js +1 -1
- package/es/progress/progress.vue_vue_type_script_lang.js +48 -0
- package/es/radio/radio-group.js +53 -0
- package/es/radio/radio.js +36 -0
- package/es/rate/rate.js +54 -0
- package/es/resize-box/resize-box.vue_vue_type_script_lang.js +47 -1
- package/es/result/result.vue_vue_type_script_lang.js +40 -0
- package/es/scrollbar/scrollbar.vue_vue_type_script_lang.js +108 -2
- package/es/sd-vue.js +10 -2
- package/es/secret/index.d.ts +48 -0
- package/es/secret/index.js +10 -0
- package/es/secret/secret.js +5 -0
- package/es/secret/secret.vue.d.ts +17 -0
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +64 -0
- package/es/secret/style/css.js +2 -0
- package/es/secret/style/index.css +54 -0
- package/es/secret/style/index.d.ts +2 -0
- package/es/secret/style/index.js +2 -0
- package/es/secret/style/index.scss +48 -0
- package/es/secret/style/token.scss +9 -0
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/optgroup.vue_vue_type_script_lang.js +12 -1
- package/es/select/option.vue_vue_type_script_lang.js +27 -0
- package/es/select/select.js +8 -6
- package/es/select/utils.js +1 -1
- package/es/skeleton/line.vue_vue_type_script_lang.js +16 -0
- package/es/skeleton/shape.vue_vue_type_script_lang.js +10 -0
- package/es/skeleton/skeleton.vue_vue_type_script_lang.js +8 -0
- package/es/slider/index.d.ts +66 -42
- package/es/slider/slider-input.vue.d.ts +33 -21
- package/es/slider/slider.vue.d.ts +33 -21
- package/es/slider/slider.vue_vue_type_script_lang.js +55 -0
- package/es/space/space.js +27 -0
- package/es/spin/spin.js +35 -0
- package/es/split/split.vue_vue_type_script_lang.js +62 -1
- package/es/statistic/countdown.vue_vue_type_script_lang.js +36 -1
- package/es/statistic/statistic.vue_vue_type_script_lang.js +74 -0
- package/es/steps/step.vue_vue_type_script_lang.js +36 -0
- package/es/steps/steps.vue_vue_type_script_lang.js +47 -0
- package/es/switch/switch.vue_vue_type_script_lang.js +98 -1
- package/es/table/table-column.js +115 -0
- package/es/table/table-operation-td.js +1 -1
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-td.js +1 -1
- package/es/table/table-th.js +1 -1
- package/es/table/table.js +442 -3
- package/es/table/utils.js +1 -1
- package/es/tabs/tab-pane.vue_vue_type_script_lang.js +23 -1
- package/es/tabs/tabs.js +104 -0
- package/es/tag/index.d.ts +29237 -74
- package/es/tag/interface.d.ts +9 -1
- package/es/tag/style/index.css +13 -6
- package/es/tag/style/index.scss +16 -4
- package/es/tag/tag.js +26 -5
- package/es/tag/tag.vue.d.ts +11688 -7
- package/es/tag/tag.vue_vue_type_script_lang.js +139 -3
- package/es/tag-group/index.d.ts +64 -0
- package/es/tag-group/index.js +10 -0
- package/es/tag-group/interface.d.ts +18 -0
- package/es/tag-group/style/css.js +2 -0
- package/es/tag-group/style/index.css +92 -0
- package/es/tag-group/style/index.d.ts +2 -0
- package/es/tag-group/style/index.js +2 -0
- package/es/tag-group/style/index.scss +108 -0
- package/es/tag-group/style/token.scss +6 -0
- package/es/tag-group/tag-group.js +5 -0
- package/es/tag-group/tag-group.vue.d.ts +46 -0
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +360 -0
- package/es/textarea/textarea.vue_vue_type_script_lang.js +90 -1
- package/es/time-picker/range-panel.js +1 -1
- package/es/time-picker/time-picker.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_lang.js +132 -0
- package/es/timeline/item.vue_vue_type_script_lang.js +38 -1
- package/es/timeline/timeline.js +28 -0
- package/es/tooltip/tooltip.vue_vue_type_script_lang.js +61 -1
- package/es/transfer/transfer.vue_vue_type_script_lang.js +136 -0
- package/es/tree/base-node.vue_vue_type_script_lang.js +7 -0
- package/es/tree/node.js +1 -1
- package/es/tree/tree.vue_vue_type_script_lang.js +287 -2
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.js +1 -1
- package/es/tree-select/tree-select.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_lang.js +281 -8
- package/es/trigger/trigger.js +161 -1
- package/es/trigger/utils.js +1 -1
- package/es/typography/base.d.ts +7 -0
- package/es/typography/base.js +127 -3
- package/es/typography/interface.d.ts +2 -0
- package/es/typography/operations.js +30 -0
- package/es/typography/paragraph.js +8 -0
- package/es/typography/title.js +6 -1
- package/es/upload/upload.js +279 -2
- package/es/verification-code/verification-code.js +59 -0
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/watermark.js +58 -1
- package/es/web-vue.css +24 -24
- package/json/vetur-attributes.json +134 -218
- package/json/vetur-tags.json +58 -67
- package/json/web-types.json +304 -493
- package/package.json +9 -7
- package/es/_utils/clipboard.d.ts +0 -1
- package/es/_utils/clipboard.js +0 -35
- package/es/link/link.vue_vue_type_script_lang.js +0 -56
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
|
+
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import resize_observer_default from "../_components/resize-observer.js";
|
|
4
|
+
import Popover from "../popover/index.js";
|
|
5
|
+
import Ellipsis from "../ellipsis/index.js";
|
|
6
|
+
import Tag from "../tag/index.js";
|
|
7
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
|
|
8
|
+
import { createReusableTemplate } from "@vueuse/core";
|
|
9
|
+
import { isFunction, isString } from "es-toolkit";
|
|
10
|
+
import { isNumber as isNumber$1 } from "es-toolkit/compat";
|
|
11
|
+
//#region components/tag-group/tag-group.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var OVERFLOW_COUNTER_VALUE = "__sd_tag_group_more__";
|
|
13
|
+
var tag_group_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TagGroup" }), {}, {
|
|
14
|
+
__name: "tag-group",
|
|
15
|
+
props: {
|
|
16
|
+
maxCount: { default: "responsive" },
|
|
17
|
+
options: { default: () => [] },
|
|
18
|
+
fieldNames: { default: () => ({}) }
|
|
19
|
+
},
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
useSlots();
|
|
23
|
+
const prefixCls = getPrefixCls("tag-group");
|
|
24
|
+
const innerRef = ref();
|
|
25
|
+
const measureRef = ref();
|
|
26
|
+
const responsiveVisibleCount = ref(null);
|
|
27
|
+
const responsiveItemMaxWidth = ref(0);
|
|
28
|
+
const [DefineTagGroupItem, ReuseTagGroupItem] = createReusableTemplate();
|
|
29
|
+
const [DefineTagGroupCounter, ReuseTagGroupCounter] = createReusableTemplate();
|
|
30
|
+
const isResponsiveMaxCount = computed(() => props.maxCount === "responsive");
|
|
31
|
+
const cls = computed(() => [prefixCls, {
|
|
32
|
+
[`${prefixCls}-responsive`]: isResponsiveMaxCount.value,
|
|
33
|
+
[`${prefixCls}-empty`]: props.options.length === 0
|
|
34
|
+
}]);
|
|
35
|
+
function resolveOptionField(option, field, fallbackField) {
|
|
36
|
+
var _optionRecord$field;
|
|
37
|
+
return (_optionRecord$field = option[field]) !== null && _optionRecord$field !== void 0 ? _optionRecord$field : option[fallbackField];
|
|
38
|
+
}
|
|
39
|
+
function normalizeItemProps(option, labelField, valueField) {
|
|
40
|
+
if (option.itemProps && typeof option.itemProps === "object" && !Array.isArray(option.itemProps)) return option.itemProps;
|
|
41
|
+
return Object.fromEntries(Object.entries(option).filter(([key]) => key !== labelField && key !== valueField && key !== "itemProps"));
|
|
42
|
+
}
|
|
43
|
+
function normalizeOption(option, index) {
|
|
44
|
+
const { label = "label", value = "value" } = props.fieldNames;
|
|
45
|
+
if (isString(option) || isNumber$1(option)) return {
|
|
46
|
+
key: `${String(option)}-${index}`,
|
|
47
|
+
label: option,
|
|
48
|
+
value: option,
|
|
49
|
+
raw: {
|
|
50
|
+
label: option,
|
|
51
|
+
value: option
|
|
52
|
+
},
|
|
53
|
+
itemProps: {},
|
|
54
|
+
isCounter: false,
|
|
55
|
+
hiddenCount: 0
|
|
56
|
+
};
|
|
57
|
+
const normalizedLabel = resolveOptionField(option, label, "label");
|
|
58
|
+
const normalizedValue = resolveOptionField(option, value, "value");
|
|
59
|
+
return {
|
|
60
|
+
key: `${String(normalizedValue)}-${index}`,
|
|
61
|
+
label: isFunction(normalizedLabel) ? normalizedLabel() : normalizedLabel,
|
|
62
|
+
value: normalizedValue,
|
|
63
|
+
raw: _objectSpread2(_objectSpread2({}, option), {}, {
|
|
64
|
+
label: normalizedLabel,
|
|
65
|
+
value: normalizedValue
|
|
66
|
+
}),
|
|
67
|
+
itemProps: normalizeItemProps(option, label, value),
|
|
68
|
+
isCounter: false,
|
|
69
|
+
hiddenCount: 0
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function createOverflowOption(hiddenCount) {
|
|
73
|
+
const label = `+${hiddenCount}`;
|
|
74
|
+
return {
|
|
75
|
+
key: `${OVERFLOW_COUNTER_VALUE}-${hiddenCount}`,
|
|
76
|
+
label,
|
|
77
|
+
value: `${OVERFLOW_COUNTER_VALUE}-${hiddenCount}`,
|
|
78
|
+
raw: {
|
|
79
|
+
label,
|
|
80
|
+
value: `${OVERFLOW_COUNTER_VALUE}-${hiddenCount}`
|
|
81
|
+
},
|
|
82
|
+
itemProps: { closable: false },
|
|
83
|
+
isCounter: true,
|
|
84
|
+
hiddenCount
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const normalizedOptions = computed(() => props.options.map((option, index) => normalizeOption(option, index)));
|
|
88
|
+
const visibleCount = computed(() => {
|
|
89
|
+
if (isResponsiveMaxCount.value) {
|
|
90
|
+
var _responsiveVisibleCou;
|
|
91
|
+
if (!normalizedOptions.value.length) return 0;
|
|
92
|
+
return Math.min(normalizedOptions.value.length, Math.max(1, (_responsiveVisibleCou = responsiveVisibleCount.value) !== null && _responsiveVisibleCou !== void 0 ? _responsiveVisibleCou : normalizedOptions.value.length));
|
|
93
|
+
}
|
|
94
|
+
if (typeof props.maxCount === "number" && props.maxCount > 0) return Math.min(props.maxCount, normalizedOptions.value.length);
|
|
95
|
+
return normalizedOptions.value.length;
|
|
96
|
+
});
|
|
97
|
+
const visibleOptions = computed(() => normalizedOptions.value.slice(0, visibleCount.value));
|
|
98
|
+
const hiddenOptions = computed(() => normalizedOptions.value.slice(visibleCount.value));
|
|
99
|
+
const overflowOption = computed(() => createOverflowOption(hiddenOptions.value.length));
|
|
100
|
+
const measureCounterOptions = computed(() => Array.from({ length: Math.max(normalizedOptions.value.length - 1, 0) }, (_, index) => createOverflowOption(index + 1)));
|
|
101
|
+
function resolveOptionLabel(option) {
|
|
102
|
+
if (option.isCounter) return option.label;
|
|
103
|
+
const label = option.raw.label;
|
|
104
|
+
return isFunction(label) ? label() : option.label;
|
|
105
|
+
}
|
|
106
|
+
function getOuterWidth(element) {
|
|
107
|
+
if (!element) return 0;
|
|
108
|
+
const style = window.getComputedStyle(element);
|
|
109
|
+
const marginLeft = Number.parseFloat(style.marginLeft || "0") || 0;
|
|
110
|
+
const marginRight = Number.parseFloat(style.marginRight || "0") || 0;
|
|
111
|
+
return element.offsetWidth + marginLeft + marginRight;
|
|
112
|
+
}
|
|
113
|
+
function getCounterWidth(hiddenCount) {
|
|
114
|
+
if (!measureRef.value || hiddenCount <= 0) return 0;
|
|
115
|
+
return getOuterWidth(measureRef.value.querySelector(`[data-hidden-count="${hiddenCount}"]`));
|
|
116
|
+
}
|
|
117
|
+
function setResponsiveState(visibleCount, itemMaxWidth = 0) {
|
|
118
|
+
responsiveVisibleCount.value = visibleCount;
|
|
119
|
+
responsiveItemMaxWidth.value = itemMaxWidth;
|
|
120
|
+
}
|
|
121
|
+
function findResponsiveState(totalItems, itemWidths, availableWidth) {
|
|
122
|
+
for (let candidate = totalItems; candidate >= 1; candidate -= 1) {
|
|
123
|
+
const hiddenCount = totalItems - candidate;
|
|
124
|
+
const counterWidth = getCounterWidth(hiddenCount);
|
|
125
|
+
const visibleWidth = itemWidths.slice(0, candidate).reduce((sum, width) => sum + width, 0);
|
|
126
|
+
if (hiddenCount === 0 && visibleWidth <= availableWidth) return {
|
|
127
|
+
visibleCount: candidate,
|
|
128
|
+
itemMaxWidth: 0
|
|
129
|
+
};
|
|
130
|
+
if (hiddenCount > 0 && candidate > 1 && visibleWidth + counterWidth <= availableWidth) return {
|
|
131
|
+
visibleCount: candidate,
|
|
132
|
+
itemMaxWidth: 0
|
|
133
|
+
};
|
|
134
|
+
if (hiddenCount > 0 && candidate === 1) {
|
|
135
|
+
const leadItemWidth = Math.max(availableWidth - counterWidth, 0);
|
|
136
|
+
if (leadItemWidth > 0) return {
|
|
137
|
+
visibleCount: 1,
|
|
138
|
+
itemMaxWidth: leadItemWidth
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
visibleCount: 1,
|
|
144
|
+
itemMaxWidth: Math.max(availableWidth - getCounterWidth(totalItems - 1), 0)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function syncResponsiveItems() {
|
|
148
|
+
if (!isResponsiveMaxCount.value) {
|
|
149
|
+
responsiveVisibleCount.value = null;
|
|
150
|
+
responsiveItemMaxWidth.value = 0;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const totalItems = normalizedOptions.value.length;
|
|
154
|
+
if (totalItems <= 1) {
|
|
155
|
+
setResponsiveState(totalItems);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const innerElement = innerRef.value;
|
|
159
|
+
const measureElement = measureRef.value;
|
|
160
|
+
if (!innerElement || !measureElement) {
|
|
161
|
+
setResponsiveState(totalItems);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
const availableWidth = Math.max(innerElement.clientWidth, 0);
|
|
165
|
+
if (availableWidth <= 0) {
|
|
166
|
+
setResponsiveState(1);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const responsiveState = findResponsiveState(totalItems, Array.from(measureElement.querySelectorAll("[data-measure-item=\"true\"]")).slice(0, totalItems).map(getOuterWidth), availableWidth);
|
|
170
|
+
setResponsiveState(responsiveState.visibleCount, responsiveState.itemMaxWidth);
|
|
171
|
+
}
|
|
172
|
+
function handleResize() {
|
|
173
|
+
nextTick(() => {
|
|
174
|
+
syncResponsiveItems();
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function isCompressedResponsiveItem(index, value) {
|
|
178
|
+
return isResponsiveMaxCount.value && !String(value).startsWith(OVERFLOW_COUNTER_VALUE) && hiddenOptions.value.length > 0 && index === 0 && responsiveItemMaxWidth.value > 0;
|
|
179
|
+
}
|
|
180
|
+
function getItemWrapperClass(option, measure) {
|
|
181
|
+
return [`${prefixCls}-item`, { [`${prefixCls}-item-measure`]: Boolean(measure) }];
|
|
182
|
+
}
|
|
183
|
+
function getCounterWrapperClass(measure) {
|
|
184
|
+
return [
|
|
185
|
+
`${prefixCls}-item`,
|
|
186
|
+
`${prefixCls}-item-counter`,
|
|
187
|
+
{ [`${prefixCls}-item-measure`]: Boolean(measure) }
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
function getItemWrapperStyle(option, index, measure) {
|
|
191
|
+
if (measure || !isCompressedResponsiveItem(index, option.value)) return;
|
|
192
|
+
return { maxWidth: `${responsiveItemMaxWidth.value}px` };
|
|
193
|
+
}
|
|
194
|
+
function getItemContentClass(option, index) {
|
|
195
|
+
return [`${prefixCls}-item-content`, { [`${prefixCls}-item-content-overflow`]: isCompressedResponsiveItem(index, option.value) }];
|
|
196
|
+
}
|
|
197
|
+
function getItemContentStyle(option, index) {
|
|
198
|
+
if (!isCompressedResponsiveItem(index, option.value)) return;
|
|
199
|
+
return { maxWidth: "100%" };
|
|
200
|
+
}
|
|
201
|
+
function getCounterContentClass() {
|
|
202
|
+
return `${prefixCls}-counter-content`;
|
|
203
|
+
}
|
|
204
|
+
onMounted(() => {
|
|
205
|
+
nextTick(() => {
|
|
206
|
+
syncResponsiveItems();
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
watch([normalizedOptions, () => props.maxCount], () => {
|
|
210
|
+
nextTick(() => {
|
|
211
|
+
syncResponsiveItems();
|
|
212
|
+
});
|
|
213
|
+
}, { deep: true });
|
|
214
|
+
return (_ctx, _cache) => {
|
|
215
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
216
|
+
createVNode(unref(DefineTagGroupItem), null, {
|
|
217
|
+
default: withCtx((slotProps) => [(openBlock(), createBlock(resolveDynamicComponent(slotProps.measure ? "span" : "li"), {
|
|
218
|
+
class: normalizeClass(getItemWrapperClass(slotProps.option, slotProps.measure)),
|
|
219
|
+
style: normalizeStyle(getItemWrapperStyle(slotProps.option, slotProps.index, slotProps.measure)),
|
|
220
|
+
"data-measure-item": slotProps.measure && !slotProps.option.isCounter ? "true" : void 0,
|
|
221
|
+
"data-hidden-count": slotProps.measure && slotProps.option.isCounter ? slotProps.hiddenCount : void 0
|
|
222
|
+
}, {
|
|
223
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "item", {
|
|
224
|
+
data: slotProps.option.raw,
|
|
225
|
+
option: slotProps.option.raw,
|
|
226
|
+
label: resolveOptionLabel(slotProps.option),
|
|
227
|
+
value: slotProps.option.value,
|
|
228
|
+
index: slotProps.index,
|
|
229
|
+
itemClass: getItemContentClass(slotProps.option, slotProps.index),
|
|
230
|
+
itemStyle: getItemContentStyle(slotProps.option, slotProps.index),
|
|
231
|
+
isOverflow: isCompressedResponsiveItem(slotProps.index, slotProps.option.value),
|
|
232
|
+
measure: Boolean(slotProps.measure)
|
|
233
|
+
}, () => [createVNode(unref(Tag), mergeProps(slotProps.option.itemProps, {
|
|
234
|
+
class: getItemContentClass(slotProps.option, slotProps.index),
|
|
235
|
+
style: getItemContentStyle(slotProps.option, slotProps.index),
|
|
236
|
+
visible: true,
|
|
237
|
+
nowrap: true
|
|
238
|
+
}), {
|
|
239
|
+
default: withCtx(() => [_ctx.$slots.label ? renderSlot(_ctx.$slots, "label", {
|
|
240
|
+
key: 0,
|
|
241
|
+
data: slotProps.option.raw,
|
|
242
|
+
option: slotProps.option.raw
|
|
243
|
+
}) : isCompressedResponsiveItem(slotProps.index, slotProps.option.value) ? (openBlock(), createBlock(unref(Ellipsis), {
|
|
244
|
+
key: 1,
|
|
245
|
+
class: normalizeClass(`${unref(prefixCls)}-item-ellipsis`)
|
|
246
|
+
}, {
|
|
247
|
+
default: withCtx(() => [createTextVNode(toDisplayString(resolveOptionLabel(slotProps.option)), 1)]),
|
|
248
|
+
_: 2
|
|
249
|
+
}, 1032, ["class"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(resolveOptionLabel(slotProps.option)), 1)], 64))]),
|
|
250
|
+
_: 2
|
|
251
|
+
}, 1040, ["class", "style"])])]),
|
|
252
|
+
_: 2
|
|
253
|
+
}, 1032, [
|
|
254
|
+
"class",
|
|
255
|
+
"style",
|
|
256
|
+
"data-measure-item",
|
|
257
|
+
"data-hidden-count"
|
|
258
|
+
]))]),
|
|
259
|
+
_: 3
|
|
260
|
+
}),
|
|
261
|
+
createVNode(unref(DefineTagGroupCounter), null, {
|
|
262
|
+
default: withCtx((slotProps) => [(openBlock(), createBlock(resolveDynamicComponent(slotProps.measure ? "span" : "li"), {
|
|
263
|
+
class: normalizeClass(getCounterWrapperClass(slotProps.measure)),
|
|
264
|
+
"data-hidden-count": slotProps.hiddenCount
|
|
265
|
+
}, {
|
|
266
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "counter", {
|
|
267
|
+
label: slotProps.option.label,
|
|
268
|
+
value: slotProps.option.value,
|
|
269
|
+
hiddenCount: slotProps.hiddenCount,
|
|
270
|
+
measure: Boolean(slotProps.measure),
|
|
271
|
+
counterClass: getCounterContentClass()
|
|
272
|
+
}, () => [createVNode(unref(Tag), mergeProps(slotProps.option.itemProps, {
|
|
273
|
+
class: getCounterContentClass(),
|
|
274
|
+
visible: true,
|
|
275
|
+
nowrap: true,
|
|
276
|
+
ellipsis: false
|
|
277
|
+
}), {
|
|
278
|
+
default: withCtx(() => [createTextVNode(toDisplayString(slotProps.option.label), 1)]),
|
|
279
|
+
_: 2
|
|
280
|
+
}, 1040, ["class"])])]),
|
|
281
|
+
_: 2
|
|
282
|
+
}, 1032, ["class", "data-hidden-count"]))]),
|
|
283
|
+
_: 3
|
|
284
|
+
}),
|
|
285
|
+
createElementVNode("span", { class: normalizeClass(cls.value) }, [normalizedOptions.value.length === 0 ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
286
|
+
isResponsiveMaxCount.value ? (openBlock(), createBlock(unref(resize_observer_default), {
|
|
287
|
+
key: 0,
|
|
288
|
+
onResize: handleResize
|
|
289
|
+
}, {
|
|
290
|
+
default: withCtx(() => [createElementVNode("span", {
|
|
291
|
+
class: normalizeClass(`${unref(prefixCls)}-resize-observer`),
|
|
292
|
+
"aria-hidden": "true"
|
|
293
|
+
}, null, 2)]),
|
|
294
|
+
_: 1
|
|
295
|
+
})) : createCommentVNode("", true),
|
|
296
|
+
createElementVNode("ul", {
|
|
297
|
+
ref_key: "innerRef",
|
|
298
|
+
ref: innerRef,
|
|
299
|
+
class: normalizeClass(`${unref(prefixCls)}-inner`)
|
|
300
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleOptions.value, (option, index) => {
|
|
301
|
+
return openBlock(), createBlock(unref(ReuseTagGroupItem), {
|
|
302
|
+
key: option.key,
|
|
303
|
+
option,
|
|
304
|
+
index,
|
|
305
|
+
"hidden-count": 0
|
|
306
|
+
}, null, 8, ["option", "index"]);
|
|
307
|
+
}), 128)), hiddenOptions.value.length > 0 ? (openBlock(), createBlock(unref(Popover), { key: 0 }, {
|
|
308
|
+
default: withCtx(() => [createVNode(unref(ReuseTagGroupCounter), {
|
|
309
|
+
option: overflowOption.value,
|
|
310
|
+
index: visibleOptions.value.length,
|
|
311
|
+
"hidden-count": hiddenOptions.value.length
|
|
312
|
+
}, null, 8, [
|
|
313
|
+
"option",
|
|
314
|
+
"index",
|
|
315
|
+
"hidden-count"
|
|
316
|
+
])]),
|
|
317
|
+
content: withCtx(() => [createElementVNode("ul", { class: normalizeClass(`${unref(prefixCls)}-popover`) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(hiddenOptions.value, (option, index) => {
|
|
318
|
+
return openBlock(), createBlock(unref(ReuseTagGroupItem), {
|
|
319
|
+
key: `hidden-${option.key}`,
|
|
320
|
+
option,
|
|
321
|
+
index: visibleOptions.value.length + index,
|
|
322
|
+
"hidden-count": 0
|
|
323
|
+
}, null, 8, ["option", "index"]);
|
|
324
|
+
}), 128))], 2)]),
|
|
325
|
+
_: 1
|
|
326
|
+
})) : createCommentVNode("", true)], 2),
|
|
327
|
+
isResponsiveMaxCount.value && normalizedOptions.value.length > 1 ? (openBlock(), createElementBlock("span", {
|
|
328
|
+
key: 1,
|
|
329
|
+
ref_key: "measureRef",
|
|
330
|
+
ref: measureRef,
|
|
331
|
+
class: normalizeClass(`${unref(prefixCls)}-measure`),
|
|
332
|
+
"aria-hidden": "true"
|
|
333
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option, index) => {
|
|
334
|
+
return openBlock(), createBlock(unref(ReuseTagGroupItem), {
|
|
335
|
+
key: `measure-${option.key}`,
|
|
336
|
+
option,
|
|
337
|
+
index,
|
|
338
|
+
"hidden-count": 0,
|
|
339
|
+
measure: true
|
|
340
|
+
}, null, 8, ["option", "index"]);
|
|
341
|
+
}), 128)), (openBlock(true), createElementBlock(Fragment, null, renderList(measureCounterOptions.value, (counterOption) => {
|
|
342
|
+
return openBlock(), createBlock(unref(ReuseTagGroupCounter), {
|
|
343
|
+
key: `counter-${counterOption.hiddenCount}`,
|
|
344
|
+
option: counterOption,
|
|
345
|
+
index: normalizedOptions.value.length,
|
|
346
|
+
"hidden-count": counterOption.hiddenCount,
|
|
347
|
+
measure: true
|
|
348
|
+
}, null, 8, [
|
|
349
|
+
"option",
|
|
350
|
+
"index",
|
|
351
|
+
"hidden-count"
|
|
352
|
+
]);
|
|
353
|
+
}), 128))], 2)) : createCommentVNode("", true)
|
|
354
|
+
], 64))], 2)
|
|
355
|
+
], 64);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
}));
|
|
359
|
+
//#endregion
|
|
360
|
+
export { tag_group_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import resize_observer_default from "../_components/resize-observer.js";
|
|
@@ -22,46 +22,123 @@ var textarea_vue_vue_type_script_lang_default = defineComponent({
|
|
|
22
22
|
},
|
|
23
23
|
inheritAttrs: false,
|
|
24
24
|
props: {
|
|
25
|
+
/**
|
|
26
|
+
* @zh 绑定值
|
|
27
|
+
* @en Value
|
|
28
|
+
* @vModel
|
|
29
|
+
*/
|
|
25
30
|
modelValue: String,
|
|
31
|
+
/**
|
|
32
|
+
* @zh 默认值(非受控状态)
|
|
33
|
+
* @en Default value (uncontrolled state)
|
|
34
|
+
*/
|
|
26
35
|
defaultValue: {
|
|
27
36
|
type: String,
|
|
28
37
|
default: ""
|
|
29
38
|
},
|
|
39
|
+
/**
|
|
40
|
+
* @zh 提示文字
|
|
41
|
+
* @en Placeholder
|
|
42
|
+
*/
|
|
30
43
|
placeholder: String,
|
|
44
|
+
/**
|
|
45
|
+
* @zh 是否禁用
|
|
46
|
+
* @en Whether to disable
|
|
47
|
+
*/
|
|
31
48
|
disabled: {
|
|
32
49
|
type: Boolean,
|
|
33
50
|
default: false
|
|
34
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* @zh 是否为错误状态
|
|
54
|
+
* @en Whether it is an error state
|
|
55
|
+
*/
|
|
35
56
|
error: {
|
|
36
57
|
type: Boolean,
|
|
37
58
|
default: false
|
|
38
59
|
},
|
|
60
|
+
/**
|
|
61
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
|
62
|
+
* @en Maximum length of input value, the errorOnly attribute was added in version 2.12.0
|
|
63
|
+
*/
|
|
39
64
|
maxLength: {
|
|
40
65
|
type: [Number, Object],
|
|
41
66
|
default: 0
|
|
42
67
|
},
|
|
68
|
+
/**
|
|
69
|
+
* @zh 是否显示字数统计
|
|
70
|
+
* @en Whether to display word count
|
|
71
|
+
*/
|
|
43
72
|
showWordLimit: {
|
|
44
73
|
type: Boolean,
|
|
45
74
|
default: false
|
|
46
75
|
},
|
|
76
|
+
/**
|
|
77
|
+
* @zh 是否允许清空文本域
|
|
78
|
+
* @en Whether to allow clearing the text
|
|
79
|
+
*/
|
|
47
80
|
allowClear: {
|
|
48
81
|
type: Boolean,
|
|
49
82
|
default: false
|
|
50
83
|
},
|
|
84
|
+
/**
|
|
85
|
+
* @zh 是否让文本框自适应内容高度
|
|
86
|
+
* @en Whether to make the textarea adapt to the height of the content
|
|
87
|
+
*/
|
|
51
88
|
autoSize: {
|
|
52
89
|
type: [Boolean, Object],
|
|
53
90
|
default: false
|
|
54
91
|
},
|
|
92
|
+
/**
|
|
93
|
+
* @zh 字符长度的计算方法
|
|
94
|
+
* @en Calculation method of word length
|
|
95
|
+
*/
|
|
55
96
|
wordLength: { type: Function },
|
|
97
|
+
/**
|
|
98
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
|
99
|
+
* @en Character interception method, used together with wordLength
|
|
100
|
+
* @version 2.12.0
|
|
101
|
+
*/
|
|
56
102
|
wordSlice: { type: Function },
|
|
103
|
+
/**
|
|
104
|
+
* @zh 透传给 textarea 的属性
|
|
105
|
+
* @en Attributes passed to textarea
|
|
106
|
+
*/
|
|
57
107
|
textareaAttrs: { type: Object }
|
|
58
108
|
},
|
|
59
109
|
emits: {
|
|
60
110
|
"update:modelValue": (_value) => true,
|
|
111
|
+
/**
|
|
112
|
+
* @zh 用户输入时触发
|
|
113
|
+
* @en Emitted when the user enters
|
|
114
|
+
* @param {string} value
|
|
115
|
+
* @param {Event} ev
|
|
116
|
+
*/
|
|
61
117
|
"input": (_value, _ev) => true,
|
|
118
|
+
/**
|
|
119
|
+
* @zh 仅在文本框失焦时触发
|
|
120
|
+
* @en Only emitted when the textarea is out of focus
|
|
121
|
+
* @param {string} value
|
|
122
|
+
* @param {Event} ev
|
|
123
|
+
*/
|
|
62
124
|
"change": (_value, _ev) => true,
|
|
125
|
+
/**
|
|
126
|
+
* @zh 点击清除按钮时触发
|
|
127
|
+
* @en Emitted when the clear button is clicked
|
|
128
|
+
* @param {MouseEvent} ev
|
|
129
|
+
*/
|
|
63
130
|
"clear": (_ev) => true,
|
|
131
|
+
/**
|
|
132
|
+
* @zh 文本框获取焦点时触发
|
|
133
|
+
* @en Emitted when the textarea gets focus
|
|
134
|
+
* @param {FocusEvent} ev
|
|
135
|
+
*/
|
|
64
136
|
"focus": (_ev) => true,
|
|
137
|
+
/**
|
|
138
|
+
* @zh 文本框失去焦点时触发
|
|
139
|
+
* @en Emitted when the textarea loses focus
|
|
140
|
+
* @param {FocusEvent} ev
|
|
141
|
+
*/
|
|
65
142
|
"blur": (_ev) => true
|
|
66
143
|
},
|
|
67
144
|
setup(props, { emit, attrs }) {
|
|
@@ -281,10 +358,22 @@ var textarea_vue_vue_type_script_lang_default = defineComponent({
|
|
|
281
358
|
};
|
|
282
359
|
},
|
|
283
360
|
methods: {
|
|
361
|
+
/**
|
|
362
|
+
* @zh 使输入框获取焦点
|
|
363
|
+
* @en Make the input box focus
|
|
364
|
+
* @public
|
|
365
|
+
* @version 2.24.0
|
|
366
|
+
*/
|
|
284
367
|
focus() {
|
|
285
368
|
var _this$$refs$textareaR;
|
|
286
369
|
(_this$$refs$textareaR = this.$refs.textareaRef) === null || _this$$refs$textareaR === void 0 || _this$$refs$textareaR.focus();
|
|
287
370
|
},
|
|
371
|
+
/**
|
|
372
|
+
* @zh 使输入框失去焦点
|
|
373
|
+
* @en Make the input box lose focus
|
|
374
|
+
* @public
|
|
375
|
+
* @version 2.24.0
|
|
376
|
+
*/
|
|
288
377
|
blur() {
|
|
289
378
|
var _this$$refs$textareaR2;
|
|
290
379
|
(_this$$refs$textareaR2 = this.$refs.textareaRef) === null || _this$$refs$textareaR2 === void 0 || _this$$refs$textareaR2.blur();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
2
|
import { isUndefined } from "../_utils/is.js";
|
|
3
3
|
import { isValidRangeValue } from "./utils/index.js";
|
|
4
4
|
import panel_default from "./panel.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
2
|
import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import time_picker_vue_vue_type_script_lang_default from "./time-picker.vue_vue_type_script_lang.js";
|
|
4
4
|
import { createBlock, createElementVNode, createSlots, createVNode, mergeProps, normalizeClass, openBlock, renderSlot, resolveComponent, resolveDynamicComponent, withCtx } from "vue";
|