@bsgoal/common 2.13.3 → 2.13.4

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": "@bsgoal/common",
3
- "version": "2.13.3",
3
+ "version": "2.13.4",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -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-21 10:21:34
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 14:26:44
4
4
  * @LastEditors: canlong.shen
5
- * @LastEditTime: 2023-05-26 14:26:06
5
+ * @LastEditTime: 2023-06-25 16:05:45
6
6
  * @FilePath: \common\src\components\bsgoal-base-table\demo.vue
7
7
  * @Description: 表格公共组件演示页面
8
8
  *
@@ -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-20 19:21:34
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 pageSize = ref(10)
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 = pageSize.value
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
- pageSize.value = size
233
+ curPageSize.value = size
226
234
  }
227
235
 
228
- watch([currentPage, pageSize], () => {
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-20 19:34:36
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="pageSizeValueGet"
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 15:32:25
5
+ * @LastEditTime: 2023-06-25 16:29:16
6
6
  * @FilePath: \common\src\components\bsgoal-base-tree-table\demo.vue
7
7
  * @Description: 树 + 列表 + 演示
8
8
  *
@@ -814,7 +814,11 @@ const test = () => {
814
814
  :expression="77"
815
815
  @on-click-tree="triggerTreeClick"
816
816
  @on-add-tree="triggerTreeAddClick"
817
- ></BsgoalBaseTreeTable>
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 15:20:18
5
+ * @LastEditTime: 2023-06-25 16:28:00
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: 0
156
+ default: 10
157
157
  }
158
158
  })
159
159
 
@@ -215,9 +215,9 @@ const tableStyler = computed(() => {
215
215
  const styler = {}
216
216
  const switchStatusValue = switchStatus.value
217
217
  if (switchStatusValue) {
218
- styler.maxWidth = 'calc(100% - 250px)'
218
+ styler.minWidth = 'calc(100% - 250px)'
219
219
  } else {
220
- styler.maxWidth = 'calc(100%)'
220
+ styler.minWidth = 'calc(100%)'
221
221
  }
222
222
 
223
223
  return styler
@@ -1,2 +0,0 @@
1
- [0531/134940.513:ERROR:registration_protocol_win.cc(107)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2)
2
- [0531/140033.772:ERROR:registration_protocol_win.cc(107)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2)