@coreui/vue-pro 4.1.2 → 4.1.3
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/README.md +1 -1
- package/dist/components/smart-table/CSmartTable.d.ts +0 -3
- package/dist/index.es.js +9 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/smart-table/CSmartTable.ts +19 -15
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
Several quick start options are available:
|
|
45
45
|
|
|
46
|
-
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.1.
|
|
46
|
+
- [Download the latest release](https://github.com/coreui/coreui-vue-pro/archive/v4.1.3.zip)
|
|
47
47
|
- Clone the repo: `git clone https://github.com/coreui/coreui-vue-pro.git`
|
|
48
48
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue-pro`
|
|
49
49
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue-pro`
|
|
@@ -66,7 +66,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
66
66
|
*/
|
|
67
67
|
columns: {
|
|
68
68
|
type: PropType<string[] | Column[]>;
|
|
69
|
-
default: () => never[];
|
|
70
69
|
required: false;
|
|
71
70
|
};
|
|
72
71
|
/**
|
|
@@ -345,7 +344,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
345
344
|
*/
|
|
346
345
|
columns: {
|
|
347
346
|
type: PropType<string[] | Column[]>;
|
|
348
|
-
default: () => never[];
|
|
349
347
|
required: false;
|
|
350
348
|
};
|
|
351
349
|
/**
|
|
@@ -574,7 +572,6 @@ declare const CSmartTable: import("vue").DefineComponent<{
|
|
|
574
572
|
pagination: boolean;
|
|
575
573
|
activePage: number;
|
|
576
574
|
clickableRows: boolean;
|
|
577
|
-
columns: string[] | Column[];
|
|
578
575
|
selectable: boolean;
|
|
579
576
|
columnFilterValue: ColumnFilterValue;
|
|
580
577
|
columnSorter: boolean | Sorter;
|
package/dist/index.es.js
CHANGED
|
@@ -9148,7 +9148,6 @@ const CSmartTable = defineComponent({
|
|
|
9148
9148
|
*/
|
|
9149
9149
|
columns: {
|
|
9150
9150
|
type: Array,
|
|
9151
|
-
default: () => [],
|
|
9152
9151
|
required: false,
|
|
9153
9152
|
},
|
|
9154
9153
|
/**
|
|
@@ -9456,7 +9455,7 @@ const CSmartTable = defineComponent({
|
|
|
9456
9455
|
});
|
|
9457
9456
|
// functions
|
|
9458
9457
|
const isSortable = (i) => {
|
|
9459
|
-
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames[i]);
|
|
9458
|
+
const isDataColumn = itemsDataColumns.value.includes(rawColumnNames.value[i]);
|
|
9460
9459
|
let column;
|
|
9461
9460
|
if (props.columns)
|
|
9462
9461
|
column = props.columns[i];
|
|
@@ -9554,16 +9553,16 @@ const CSmartTable = defineComponent({
|
|
|
9554
9553
|
sorterState.state = '';
|
|
9555
9554
|
};
|
|
9556
9555
|
// computed
|
|
9557
|
-
const genCols = Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_');
|
|
9558
|
-
const rawColumnNames = props.columns
|
|
9556
|
+
const genCols = computed(() => Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_'));
|
|
9557
|
+
const rawColumnNames = computed(() => props.columns
|
|
9559
9558
|
? props.columns.map((column) => {
|
|
9560
9559
|
if (typeof column === 'object')
|
|
9561
9560
|
return column.key;
|
|
9562
9561
|
else
|
|
9563
9562
|
return column;
|
|
9564
9563
|
})
|
|
9565
|
-
: genCols; //! || el
|
|
9566
|
-
const itemsDataColumns = computed(() => rawColumnNames.filter((name) => genCols.includes(name)));
|
|
9564
|
+
: genCols.value); //! || el
|
|
9565
|
+
const itemsDataColumns = computed(() => rawColumnNames.value.filter((name) => genCols.value.includes(name)));
|
|
9567
9566
|
// variables
|
|
9568
9567
|
const columnFiltered = () => {
|
|
9569
9568
|
let _items = items.value;
|
|
@@ -9669,7 +9668,7 @@ const CSmartTable = defineComponent({
|
|
|
9669
9668
|
...props.tableHeadProps,
|
|
9670
9669
|
columnFilter: props.columnFilter,
|
|
9671
9670
|
columnFilterValue: columnFilterState.value,
|
|
9672
|
-
columns:
|
|
9671
|
+
columns: rawColumnNames.value,
|
|
9673
9672
|
columnSorter: props.columnSorter,
|
|
9674
9673
|
selectable: props.selectable,
|
|
9675
9674
|
selectAll: selectedAll.value,
|
|
@@ -9716,12 +9715,12 @@ const CSmartTable = defineComponent({
|
|
|
9716
9715
|
currentItems: currentItems.value,
|
|
9717
9716
|
firstItemOnActivePageIndex: firstItemOnActivePageIndex.value,
|
|
9718
9717
|
noItemsLabel: props.noItemsLabel,
|
|
9719
|
-
columns:
|
|
9718
|
+
columns: rawColumnNames.value,
|
|
9720
9719
|
scopedSlots: slots,
|
|
9721
9720
|
selectable: props.selectable,
|
|
9722
9721
|
onRowChecked: (id, value) => handleRowChecked(id, value),
|
|
9723
9722
|
onRowClick: (item, index, columnName, event) => handleRowClick(item, index, columnName, event),
|
|
9724
|
-
rawColumnNames: rawColumnNames,
|
|
9723
|
+
rawColumnNames: rawColumnNames.value,
|
|
9725
9724
|
clickableRows: props.clickableRows,
|
|
9726
9725
|
...props.tableBodyProps,
|
|
9727
9726
|
}),
|
|
@@ -9731,7 +9730,7 @@ const CSmartTable = defineComponent({
|
|
|
9731
9730
|
...props.tableFootProps,
|
|
9732
9731
|
columnFilter: false,
|
|
9733
9732
|
columnSorter: false,
|
|
9734
|
-
columns:
|
|
9733
|
+
columns: rawColumnNames.value,
|
|
9735
9734
|
selectable: props.selectable,
|
|
9736
9735
|
selectAll: selectedAll.value,
|
|
9737
9736
|
onFilterInput: (key, value) => columnFilterChange(key, value, 'input'),
|
|
@@ -9761,7 +9760,6 @@ const CSmartTable = defineComponent({
|
|
|
9761
9760
|
pages: numberOfPages.value,
|
|
9762
9761
|
activePage: activePage.value,
|
|
9763
9762
|
onActivePageChange: handleActivePageChange,
|
|
9764
|
-
limit: itemsPerPage.value,
|
|
9765
9763
|
})
|
|
9766
9764
|
: ''),
|
|
9767
9765
|
h$1('div', {
|