@bsgoal/common 2.13.3 → 2.13.5
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/dist/index.mjs +1559 -1554
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/bsgoal-base-search-table/index.vue +2 -8
- package/src/components/bsgoal-base-table/demo.vue +1 -1
- package/src/components/bsgoal-base-table/index.vue +14 -5
- package/src/components/bsgoal-base-table-pagination/index.vue +2 -13
- package/src/components/bsgoal-base-tree-table/demo.vue +7 -3
- package/src/components/bsgoal-base-tree-table/index.vue +5 -6
- package/src/components/bsgoal-base-select/debug.log +0 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-18 17:04:47
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-25 16:08:36
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-search-table\index.vue
|
|
7
7
|
* @Description: 查询+表格 基础组件
|
|
8
8
|
*
|
|
@@ -134,13 +134,6 @@ const props = defineProps({
|
|
|
134
134
|
})
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
// ---> S 注入分页的值 <---
|
|
138
|
-
const pageSizeValue = unref(props.pageSize)
|
|
139
|
-
if (pageSizeValue) {
|
|
140
|
-
provide('PAGINATION_PAGE_SIZE', ref(props.pageSize))
|
|
141
|
-
}
|
|
142
|
-
// ---> E 注入分页的值 <---
|
|
143
|
-
|
|
144
137
|
const transferFoldStatus = ref(false)
|
|
145
138
|
provide('transferFoldStatus', transferFoldStatus)
|
|
146
139
|
|
|
@@ -214,6 +207,7 @@ defineExpose({
|
|
|
214
207
|
<!-- S 表格 -->
|
|
215
208
|
<BsgoalBaseTable
|
|
216
209
|
ref="BSGOAL_BASE_TABLE_REF"
|
|
210
|
+
:page-size="pageSize"
|
|
217
211
|
:map-props="mapProps"
|
|
218
212
|
:operationWidth="operationWidth"
|
|
219
213
|
:config-options="tableOptions"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 11:29:04
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-25 16:04:16
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table\index.vue
|
|
7
7
|
* @Description:
|
|
8
8
|
*
|
|
@@ -126,6 +126,13 @@ const props = defineProps({
|
|
|
126
126
|
hasPage: {
|
|
127
127
|
type: Boolean,
|
|
128
128
|
default: true
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* 每页显示条目个数
|
|
132
|
+
*/
|
|
133
|
+
pageSize: {
|
|
134
|
+
type: [Number],
|
|
135
|
+
default: 10
|
|
129
136
|
}
|
|
130
137
|
})
|
|
131
138
|
|
|
@@ -175,7 +182,7 @@ const mapPropsFuse = {
|
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
const currentPage = ref(1)
|
|
178
|
-
const
|
|
185
|
+
const curPageSize = ref(props.pageSize)
|
|
179
186
|
const total = ref(0)
|
|
180
187
|
const searchParams = ref({})
|
|
181
188
|
const tableLoading = ref(props.loading)
|
|
@@ -185,7 +192,7 @@ const ping = () => {
|
|
|
185
192
|
const { fetch, call, hasPage } = props
|
|
186
193
|
const searchParamsVal = searchParams.value
|
|
187
194
|
const currentPageVal = currentPage.value
|
|
188
|
-
const pageSizeVal =
|
|
195
|
+
const pageSizeVal = curPageSize.value
|
|
189
196
|
const fetchParams = { ...searchParamsVal }
|
|
190
197
|
// 显示分页的注入分页参数
|
|
191
198
|
if (hasPage) {
|
|
@@ -196,6 +203,7 @@ const ping = () => {
|
|
|
196
203
|
useFetch(fetch(fetchParams), call, tableLoading, resData)
|
|
197
204
|
}
|
|
198
205
|
|
|
206
|
+
|
|
199
207
|
watchEffect(() => {
|
|
200
208
|
tableData.value = props.data
|
|
201
209
|
})
|
|
@@ -222,10 +230,10 @@ const triggerPaginationCurrentChange = (current = 1) => {
|
|
|
222
230
|
}
|
|
223
231
|
//改变页数
|
|
224
232
|
const triggerPaginationSizeChange = (size = 10) => {
|
|
225
|
-
|
|
233
|
+
curPageSize.value = size
|
|
226
234
|
}
|
|
227
235
|
|
|
228
|
-
watch([currentPage,
|
|
236
|
+
watch([currentPage, curPageSize], () => {
|
|
229
237
|
ping()
|
|
230
238
|
})
|
|
231
239
|
|
|
@@ -311,6 +319,7 @@ defineExpose({
|
|
|
311
319
|
<BsgoalBaseTablePagination
|
|
312
320
|
v-if="hasPage"
|
|
313
321
|
:total="total"
|
|
322
|
+
:page-size="curPageSize"
|
|
314
323
|
@on-current-change="triggerPaginationCurrentChange"
|
|
315
324
|
@on-size-change="triggerPaginationSizeChange"
|
|
316
325
|
/>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-15 16:34:57
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-
|
|
5
|
+
* @LastEditTime: 2023-06-25 16:04:50
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-table-pagination\index.vue
|
|
7
7
|
* @Description: 表格的分页按钮
|
|
8
8
|
*
|
|
@@ -70,17 +70,6 @@ const triggerCurrentChange = (current = 1) => {
|
|
|
70
70
|
emits('on-current-change', current)
|
|
71
71
|
}
|
|
72
72
|
const page = ref(1)
|
|
73
|
-
|
|
74
|
-
const injectPageSize = inject('PAGINATION_PAGE_SIZE')
|
|
75
|
-
console.log('injectPageSize',injectPageSize);
|
|
76
|
-
// ---> S pageSize 值注入 <---
|
|
77
|
-
const pageSizeValueGet = computed(() => {
|
|
78
|
-
if (injectPageSize) {
|
|
79
|
-
return unref(injectPageSize)
|
|
80
|
-
}
|
|
81
|
-
return props.pageSize
|
|
82
|
-
})
|
|
83
|
-
// ---> E pageSize 值注入 <---
|
|
84
73
|
</script>
|
|
85
74
|
<template>
|
|
86
75
|
<div class="bsgoal-base-table-pagination">
|
|
@@ -91,7 +80,7 @@ const pageSizeValueGet = computed(() => {
|
|
|
91
80
|
layout="total, sizes, prev, pager, next, jumper"
|
|
92
81
|
v-model:current-page="page"
|
|
93
82
|
:page-sizes="pageSizes"
|
|
94
|
-
:page-size="
|
|
83
|
+
:page-size="pageSize"
|
|
95
84
|
:total="total"
|
|
96
85
|
@size-change="triggerSizeChange"
|
|
97
86
|
@current-change="triggerCurrentChange"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:51
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-25
|
|
5
|
+
* @LastEditTime: 2023-06-25 16:46:31
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\demo.vue
|
|
7
7
|
* @Description: 树 + 列表 + 演示
|
|
8
8
|
*
|
|
@@ -794,7 +794,7 @@ setTimeout(() => {
|
|
|
794
794
|
|
|
795
795
|
const BSGOAL_BASE_TREE_TABLE_REF = ref(null)
|
|
796
796
|
const test = () => {
|
|
797
|
-
BSGOAL_BASE_TREE_TABLE_REF.value.refreshList({
|
|
797
|
+
BSGOAL_BASE_TREE_TABLE_REF.value.refreshList({})
|
|
798
798
|
}
|
|
799
799
|
|
|
800
800
|
// ---> E 列表 <---
|
|
@@ -814,7 +814,11 @@ const test = () => {
|
|
|
814
814
|
:expression="77"
|
|
815
815
|
@on-click-tree="triggerTreeClick"
|
|
816
816
|
@on-add-tree="triggerTreeAddClick"
|
|
817
|
-
|
|
817
|
+
>
|
|
818
|
+
<!-- <template #prop1="{row}">
|
|
819
|
+
<div>{{ row }}</div>
|
|
820
|
+
</template> -->
|
|
821
|
+
</BsgoalBaseTreeTable>
|
|
818
822
|
</div>
|
|
819
823
|
</div>
|
|
820
824
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:44
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-25
|
|
5
|
+
* @LastEditTime: 2023-06-25 16:45:42
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\index.vue
|
|
7
7
|
* @Description: 树结构 + 列表
|
|
8
8
|
*
|
|
@@ -153,7 +153,7 @@ const props = defineProps({
|
|
|
153
153
|
*/
|
|
154
154
|
pageSize: {
|
|
155
155
|
type: [Number],
|
|
156
|
-
default:
|
|
156
|
+
default: 10
|
|
157
157
|
}
|
|
158
158
|
})
|
|
159
159
|
|
|
@@ -200,8 +200,7 @@ const triggerTreeClick = (value, node, treeNode, event) => {
|
|
|
200
200
|
// ---> S 表 <---
|
|
201
201
|
const BSGOAL_BASE_SEARCH_TABLE_REF = ref(null)
|
|
202
202
|
const refreshList = (params = {}) => {
|
|
203
|
-
|
|
204
|
-
BSGOAL_BASE_SEARCH_TABLE_REF.value.refreshList(params)
|
|
203
|
+
BSGOAL_BASE_SEARCH_TABLE_REF.value.refresh(params)
|
|
205
204
|
}
|
|
206
205
|
|
|
207
206
|
// 暴露的属性
|
|
@@ -215,9 +214,9 @@ const tableStyler = computed(() => {
|
|
|
215
214
|
const styler = {}
|
|
216
215
|
const switchStatusValue = switchStatus.value
|
|
217
216
|
if (switchStatusValue) {
|
|
218
|
-
styler.
|
|
217
|
+
styler.minWidth = 'calc(100% - 250px)'
|
|
219
218
|
} else {
|
|
220
|
-
styler.
|
|
219
|
+
styler.minWidth = 'calc(100%)'
|
|
221
220
|
}
|
|
222
221
|
|
|
223
222
|
return styler
|