Skip to content

Commit 00cdb45

Browse files
committed
prettier
1 parent 21252c0 commit 00cdb45

39 files changed

+70
-346
lines changed

Diff for: .prettierrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
{
2020
files: "*.md",
2121
options: {
22+
printWidth: 100,
2223
proseWrap: "preserve",
2324
},
2425
},

Diff for: examples/src/docs/en/QA.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ A:Too much text in a cell destroys the layout,This can be controlled by style [w
3535

3636
```html
3737
<template>
38-
<ve-table
39-
style="word-break: break-all"
40-
:columns="columns"
41-
:table-data="tableData"
42-
/>
38+
<ve-table style="word-break: break-all" :columns="columns" :table-data="tableData" />
4339
</template>
4440
```

Diff for: examples/src/docs/en/start.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ Write the following in mian.js:
4141
import Vue from "vue";
4242
import "vue-easytable/libs/theme-default/index.css"; // import style
4343

44-
import {
45-
VeTable,
46-
VePagination,
47-
VeIcon,
48-
VeLoading,
49-
VeLocale,
50-
} from "vue-easytable"; // import library
44+
import { VeTable, VePagination, VeIcon, VeLoading, VeLocale } from "vue-easytable"; // import library
5145

5246
Vue.use(VeTable);
5347
Vue.use(VePagination);

Diff for: examples/src/docs/en/ve-checkbox/checkbox-multiple-advanced.md

+3-14
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@
4747
{ disabled: false, label: "水蜜桃2" },
4848
],
4949
50-
checkboxGroupDefaultValue: [
51-
"南瓜",
52-
"哈密瓜",
53-
"水蜜桃",
54-
"哈密瓜2",
55-
],
50+
checkboxGroupDefaultValue: ["南瓜", "哈密瓜", "水蜜桃", "哈密瓜2"],
5651
5752
indeterminate: true,
5853
checkedAllModel: false,
@@ -79,10 +74,7 @@
7974
let result = [];
8075
8176
this.checkboxGroupInitValues.filter((x) => {
82-
if (
83-
x.disabled &&
84-
this.checkboxGroupDefaultValue.indexOf(x.label) > -1
85-
) {
77+
if (x.disabled && this.checkboxGroupDefaultValue.indexOf(x.label) > -1) {
8678
result.push(x.label);
8779
}
8880
});
@@ -94,10 +86,7 @@
9486
let result = [];
9587
9688
this.checkboxGroupInitValues.filter((x) => {
97-
if (
98-
x.disabled &&
99-
this.checkboxGroupDefaultValue.indexOf(x.label) === -1
100-
) {
89+
if (x.disabled && this.checkboxGroupDefaultValue.indexOf(x.label) === -1) {
10190
result.push(x.label);
10291
}
10392
});

Diff for: examples/src/docs/en/ve-checkbox/checkbox-multiple-simple.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,14 @@
6969
// 是否全部选中
7070
hasAllChecked() {
7171
return this.checkboxGroupInitValues.every((x) => {
72-
return (
73-
this.checkboxGroupDefaultValue2.indexOf(x.label) > -1
74-
);
72+
return this.checkboxGroupDefaultValue2.indexOf(x.label) > -1;
7573
});
7674
},
7775
7876
// 判断是否有部分选中
7977
hasPartChecked() {
8078
return this.checkboxGroupInitValues.some((x) => {
81-
return (
82-
this.checkboxGroupDefaultValue2.indexOf(x.label) > -1
83-
);
79+
return this.checkboxGroupDefaultValue2.indexOf(x.label) > -1;
8480
});
8581
},
8682
},

Diff for: examples/src/docs/en/ve-loading/container.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ Display the Loading effect in containers such as tables
1010
<button class="button-demo" @click="close()">Close</button>
1111
<br />
1212
<br />
13-
<ve-table
14-
id="loading-container"
15-
:columns="columns"
16-
:table-data="tableData"
17-
/>
13+
<ve-table id="loading-container" :columns="columns" :table-data="tableData" />
1814
</div>
1915
</template>
2016
<script>

Diff for: examples/src/docs/en/ve-locale/cover-lang.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Use Locale.update method to modify the default configs.
77
<template>
88
<div>
99
<div>
10-
<button class="button-demo" @click="coverLang()">
11-
Override Config
12-
</button>
10+
<button class="button-demo" @click="coverLang()">Override Config</button>
1311
<br />
1412
<br />
1513
</div>

Diff for: examples/src/docs/en/ve-pagination/layout-settings.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
<div>
88
<div>
99
<div class="mb20 bold">Don't display page number button</div>
10-
<ve-pagination
11-
:total="600"
12-
:layout="['total', 'prev', 'next', 'sizer', 'jumper']"
13-
/>
10+
<ve-pagination :total="600" :layout="['total', 'prev', 'next', 'sizer', 'jumper']" />
1411
</div>
1512
<div>
1613
<div class="mt30 mb20 bold">Adjust display order</div>

Diff for: examples/src/docs/en/ve-radio/base.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
<div>
66
<div>
77
<div class="bold">单选</div>
8-
<ve-radio @on-radio-change="radioChange" v-model="radioVal">
9-
Radio
10-
</ve-radio>
8+
<ve-radio @on-radio-change="radioChange" v-model="radioVal">Radio</ve-radio>
119
<div>{{radioVal}}</div>
1210
</div>
1311

Diff for: examples/src/docs/en/ve-radio/controlled.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
<div class="bold">受控单选</div>
88
<button class="button-demo" @click="test()">测试</button>
99
<br />
10-
<ve-radio
11-
isControlled
12-
@on-radio-change="radioChange"
13-
:isSelected="radioVal"
14-
>
10+
<ve-radio isControlled @on-radio-change="radioChange" :isSelected="radioVal">
1511
Radio
1612
</ve-radio>
1713
<div>{{radioVal}}</div>

Diff for: examples/src/docs/en/ve-select/base.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@
9999

100100
```html
101101
<template>
102-
<ve-select
103-
v-model="selectItems1"
104-
placeholder="姓名"
105-
@on-select-change="selectChange"
106-
/>
102+
<ve-select v-model="selectItems1" placeholder="姓名" @on-select-change="selectChange" />
107103
</template>
108104
<script>
109105
export default {

Diff for: examples/src/docs/en/ve-table/border/border-all.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
:columns="columns"
9-
:table-data="tableData"
10-
:border-x="true"
11-
:border-y="true"
12-
/>
7+
<ve-table :columns="columns" :table-data="tableData" :border-x="true" :border-y="true" />
138
</template>
149

1510
<script>

Diff for: examples/src/docs/en/ve-table/cell-custom/body-cell.md

+3-12
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
style="width:100%"
9-
border-y
10-
:columns="columns"
11-
:table-data="tableData"
12-
/>
7+
<ve-table style="width:100%" border-y :columns="columns" :table-data="tableData" />
138
</template>
149

1510
<script>
@@ -68,9 +63,7 @@
6863
align: "left",
6964
renderBodyCell: ({ row, column, rowIndex }, h) => {
7065
const text = row[column.field];
71-
return (
72-
<input style="width:100%" value={text}></input>
73-
);
66+
return <input style="width:100%" value={text}></input>;
7467
},
7568
},
7669
{
@@ -91,9 +84,7 @@
9184
&nbsp;
9285
<button
9386
class="button-demo"
94-
on-click={() =>
95-
this.deleteRow(rowIndex)
96-
}
87+
on-click={() => this.deleteRow(rowIndex)}
9788
>
9889
Delete
9990
</button>

Diff for: examples/src/docs/en/ve-table/cell-custom/more.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010

1111
```html
1212
<template>
13-
<ve-table
14-
style="width:100%"
15-
border-y
16-
:columns="columns"
17-
:table-data="tableData"
18-
/>
13+
<ve-table style="width:100%" border-y :columns="columns" :table-data="tableData" />
1914
</template>
2015

2116
<script>
@@ -45,13 +40,7 @@
4540
width: 200,
4641
align: "center",
4742
renderBodyCell: ({ row, column, rowIndex }, h) => {
48-
return (
49-
<OtherComp
50-
row={row}
51-
column={column}
52-
rowIndex={rowIndex}
53-
/>
54-
);
43+
return <OtherComp row={row} column={column} rowIndex={rowIndex} />;
5544
},
5645
},
5746
{

Diff for: examples/src/docs/en/ve-table/cell-span/custom-content.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
if (column.field === "name") {
3333
if (rowIndex === 1) {
3434
return (
35-
<span style="color:#1890ff;">
36-
this is custom content
37-
</span>
35+
<span style="color:#1890ff;">this is custom content</span>
3836
);
3937
}
4038
}
@@ -52,9 +50,7 @@
5250
if (rowIndex === 1) {
5351
if (column.field === "date") {
5452
return (
55-
<span style="color:#1890ff;">
56-
this is custom content
57-
</span>
53+
<span style="color:#1890ff;">this is custom content</span>
5854
);
5955
}
6056
}

Diff for: examples/src/docs/en/ve-table/cell-style/body-cell-style.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
:columns="columns"
9-
:table-data="tableData"
10-
:cell-style-option="cellStyleOption"
11-
/>
7+
<ve-table :columns="columns" :table-data="tableData" :cell-style-option="cellStyleOption" />
128
</template>
139

1410
<style>

Diff for: examples/src/docs/en/ve-table/cell-style/body-row-style.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
:columns="columns"
9-
:table-data="tableData"
10-
:cell-style-option="cellStyleOption"
11-
/>
7+
<ve-table :columns="columns" :table-data="tableData" :cell-style-option="cellStyleOption" />
128
</template>
139

1410
<style>

Diff for: examples/src/docs/en/ve-table/cell-style/header-cell-style.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
:columns="columns"
9-
:table-data="tableData"
10-
:cell-style-option="cellStyleOption"
11-
/>
7+
<ve-table :columns="columns" :table-data="tableData" :cell-style-option="cellStyleOption" />
128
</template>
139

1410
<style>

Diff for: examples/src/docs/en/ve-table/cell-style/header-row-style.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
```html
66
<template>
7-
<ve-table
8-
:columns="columns"
9-
:table-data="tableData"
10-
:cell-style-option="cellStyleOption"
11-
/>
7+
<ve-table :columns="columns" :table-data="tableData" :cell-style-option="cellStyleOption" />
128
</template>
139

1410
<style>

Diff for: examples/src/docs/en/ve-table/event-custom/on-body-cell.md

+5-35
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,19 @@
2222
bodyCellEvents: ({ row, column, rowIndex }) => {
2323
return {
2424
click: (event) => {
25-
console.log(
26-
"click::",
27-
row,
28-
column,
29-
rowIndex,
30-
event,
31-
);
25+
console.log("click::", row, column, rowIndex, event);
3226
},
3327
dblclick: (event) => {
34-
console.log(
35-
"dblclick::",
36-
row,
37-
column,
38-
rowIndex,
39-
event,
40-
);
28+
console.log("dblclick::", row, column, rowIndex, event);
4129
},
4230
contextmenu: (event) => {
43-
console.log(
44-
"contextmenu::",
45-
row,
46-
column,
47-
rowIndex,
48-
event,
49-
);
31+
console.log("contextmenu::", row, column, rowIndex, event);
5032
},
5133
mouseenter: (event) => {
52-
console.log(
53-
"mouseenter::",
54-
row,
55-
column,
56-
rowIndex,
57-
event,
58-
);
34+
console.log("mouseenter::", row, column, rowIndex, event);
5935
},
6036
mouseleave: (event) => {
61-
console.log(
62-
"mouseleave::",
63-
row,
64-
column,
65-
rowIndex,
66-
event,
67-
);
37+
console.log("mouseleave::", row, column, rowIndex, event);
6838
},
6939
};
7040
},

0 commit comments

Comments
 (0)