Skip to content

Commit a5f8975

Browse files
committed
releases 4.7.37
1 parent 02de2a0 commit a5f8975

28 files changed

+1134
-120
lines changed

README.en.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,37 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
7070
Version: [vue](https://www.npmjs.com/package/vue) 3.x
7171

7272
```shell
73-
npm install vxe-table
73+
npm install vxe-table@next
7474
```
7575

7676
Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
7777

78-
### npm
78+
### NPM
79+
80+
### Use Table
81+
82+
```javascript
83+
// ...
84+
import VxeTable from 'vxe-table'
85+
import 'vxe-table/lib/style.css'
86+
// ...
87+
88+
createApp(App).use(VxeTable).mount('#app')
89+
```
90+
91+
### Use Table and UI
7992

8093
```javascript
81-
import { createApp } from 'vue'
82-
import VxeUITable from 'vxe-table'
94+
// ...
95+
import VxeTable from 'vxe-table'
8396
import 'vxe-table/lib/style.css'
97+
// ...
98+
99+
import VxeUI from 'vxe-pc-ui'
100+
import 'vxe-pc-ui/lib/style.css'
101+
// ...
84102

85-
createApp(App).use(VxeUITable).mount('#app')
103+
createApp(App).use(VxeUI).use(VxeTable).mount('#app')
86104
```
87105

88106
### CDN
@@ -91,11 +109,15 @@ Use a third-party CDN to remember to lock the version number to avoid being affe
91109
***It is not recommended to use the CDN address of a third party in a formal environment because the connection can fail at any time***
92110

93111
```HTML
94-
<!-- Style -->
95-
<link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
96-
<!-- Script -->
97-
<script src="https://unpkg.com/xe-utils"></script>
98-
<script src="https://unpkg.com/vxe-table"></script>
112+
<!-- style -->
113+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-pc-ui/lib/style.css">
114+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-table@next/lib/style.css">
115+
<!-- vue -->
116+
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
117+
<!-- table -->
118+
<script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
119+
<script src="https://cdn.jsdelivr.net/npm/vxe-pc-ui"></script>
120+
<script src="https://cdn.jsdelivr.net/npm/vxe-table@next"></script>
99121
```
100122

101123
## Example
@@ -128,14 +150,15 @@ const tableData = ref([
128150

129151
## Online Documents
130152

131-
👉 [Document](https://vxetable.cn)
153+
👉 [UI Document](https://vxeui.com)
154+
👉 [Table Document](https://vxetable.cn)
132155

133156
## Run the project
134157

135158
Install dependencies
136159

137160
```shell
138-
npm install
161+
npm run update
139162
```
140163

141164
Start local debugging

README.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,37 @@
8484
版本:[vue](https://www.npmjs.com/package/vue) 3.x
8585

8686
```shell
87-
npm install vxe-table
87+
npm install vxe-table@next
8888
```
8989

9090
Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
9191

92-
### npm
92+
### NPM
93+
94+
### 只使用表格
95+
96+
```javascript
97+
// ...
98+
import VxeTable from 'vxe-table'
99+
import 'vxe-table/lib/style.css'
100+
// ...
101+
102+
createApp(App).use(VxeTable).mount('#app')
103+
```
104+
105+
### 使用表格与 UI 库
93106

94107
```javascript
95-
import { createApp } from 'vue'
96-
import VxeUITable from 'vxe-table'
108+
// ...
109+
import VxeTable from 'vxe-table'
97110
import 'vxe-table/lib/style.css'
111+
// ...
112+
113+
import VxeUI from 'vxe-pc-ui'
114+
import 'vxe-pc-ui/lib/style.css'
115+
// ...
98116

99-
createApp(App).use(VxeUITable).mount('#app')
117+
createApp(App).use(VxeUI).use(VxeTable).mount('#app')
100118
```
101119

102120
### CDN
@@ -105,11 +123,15 @@ createApp(App).use(VxeUITable).mount('#app')
105123
***不建议将第三方的 CDN 地址用于正式环境,因为该连接随时都可能会失效***
106124

107125
```HTML
108-
<!-- 引入样式 -->
109-
<link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
110-
<!-- 引入脚本 -->
111-
<script src="https://unpkg.com/xe-utils"></script>
112-
<script src="https://unpkg.com/vxe-table"></script>
126+
<!-- style -->
127+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-pc-ui/lib/style.css">
128+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-table@next/lib/style.css">
129+
<!-- vue -->
130+
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
131+
<!-- table -->
132+
<script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
133+
<script src="https://cdn.jsdelivr.net/npm/vxe-pc-ui"></script>
134+
<script src="https://cdn.jsdelivr.net/npm/vxe-table@next"></script>
113135
```
114136

115137
## 示例
@@ -142,7 +164,8 @@ const tableData = ref([
142164

143165
## 在线文档
144166

145-
👉 [官网文档](https://vxetable.cn)
167+
👉 [组件文档](https://vxeui.com)
168+
👉 [表格文档](https://vxetable.cn)
146169

147170
## QQ 交流群
148171

README.zh-TW.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,37 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
6969
版本:[vue](https://www.npmjs.com/package/vue) 3.x
7070

7171
```shell
72-
npm install vxe-table
72+
npm install vxe-table@next
7373
```
7474

7575
Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
7676

77-
### npm
77+
### NPM
78+
79+
### 使用表格
80+
81+
```javascript
82+
// ...
83+
import VxeTable from 'vxe-table'
84+
import 'vxe-table/lib/style.css'
85+
// ...
86+
87+
createApp(App).use(VxeTable).mount('#app')
88+
```
89+
90+
### 使用表格与 UI 库
7891

7992
```javascript
80-
import { createApp } from 'vue'
81-
import VxeUITable from 'vxe-table'
93+
// ...
94+
import VxeTable from 'vxe-table'
8295
import 'vxe-table/lib/style.css'
96+
// ...
97+
98+
import VxeUI from 'vxe-pc-ui'
99+
import 'vxe-pc-ui/lib/style.css'
100+
// ...
83101

84-
createApp(App).use(VxeUITable).mount('#app')
102+
createApp(App).use(VxeUI).use(VxeTable).mount('#app')
85103
```
86104

87105
### CDN
@@ -90,11 +108,15 @@ createApp(App).use(VxeUITable).mount('#app')
90108
***不建議將第三方的 CDN 地址用於正式環境,因爲該連接隨時都可能會失效***
91109

92110
```HTML
93-
<!-- 引入樣式 -->
94-
<link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
95-
<!-- 引入腳本 -->
96-
<script src="https://unpkg.com/xe-utils"></script>
97-
<script src="https://unpkg.com/vxe-table"></script>
111+
<!-- style -->
112+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-pc-ui/lib/style.css">
113+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-table@next/lib/style.css">
114+
<!-- vue -->
115+
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
116+
<!-- table -->
117+
<script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
118+
<script src="https://cdn.jsdelivr.net/npm/vxe-pc-ui"></script>
119+
<script src="https://cdn.jsdelivr.net/npm/vxe-table@next"></script>
98120
```
99121

100122
## 示例
@@ -127,14 +149,15 @@ const tableData = ref([
127149

128150
## 線上檔案
129151

130-
👉 [官網檔案](https://vxetable.cn)
152+
👉 [組件文檔](https://vxeui.com)
153+
👉 [表格文檔](https://vxetable.cn)
131154

132155
## 運行項目
133156

134157
安裝依賴
135158

136159
```shell
137-
npm install
160+
npm run update
138161
```
139162

140163
啓動本地調試

examples/App.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<div>
55
<button @click="changeTheme">切换主题</button>
66
</div>
7+
<div>
8+
<button @click="changeLang('zh-CN')">中文</button>
9+
<button @click="changeLang('en-US')">英文</button>
10+
</div>
711
<RouterLink class="link" v-for="(item, index) in navList" :key="index" :to="item.routerLink">{{ item.name }}</RouterLink>
812
</div>
913
<div class="page-layout-body">
@@ -36,6 +40,12 @@ const changeTheme = () => {
3640
VxeUI.setTheme(themeName)
3741
localStorage.setItem('VXE_THEME', themeName)
3842
}
43+
44+
VxeUI.setLanguage((localStorage.getItem('VXE_LANGUAGE') as 'zh-CN' | 'en-US') || 'zh-CN')
45+
const changeLang = (lang: 'zh-CN' | 'en-US') => {
46+
VxeUI.setLanguage(lang)
47+
localStorage.setItem('VXE_LANGUAGE', lang)
48+
}
3949
</script>
4050

4151
<style lang="scss" scoped>

examples/main.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ import { createApp } from 'vue'
22
import App from './App.vue'
33
import router from './router'
44

5-
import VxeUI from 'vxe-pc-ui'
6-
import 'vxe-pc-ui/lib/style.css'
5+
// import VxeUI from 'vxe-pc-ui'
6+
// import 'vxe-pc-ui/lib/style.css'
77

8-
import VxeUITable from '../packages'
8+
// import enUS from 'vxe-pc-ui/packages/language/en-US'
9+
10+
import VxeTable from '../packages'
911
import '../styles/all.scss'
1012

1113
import './style/index.scss'
1214

15+
// VxeUI.setI18n('en-US', enUS)
16+
1317
createApp(App)
1418
.use(router)
15-
.use(VxeUI)
16-
.use(VxeUITable)
19+
// .use(VxeUI)
20+
.use(VxeTable)
1721
.mount('#app')

examples/views/table/TableTest1.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313
<vxe-column type="checkbox" title="ID" width="140"></vxe-column>
1414
<vxe-column field="role" title="Role"></vxe-column>
1515
<vxe-column field="name" title="Name" sortable></vxe-column>
16-
<vxe-column field="age" title="Age" :filters="ageOptions" :filter-method="filterAgeMethod" :filter-recover-method="filterAgeRecoverMethod">
16+
<vxe-column field="age" title="Age" :filters="ageOptions" :filter-method="filterAgeMethod">
1717
<template #filter="{ $panel, column }">
1818
<vxe-input class="my-input" v-for="(option, index) in column.filters" :key="index" v-model="option.data" @input="$panel.changeOption($event, !!option.data, option)" @keyup.enter="$panel.confirmFilter()" placeholder="按回车确认筛选" />
1919
</template>
2020
</vxe-column>
2121
<vxe-column field="sex" title="Sex" :filters="demo1.sexList" :filter-multiple="false" :formatter="formatterSex"></vxe-column>
22-
<vxe-column
23-
field="age"
24-
title="Age"
25-
sortable
26-
:filters="demo1.ageOptions"
27-
:filter-method="filterAgeMethod"></vxe-column>
2822
<vxe-column field="address" title="Address" show-overflow></vxe-column>
2923
</vxe-table>
3024
</div>

examples/views/table/TableTest2.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<vxe-toolbar ref="toolbarRef" custom></vxe-toolbar>
3+
<vxe-toolbar ref="toolbarRef" custom export import></vxe-toolbar>
44

55
<vxe-table
66
border
@@ -12,6 +12,8 @@
1212
id="bbbbb"
1313
:custom-config="{storage:true}"
1414
:loading="demo1.loading"
15+
:import-config="{modes: importModes}"
16+
:export-config="{modes: exportModes}"
1517
:expand-config="{iconOpen: 'vxe-icon-question-circle-fill', iconClose: 'vxe-icon-question-circle-fill'}"
1618
:checkbox-config="{labelField: 'id', highlight: true, range: true}"
1719
:data="demo1.tableData">
@@ -49,6 +51,18 @@ interface RowVO {
4951
const tableRef = ref<VxeTableInstance<RowVO>>()
5052
const toolbarRef = ref<VxeToolbarInstance>()
5153
54+
const importModes = ref([
55+
{ label: '自定义25', value: '11' },
56+
{ label: '自定义11', value: '33' },
57+
{ label: 'current', value: 'current' }
58+
])
59+
60+
const exportModes = ref([
61+
{ label: '自定义25', value: '11' },
62+
{ label: '自定义11', value: '33' },
63+
{ label: 'current', value: 'current' }
64+
])
65+
5266
const demo1 = reactive({
5367
loading: false,
5468
tableData: [] as any[],

examples/views/table/TableTest3.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<vxe-toolbar ref="toolbarRef" print custom></vxe-toolbar>
3+
<vxe-toolbar ref="toolbarRef" print export import custom></vxe-toolbar>
44

55
<vxe-table
66
border
@@ -11,6 +11,8 @@
1111
ref="tableRef"
1212
id="aaaa"
1313
:print-config="{}"
14+
:import-config="{}"
15+
:export-config="{}"
1416
:custom-config="{mode: 'popup',storage:true}"
1517
:loading="demo1.loading"
1618
:expand-config="{iconOpen: 'vxe-icon-question-circle-fill', iconClose: 'vxe-icon-question-circle-fill'}"

0 commit comments

Comments
 (0)