Skip to content

Commit

Permalink
chore: 修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
kohaiy committed Mar 16, 2024
1 parent 99f4503 commit 1884def
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 90 deletions.
89 changes: 4 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

# @easytable/vue

> [!IMPORTANT]
> 本仓库迁移自 [vue-easytable](https://github.com/huangshuwei/vue-easytable) Vue.js 2.x ,基于 Vue.js 3.x 重构中……
> [!WARNING]
> 本仓库迁移自 [vue-easytable](https://github.com/huangshuwei/vue-easytable) Vue.js 2.x ,基于 Vue.js 3.x 重构中,目前基本完成。
[English](./README-EN.md) | **中文**

## 介绍

一个强大的 vue3.x 表格组件。你可以将它用做数据表、微软 excel 或者 goole sheet. 支持虚拟滚动、单元格编辑等功能。

> [!WARNING]
> [!IMPORTANT]
> 如果您正在使用 Vue2.x ,请使用 [vue-easytable](https://github.com/huangshuwei/vue-easytable) 组件库。
## 特点
Expand All @@ -25,7 +25,7 @@
## API & 文档

- [官方文档](https://easytable.kohai.top/)
- [官方文档 (Cloudflare Pages)](https://easytable.pages.dev/)
- [官方文档 (GitHub Pages)](https://kohaiy.github.io/easytable/)

## 功能支持

Expand Down Expand Up @@ -83,8 +83,6 @@ yarn add @easytable/vue

## 使用

### 使用 NPM 安装(推荐)

Write the following in main.js:

```javascript
Expand Down Expand Up @@ -154,85 +152,6 @@ Example:
</script>
```

### 通过 CDN 使用 @easytable/vue

你可以借助 script 标签直接通过 CDN 来使用 @easytable/vue

```html
<script src="https://unpkg.com/@easytable/vue/libs/umd/easytable-vue.js"></script>
```

这里我们使用了 unpkg,但你也可以使用任何提供 npm 包服务的 CDN,例如 jsdelivr 或 cdnjs。当然,你也可以下载此文件并自行提供服务。

示例:

```html
<!-- 引入 Vue -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<!-- 引入 @easytable/vue -->
<script src="https://unpkg.com/@easytable/vue/libs/umd/easytable-vue.js"></script>
<!-- 引入样式文件 -->
<link rel="stylesheet" href="https://unpkg.com/@easytable/vue@0.0.0-alpha.3/libs/theme-default/index.css">

<div id="app">
<ve-table :columns="columns" :table-data="tableData" />
</div>

<script>
const { createApp, ref } = Vue
const { useVeTable } = EasytableVue
createApp({
setup() {
const columns = ref([
{ field: "name", key: "a", title: "Name", align: "center" },
{ field: "date", key: "b", title: "Date", align: "left" },
{ field: "hobby", key: "c", title: "Hobby", align: "right" },
{ field: "address", key: "d", title: "Address" },
])
const tableData = ref([
{
name: "John",
date: "1900-05-20",
hobby: "coding and coding repeat",
address: "No.1 Century Avenue, Shanghai",
},
{
name: "Dickerson",
date: "1910-06-20",
hobby: "coding and coding repeat",
address: "No.1 Century Avenue, Beijing",
},
{
name: "Larsen",
date: "2000-07-20",
hobby: "coding and coding repeat",
address: "No.1 Century Avenue, Chongqing",
},
{
name: "Geneva",
date: "2010-08-20",
hobby: "coding and coding repeat",
address: "No.1 Century Avenue, Xiamen",
},
{
name: "Jami",
date: "2020-09-20",
hobby: "coding and coding repeat",
address: "No.1 Century Avenue, Shenzhen",
},
])
return {
columns,
tableData
}
}
})
.use(useVeTable())
.mount('#app')
</script>
```

## 开发计划

[正在做的事情](https://github.com/kohaiy/easytable/projects)
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
</title>
<meta
name="description"
content="vue table 组件 强大、灵活,支持 单元格合并、单元格编辑、多表头固定、多列固定、列拖动、排序、自定义列、分页、单元格编辑、全选、行展开、条件过滤、footer 汇总、导出excel、汇总 Vue2.x flexible table components, support for cell edit,multi-head fixed, multi-column fixed, clumn drag, sort, custom column,Cell Editing, Support cell merge (colSpan and rowSpan),Support checkbox selection"
content="vue table 组件 强大、灵活,支持 单元格合并、单元格编辑、多表头固定、多列固定、列拖动、排序、自定义列、分页、单元格编辑、全选、行展开、条件过滤、footer 汇总、导出excel、汇总 Vue2.x flexible table components, support for cell edit,multi-head fixed, multi-column fixed, column drag, sort, custom column,Cell Editing, Support cell merge (colSpan and rowSpan),Support checkbox selection"
/>
<meta property="og:type" content="website" />
<meta
property="og:title"
content="vue2.x table 组件,支持 单元格合并、单元格编辑、多表头固定、多列固定、列拖动、排序、自定义列、分页、单元格编辑、条件过滤、footer 汇总、全选 Vue2.x flexible table components, support for cell edit,multi-head fixed, multi-column fixed, clumn drag, sort, custom column,Cell Editing, Support cell merge (colSpan and rowSpan),Support checkbox selection"
content="vue3.x table 组件,支持 单元格合并、单元格编辑、多表头固定、多列固定、列拖动、排序、自定义列、分页、单元格编辑、条件过滤、footer 汇总、全选 Vue2.x flexible table components, support for cell edit,multi-head fixed, multi-column fixed, column drag, sort, custom column,Cell Editing, Support cell merge (colSpan and rowSpan),Support checkbox selection"
/>
<meta
property="og:url"
content="https://github.com/huangshuwei/vue-easytable"
content="https://github.com/kohaiy/easytable"
/>
<meta property="og:site_name" content="vue table 组件" />
<link rel="icon" type="image/x-icon" href="./favicon.ico">
Expand Down
2 changes: 0 additions & 2 deletions docs/src/demo/normal-data-grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ export default defineComponent({
}
return 0
})
// 解决排序后不会刷新数据
this.tableData = [...this.tableData]
}
else {
this.resetTableData()
Expand Down
1 change: 1 addition & 0 deletions packages/ve-table/src/ve-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ export default defineComponent({
this.initVirtualScroll()
},
immediate: true,
deep: true,
},
'allRowKeys': {
handler(newVal) {
Expand Down

0 comments on commit 1884def

Please sign in to comment.