vary-ui 3.22.16 → 3.22.19

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.
Files changed (40) hide show
  1. package/dist/{Loading-B3CfBW3T.js → Loading-DKgbvRru.js} +2 -2
  2. package/dist/{Wrap-CRo9kCbS.js → Wrap-Ni1e7jlD.js} +1 -1
  3. package/dist/lib/Button/Button.js +2 -2
  4. package/dist/lib/Card/Card.js +2 -2
  5. package/dist/lib/Checkbox/Checkbox.js +2 -2
  6. package/dist/lib/CheckboxGroup/CheckboxGroup.js +2 -2
  7. package/dist/lib/Confirm/Confirm.js +2 -2
  8. package/dist/lib/Date/Date.js +4 -4
  9. package/dist/lib/Dialog/Dialog.js +1 -1
  10. package/dist/lib/Divider/Divider.js +1 -1
  11. package/dist/lib/Form/Form.js +2 -2
  12. package/dist/lib/FormItem/FormItem.js +3 -3
  13. package/dist/lib/Input/Input.js +4 -4
  14. package/dist/lib/Link/Link.js +2 -2
  15. package/dist/lib/Loading/Loading.js +3 -3
  16. package/dist/lib/Menu/Menu.js +2 -2
  17. package/dist/lib/Message/Message.js +2 -2
  18. package/dist/lib/Pagination/Pagination.js +6 -6
  19. package/dist/lib/Popover/Popover.js +2 -2
  20. package/dist/lib/Radio/Radio.js +2 -2
  21. package/dist/lib/RadioButton/RadioButton.js +2 -2
  22. package/dist/lib/RadioGroup/RadioGroup.js +1 -1
  23. package/dist/lib/Scene/Scene.js +1 -1
  24. package/dist/lib/Scroll/Scroll.js +2 -2
  25. package/dist/lib/Select/Select.js +11 -11
  26. package/dist/lib/Skeleton/Skeleton.js +1 -1
  27. package/dist/lib/Tab/Tab.js +6 -85
  28. package/dist/lib/Table/Table.js +3 -3
  29. package/dist/lib/TableColumn/TableColumn.js +1 -1
  30. package/dist/lib/Tabs/Tabs.js +97 -0
  31. package/dist/types/index.d.ts +3 -3
  32. package/dist/vary-ui.js +9 -9
  33. package/package.json +1 -1
  34. package/dist/lib/TabPanel/TabPanel.js +0 -18
  35. /package/dist/{_plugin-vue_export-helper-C3ylAyHA.js → _plugin-vue_export-helper-BjeChPZl.js} +0 -0
  36. /package/dist/{_tslib-D7Z8egG5.js → _tslib-BRhoy8gh.js} +0 -0
  37. /package/dist/{config-BUCuYzrc.js → config-Sb3WJ3Fr.js} +0 -0
  38. /package/dist/types/lib/{TabPanel/TabPanel.vue.d.ts → Tabs/Tab.vue.d.ts} +0 -0
  39. /package/dist/types/lib/{Tab/Tab.vue.d.ts → Tabs/Tabs.vue.d.ts} +0 -0
  40. /package/dist/{utils-4von65WL.js → utils-CtmP_RqT.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, onMounted, createVNode } from 'vue';
2
- import { c as config } from './config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from './_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from './config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from './_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _a;
6
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createVNode } from 'vue';
2
- import { _ as _export_sfc } from './_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from './_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, createVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
3
  import { Icon } from '@iconify/vue';
4
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
4
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
5
 
6
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, createVNode, createTextVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, computed, ref, createVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, provide, computed, createVNode } from 'vue';
2
- import { i as isArray } from '../../utils-4von65WL.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { i as isArray } from '../../utils-CtmP_RqT.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, createVNode, createApp, h, isVNode } from 'vue';
2
2
  import Button from '../Button/Button.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
4
- import '../../config-BUCuYzrc.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
+ import '../../config-Sb3WJ3Fr.js';
5
5
  import '@iconify/vue';
6
6
 
