bri-components 1.3.77 → 1.3.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.3.77",
3
+ "version": "1.3.78",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -11,6 +11,7 @@
11
11
 
12
12
  <!-- 表格 -->
13
13
  <bri-table
14
+ v-show="showListData.length"
14
15
  ref="briTable"
15
16
  class="DshFlatTable-main"
16
17
  :columns="showColumns"
@@ -20,6 +21,17 @@
20
21
  @changeSelect="changeSelect"
21
22
  @selectAll="changeSelect"
22
23
  ></bri-table>
24
+ <bri-table
25
+ v-show="!showListData.length"
26
+ ref="briTable"
27
+ class="DshFlatTable-main"
28
+ :columns="showColumns"
29
+ :data="showListData"
30
+ :footer-data="footerData"
31
+ :propsObj="tablePropsObj"
32
+ @changeSelect="changeSelect"
33
+ @selectAll="changeSelect"
34
+ ></bri-table>
23
35
 
24
36
  <!-- 添加行 -->
25
37
  <dsh-render :render="createOperationRender"></dsh-render>
@@ -11,6 +11,18 @@
11
11
 
12
12
  <!-- 表格 -->
13
13
  <bri-table
14
+ v-show="showListData.length"
15
+ ref="briTable"
16
+ class="DshTreeTable-main"
17
+ :columns="showColumns"
18
+ :data="renderedListData"
19
+ :footer-data="footerData"
20
+ :propsObj="tablePropsObj"
21
+ @changeSelect="changeSelect"
22
+ @selectAll="changeSelect"
23
+ ></bri-table>
24
+ <bri-table
25
+ v-show="!showListData.length"
14
26
  ref="briTable"
15
27
  class="DshTreeTable-main"
16
28
  :columns="showColumns"
@@ -71,7 +71,47 @@ export default {
71
71
  width: 76,
72
72
  align: "center",
73
73
  fixed: "left",
74
- renderBodyCell: ({ column, row, rowIndex }) => ++rowIndex
74
+ renderBodyCell: ({ row, column, rowIndex }, h) => {
75
+ return [
76
+ h("div", rowIndex + 1),
77
+
78
+ // 添加符
79
+ // this.operationMap.canCreate && !this.isSearching && rowIndex !== this.allListData.length - 1
80
+ this.operationMap.canCreate && !this.isSearching
81
+ ? h("div", {
82
+ style: {
83
+ position: "absolute",
84
+ bottom: "0px",
85
+ right: "0px",
86
+ display: "inline-block",
87
+ width: "16px",
88
+ height: " 16px",
89
+ border: "1px solid #dcdee2",
90
+ backgroundColor: "#ffffff",
91
+ lineHeight: "12px",
92
+ cursor: "pointer",
93
+ verticalAlign: "middle",
94
+ transition: "color .2s ease-in-out,border-color .2s ease-in-out"
95
+ }
96
+ }, [
97
+ h("Icon", {
98
+ style: {
99
+ fontWeight: "500"
100
+ },
101
+ props: {
102
+ type: "md-add-circle", // "ios-add"
103
+ size: "14"
104
+ },
105
+ on: {
106
+ click: () => {
107
+ this.clickCreate(this.operationMap.canCreate, row, rowIndex);
108
+ }
109
+ }
110
+ })
111
+ ])
112
+ : h("span", "")
113
+ ];
114
+ }
75
115
  };
76
116
  }
77
117
  },
@@ -90,7 +130,7 @@ export default {
90
130
  };
91
131
  const newRowIndex = rowIndex == null ? list.length : rowIndex + 1;
92
132
  list.splice(newRowIndex, 0, newRow);
93
- this.$forceUpdate(); // 自定义页中点击添加一行没有更新页面
133
+ // this.$forceUpdate(); // 自定义页中点击添加一行没有更新页面
94
134
 
95
135
  this.change("createRow", null, newRow, newRowIndex);
96
136
  },
@@ -161,7 +161,7 @@ export default {
161
161
  }, row.__treeIndex__),
162
162
 
163
163
  // 添加符
164
- this.operationMap.canCreate && row.level < this.maxLevel && !this.isSearching
164
+ this.operationMap.canCreate && !this.isSearching && row.level < this.maxLevel
165
165
  ? h("div", {
166
166
  style: {
167
167
  position: "absolute",