bkui-vue 0.0.3-beta.2-7 → 0.0.3-beta.2-8

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.
@@ -16,6 +16,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__exception_12c197e0__ from "../exception";
16
16
  import * as __WEBPACK_EXTERNAL_MODULE__button_59c00871__ from "../button";
17
17
  import * as __WEBPACK_EXTERNAL_MODULE__icon__2ba2075d__ from "../icon/";
18
18
  import * as __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__ from "../popover";
19
+ import * as __WEBPACK_EXTERNAL_MODULE__input_752b0149__ from "../input";
19
20
  /******/ // The require scope
20
21
  /******/ var __webpack_require__ = {};
21
22
  /******/
@@ -111,7 +112,7 @@ function defineProperty_defineProperty(obj, key, value) {
111
112
  ;// CONCATENATED MODULE: external "vue"
112
113
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
113
114
  var external_vue_y = x => () => x
114
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
115
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
115
116
  ;// CONCATENATED MODULE: ../../packages/table/src/const.ts
116
117
 
117
118
  /*
@@ -1588,195 +1589,6 @@ function v4(options, buf, offset) {
1588
1589
  }
1589
1590
 
1590
1591
  /* harmony default export */ const esm_browser_v4 = (v4);
1591
- ;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-pagination.tsx
1592
-
1593
-
1594
-
1595
- function use_pagination_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1596
- function use_pagination_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_pagination_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_pagination_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1597
- /*
1598
- * Tencent is pleased to support the open source community by making
1599
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1600
- *
1601
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1602
- *
1603
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1604
- *
1605
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1606
- *
1607
- * ---------------------------------------------------
1608
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1609
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1610
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1611
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1612
- *
1613
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1614
- * the Software.
1615
- *
1616
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1617
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1618
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1619
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1620
- * IN THE SOFTWARE.
1621
- */
1622
-
1623
-
1624
- /**
1625
- * 处理 Prop中的分页配置
1626
- * prop中的配置会覆盖本地的配置
1627
- * @param propPagination 用户传入的配置
1628
- * @param defVal 默认配置
1629
- * @returns 返回值
1630
- */
1631
- var resolvePaginationOption = function resolvePaginationOption(propPagination, defVal) {
1632
- if (!!propPagination) {
1633
- if (typeof_typeof(propPagination) === 'object') {
1634
- var current = Object.prototype.hasOwnProperty.call(propPagination, 'current') ? propPagination.current : propPagination.value;
1635
- if (!/\d+/.test(current)) {
1636
- current = 1;
1637
- }
1638
- return use_pagination_objectSpread(use_pagination_objectSpread(use_pagination_objectSpread({}, defVal), propPagination), {}, {
1639
- current: current
1640
- });
1641
- }
1642
- return defVal;
1643
- }
1644
- return {};
1645
- };
1646
- /* harmony default export */ const use_pagination = (function (props) {
1647
- var startIndex = (0,external_vue_namespaceObject.ref)(0);
1648
- var endIndex = (0,external_vue_namespaceObject.ref)(0);
1649
- /**
1650
- * 分页配置
1651
- * 用于配置分页组件
1652
- * pagination 为Prop传入配置
1653
- * 方便兼容内置分页功能,此处需要单独处理count
1654
- */
1655
- var propsData = (0,external_vue_namespaceObject.computed)(function () {
1656
- return props.data;
1657
- });
1658
- var localPagination = (0,external_vue_namespaceObject.ref)(null);
1659
- var indexData = (0,external_vue_namespaceObject.reactive)([]);
1660
- // 当前分页缓存,用于支持内置前端分页,用户无需接收change事件来自行处理数据分割
1661
- var pagination = (0,external_vue_namespaceObject.reactive)({
1662
- count: 0,
1663
- limit: 10,
1664
- current: 1,
1665
- align: 'right',
1666
- layout: ['total', 'limit', 'list']
1667
- });
1668
- var resolveLocalPagination = function resolveLocalPagination() {
1669
- if (!props.pagination) {
1670
- return;
1671
- }
1672
- localPagination.value = props.remotePagination ? pagination : use_pagination_objectSpread(use_pagination_objectSpread({}, pagination), {}, {
1673
- count: indexData.length
1674
- });
1675
- };
1676
- /**
1677
- * 重置当前分页开始位置 & 结束位置
1678
- * 如果未启用分页,则开始位置为0,结束位置为 data.length
1679
- * @returns
1680
- */
1681
- var resetStartEndIndex = function resetStartEndIndex() {
1682
- if (!props.pagination || props.remotePagination) {
1683
- startIndex.value = 0;
1684
- endIndex.value = indexData.length;
1685
- return;
1686
- }
1687
- // 如果是前端分页
1688
- startIndex.value = (pagination.current - 1) * pagination.limit;
1689
- endIndex.value = pagination.current * pagination.limit;
1690
- };
1691
- /**
1692
- * 当前页分页数据
1693
- */
1694
- var pageData = (0,external_vue_namespaceObject.reactive)([]);
1695
- var sort = function sort(sourceData, sortFn, column, type, sortScope) {
1696
- if (typeof sortFn === 'function') {
1697
- sourceData.sort(function (a, b) {
1698
- return sortFn(a, b, type, column, sortScope);
1699
- });
1700
- }
1701
- };
1702
- /**
1703
- * 初始化排序动作
1704
- * @param data
1705
- * @param sortColumns
1706
- */
1707
- var multiSort = function multiSort(data, sortColumns) {
1708
- sortColumns.forEach(function (item) {
1709
- sort(data, item.schema[COLUMN_ATTRIBUTE.COL_SORT_FN], item.column, item.schema[COLUMN_ATTRIBUTE.COL_SORT_TYPE], item.schema[COLUMN_ATTRIBUTE.COL_SORT_SCOPE]);
1710
- });
1711
- };
1712
- var filter = function filter(sourceData, filterFn) {
1713
- if (typeof filterFn === 'function') {
1714
- var filterVals = sourceData.filter(function (row, index) {
1715
- return filterFn(row, index, indexData);
1716
- });
1717
- sourceData.length = 0;
1718
- sourceData.push.apply(sourceData, _toConsumableArray(filterVals));
1719
- }
1720
- return sourceData;
1721
- };
1722
- var resolveIndexData = function resolveIndexData() {
1723
- return new Promise(function (resolve) {
1724
- (0,external_vue_namespaceObject.nextTick)(function () {
1725
- var target = propsData.value.slice();
1726
- indexData.length = 0;
1727
- indexData.push.apply(indexData, _toConsumableArray(target));
1728
- resolve();
1729
- });
1730
- });
1731
- };
1732
- var resolvePageData = function resolvePageData(filterFn, sortFn, column, type, sortScope, multiCol) {
1733
- var sourceData = indexData.slice();
1734
- if (multiCol !== null && multiCol !== void 0 && multiCol.length) {
1735
- multiSort(sourceData, multiCol);
1736
- }
1737
- pageData.length = 0;
1738
- pageData.push.apply(pageData, _toConsumableArray(sourceData.slice(startIndex.value, endIndex.value)));
1739
- filter(pageData, filterFn);
1740
- sort(pageData, sortFn, column, type, sortScope);
1741
- resolveLocalPagination();
1742
- };
1743
- var resolvePageDataBySortList = function resolvePageDataBySortList(multiCol) {
1744
- resolvePageData(null, null, null, null, null, multiCol);
1745
- };
1746
- var multiFilter = function multiFilter(filterFnList) {
1747
- var sourceData = indexData.slice();
1748
- var target = filterFnList.reduce(function (result, fn) {
1749
- return filter(result, fn);
1750
- }, sourceData);
1751
- pageData.length = 0;
1752
- pageData.push.apply(pageData, _toConsumableArray(target));
1753
- };
1754
- var handlePaginationChange = function handlePaginationChange() {
1755
- pagination = resolvePaginationOption(props.pagination, pagination);
1756
- resolveLocalPagination();
1757
- resetStartEndIndex();
1758
- resolvePageData();
1759
- };
1760
- handlePaginationChange();
1761
- (0,external_vue_namespaceObject.watch)(function () {
1762
- return [props.pagination];
1763
- }, function () {
1764
- handlePaginationChange();
1765
- }, {
1766
- deep: true
1767
- });
1768
- return {
1769
- pageData: pageData,
1770
- indexData: indexData,
1771
- localPagination: localPagination,
1772
- resolvePageData: resolvePageData,
1773
- resolveIndexData: resolveIndexData,
1774
- resolvePageDataBySortList: resolvePageDataBySortList,
1775
- resetStartEndIndex: resetStartEndIndex,
1776
- multiFilter: multiFilter,
1777
- sort: sort
1778
- };
1779
- });
1780
1592
  ;// CONCATENATED MODULE: external "lodash/debounce"
1781
1593
  var debounce_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1782
1594
  var debounce_y = x => () => x
@@ -2753,6 +2565,7 @@ function utils_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
2753
2565
 
2754
2566
 
2755
2567
 
2568
+
2756
2569
  /**
2757
2570
  * 解析Prop值 | 可能为多种类型 & 函数返回的场景
2758
2571
  * @param prop 当前Prop
@@ -2933,6 +2746,10 @@ var resolveHeadConfig = function resolveHeadConfig(props) {
2933
2746
  height: headHeight
2934
2747
  }, thead);
2935
2748
  };
2749
+ var getRegExp = function getRegExp(val) {
2750
+ var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ig';
2751
+ return new RegExp("".concat(val).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), flags);
2752
+ };
2936
2753
  /**
2937
2754
  * 获取当前行指定列的内容
2938
2755
  * @param row 当前行
@@ -2946,11 +2763,9 @@ var getRowText = function getRowText(row, key, format) {
2946
2763
  if (typeof row === 'string' || typeof row === 'number' || typeof row === 'boolean') {
2947
2764
  result = row;
2948
2765
  }
2949
- var getRegExp = function getRegExp(val) {
2950
- var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ig';
2951
- return new RegExp("".concat(val).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), flags);
2952
- };
2953
- result = (0,get_namespaceObject["default"])(row, key);
2766
+ if (typeof_typeof(row) === 'object') {
2767
+ result = (0,get_namespaceObject["default"])(row, key);
2768
+ }
2954
2769
  if (format !== null && format !== void 0 && format.length) {
2955
2770
  format.forEach(function (reg) {
2956
2771
  if (typeof reg === 'function') {
@@ -3203,6 +3018,202 @@ var resolveColumnSortProp = function resolveColumnSortProp(col, props) {
3203
3018
  active: !!col.sort
3204
3019
  };
3205
3020
  };
3021
+ var getRawData = function getRawData(data) {
3022
+ if ((0,external_vue_namespaceObject.isProxy)(data)) {
3023
+ return (0,external_vue_namespaceObject.toRaw)(data);
3024
+ }
3025
+ return data;
3026
+ };
3027
+ ;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-pagination.tsx
3028
+
3029
+
3030
+
3031
+ function use_pagination_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3032
+ function use_pagination_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_pagination_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_pagination_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3033
+ /*
3034
+ * Tencent is pleased to support the open source community by making
3035
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3036
+ *
3037
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3038
+ *
3039
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3040
+ *
3041
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3042
+ *
3043
+ * ---------------------------------------------------
3044
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3045
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3046
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3047
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3048
+ *
3049
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3050
+ * the Software.
3051
+ *
3052
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3053
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3054
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3055
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3056
+ * IN THE SOFTWARE.
3057
+ */
3058
+
3059
+
3060
+
3061
+ /**
3062
+ * 处理 Prop中的分页配置
3063
+ * prop中的配置会覆盖本地的配置
3064
+ * @param propPagination 用户传入的配置
3065
+ * @param defVal 默认配置
3066
+ * @returns 返回值
3067
+ */
3068
+ var resolvePaginationOption = function resolvePaginationOption(propPagination, defVal) {
3069
+ if (!!propPagination) {
3070
+ if (typeof_typeof(propPagination) === 'object') {
3071
+ var current = Object.prototype.hasOwnProperty.call(propPagination, 'current') ? propPagination.current : propPagination.value;
3072
+ if (!/\d+/.test(current)) {
3073
+ current = 1;
3074
+ }
3075
+ return use_pagination_objectSpread(use_pagination_objectSpread(use_pagination_objectSpread({}, defVal), propPagination), {}, {
3076
+ current: current
3077
+ });
3078
+ }
3079
+ return defVal;
3080
+ }
3081
+ return {};
3082
+ };
3083
+ /* harmony default export */ const use_pagination = (function (props) {
3084
+ var startIndex = (0,external_vue_namespaceObject.ref)(0);
3085
+ var endIndex = (0,external_vue_namespaceObject.ref)(0);
3086
+ /**
3087
+ * 分页配置
3088
+ * 用于配置分页组件
3089
+ * pagination 为Prop传入配置
3090
+ * 方便兼容内置分页功能,此处需要单独处理count
3091
+ */
3092
+ var propsData = (0,external_vue_namespaceObject.computed)(function () {
3093
+ return props.data;
3094
+ });
3095
+ var localPagination = (0,external_vue_namespaceObject.ref)(null);
3096
+ var indexData = (0,external_vue_namespaceObject.reactive)([]);
3097
+ // 当前分页缓存,用于支持内置前端分页,用户无需接收change事件来自行处理数据分割
3098
+ var pagination = (0,external_vue_namespaceObject.reactive)({
3099
+ count: 0,
3100
+ limit: 10,
3101
+ current: 1,
3102
+ align: 'right',
3103
+ layout: ['total', 'limit', 'list']
3104
+ });
3105
+ var resolveLocalPagination = function resolveLocalPagination() {
3106
+ if (!props.pagination) {
3107
+ return;
3108
+ }
3109
+ localPagination.value = props.remotePagination ? pagination : use_pagination_objectSpread(use_pagination_objectSpread({}, pagination), {}, {
3110
+ count: indexData.length
3111
+ });
3112
+ };
3113
+ /**
3114
+ * 重置当前分页开始位置 & 结束位置
3115
+ * 如果未启用分页,则开始位置为0,结束位置为 data.length
3116
+ * @returns
3117
+ */
3118
+ var resetStartEndIndex = function resetStartEndIndex() {
3119
+ if (!props.pagination || props.remotePagination) {
3120
+ startIndex.value = 0;
3121
+ endIndex.value = indexData.length;
3122
+ return;
3123
+ }
3124
+ // 如果是前端分页
3125
+ startIndex.value = (pagination.current - 1) * pagination.limit;
3126
+ endIndex.value = pagination.current * pagination.limit;
3127
+ };
3128
+ /**
3129
+ * 当前页分页数据
3130
+ */
3131
+ var pageData = (0,external_vue_namespaceObject.reactive)([]);
3132
+ var sort = function sort(sourceData, sortFn, column, type, sortScope) {
3133
+ if (typeof sortFn === 'function') {
3134
+ sourceData.sort(function (a, b) {
3135
+ return sortFn(a, b, type, column, sortScope);
3136
+ });
3137
+ }
3138
+ };
3139
+ /**
3140
+ * 初始化排序动作
3141
+ * @param data
3142
+ * @param sortColumns
3143
+ */
3144
+ var multiSort = function multiSort(data, sortColumns) {
3145
+ sortColumns.forEach(function (item) {
3146
+ sort(data, item.schema[COLUMN_ATTRIBUTE.COL_SORT_FN], item.column, item.schema[COLUMN_ATTRIBUTE.COL_SORT_TYPE], item.schema[COLUMN_ATTRIBUTE.COL_SORT_SCOPE]);
3147
+ });
3148
+ };
3149
+ var filter = function filter(sourceData, filterFn) {
3150
+ if (typeof filterFn === 'function') {
3151
+ var filterVals = sourceData.filter(function (row, index) {
3152
+ return filterFn(row, index, indexData);
3153
+ });
3154
+ sourceData.length = 0;
3155
+ sourceData.push.apply(sourceData, _toConsumableArray(filterVals));
3156
+ }
3157
+ return sourceData;
3158
+ };
3159
+ var resolveIndexData = function resolveIndexData() {
3160
+ return new Promise(function (resolve) {
3161
+ (0,external_vue_namespaceObject.nextTick)(function () {
3162
+ var target = propsData.value.slice();
3163
+ indexData.length = 0;
3164
+ indexData.push.apply(indexData, _toConsumableArray(getRawData(target)));
3165
+ resolve();
3166
+ });
3167
+ });
3168
+ };
3169
+ var resolvePageData = function resolvePageData(filterFn, sortFn, column, type, sortScope, multiCol) {
3170
+ var sourceData = indexData.slice();
3171
+ if (multiCol !== null && multiCol !== void 0 && multiCol.length) {
3172
+ multiSort(sourceData, multiCol);
3173
+ }
3174
+ pageData.length = 0;
3175
+ pageData.push.apply(pageData, _toConsumableArray(sourceData.slice(startIndex.value, endIndex.value)));
3176
+ filter(pageData, filterFn);
3177
+ sort(pageData, sortFn, column, type, sortScope);
3178
+ resolveLocalPagination();
3179
+ };
3180
+ var resolvePageDataBySortList = function resolvePageDataBySortList(multiCol) {
3181
+ resolvePageData(null, null, null, null, null, multiCol);
3182
+ };
3183
+ var multiFilter = function multiFilter(filterFnList) {
3184
+ var sourceData = indexData.slice();
3185
+ var target = filterFnList.reduce(function (result, fn) {
3186
+ return filter(result, fn);
3187
+ }, sourceData);
3188
+ pageData.length = 0;
3189
+ pageData.push.apply(pageData, _toConsumableArray(getRawData(target)));
3190
+ };
3191
+ var handlePaginationChange = function handlePaginationChange() {
3192
+ pagination = resolvePaginationOption(props.pagination, pagination);
3193
+ resolveLocalPagination();
3194
+ resetStartEndIndex();
3195
+ resolvePageData();
3196
+ };
3197
+ handlePaginationChange();
3198
+ (0,external_vue_namespaceObject.watch)(function () {
3199
+ return [props.pagination];
3200
+ }, function () {
3201
+ handlePaginationChange();
3202
+ }, {
3203
+ deep: true
3204
+ });
3205
+ return {
3206
+ pageData: pageData,
3207
+ indexData: indexData,
3208
+ localPagination: localPagination,
3209
+ resolvePageData: resolvePageData,
3210
+ resolveIndexData: resolveIndexData,
3211
+ resolvePageDataBySortList: resolvePageDataBySortList,
3212
+ resetStartEndIndex: resetStartEndIndex,
3213
+ multiFilter: multiFilter,
3214
+ sort: sort
3215
+ };
3216
+ });
3206
3217
  ;// CONCATENATED MODULE: ../../packages/table/src/use-attributes.ts
3207
3218
 
3208
3219
 
@@ -3590,7 +3601,7 @@ function use_attributes_objectSpread(e) { for (var r = 1; r < arguments.length;
3590
3601
  if (typeof item === 'string') {
3591
3602
  return getRowValue(row, item) === item;
3592
3603
  }
3593
- return item === row;
3604
+ return getRawData(item) === getRawData(row);
3594
3605
  });
3595
3606
  }