7
7
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, shallowRef, ref, reactive, watch, createVNode, createTextVNode } from 'vue';
2
- import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-4von65WL.js';
2
+ import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-CtmP_RqT.js';
3
3
  import Popover from '../Popover/Popover.js';
4
4
  import Scroll from '../Scroll/Scroll.js';
5
5
  import Link from '../Link/Link.js';
6
- import { W as Wrap } from '../../Wrap-CRo9kCbS.js';
7
- import { c as config } from '../../config-BUCuYzrc.js';
8
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
6
+ import { W as Wrap } from '../../Wrap-Ni1e7jlD.js';
7
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
8
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
9
9
 
10
10
  const weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
11
11
  const months = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"].map((r, i) => {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watch, onMounted, onBeforeUnmount, createVNode, createTextVNode } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createVNode } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, provide, createVNode } from 'vue';
2
- import { _ as __awaiter } from '../../_tslib-D7Z8egG5.js';
2
+ import { _ as __awaiter } from '../../_tslib-BRhoy8gh.js';
3
3
  import Schema from 'async-validator';
4
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
4
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
5
 
6
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  props: {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, inject, computed, ref, onMounted, onUnmounted, provide, createVNode } from 'vue';
2
- import { _ as __awaiter } from '../../_tslib-D7Z8egG5.js';
3
- import { c as config } from '../../config-BUCuYzrc.js';
2
+ import { _ as __awaiter } from '../../_tslib-BRhoy8gh.js';
3
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
4
4
  import Schema from 'async-validator';
5
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
5
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
6
6
 
7
7
  var _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  props: {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, ref, computed, inject, watch, createVNode } from 'vue';
2
- import { W as Wrap } from '../../Wrap-CRo9kCbS.js';
3
- import { c as isFun } from '../../utils-4von65WL.js';
4
- import { c as config } from '../../config-BUCuYzrc.js';
5
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { W as Wrap } from '../../Wrap-Ni1e7jlD.js';
3
+ import { c as isFun } from '../../utils-CtmP_RqT.js';
4
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
5
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
6
6
 
7
7
  var _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, createVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,7 +1,7 @@
1
1
  import { shallowRef, createApp, h } from 'vue';
2
- import { L as Loading } from '../../Loading-B3CfBW3T.js';
3
- import { c as config } from '../../config-BUCuYzrc.js';
4
- import '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { L as Loading } from '../../Loading-DKgbvRru.js';
3
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
4
+ import '../../_plugin-vue_export-helper-BjeChPZl.js';
5
5
 
6
6
  const defaultOptions = {
7
7
  lock: false,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, watch, createVNode } from 'vue';
2
- import { k as debounce } from '../../utils-4von65WL.js';
2
+ import { k as debounce } from '../../utils-CtmP_RqT.js';
3
3
  import Scroll from '../Scroll/Scroll.js';
4
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
4
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
5
 
6
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, onMounted, h, createApp } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = defineComponent({
6
6
  props: {
@@ -1,15 +1,15 @@
1
1
  import { defineComponent, ref, watch, createVNode, createTextVNode } from 'vue';
2
2
  import Select from '../Select/Select.js';
3
- import { c as config } from '../../config-BUCuYzrc.js';
4
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
5
- import '../../_tslib-D7Z8egG5.js';
6
- import '../../utils-4von65WL.js';
3
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
4
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
+ import '../../_tslib-BRhoy8gh.js';
6
+ import '../../utils-CtmP_RqT.js';
7
7
  import '../Popover/Popover.js';
8
- import '../../Wrap-CRo9kCbS.js';
8
+ import '../../Wrap-Ni1e7jlD.js';
9
9
  import '../Input/Input.js';
10
10
  import '../Checkbox/Checkbox.js';
11
11
  import '../Scroll/Scroll.js';
12
- import '../../Loading-B3CfBW3T.js';
12
+ import '../../Loading-DKgbvRru.js';
13
13
 
14
14
  var _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, shallowRef, ref, watch, onMounted, onBeforeUnmount, createVNode, nextTick } from 'vue';
2
- import { t as throttle } from '../../utils-4von65WL.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { t as throttle } from '../../utils-CtmP_RqT.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, computed, createVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, computed, createVNode } from 'vue';
2
- import { c as config } from '../../config-BUCuYzrc.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, provide, computed, createVNode } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /*@__PURE__*/ defineComponent({
5
5
  __name: 'Scene',
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, shallowRef, ref, onMounted, nextTick, onBeforeUnmount, createVNode } from 'vue';
2
- import { k as debounce } from '../../utils-4von65WL.js';
3
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { k as debounce } from '../../utils-CtmP_RqT.js';
3
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
4
4
 
