bri-components 1.5.10 → 1.5.11
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 +1 -1
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +4 -0
- package/src/components/list/DshFlatTable.vue +4 -4
- package/src/components/list/mixins/DshCascaderTableMixin.js +1 -1
- package/src/components/list/mixins/DshFlatTableMixin.js +10 -10
- package/src/components/list/mixins/tableBaseMixin.js +1 -1
package/package.json
CHANGED
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
<input
|
|
58
58
|
id="fileupload"
|
|
59
59
|
class="file"
|
|
60
|
+
:accept="acceptType"
|
|
60
61
|
:type="inputType"
|
|
61
62
|
@change="setImage"
|
|
62
63
|
/>
|
|
@@ -155,6 +156,9 @@
|
|
|
155
156
|
},
|
|
156
157
|
finalRequestOssType () {
|
|
157
158
|
return this.propsObj._requestOssType || this.requestOssType || "default";
|
|
159
|
+
},
|
|
160
|
+
acceptType () {
|
|
161
|
+
return this.propsObj._acceptType || "*";
|
|
158
162
|
}
|
|
159
163
|
},
|
|
160
164
|
created () {
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
>
|
|
75
75
|
<dsh-page
|
|
76
76
|
:mode="pageMode"
|
|
77
|
-
:total="
|
|
77
|
+
:total="totalNum"
|
|
78
78
|
:propsObj="pagePropsObj"
|
|
79
79
|
@changePage="changePage"
|
|
80
80
|
@changePageSize="changePageSize"
|
|
81
81
|
>
|
|
82
|
-
共 {{
|
|
82
|
+
共 {{ totalNum }} 条
|
|
83
83
|
|
|
84
84
|
<span
|
|
85
85
|
class="DshFlatTable-sort"
|
|
@@ -183,12 +183,12 @@
|
|
|
183
183
|
>
|
|
184
184
|
<dsh-page
|
|
185
185
|
:mode="pageMode"
|
|
186
|
-
:total="
|
|
186
|
+
:total="totalNum"
|
|
187
187
|
:propsObj="pagePropsObj"
|
|
188
188
|
@changePage="changePage"
|
|
189
189
|
@changePageSize="changePageSize"
|
|
190
190
|
>
|
|
191
|
-
共 {{
|
|
191
|
+
共 {{ totalNum }} 条
|
|
192
192
|
|
|
193
193
|
<span
|
|
194
194
|
class="DshFlatTable-sort"
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
},
|
|
61
61
|
// 替换tableBaseMixin里的
|
|
62
62
|
searchTitle () {
|
|
63
|
-
return `${this.isSearching ? "筛选" : "全部"}数据${this.isMergeRowTable ? `,共 ${this.
|
|
63
|
+
return `${this.isSearching ? "筛选" : "全部"}数据${this.isMergeRowTable ? `,共 ${this.totalNum}条;` : ";"}`;
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
/* --- 列字段 --- */
|
|
@@ -168,17 +168,17 @@ export default {
|
|
|
168
168
|
const pagesize = this.pagePropsObj.pagesize;
|
|
169
169
|
|
|
170
170
|
return page >= 1
|
|
171
|
-
?
|
|
171
|
+
? page > this.totalPage
|
|
172
172
|
? this.showListData.slice(-(this.showListData.length % pagesize || pagesize))
|
|
173
173
|
: this.showListData.slice((page - 1) * pagesize, page * pagesize)
|
|
174
174
|
: [];
|
|
175
175
|
},
|
|
176
176
|
// 全部数据 或 筛选时符合条件的数据 -共多少分(!!!最小为1)
|
|
177
|
-
|
|
177
|
+
totalPage () {
|
|
178
178
|
return (
|
|
179
|
-
this.
|
|
180
|
-
? Math.ceil(this.
|
|
181
|
-
: this.
|
|
179
|
+
this.totalNum % this.pagePropsObj.pagesize > 0
|
|
180
|
+
? Math.ceil(this.totalNum / this.pagePropsObj.pagesize)
|
|
181
|
+
: this.totalNum / this.pagePropsObj.pagesize
|
|
182
182
|
) || 1;
|
|
183
183
|
}
|
|
184
184
|
},
|
|
@@ -203,15 +203,15 @@ export default {
|
|
|
203
203
|
this.changePage(1);
|
|
204
204
|
}
|
|
205
205
|
} else {
|
|
206
|
-
if (this.pagePropsObj.page !== this.
|
|
207
|
-
this.changePage(this.
|
|
206
|
+
if (this.pagePropsObj.page !== this.totalPage) {
|
|
207
|
+
this.changePage(this.totalPage);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
211
|
// 也供外部使用 -删除数据时,更正this.pagePropsObj.page
|
|
212
212
|
fixCurPage () {
|
|
213
|
-
if (this.pagePropsObj.page > this.
|
|
214
|
-
this.changePage(this.
|
|
213
|
+
if (this.pagePropsObj.page > this.totalPage) {
|
|
214
|
+
this.changePage(this.totalPage);
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
// 暂未供外部使用 -判断是否要转到下一页(在本页最后一条上插入一行时,要转到下一页)
|