vary-ui 3.21.50 → 3.21.52
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/{Loading-CHvjzGBQ.js → Loading-DMFKMWpc.js} +2 -2
- package/dist/{Wrap-BQbRmjJj.js → Wrap-GIpwRQ0Z.js} +1 -1
- package/dist/lib/Button/Button.js +2 -2
- package/dist/lib/Card/Card.js +2 -2
- package/dist/lib/Checkbox/Checkbox.js +2 -2
- package/dist/lib/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/lib/Confirm/Confirm.js +2 -2
- package/dist/lib/Date/Date.js +4 -4
- package/dist/lib/Dialog/Dialog.js +1 -1
- package/dist/lib/Divider/Divider.js +1 -1
- package/dist/lib/Field/Field.js +2 -2
- package/dist/lib/Form/Form.js +1 -1
- package/dist/lib/Input/Input.js +3 -3
- package/dist/lib/Link/Link.js +2 -2
- package/dist/lib/Loading/Loading.js +3 -3
- package/dist/lib/Menu/Menu.js +2 -2
- package/dist/lib/Message/Message.js +2 -2
- package/dist/lib/Pagination/Pagination.js +5 -5
- package/dist/lib/Popover/Popover.js +2 -2
- package/dist/lib/Radio/Radio.js +2 -2
- package/dist/lib/RadioGroup/RadioGroup.js +2 -2
- package/dist/lib/Scene/Scene.js +1 -1
- package/dist/lib/Scroll/Scroll.js +2 -2
- package/dist/lib/Select/Select.js +5 -5
- package/dist/lib/Skeleton/Skeleton.js +1 -1
- package/dist/lib/Tab/Tab.js +2 -2
- package/dist/lib/TabPanel/TabPanel.js +1 -1
- package/dist/lib/Table/Table.js +166 -112
- package/dist/lib/TableColumn/TableColumn.js +1 -1
- package/dist/types/lib/Table/Table.vue.d.ts +25 -7
- package/dist/vary-ui.js +5 -5
- package/package.json +1 -1
- /package/dist/{_plugin-vue_export-helper-BEsJRPvd.js → _plugin-vue_export-helper-BwJJ-9J8.js} +0 -0
- /package/dist/{config-Twa_hIhN.js → config-BAKtXHgR.js} +0 -0
- /package/dist/{utils-DIWiLPoW.js → utils-B7J83i5S.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from './config-
|
|
3
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from './config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
2
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
console.log(config);
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
package/dist/lib/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, inject, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, provide, createVNode } from 'vue';
|
|
2
|
-
import { i as isArray } from '../../utils-
|
|
2
|
+
import { i as isArray } from '../../utils-B7J83i5S.js';
|
|
3
3
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
5
|
-
import '../../config-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
5
|
+
import '../../config-BAKtXHgR.js';
|
|
6
6
|
|
|
7
7
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, createVNode, createApp, h } from 'vue';
|
|
2
2
|
import Button from '../Button/Button.js';
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
-
import '../../config-
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
|
+
import '../../config-BAKtXHgR.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
package/dist/lib/Date/Date.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-B7J83i5S.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-
|
|
7
|
-
import { c as config } from '../../config-
|
|
8
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
6
|
+
import { W as Wrap } from '../../Wrap-GIpwRQ0Z.js';
|
|
7
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
8
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Field/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
package/dist/lib/Form/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, provide, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Input/Input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, mergeProps } from 'vue';
|
|
2
|
-
import { W as Wrap } from '../../Wrap-
|
|
3
|
-
import { c as isFun } from '../../utils-
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { W as Wrap } from '../../Wrap-GIpwRQ0Z.js';
|
|
3
|
+
import { c as isFun } from '../../utils-B7J83i5S.js';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
inheritAttrs: false,
|
package/dist/lib/Link/Link.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
3
|
-
import { c as config } from '../../config-
|
|
4
|
-
import '../../_plugin-vue_export-helper-
|
|
2
|
+
import { L as Loading } from '../../Loading-DMFKMWpc.js';
|
|
3
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
4
|
+
import '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
5
5
|
|
|
6
6
|
const defaultOptions = {
|
|
7
7
|
lock: false,
|
package/dist/lib/Menu/Menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode } from 'vue';
|
|
2
|
-
import { k as debounce } from '../../utils-
|
|
2
|
+
import { k as debounce } from '../../utils-B7J83i5S.js';
|
|
3
3
|
import Scroll from '../Scroll/Scroll.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
5
|
-
import '../../utils-
|
|
3
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
5
|
+
import '../../utils-B7J83i5S.js';
|
|
6
6
|
import '../Popover/Popover.js';
|
|
7
|
-
import '../../Wrap-
|
|
7
|
+
import '../../Wrap-GIpwRQ0Z.js';
|
|
8
8
|
import '../Input/Input.js';
|
|
9
9
|
import '../Checkbox/Checkbox.js';
|
|
10
10
|
import '../Scroll/Scroll.js';
|
|
11
|
-
import '../../Loading-
|
|
11
|
+
import '../../Loading-DMFKMWpc.js';
|
|
12
12
|
|
|
13
13
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
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-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { t as throttle } from '../../utils-B7J83i5S.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
package/dist/lib/Radio/Radio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, inject } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, provide, createVNode } from 'vue';
|
|
2
2
|
import Radio from '../Radio/Radio.js';
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
-
import '../../config-
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
|
+
import '../../config-BAKtXHgR.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
package/dist/lib/Scene/Scene.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.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-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { k as debounce } from '../../utils-B7J83i5S.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* note:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, shallowRef, reactive, watch, createVNode, createTextVNode, isVNode, nextTick } from 'vue';
|
|
2
|
-
import { k as debounce } from '../../utils-
|
|
2
|
+
import { k as debounce } from '../../utils-B7J83i5S.js';
|
|
3
3
|
import Popover from '../Popover/Popover.js';
|
|
4
|
-
import { W as Wrap } from '../../Wrap-
|
|
4
|
+
import { W as Wrap } from '../../Wrap-GIpwRQ0Z.js';
|
|
5
5
|
import Input from '../Input/Input.js';
|
|
6
6
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
7
7
|
import Scroll from '../Scroll/Scroll.js';
|
|
8
|
-
import { c as config } from '../../config-
|
|
9
|
-
import { L as Loading } from '../../Loading-
|
|
10
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
8
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
9
|
+
import { L as Loading } from '../../Loading-DMFKMWpc.js';
|
|
10
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
11
11
|
|
|
12
12
|
/******************************************************************************
|
|
13
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Tab/Tab.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, onBeforeUnmount, createVNode } from 'vue';
|
|
2
|
-
import { m as matchChildrenCoponent } from '../../utils-
|
|
2
|
+
import { m as matchChildrenCoponent } from '../../utils-B7J83i5S.js';
|
|
3
3
|
import TabPanel from '../TabPanel/TabPanel.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
setup(_props, {
|
package/dist/lib/Table/Table.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import { k as debounce, m as matchChildrenCoponent } from '../../utils-
|
|
1
|
+
import { defineComponent, getCurrentInstance, ref, shallowRef, reactive, nextTick, onMounted, watch, onBeforeMount, createVNode, createTextVNode } from 'vue';
|
|
2
|
+
import { k as debounce, m as matchChildrenCoponent } from '../../utils-B7J83i5S.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-
|
|
7
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
6
|
+
import { c as config } from '../../config-BAKtXHgR.js';
|
|
7
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
8
8
|
|
|
9
|
+
let colKey = 0;
|
|
9
10
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
props: {
|
|
11
12
|
data: {
|
|
@@ -29,9 +30,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
30
|
default: false
|
|
30
31
|
},
|
|
31
32
|
selection: {
|
|
32
|
-
type:
|
|
33
|
-
default:
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => []
|
|
34
35
|
},
|
|
36
|
+
// 默认选中的行
|
|
35
37
|
placeholder: {
|
|
36
38
|
type: String,
|
|
37
39
|
default: ""
|
|
@@ -53,7 +55,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
55
|
},
|
|
54
56
|
rowKey: {
|
|
55
57
|
type: [String, Function],
|
|
56
|
-
default: "
|
|
58
|
+
default: ""
|
|
57
59
|
},
|
|
58
60
|
scrollX: {
|
|
59
61
|
type: Boolean,
|
|
@@ -66,21 +68,41 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
68
|
height: {
|
|
67
69
|
type: String,
|
|
68
70
|
default: ""
|
|
69
|
-
}
|
|
71
|
+
},
|
|
72
|
+
autoSelectRowOnClick: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
// 点击行时只选中当前行
|
|
77
|
+
autoToggleRowOnClick: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false
|
|
80
|
+
} // 点击行时切换当前行选中状态
|
|
70
81
|
},
|
|
71
|
-
emits: ["row-click", "selection-change", "sort-change", "cell-click"],
|
|
82
|
+
emits: ["row-click", "selection-change", "update:selection", "sort-change", "cell-click"],
|
|
72
83
|
setup(_props, {
|
|
73
84
|
emit: _emit,
|
|
74
85
|
slots: _slots,
|
|
75
86
|
attrs: _attrs,
|
|
76
87
|
expose: _expose
|
|
77
88
|
}) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
89
|
+
console.log(getCurrentInstance());
|
|
90
|
+
const openDebug = _attrs.debug !== undefined; // 只要不是undefined就设置为true
|
|
81
91
|
const rootRef = ref(null);
|
|
82
92
|
// 启用选中功能时, 保存选中的行key
|
|
83
|
-
const selectedRowMap =
|
|
93
|
+
const selectedRowMap = ref({});
|
|
94
|
+
const updateSelectedRowMap = debounce(function (selection) {
|
|
95
|
+
console.log('updateSelectedRowMap', selection);
|
|
96
|
+
selectedRowMap.value = {}; // 清空selectedRowMap
|
|
97
|
+
selection.forEach(r => {
|
|
98
|
+
const key = getRowKey(r);
|
|
99
|
+
selectedRowMap.value[key] = r;
|
|
100
|
+
});
|
|
101
|
+
}, 200);
|
|
102
|
+
// 如果selection不为空, 则更新selectedRowMap
|
|
103
|
+
if (_props.selection.length > 0) {
|
|
104
|
+
updateSelectedRowMap();
|
|
105
|
+
}
|
|
84
106
|
const showLeftShadow = ref(false); // 是否显示左浮动表格的阴影
|
|
85
107
|
const showRightShadow = ref(false); // 是否显示右浮动表格的阴影
|
|
86
108
|
const rowsHeight = ref([]); // 行高
|
|
@@ -100,19 +122,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
100
122
|
const scrollBodyRightRef = shallowRef(null);
|
|
101
123
|
const scrollBodyMainRef = shallowRef(null);
|
|
102
124
|
const showFixedColumn = ref(false); // 是否显示固定列
|
|
125
|
+
const dataList = ref([]); // 数据列表
|
|
103
126
|
const sortFields = reactive(Object.assign({
|
|
104
127
|
prop: "",
|
|
105
128
|
order: ""
|
|
106
129
|
}, _props.defaultSort)); // 用来保存排序的依据
|
|
107
130
|
const defineWidth = ref(0); // 定义的宽度
|
|
108
131
|
function getRowKey(r) {
|
|
109
|
-
// r: row, ri: rowIndex
|
|
110
|
-
if (!_props.rowKey) {
|
|
111
|
-
console.error("table component miss rowKey prop");
|
|
112
|
-
}
|
|
113
132
|
const rowKey = typeof _props.rowKey === "function" ? _props.rowKey({
|
|
114
133
|
row: r
|
|
115
|
-
}) : r[_props.rowKey];
|
|
134
|
+
}) : _props.rowKey ? r[_props.rowKey] : r['key'] || r['id'];
|
|
135
|
+
if (!rowKey) {
|
|
136
|
+
console.warn("table component miss rowKey prop");
|
|
137
|
+
}
|
|
116
138
|
return rowKey;
|
|
117
139
|
}
|
|
118
140
|
const fixedLeftColumns = ref([]);
|
|
@@ -120,6 +142,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
142
|
const mainColumns = ref([]);
|
|
121
143
|
let mergeColumns = [];
|
|
122
144
|
function init() {
|
|
145
|
+
const list = JSON.parse(JSON.stringify([..._props.data])); // 先从data中获取
|
|
146
|
+
dataList.value = list;
|
|
123
147
|
mergeColumns = JSON.parse(JSON.stringify([..._props.columns])); // 先从columns中获取
|
|
124
148
|
const slotColumns = _slots.default ? matchChildrenCoponent(_slots.default(), TableColumn) : [];
|
|
125
149
|
slotColumns.forEach(r => {
|
|
@@ -156,16 +180,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
156
180
|
const leftColumns = [];
|
|
157
181
|
const rightColumns = [];
|
|
158
182
|
const normalColumns = [];
|
|
159
|
-
// 分离列
|
|
160
|
-
let hasSelectionColumn = false;
|
|
161
183
|
mergeColumns.forEach(c => {
|
|
162
184
|
var _a;
|
|
163
185
|
// 处理c.width为纯数字的情况, 如果是纯数字就加上px单位, 否则就保持原有规则
|
|
164
186
|
c.width = c.width ? (c.width + '').replace('px', '') : 0;
|
|
165
187
|
c.visible = (_a = c.visible) !== null && _a !== void 0 ? _a : true; // 所有列的默认visible设置为true
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
188
|
+
c.colKey = colKey++; // 给列添加一个唯一的key
|
|
189
|
+
if (c.prop === 'selection') ;
|
|
169
190
|
if (c.visible === false) return; // visible为false的直接跳过
|
|
170
191
|
if (c.fixed === "left") {
|
|
171
192
|
leftColumns.push(c);
|
|
@@ -175,16 +196,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
196
|
normalColumns.push(c);
|
|
176
197
|
}
|
|
177
198
|
});
|
|
178
|
-
if (!hasSelectionColumn && _props.selection) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
199
|
+
// if (!hasSelectionColumn && _props.selection) {
|
|
200
|
+
// // 如果存在selection列, 则不添加
|
|
201
|
+
// // 如果不存在selection slot 或者 column中未定义, 且table中有selection属性, 就自动添加
|
|
202
|
+
// // 给mainColumn和leftColumn都添加一列
|
|
203
|
+
// leftColumns.unshift({
|
|
204
|
+
// label: "1",
|
|
205
|
+
// prop: "selection",
|
|
206
|
+
// align: "center",
|
|
207
|
+
// });
|
|
208
|
+
// }
|
|
188
209
|
mainColumns.value = [...leftColumns, ...normalColumns, ...rightColumns];
|
|
189
210
|
fixedLeftColumns.value = leftColumns;
|
|
190
211
|
fixedRightColumns.value = rightColumns;
|
|
@@ -216,14 +237,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
216
237
|
showFixedColumn.value = true; // 固定列显示
|
|
217
238
|
showRightShadow.value = true; // 右边阴影显示
|
|
218
239
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
openDebug && console.log('各列原宽度', mainColumns.value.map(c => c._maxWidth + 'px'));
|
|
241
|
+
openDebug && console.log('视图宽度', rootWidth);
|
|
242
|
+
openDebug && console.log('表格需要的宽度', needWidth);
|
|
243
|
+
openDebug && console.log('最终使用的宽度', initTableWidth);
|
|
244
|
+
openDebug && console.log('固定列的总宽度', fixedWidthTotal);
|
|
245
|
+
openDebug && console.log('需要分配的宽度', initTableWidth - needWidth);
|
|
246
|
+
openDebug && console.log('需要分配的列数', flexColumnTotal);
|
|
247
|
+
openDebug && console.log('每列需要增加的宽度', Math.floor((initTableWidth - needWidth) / flexColumnTotal));
|
|
227
248
|
const splitWidth = Math.floor((initTableWidth - needWidth) / flexColumnTotal);
|
|
228
249
|
defineWidth.value = initTableWidth;
|
|
229
250
|
nextTick(() => {
|
|
@@ -247,7 +268,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
247
268
|
total += parseInt(colWidthTmp[ci] + '');
|
|
248
269
|
// console.log(ci, thEles[ci], tdEles[ci], thWidth, tdWidth, colWidthTmp[ci])
|
|
249
270
|
});
|
|
250
|
-
|
|
271
|
+
openDebug && console.log('colWidthTmp', colWidthTmp, total, initTableWidth);
|
|
251
272
|
if (total < initTableWidth) {
|
|
252
273
|
// 如果计算的总宽度小于预想宽度
|
|
253
274
|
const index = mainColumns.value.findIndex(c => !c.width); // 找到第一个没有width的列
|
|
@@ -267,21 +288,24 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
267
288
|
});
|
|
268
289
|
}) : null;
|
|
269
290
|
let needWidth = 0; // 表格需要的宽度
|
|
291
|
+
let fixedWidthTotal = 0; // 固定列的总宽度
|
|
270
292
|
let flexColumnTotal = 0; // 可变列的总数量
|
|
271
293
|
function initStyle() {
|
|
272
294
|
// 先计算表格各列的宽度
|
|
273
295
|
// 同步表格的宽度
|
|
274
296
|
needWidth = 0;
|
|
297
|
+
fixedWidthTotal = 0;
|
|
275
298
|
flexColumnTotal = 0;
|
|
276
299
|
const thEles = headMainRef.value.querySelectorAll('th');
|
|
277
300
|
// const tdEles = bodyMainRef.value.querySelector('tr').querySelectorAll('td');
|
|
278
301
|
const tdEles = bodyMainRef.value.querySelectorAll('col');
|
|
279
302
|
// 只计算需要的宽度
|
|
280
303
|
mainColumns.value.forEach((c, ci) => {
|
|
304
|
+
var _a;
|
|
281
305
|
const th = thEles[ci].getBoundingClientRect();
|
|
282
306
|
const thWidth = th.width;
|
|
283
|
-
const td = tdEles[ci].getBoundingClientRect();
|
|
284
|
-
const tdWidth = td.width;
|
|
307
|
+
const td = (_a = tdEles[ci]) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
308
|
+
const tdWidth = (td === null || td === void 0 ? void 0 : td.width) || 0;
|
|
285
309
|
// console.log('td', tdEles[ci], tdWidth)
|
|
286
310
|
let maxWidth = Math.ceil(Math.max(thWidth, tdWidth));
|
|
287
311
|
if (c.prop === 'selection') {
|
|
@@ -295,6 +319,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
319
|
const width = parseInt(c.width + '');
|
|
296
320
|
c._maxWidth = width;
|
|
297
321
|
needWidth += width;
|
|
322
|
+
fixedWidthTotal += width;
|
|
298
323
|
}
|
|
299
324
|
} else {
|
|
300
325
|
needWidth += maxWidth;
|
|
@@ -305,57 +330,79 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
305
330
|
});
|
|
306
331
|
mapSize();
|
|
307
332
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
// 获取所有选中的行
|
|
341
|
-
getAllSelection() {
|
|
342
|
-
return Object.values(selectedRowMap);
|
|
343
|
-
},
|
|
344
|
-
// 清空所有选中的行
|
|
345
|
-
clearAllSelection() {
|
|
346
|
-
Object.keys(selectedRowMap).forEach(key => {
|
|
347
|
-
delete selectedRowMap[key];
|
|
348
|
-
});
|
|
349
|
-
_emit("selection-change", []);
|
|
333
|
+
/**
|
|
334
|
+
* 选中状态发生变化时, 更新selection
|
|
335
|
+
*/
|
|
336
|
+
function selectionChange(selection) {
|
|
337
|
+
updateSelectedRowMap(selection);
|
|
338
|
+
_emit("update:selection", selection);
|
|
339
|
+
_emit("selection-change", selection);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* 切换全部状态, 全选或者全不选
|
|
343
|
+
* @param selected 是否选中
|
|
344
|
+
*/
|
|
345
|
+
function toggleAllSelection(selected) {
|
|
346
|
+
if (selected) {
|
|
347
|
+
selectionChange(dataList.value);
|
|
348
|
+
} else {
|
|
349
|
+
selectionChange([]);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* 自动切换某一行的选中状态
|
|
354
|
+
* @param row 行数据
|
|
355
|
+
* @param clearAll 是否清空所有选中的行
|
|
356
|
+
*/
|
|
357
|
+
function toggleRowSelection(row, clearAll = false) {
|
|
358
|
+
const key = getRowKey(row);
|
|
359
|
+
const map = clearAll ? {} : Object.assign({}, selectedRowMap.value);
|
|
360
|
+
if (map[key]) {
|
|
361
|
+
delete map[key];
|
|
362
|
+
} else {
|
|
363
|
+
map[key] = row;
|
|
350
364
|
}
|
|
365
|
+
selectionChange(Object.values(map));
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* 设置某一行的选中状态
|
|
369
|
+
* @param row 行数据
|
|
370
|
+
* @param selected 是否选中
|
|
371
|
+
* @param clearAll 是否清空所有选中的行
|
|
372
|
+
*/
|
|
373
|
+
function setRowSelection(row, selected, clearAll = false) {
|
|
374
|
+
const key = getRowKey(row);
|
|
375
|
+
const map = clearAll ? {} : Object.assign({}, selectedRowMap.value);
|
|
376
|
+
if (selected) {
|
|
377
|
+
map[key] = row;
|
|
378
|
+
} else {
|
|
379
|
+
delete map[key];
|
|
380
|
+
}
|
|
381
|
+
selectionChange(Object.values(map));
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* 获取所有选中的行
|
|
385
|
+
* @returns 选中的行数据
|
|
386
|
+
*/
|
|
387
|
+
function getAllSelection() {
|
|
388
|
+
return Object.values(selectedRowMap.value);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* 清空所有选中的行
|
|
392
|
+
*/
|
|
393
|
+
function clearAllSelection() {
|
|
394
|
+
selectionChange([]);
|
|
395
|
+
}
|
|
396
|
+
_expose({
|
|
397
|
+
toggleAllSelection,
|
|
398
|
+
toggleRowSelection,
|
|
399
|
+
setRowSelection,
|
|
400
|
+
getAllSelection,
|
|
401
|
+
clearAllSelection
|
|
351
402
|
});
|
|
352
403
|
onMounted(() => {
|
|
353
|
-
if (_props.data.length === 0) {
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
404
|
init();
|
|
357
405
|
nextTick(() => {
|
|
358
|
-
init();
|
|
359
406
|
initStyle();
|
|
360
407
|
if (rootRef.value) {
|
|
361
408
|
ro.observe(rootRef.value);
|
|
@@ -363,8 +410,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
363
410
|
});
|
|
364
411
|
});
|
|
365
412
|
watch(() => _props.data, () => {
|
|
413
|
+
init();
|
|
366
414
|
nextTick(() => {
|
|
367
|
-
|
|
415
|
+
initStyle();
|
|
368
416
|
});
|
|
369
417
|
}, {
|
|
370
418
|
deep: true
|
|
@@ -377,6 +425,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
377
425
|
}, {
|
|
378
426
|
deep: true
|
|
379
427
|
});
|
|
428
|
+
watch(() => _props.selection, (newVal, oldVal) => {
|
|
429
|
+
updateSelectedRowMap(newVal);
|
|
430
|
+
}, {
|
|
431
|
+
deep: true
|
|
432
|
+
// immediate: true
|
|
433
|
+
});
|
|
380
434
|
onBeforeMount(() => {
|
|
381
435
|
// 组件销毁前, 取消对元素的监控
|
|
382
436
|
if (rootRef.value) {
|
|
@@ -392,22 +446,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
392
446
|
// 多选框的列单独处理
|
|
393
447
|
body = createVNode(Checkbox, {
|
|
394
448
|
"key": "all",
|
|
395
|
-
"partial": Object.keys(selectedRowMap).length > 0 && Object.keys(selectedRowMap).length <
|
|
396
|
-
"modelValue": Object.keys(selectedRowMap).length ===
|
|
449
|
+
"partial": Object.keys(selectedRowMap.value).length > 0 && Object.keys(selectedRowMap.value).length < dataList.value.length,
|
|
450
|
+
"modelValue": dataList.value.length > 0 && Object.keys(selectedRowMap.value).length === dataList.value.length ? true : false,
|
|
397
451
|
"onChange": v => {
|
|
398
452
|
if (v) {
|
|
399
453
|
// 全选
|
|
400
|
-
|
|
401
|
-
const key = getRowKey(r);
|
|
402
|
-
selectedRowMap[key] = r;
|
|
403
|
-
});
|
|
454
|
+
toggleAllSelection(true);
|
|
404
455
|
} else {
|
|
405
456
|
// 取消全选
|
|
406
|
-
|
|
407
|
-
delete selectedRowMap[k];
|
|
408
|
-
});
|
|
457
|
+
toggleAllSelection(false);
|
|
409
458
|
}
|
|
410
|
-
_emit("selection-change", Object.values(selectedRowMap));
|
|
459
|
+
_emit("selection-change", Object.values(selectedRowMap.value));
|
|
411
460
|
}
|
|
412
461
|
}, null);
|
|
413
462
|
} else {
|
|
@@ -485,14 +534,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
485
534
|
} else if (c.prop === "selection") {
|
|
486
535
|
body = createVNode(Checkbox, {
|
|
487
536
|
"key": rowKey,
|
|
488
|
-
"modelValue": selectedRowMap[rowKey] ? true : false,
|
|
537
|
+
"modelValue": selectedRowMap.value[rowKey] ? true : false,
|
|
489
538
|
"onChange": v => {
|
|
490
|
-
if (
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
delete selectedRowMap[rowKey];
|
|
539
|
+
if (!_props.autoSelectRowOnClick && !_props.autoToggleRowOnClick) {
|
|
540
|
+
// 如果这两个都没打开, 这里需要手动触发
|
|
541
|
+
toggleRowSelection(r);
|
|
494
542
|
}
|
|
495
|
-
_emit("selection-change", Object.values(selectedRowMap));
|
|
496
543
|
}
|
|
497
544
|
}, null);
|
|
498
545
|
} else {
|
|
@@ -514,6 +561,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
514
561
|
function cellClick(p) {
|
|
515
562
|
// 点击单元格事件
|
|
516
563
|
// console.log('cellClick', p)
|
|
564
|
+
if (_props.autoSelectRowOnClick) {
|
|
565
|
+
// 点击行时只选中当前行
|
|
566
|
+
setRowSelection(p.row, true, true);
|
|
567
|
+
} else if (_props.autoToggleRowOnClick) {
|
|
568
|
+
// 点击行时切换当前行选中状态
|
|
569
|
+
toggleRowSelection(p.row);
|
|
570
|
+
}
|
|
517
571
|
_emit("cell-click", p);
|
|
518
572
|
}
|
|
519
573
|
return () => {
|
|
@@ -526,7 +580,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
526
580
|
"v_table--full-border": _props.border == 'full',
|
|
527
581
|
"v_table--enable_scroll": _props.scrollX,
|
|
528
582
|
'v_table--layout-fixed': defineWidth.value > 0,
|
|
529
|
-
'v_table--debug':
|
|
583
|
+
'v_table--debug': openDebug
|
|
530
584
|
}],
|
|
531
585
|
"onMouseleave": () => {
|
|
532
586
|
currentRowIndex.value = -1;
|
|
@@ -646,7 +700,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
646
700
|
return createVNode("col", {
|
|
647
701
|
"width": c.width && c.width !== 'minimal' ? c.width + 'px' : colsWidth.value[ci]
|
|
648
702
|
}, null);
|
|
649
|
-
})]), createVNode("tbody", null, [
|
|
703
|
+
})]), createVNode("tbody", null, [dataList.value.map((r, ri) => {
|
|
650
704
|
return createVNode("tr", {
|
|
651
705
|
"key": getRowKey(r),
|
|
652
706
|
"class": [{
|
|
@@ -714,7 +768,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
714
768
|
} : {}
|
|
715
769
|
}, [createVNode("colgroup", null, [mainColumns.value.map((c, ci) => createVNode("col", {
|
|
716
770
|
"width": c.width && c.width !== 'minimal' ? c.width + 'px' : colsWidth.value[ci]
|
|
717
|
-
}, null))]), createVNode("tbody", null, [
|
|
771
|
+
}, null))]), createVNode("tbody", null, [dataList.value.map((r, ri) => createVNode("tr", {
|
|
718
772
|
"key": getRowKey(r),
|
|
719
773
|
"class": [{
|
|
720
774
|
"v_table_tr--hover": ri === currentRowIndex.value
|
|
@@ -749,7 +803,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
749
803
|
ri,
|
|
750
804
|
ci
|
|
751
805
|
})]);
|
|
752
|
-
})]))])]),
|
|
806
|
+
})]))])]), dataList.value.length === 0 && createVNode("div", {
|
|
753
807
|
"class": "v_table_empty"
|
|
754
808
|
}, [_slots.empty ? _slots.empty() : "Empty Data"])]
|
|
755
809
|
}),
|
|
@@ -776,7 +830,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
776
830
|
return createVNode("col", {
|
|
777
831
|
"width": c.width && c.width !== 'minimal' ? c.width + 'px' : colsWidth.value[i]
|
|
778
832
|
}, null);
|
|
779
|
-
})]), createVNode("tbody", null, [
|
|
833
|
+
})]), createVNode("tbody", null, [dataList.value.map((r, ri) => createVNode("tr", {
|
|
780
834
|
"key": getRowKey(r),
|
|
781
835
|
"class": [{
|
|
782
836
|
"v_table_tr--hover": ri === currentRowIndex.value
|
|
@@ -10,7 +10,6 @@ export type TableColumnProp = {
|
|
|
10
10
|
sortable?: Slot | boolean;
|
|
11
11
|
filter?: Slot | boolean;
|
|
12
12
|
visible?: boolean;
|
|
13
|
-
_maxWidth?: number;
|
|
14
13
|
};
|
|
15
14
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
15
|
data: {
|
|
@@ -34,8 +33,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
33
|
default: boolean;
|
|
35
34
|
};
|
|
36
35
|
selection: {
|
|
37
|
-
type:
|
|
38
|
-
default:
|
|
36
|
+
type: PropType<any[]>;
|
|
37
|
+
default: () => any[];
|
|
39
38
|
};
|
|
40
39
|
placeholder: {
|
|
41
40
|
type: StringConstructor;
|
|
@@ -74,7 +73,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
74
73
|
type: StringConstructor;
|
|
75
74
|
default: string;
|
|
76
75
|
};
|
|
77
|
-
|
|
76
|
+
autoSelectRowOnClick: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
autoToggleRowOnClick: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("row-click" | "selection-change" | "update:selection" | "sort-change" | "cell-click")[], "row-click" | "selection-change" | "update:selection" | "sort-change" | "cell-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
78
85
|
data: {
|
|
79
86
|
type: PropType<any[]>;
|
|
80
87
|
default: () => any[];
|
|
@@ -96,8 +103,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
96
103
|
default: boolean;
|
|
97
104
|
};
|
|
98
105
|
selection: {
|
|
99
|
-
type:
|
|
100
|
-
default:
|
|
106
|
+
type: PropType<any[]>;
|
|
107
|
+
default: () => any[];
|
|
101
108
|
};
|
|
102
109
|
placeholder: {
|
|
103
110
|
type: StringConstructor;
|
|
@@ -136,9 +143,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
136
143
|
type: StringConstructor;
|
|
137
144
|
default: string;
|
|
138
145
|
};
|
|
146
|
+
autoSelectRowOnClick: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
autoToggleRowOnClick: {
|
|
151
|
+
type: BooleanConstructor;
|
|
152
|
+
default: boolean;
|
|
153
|
+
};
|
|
139
154
|
}>> & Readonly<{
|
|
140
155
|
"onRow-click"?: (...args: any[]) => any;
|
|
141
156
|
"onSelection-change"?: (...args: any[]) => any;
|
|
157
|
+
"onUpdate:selection"?: (...args: any[]) => any;
|
|
142
158
|
"onSort-change"?: (...args: any[]) => any;
|
|
143
159
|
"onCell-click"?: (...args: any[]) => any;
|
|
144
160
|
}>, {
|
|
@@ -147,7 +163,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
147
163
|
hover: boolean;
|
|
148
164
|
border: boolean | "full";
|
|
149
165
|
stripe: boolean;
|
|
150
|
-
selection:
|
|
166
|
+
selection: any[];
|
|
151
167
|
placeholder: string;
|
|
152
168
|
align: string;
|
|
153
169
|
size: string;
|
|
@@ -158,5 +174,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
158
174
|
scrollX: boolean;
|
|
159
175
|
scrollY: boolean;
|
|
160
176
|
height: string;
|
|
177
|
+
autoSelectRowOnClick: boolean;
|
|
178
|
+
autoToggleRowOnClick: boolean;
|
|
161
179
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
162
180
|
export default _default;
|
package/dist/vary-ui.js
CHANGED
|
@@ -17,7 +17,7 @@ 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, createApp, h } from 'vue';
|
|
20
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
20
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BwJJ-9J8.js';
|
|
21
21
|
import Tab from './lib/Tab/Tab.js';
|
|
22
22
|
import Table from './lib/Table/Table.js';
|
|
23
23
|
import TableColumn from './lib/TableColumn/TableColumn.js';
|
|
@@ -27,10 +27,10 @@ import RadioGroup from './lib/RadioGroup/RadioGroup.js';
|
|
|
27
27
|
export { default as Message } from './lib/Message/Message.js';
|
|
28
28
|
export { default as Confirm } from './lib/Confirm/Confirm.js';
|
|
29
29
|
import './lib/Loading/Loading.js';
|
|
30
|
-
import { c as config, s as setConfig } from './config-
|
|
31
|
-
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-
|
|
32
|
-
import { L as Loading } from './Loading-
|
|
33
|
-
import './Wrap-
|
|
30
|
+
import { c as config, s as setConfig } from './config-BAKtXHgR.js';
|
|
31
|
+
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-B7J83i5S.js';
|
|
32
|
+
import { L as Loading } from './Loading-DMFKMWpc.js';
|
|
33
|
+
import './Wrap-GIpwRQ0Z.js';
|
|
34
34
|
|
|
35
35
|
var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
36
36
|
props: {
|
package/package.json
CHANGED
/package/dist/{_plugin-vue_export-helper-BEsJRPvd.js → _plugin-vue_export-helper-BwJJ-9J8.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|