Skip to content

Commit

Permalink
fix:解决合并冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
wujie.zhou committed Sep 15, 2022
2 parents bee45d3 + c46cc44 commit fe02b86
Show file tree
Hide file tree
Showing 14 changed files with 573 additions and 177 deletions.
16 changes: 15 additions & 1 deletion examples/features/autoCalWidth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,21 @@ export default {
},
}
},
mounted() {},
beforeCreate() {
console.log('B组件 beforeCreate')
},
created() {
console.log('B组件 created')
},
mounted() {
console.log('B组件 mounted')
},
beforeDestroy() {
console.log('B组件 beforeDestroy')
},
destroyed() {
console.log('B组件 destroyed')
},
methods: {
onTableScroll(event) {
console.log(event.target.scrollLeft);
Expand Down
44 changes: 38 additions & 6 deletions examples/features/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>source code</a
>
</p>

<button @click="aaa">aaaaaa</button>
<flex-table
resizable
:loading="loading"
Expand All @@ -18,6 +18,8 @@
:maxWidth="600"
uniqueKey="myid"
:headSum="headSum"
fixedHead
:rowClassName="rowClassName"
fixed-head
@on-scroll-x="onTableScroll"
@on-row-click="handleRowClick"
Expand Down Expand Up @@ -60,7 +62,7 @@ export default {
columns: [
{
type: "selection",
width: 20,
//
align: "center",
fixed: 'left',
},
Expand All @@ -70,7 +72,7 @@ export default {
width: 240,
// maxWidth: 250,
// minWidth: 150,
type: "slot",
// type: "slot",
fixed: 'left',
},
{
Expand All @@ -81,12 +83,13 @@ export default {
// render(h, params) {
// return h("span", "age: " + params.row.age);
// },
// fixed: 'left',
fixed: 'left',
},
{
title: "Address",
key: "address",
sortable: true,
fixed: 'left',
},
{
title: "Sex",
Expand All @@ -108,6 +111,7 @@ export default {
title: "Date",
key: "date",
width: 240,
fixed: 'rigth',
},
],
loading: false,
Expand All @@ -122,12 +126,27 @@ export default {
type: "headSum",
name: "I m Head Sum",
age: 24,
sex: '1234',
address: "London",
date: "2016-10-01",
},
};
},
mounted() {},
beforeCreate() {
console.log('A组件 beforeCreate')
},
created() {
console.log('A组件 created')
},
mounted() {
console.log('A组件 mounted')
},
beforeDestroy() {
console.log('A组件 beforeDestroy')
},
destroyed() {
console.log('A组件 destroyed')
},
methods: {
onTableScroll(event) {
console.log(event.target.scrollLeft);
Expand All @@ -138,6 +157,19 @@ export default {
handleSelection(row) {
console.log("on-selection-change", row.length);
},
aaa(){
console.log('在 A组件 点击了路由跳转 至 B组件: ');
this.$router.push({ path: 'autoCalWidth' });
},
rowClassName(row, index){
// return 'aaaaaa'
return index === 1 ? 'aaaaa' : ''
}
},
};
</script>
</script>
<style lang="less">
.aaaaa{
background:#999
}
</style>
11 changes: 10 additions & 1 deletion examples/features/sortable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
:columns="columns"
:data="list"
@on-sort-change="onSortChange"
></flex-table>
>
<template slot-scope="{ row }" slot="operation">
123
</template>
</flex-table>
</div>
</template>
<script>
Expand Down Expand Up @@ -38,6 +42,11 @@ export default {
width: 100,
sortable: true,
},
{
title: 'operation',
key: 'operation',
slot: true
},
{
title: 'Age',
key: 'age',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tm-flextable",
"version": "1.0.3",
"version": "1.2.5",
"description": "Using div to implement flexible、high performance table",
"main": "dist/index.js",
"typings": "types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/Spinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
<style lang="less">
.flex-table-spinner {
position: absolute;
z-index: 1;
z-index: 100;
top: 0;
right: 0;
bottom: 0;
Expand Down
Loading

0 comments on commit fe02b86

Please sign in to comment.