5
5
  /**
6
6
  * note:
@@ -1,14 +1,14 @@
1
1
  import { defineComponent, ref, shallowRef, reactive, watch, onMounted, createVNode, createTextVNode, nextTick, isVNode } from 'vue';
2
- import { _ as __awaiter } from '../../_tslib-D7Z8egG5.js';
3
- import { i as isArray, a as isObject, k as debounce } from '../../utils-4von65WL.js';
2
+ import { _ as __awaiter } from '../../_tslib-BRhoy8gh.js';
3
+ import { i as isArray, a as isObject, k as debounce } from '../../utils-CtmP_RqT.js';
4
4
  import Popover from '../Popover/Popover.js';
5
- import { W as Wrap } from '../../Wrap-CRo9kCbS.js';
5
+ import { W as Wrap } from '../../Wrap-Ni1e7jlD.js';
6
6
  import Input from '../Input/Input.js';
7
7
  import Checkbox from '../Checkbox/Checkbox.js';
8
8
  import Scroll from '../Scroll/Scroll.js';
9
- import { c as config } from '../../config-BUCuYzrc.js';
10
- import { L as Loading } from '../../Loading-B3CfBW3T.js';
11
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
9
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
10
+ import { L as Loading } from '../../Loading-DKgbvRru.js';
11
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
12
12
 
13
13
  /**
14
14
  关于远程搜索:
@@ -231,7 +231,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
231
231
  v2.push(d.__originData);
232
232
  });
233
233
  _emit("update:model-value", _props.multiple ? v1 : v1.length > 0 ? v1[0] : "");
234
- _emit("change", v2, selectedNodes.value);
234
+ _emit("change", _props.multiple ? v2 : v2.length > 0 ? v2[0] : "", selectedNodes.value);
235
235
  _emit("popover-close");
236
236
  }
237
237
  const selectedNodes = ref([]);
@@ -568,13 +568,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
568
568
  // 独立模式, 任意节点都可以选中
569
569
  selectedValues.value = [row.__full_value];
570
570
  selectedNodes.value = [row];
571
- closePopover();
571
+ focus.value = false;
572
572
  } else {
573
573
  // 关联模式, 只有没有children的节点才可以选中
574
574
  if (!row.__hasChildren || !_props.tree) {
575
575
  selectedValues.value = [row.__full_value];
576
576
  selectedNodes.value = [row];
577
- closePopover();
577
+ focus.value = false;
578
578
  }
579
579
  }
580
580
  }
@@ -608,7 +608,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
608
608
  e.stopPropagation(); // 阻止冒泡是为了防止popover弹出, 因为本组件内要手动控制popover状态
609
609
  if (_props.readonly || _props.disabled) return; // 如果组件是只读或者被禁用状态, 不再展开popover
610
610
  if (focus.value) {
611
- closePopover();
611
+ focus.value = false;
612
612
  } else {
613
613
  openPopover();
614
614
  }
@@ -671,7 +671,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
671
671
  if (_props.readonly || _props.disabled) return; // 如果组件是只读或者被禁用状态, 不再展开popover
672
672
  selectedValues.value = []; // 直接清空selectedValues
673
673
  updateResult(new Set(), new Set());
674
- closePopover();
674
+ focus.value = false;
675
675
  }
676
676
  }, [createVNode("span", {
677
677
  "class": "icon-close-round-fill"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createVNode } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -1,97 +1,18 @@
1
- import { defineComponent, ref, watch, onBeforeUnmount, createVNode } from 'vue';
2
- import { m as matchChildrenCoponent } from '../../utils-4von65WL.js';
3
- import TabPanel from '../TabPanel/TabPanel.js';
4
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
1
+ import { defineComponent, createVNode } from 'vue';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
3
 
6
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
7
- props: {
8
- modelValue: {
9
- type: String,
10
- default: ""
11
- },
12
- border: {
13
- type: Boolean,
14
- default: false
15
- },
16
- shadow: {
17
- type: Boolean,
18
- default: false
19
- }
20
- },
21
- emits: ["update:model-value", "change"],
22
5
  setup(_props, {
23
- slots: _slots,
24
- emit: _emit,
25
- attrs: _attrs
6
+ slots: _slots
26
7
  }) {
27
- const tabKey = ref(_props.modelValue || "");
28
- const lastKey = ref("");
29
- watch(() => _props.modelValue, v => {
30
- _emit("change", v);
31
- tabKey.value = v;
32
- });
33
- onBeforeUnmount(() => {
34
- lastKey.value = "";
35
- });
36
8
  return () => {
37
- const panels = _slots.default ? matchChildrenCoponent(_slots.default(), TabPanel) : [];
38
- panels.forEach(p => {
39
- if (p.props.hasOwnProperty("preload")) {
40
- p.props.preload = true;
41
- }
42
- p.props = Object.assign({
43
- visible: true
44
- }, p.props);
45
- });
46
- panels.findIndex(p => p.props.key === tabKey.value);
47
- panels.findIndex(p => p.props.key === lastKey.value);
48
9
  return createVNode("div", {
49
- "class": ["v_tab", {
50
- "v_tab--shadow": _props.shadow
51
- }, {
52
- "v_tab--border": _props.border
53
- }]
54
- }, [createVNode("ul", {
55
- "class": "v_tab_nav_group"
56
- }, [panels.filter(p => p.props.visible).map(p => {
57
- return createVNode("li", {
58
- "class": ["v_tab_nav_item", {
59
- "v_tab_nav_item--active": tabKey.value === p.props.key,
60
- "v_tab_nav_item--disabled": p.props.disabled
61
- }],
62
- "onClick": () => {
63
- if (p.props.key === tabKey.value) return;
64
- if (p.props.disabled) return;
65
- lastKey.value = tabKey.value;
66
- tabKey.value = p.props.key;
67
- _emit("update:model-value", p.props.key);
68
- }
69
- }, [p.children && p.children.label ? p.children.label(Object.assign(Object.assign({}, p.props), {
70
- active: tabKey.value === p.props.key
71
- })) : p.props.label]);
72
- })]), createVNode("ul", {
73
- "class": "v_tab_panel_group"
74
- }, [panels.map(p => {
75
- return createVNode("li", {
76
- "key": p.props.key,
77
- "class": ["v_tab_panel_item", {
78
- v_tab_panel_item_active: tabKey.value === p.props.key
79
- }],
80
- "onAnimationend": e => {
81
- // enter事件不需要处理
82
- if (e.target === e.currentTarget) e.target.classList.remove("leave-left", "leave-right", "enter-left", "enter-right");
83
- }
84
- }, [(p.props.preload || tabKey.value === p.props.key) && p.children && p.children.default()]);
85
- })])]);
10
+ "class": "v_tab_panel_body"
11
+ }, null);
86
12
  };
87
13
  }
88
14
  });
89
- /**
90
- 假如用定位去实现:
91
- 除了当前panel为relative, 其他都为absolute, 这样可以让当前panel撑开高度
92
- 把上一个的zindex设为次大值, 当前的设为最大值
93
- */
94
15
 
