bri-components 1.4.55 → 1.4.57

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.4.55",
3
+ "version": "1.4.57",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -145,6 +145,11 @@
145
145
  set (val) {
146
146
  this.$set(this.value, this.controlKey, this.$transformDate(val, "-", this.subType));
147
147
  }
148
+ },
149
+ showVal () {
150
+ return this.$isEmptyData(this.curVal)
151
+ ? this.emptyShowVal
152
+ : this.$transformDate(this.curVal, "-", this.subType);
148
153
  }
149
154
  },
150
155
  created () {},
@@ -52,19 +52,6 @@
52
52
  <!-- 表格展示模式 -->
53
53
  <template v-else>
54
54
  <bri-table
55
- v-show="selfShowListData.length && !isSearching"
56
- ref="briTable"
57
- class="DshFlatTable-main"
58
- :columns="showColumns"
59
- :data="selfRenderedListData"
60
- :footer-data="footerData"
61
- :propsObj="tablePropsObj"
62
- @changeSelect="changeSelect"
63
- @selectAll="changeSelect"
64
- ></bri-table>
65
- <bri-table
66
- v-show="!selfShowListData.length || isSearching"
67
- ref="briTable"
68
55
  class="DshFlatTable-main"
69
56
  :columns="showColumns"
70
57
  :data="selfShowListData"
@@ -130,27 +117,59 @@
130
117
  <!-- 搜索条件 -->
131
118
  <dsh-render :render="topSearchRender"></dsh-render>
132
119
 
133
- <!-- 表格 -->
134
- <bri-table
135
- v-show="selfShowListData.length && !isSearching"
136
- class="DshFlatTable-fullscreen-inner-main"
137
- :columns="showColumns"
138
- :data="selfRenderedListData"
139
- :footer-data="footerData"
140
- :propsObj="tableInModalPropsObj"
141
- @changeSelect="changeSelect"
142
- @selectAll="changeSelect"
143
- ></bri-table>
144
- <bri-table
145
- v-show="!selfShowListData.length || isSearching"
146
- class="DshFlatTable-fullscreen-inner-main"
147
- :columns="showColumns"
148
- :data="selfShowListData"
149
- :footer-data="footerData"
150
- :propsObj="tableInModalPropsObj"
151
- @changeSelect="changeSelect"
152
- @selectAll="changeSelect"
153
- ></bri-table>
120
+ <!-- 内容 -->
121
+ <template>
122
+ <!-- 表单展示模式 -->
123
+ <div
124
+ v-if="showMode === 'form'"
125
+ class="DshFlatTable-fullscreen-inner-form"
126
+ >
127
+ <div
128
+ v-for="(row, rowIndex) in selfShowListData"
129
+ :key="row._id"
130
+ class="item"
131
+ >
132
+ <div class="item-index">
133
+ <p>第{{ rowIndex + 1 }}条</p>
134
+ <span></span>
135
+ </div>
136
+
137
+ <dsh-form
138
+ class="item-form"
139
+ :canEdit="getRowCanEdit(row, rowIndex)"
140
+ :formData="row"
141
+ :formList="getRowFormList(row, rowIndex)"
142
+ :allFormList="getRowFormList(row, rowIndex)"
143
+ :inTableType="inTableType"
144
+ :allListRows="allListData"
145
+ :rowIndex="rowIndex"
146
+ :parentFormList="allFormList"
147
+ :parentObj="parentObj"
148
+ ></dsh-form>
149
+
150
+ <dsh-icons
151
+ v-if="$getOperationList(['canInsert', 'canDelete']).length"
152
+ class="item-icons"
153
+ itemClass="item-icons-item"
154
+ :list="$getOperationList(['canInsert', 'canDelete'])"
155
+ @click="$dispatchEvent($event, row, rowIndex)"
156
+ ></dsh-icons>
157
+ </div>
158
+ </div>
159
+
160
+ <!-- 表格展示模式 -->
161
+ <template v-else>
162
+ <bri-table
163
+ class="DshFlatTable-fullscreen-inner-main"
164
+ :columns="showColumns"
165
+ :data="selfShowListData"
166
+ :footer-data="footerData"
167
+ :propsObj="tableInModalPropsObj"
168
+ @changeSelect="changeSelect"
169
+ @selectAll="changeSelect"
170
+ ></bri-table>
171
+ </template>
172
+ </template>
154
173
 
155
174
  <!-- 添加行 -->
156
175
  <dsh-render :render="createBtnRender"></dsh-render>
@@ -307,6 +326,7 @@
307
326
  display: flex;
308
327
  flex-direction: column;
309
328
 
329
+ &-form,
310
330
  &-main {
311
331
  flex: 1;
312
332
  min-height: 0px;
@@ -70,11 +70,6 @@ export default {
70
70
  allListMap () {
71
71
  return this.$arrToMap(this.allListData, "_id");
72
72
  },
73
- selfRenderedListData () {
74
- return this.isMergeRowTable
75
- ? this.renderedListData
76
- : this.curPageShowListData;
77
- },
78
73
  selfShowListData () {
79
74
  return this.isMergeRowTable
80
75
  ? this.showListData
@@ -9,7 +9,7 @@
9
9
  height: 100%;
10
10
  overflow: auto;
11
11
  word-break: break-word;
12
- position: relative;
12
+ // position: relative;
13
13
 
14
14
  td {
15
15
  white-space: normal !important;
@@ -145,11 +145,9 @@
145
145
  }
146
146
 
147
147
  &-empty {
148
- position: absolute;
149
- top: 0px;
150
- left: 0px;
151
148
  width: 100%;
152
149
  height: 100%;
150
+ min-height: 60px;
153
151
  padding: 9px 16px;
154
152
  border: 1px solid @borderColor;
155
153
  border-top: none;