diff --git a/demo/documentation/components/config-provider/enUS/os-theme.demo.md b/demo/documentation/components/config-provider/enUS/os-theme.demo.md index 7faa166e3..029f7c98e 100644 --- a/demo/documentation/components/config-provider/enUS/os-theme.demo.md +++ b/demo/documentation/components/config-provider/enUS/os-theme.demo.md @@ -1,5 +1,5 @@ # Use OS Theme -Naive-ui provides `$NOs.theme` property to get the current theme of your OS. +Naive UI provides `useOsTheme` to get the current theme of your OS. ```html diff --git a/demo/documentation/components/data-table/enUS/filter-and-sorter.demo.md b/demo/documentation/components/data-table/enUS/filter-and-sorter.demo.md index 3063c7e58..4a1e5ce64 100644 --- a/demo/documentation/components/data-table/enUS/filter-and-sorter.demo.md +++ b/demo/documentation/components/data-table/enUS/filter-and-sorter.demo.md @@ -24,7 +24,7 @@ const columns = [ { title: 'Age', key: 'age', - sorter: (row1, row2) => row2.age - row1.age + sorter: (row1, row2) => row1.age - row2.age }, { title: 'Address', diff --git a/demo/documentation/components/data-table/zhCN/filter-and-sorter.demo.md b/demo/documentation/components/data-table/zhCN/filter-and-sorter.demo.md index af5217be1..56d6eced9 100644 --- a/demo/documentation/components/data-table/zhCN/filter-and-sorter.demo.md +++ b/demo/documentation/components/data-table/zhCN/filter-and-sorter.demo.md @@ -24,7 +24,7 @@ const columns = [ { title: 'Age', key: 'age', - sorter: (row1, row2) => row2.age - row1.age + sorter: (row1, row2) => row1.age - row2.age }, { title: 'Address', diff --git a/src/_base/icons/ArrowDown.vue b/src/_base/icons/ArrowDown.vue new file mode 100644 index 000000000..94910eab3 --- /dev/null +++ b/src/_base/icons/ArrowDown.vue @@ -0,0 +1,9 @@ + diff --git a/src/_base/icons/Filter.vue b/src/_base/icons/Filter.vue new file mode 100644 index 000000000..d87ae8628 --- /dev/null +++ b/src/_base/icons/Filter.vue @@ -0,0 +1,9 @@ + diff --git a/src/_base/icons/index.js b/src/_base/icons/index.js index 18b464659..0d4c04ea8 100644 --- a/src/_base/icons/index.js +++ b/src/_base/icons/index.js @@ -6,3 +6,5 @@ export { default as ErrorIcon } from './Error.vue' export { default as WarningIcon } from './Warning.vue' export { default as InfoIcon } from './Info.vue' export { default as CloseIcon } from './Close.vue' +export { default as FilterIcon } from './Filter.vue' +export { default as ArrowDownIcon } from './ArrowDown' diff --git a/src/data-table/src/DataTable.vue b/src/data-table/src/DataTable.vue index 981cc6d82..e78835097 100644 --- a/src/data-table/src/DataTable.vue +++ b/src/data-table/src/DataTable.vue @@ -123,7 +123,7 @@ function normalizeColumn (column) { }) if (!column.key && column.type === 'selection') { defaultColumn.key = 'selection' - defaultColumn.width = 48 + defaultColumn.width = 40 } return defaultColumn } diff --git a/src/data-table/src/HeaderButton/FilterButton.vue b/src/data-table/src/HeaderButton/FilterButton.vue index 3c1c9d886..ea255c25c 100644 --- a/src/data-table/src/HeaderButton/FilterButton.vue +++ b/src/data-table/src/HeaderButton/FilterButton.vue @@ -37,7 +37,7 @@ import NIcon from '../../../icon' import NDataTableFilterMenu from './FilterMenu.vue' import NPopover from '../../../popover' -import FilterIcon from '../../../_icons/funnel.vue' +import { FilterIcon } from '../../../_base/icons' function createActiveFilters (allFilters, columnKey, syntheticFilterValue) { const activeFilters = Object.assign({}, allFilters) diff --git a/src/data-table/src/HeaderButton/SortButton.vue b/src/data-table/src/HeaderButton/SortButton.vue index 1a3b84d3b..ef14ddde8 100644 --- a/src/data-table/src/HeaderButton/SortButton.vue +++ b/src/data-table/src/HeaderButton/SortButton.vue @@ -6,22 +6,16 @@ 'n-data-table-sort-button--desc': currentColumnActive && syntheticSortOrder === 'descend' }" > - - - - - + +