95
- var Tab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/loki/Documents/office/aprojects/vary/vary-ui/lib/Tab/Tab.vue"]]);
16
+ var Tab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/loki/Documents/office/aprojects/vary/vary-ui/lib/Tabs/Tab.vue"]]);
96
17
 
97
18
  export { Tab as default };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, ref, shallowRef, reactive, computed, nextTick, onMounted, watch, onBeforeMount, createVNode, createTextVNode } from 'vue';
2
- import { k as debounce, m as matchChildrenCoponent, t as throttle } from '../../utils-4von65WL.js';
2
+ import { k as debounce, m as matchChildrenCoponent, t as throttle } from '../../utils-CtmP_RqT.js';
3
3
  import Checkbox from '../Checkbox/Checkbox.js';
4
4
  import Scroll from '../Scroll/Scroll.js';
5
5
  import TableColumn from '../TableColumn/TableColumn.js';
6
- import { c as config } from '../../config-BUCuYzrc.js';
7
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
6
+ import { c as config } from '../../config-Sb3WJ3Fr.js';
7
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
8
8
 
9
9
  let colKey = 0;
10
10
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
2
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
@@ -0,0 +1,97 @@
1
+ import { defineComponent, ref, watch, onBeforeUnmount, createVNode } from 'vue';
2
+ import { m as matchChildrenCoponent } from '../../utils-CtmP_RqT.js';
3
+ import Tab from '../Tab/Tab.js';
4
+ import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BjeChPZl.js';
5
+
6
+ var _sfc_main = /* @__PURE__ */ defineComponent({
7
+ props: {
8
+ modelValue: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ border: {
13
+ type: Boolean,
14
+ default: false
15
+ },
16
+ shadow: {
17
+ type: Boolean,
18
+ default: false
19
+ }
20
+ },
21
+ emits: ["update:model-value", "change"],
22
+ setup(_props, {
23
+ slots: _slots,
24
+ emit: _emit,
25
+ attrs: _attrs
26
+ }) {
27
+ const tabKey = ref(_props.modelValue || "");
28
+ const lastKey = ref("");
29
+ watch(() => _props.modelValue, v => {
30
+ _emit("change", v);
31
+ tabKey.value = v;
32
+ });
33
+ onBeforeUnmount(() => {
34
+ lastKey.value = "";
35
+ });
36
+ return () => {
37
+ const panels = _slots.default ? matchChildrenCoponent(_slots.default(), Tab) : [];
38
+ panels.forEach(p => {
39
+ if (p.props.hasOwnProperty("preload")) {
40
+ p.props.preload = true;
41
+ }
42
+ p.props = Object.assign({
43
+ visible: true
44
+ }, p.props);
45
+ });
46
+ panels.findIndex(p => p.props.key === tabKey.value);
47
+ panels.findIndex(p => p.props.key === lastKey.value);
48
+ return createVNode("div", {
49
+ "class": ["v_tab", {
50
+ "v_tab--shadow": _props.shadow
51
+ }, {
52
+ "v_tab--border": _props.border
53
+ }]
54
+ }, [createVNode("ul", {
55
+ "class": "v_tab_nav_group"
56
+ }, [panels.filter(p => p.props.visible).map(p => {
57
+ return createVNode("li", {
58
+ "class": ["v_tab_nav_item", {
59
+ "v_tab_nav_item--active": tabKey.value === p.props.key,
60
+ "v_tab_nav_item--disabled": p.props.disabled
61
+ }],
62
+ "onClick": () => {
63
+ if (p.props.key === tabKey.value) return;
64
+ if (p.props.disabled) return;
65
+ lastKey.value = tabKey.value;
66
+ tabKey.value = p.props.key;
67
+ _emit("update:model-value", p.props.key);
68
+ }
69
+ }, [p.children && p.children.label ? p.children.label(Object.assign(Object.assign({}, p.props), {
70
+ active: tabKey.value === p.props.key
71
+ })) : p.props.label]);
72
+ })]), createVNode("ul", {
73
+ "class": "v_tab_panel_group"
74
+ }, [panels.map(p => {
75
+ return createVNode("li", {
76
+ "key": p.props.key,
77
+ "class": ["v_tab_panel_item", {
78
+ v_tab_panel_item_active: tabKey.value === p.props.key
79
+ }],
80
+ "onAnimationend": e => {
81
+ // enter事件不需要处理
82
+ if (e.target === e.currentTarget) e.target.classList.remove("leave-left", "leave-right", "enter-left", "enter-right");
83
+ }
84
+ }, [(p.props.preload || tabKey.value === p.props.key) && p.children && p.children.default()]);
85
+ })])]);
86
+ };
87
+ }
88
+ });
89
+ /**
90
+ 假如用定位去实现:
91
+ 除了当前panel为relative, 其他都为absolute, 这样可以让当前panel撑开高度
92
+ 把上一个的zindex设为次大值, 当前的设为最大值
93
+ */
94
+
95
+ var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/loki/Documents/office/aprojects/vary/vary-ui/lib/Tabs/Tabs.vue"]]);
96
+
97
+ export { Tabs as default };
@@ -18,10 +18,10 @@ import Scroll from "./lib/Scroll/Scroll.vue";
18
18
  import Select from "./lib/Select/Select.vue";
