From bc00ce035444ac1372344f933d86b280c3c5738f Mon Sep 17 00:00:00 2001 From: njleonzhang Date: Sat, 14 Jan 2017 14:51:44 +0800 Subject: [PATCH] revise table default sort api --- examples/docs/en-US/table.md | 10 ++++------ examples/docs/zh-CN/table.md | 10 ++++------ packages/table/src/table-header.js | 23 +++++++++++++---------- packages/table/src/table.vue | 7 ++----- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/examples/docs/en-US/table.md b/examples/docs/en-US/table.md index 7c4cd1dee..0c3e222c8 100644 --- a/examples/docs/en-US/table.md +++ b/examples/docs/en-US/table.md @@ -1122,15 +1122,14 @@ You can also select multiple rows. Sort the data to find or compare data quickly. -:::demo Set table attribute `default-sort-prop` and `default-sort-order` to determine default sort column and order. Set attribute `sortable` in a certain column to sort the data based on this column. It accepts `Boolean` with a default value `false`. In this example we use another attribute named `formatter` to format the value of certain columns. It accepts a function which has two parameters: `row` and `column`. You can handle it according to your own needs. +:::demo Set table attribute `default-sort` to determine default sort column and order. Set attribute `sortable` in a certain column to sort the data based on this column. It accepts `Boolean` with a default value `false`. In this example we use another attribute named `formatter` to format the value of certain columns. It accepts a function which has two parameters: `row` and `column`. You can handle it according to your own needs. ```html