3596
3607
  return false;
@@ -3616,7 +3627,8 @@ function use_attributes_objectSpread(e) { for (var r = 1; r < arguments.length;
3616
3627
  (_formatData$data = formatData.data).push.apply(_formatData$data, _toConsumableArray(data));
3617
3628
  var hasSelectedRow = false;
3618
3629
  var hasUnSelectedRow = false;
3619
- (data || []).forEach(function (row, index) {
3630
+ (data || []).forEach(function (item, index) {
3631
+ var row = getRawData(item);
3620
3632
  var rowId = getRowId(row, esm_browser_v4(), props);
3621
3633
  var isSelected = isRowSelected(row);
3622
3634
  if (isSelected) {
@@ -3657,7 +3669,8 @@ function use_attributes_objectSpread(e) { for (var r = 1; r < arguments.length;
3657
3669
  * @param attrName
3658
3670
  * @param attrValue
3659
3671
  */
3660
- var setRowAttribute = function setRowAttribute(row, attrName, attrValue) {
3672
+ var setRowAttribute = function setRowAttribute(item, attrName, attrValue) {
3673
+ var row = getRawData(item);
3661
3674
  var target = formatData.dataSchema.get(row);
3662
3675
  if (target && Object.prototype.hasOwnProperty.call(target, attrName)) {
3663
3676
  target[attrName] = attrValue;
@@ -3698,8 +3711,9 @@ function use_attributes_objectSpread(e) { for (var r = 1; r < arguments.length;
3698
3711
  var setRowExpand = function setRowExpand(row, isExpand) {
3699
3712
  setRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND, isExpand);
3700
3713
  };
3701
- var getRowAttribute = function getRowAttribute(row, attrName) {
3714
+ var getRowAttribute = function getRowAttribute(item, attrName) {
3702
3715
  var _formatData$dataSchem6;
3716
+ var row = getRawData(item);
3703
3717
  return (_formatData$dataSchem6 = formatData.dataSchema.get(row)) === null || _formatData$dataSchem6 === void 0 ? void 0 : _formatData$dataSchem6[attrName];
3704
3718
  };
3705
3719
  var toggleRowSelection = function toggleRowSelection(row) {
@@ -5068,6 +5082,10 @@ function _isSlot(s) {
5068
5082
  onDrop: onDrop
5069
5083
  };
5070
5084
  });
5085
+ ;// CONCATENATED MODULE: external "../input"
5086
+ var external_input_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
5087
+ var external_input_y = x => () => x
5088
+ const external_input_namespaceObject = external_input_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__input_752b0149__["default"] });
5071
5089
  ;// CONCATENATED MODULE: ../../packages/table/src/plugins/head-filter.tsx
5072
5090
 
5073
5091
 
@@ -5108,6 +5126,7 @@ function _isSlot(s) {
5108
5126
 
5109
5127
 
5110
5128
 
5129
+
5111
5130
  function head_filter_isSlot(s) {
5112
5131
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
5113
5132
  }
@@ -5348,7 +5367,7 @@ function head_filter_isSlot(s) {
5348
5367
  "class": headFilterContentClass
5349
5368
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
5350
5369
  "style": "padding: 4px 10px;"
5351
- }, [(0,external_vue_namespaceObject.createVNode)((0,external_vue_namespaceObject.resolveComponent)("bk-input"), {
5370
+ }, [(0,external_vue_namespaceObject.createVNode)(external_input_namespaceObject["default"], {
5352
5371
  "modelValue": searchValue.value,
5353
5372
  "onUpdate:modelValue": function onUpdateModelValue($event) {
5354
5373
  return searchValue.value = $event;
@@ -84,7 +84,7 @@ declare const _default: (props: TablePropTypes) => {
84
84
  clearSelection: () => void;
85
85
  clearColumnSort: (reset?: boolean) => void;
86
86
  toggleRowSelection: (row: any) => void;
87
- getRowAttribute: (row: any | IEmptyObject, attrName: string) => any;
87
+ getRowAttribute: (item: any | IEmptyObject, attrName: string) => any;
88
88
  filter: () => void;
89
89
  sortData: (column: Column) => void;
90
90
  isCheckedAll: () => boolean;
@@ -133,3 +133,4 @@ export declare const resolveColumnSortProp: (col: Column, props: TablePropTypes)
133
133
  scope: import("./props").SortScope;
134
134
  active: boolean;
135
135
  };
136
+ export declare const getRawData: (data: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "0.0.3-beta.2-7",
3
+ "version": "0.0.3-beta.2-8",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",