19
19
  import Skeleton from "./lib/Skeleton/Skeleton.vue";
20
20
  import Switch from "./lib/Switch/Switch.vue";
21
- import Tab from "./lib/Tab/Tab.vue";
21
+ import Tab from "./lib/Tabs/Tab.vue";
22
+ import Tabs from "./lib/Tabs/Tabs.vue";
22
23
  import Table from "./lib/Table/Table.vue";
23
24
  import TableColumn from "./lib/TableColumn/TableColumn.vue";
24
- import TabPanel from "./lib/TabPanel/TabPanel.vue";
25
25
  import Tree from "./lib/Tree/Tree.vue";
26
26
  import Radio from "./lib/RadioGroup/Radio.vue";
27
27
  import RadioButton from "./lib/RadioGroup/RadioButton.vue";
@@ -40,7 +40,7 @@ declare const VarConfirm: typeof Confirm;
40
40
  declare const VarAlert: typeof Confirm;
41
41
  declare const VarLoading: import("vue").DefineComponent<{}, {}, any>;
42
42
  declare const VarPreview: import("vue").DefineComponent<{}, {}, any>;
43
- export { Scene, Card, Dialog, Divider, Button, Link, Input, Radio, RadioButton, RadioGroup, Checkbox, CheckboxGroup, Select, Date, Tab, TabPanel, Table, TableColumn, Menu, Scroll, Skeleton, Switch, Pagination, Popover, Preview, Form, FormItem, Tree, VarMessage, VarConfirm, VarAlert, VarLoading, VarPreview, Icon, };
43
+ export { Scene, Card, Dialog, Divider, Button, Link, Input, Radio, RadioButton, RadioGroup, Checkbox, CheckboxGroup, Select, Date, Tab, Tabs, Table, TableColumn, Menu, Scroll, Skeleton, Switch, Pagination, Popover, Preview, Form, FormItem, Tree, VarMessage, VarConfirm, VarAlert, VarLoading, VarPreview, Icon, };
44
44
  export * from "./lib/utils";
45
45
  import "./src/styles/root.scss";
46
46
  import "./icomoon/style.css";
package/dist/vary-ui.js CHANGED
@@ -17,11 +17,11 @@ import Scroll from './lib/Scroll/Scroll.js';
17
17
  import Select from './lib/Select/Select.js';
18
18
  import Skeleton from './lib/Skeleton/Skeleton.js';
19
19
  import { defineComponent, ref, watch, createVNode, onMounted, onBeforeUnmount, createTextVNode } from 'vue';
20
- import { _ as _export_sfc } from './_plugin-vue_export-helper-C3ylAyHA.js';
20
+ import { _ as _export_sfc } from './_plugin-vue_export-helper-BjeChPZl.js';
21
21
  import Tab from './lib/Tab/Tab.js';
22
+ import Tabs from './lib/Tabs/Tabs.js';
22
23
  import Table from './lib/Table/Table.js';
23
24
  import TableColumn from './lib/TableColumn/TableColumn.js';
24
- import TabPanel from './lib/TabPanel/TabPanel.js';
25
25
  import Radio from './lib/Radio/Radio.js';
26
26
  import RadioButton from './lib/RadioButton/RadioButton.js';
27
27
  import RadioGroup from './lib/RadioGroup/RadioGroup.js';
@@ -30,11 +30,11 @@ import createConfirm from './lib/Confirm/Confirm.js';
30
30
  import './lib/Loading/Loading.js';
31
31
  import { Icon } from '@iconify/vue';
32
32
  export { Icon } from '@iconify/vue';
33
- export { k as debounce, i as isArray, b as isBoolean, d as isDate, f as isDateTime, c as isFun, h as isMonth, j as isNumber, a as isObject, e as isTime, g as isYear, m as matchChildrenCoponent, n as now, t as throttle } from './utils-4von65WL.js';
34
- import { s as setConfig } from './config-BUCuYzrc.js';
35
- import { L as Loading } from './Loading-B3CfBW3T.js';
36
- import './Wrap-CRo9kCbS.js';
37
- import './_tslib-D7Z8egG5.js';
33
+ export { k as debounce, i as isArray, b as isBoolean, d as isDate, f as isDateTime, c as isFun, h as isMonth, j as isNumber, a as isObject, e as isTime, g as isYear, m as matchChildrenCoponent, n as now, t as throttle } from './utils-CtmP_RqT.js';
34
+ import { s as setConfig } from './config-Sb3WJ3Fr.js';
35
+ import { L as Loading } from './Loading-DKgbvRru.js';
36
+ import './Wrap-Ni1e7jlD.js';
37
+ import './_tslib-BRhoy8gh.js';
38
38
  import 'async-validator';
39
39
 
40
40
  var _sfc_main$2 = /* @__PURE__ */ defineComponent({
@@ -364,7 +364,7 @@ const comps = {
364
364
  Switch,
365
365
  Date,
366
366
  Tab,
367
- TabPanel,
367
+ Tabs,
368
368
  Table,
369
369
  TableColumn,
370
370
  Tree,
@@ -394,4 +394,4 @@ const VaryUI = {
394
394
  },
395
395
  };
396
396
 
397
- export { Button, Card, Checkbox, CheckboxGroup, Date, Dialog, Divider, Form, FormItem, Input, Link, Menu, Pagination, Popover, Preview, Radio, RadioButton, RadioGroup, Scene, Scroll, Select, Skeleton, Switch, Tab, TabPanel, Table, TableColumn, Tree, VarAlert, VarConfirm, VarLoading, VarMessage, VarPreview, VaryUI as default };
397
+ export { Button, Card, Checkbox, CheckboxGroup, Date, Dialog, Divider, Form, FormItem, Input, Link, Menu, Pagination, Popover, Preview, Radio, RadioButton, RadioGroup, Scene, Scroll, Select, Skeleton, Switch, Tab, Table, TableColumn, Tabs, Tree, VarAlert, VarConfirm, VarLoading, VarMessage, VarPreview, VaryUI as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vary-ui",
3
- "version": "3.22.16",
3
+ "version": "3.22.19",
4
4
  "description": "vary-ui base vue3",
5
5
  "homepage": "https://varyui.com",
6
6
  "main": "dist/vary-ui.js",
@@ -1,18 +0,0 @@
1
- import { defineComponent, createVNode } from 'vue';
2
- import { _ as _export_sfc } from '../../_plugin-vue_export-helper-C3ylAyHA.js';
3
-
4
- var _sfc_main = /* @__PURE__ */ defineComponent({
5
- setup(_props, {
6
- slots: _slots
7
- }) {
8
- return () => {
9
- return createVNode("div", {
10
- "class": "v_tab_panel_body"
11
- }, null);
12
- };
13
- }
14
- });
15
-
16
- var TabPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/loki/Documents/office/aprojects/vary/vary-ui/lib/TabPanel/TabPanel.vue"]]);
17
-
18
- export { TabPanel as default };
File without changes
File without changes
File without changes