br-dionysus 0.9.1 → 0.9.2

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/README.md CHANGED
@@ -264,6 +264,7 @@ const test = ref<number>(0)
264
264
 
265
265
  <template>
266
266
  <m-new-select-table
267
+ class="zzz"
267
268
  ref="selectRef"
268
269
  v-model="code"
269
270
  placeholder="请选择单号"
@@ -272,13 +273,15 @@ const test = ref<number>(0)
272
273
  :keywords="{label: 'createdUserName',value: 'sn' }"
273
274
  size="small"
274
275
  @selected="selected"
276
+ @selectMultiple="selectMultiple"
275
277
  multiple
276
278
  filterable
277
279
  tableHeight="200"
278
280
  reserveSelection
279
281
  :filterMethod="filterMethod"
280
282
  @toPage="toPage"
281
- :total="9"
283
+ isAffirmBtn
284
+ :total="total"
282
285
  ></m-new-select-table>
283
286
  </template>
284
287
  <script setup lang="ts">
@@ -288,21 +291,21 @@ import { Page } from 'packages/typings/class'
288
291
  const commodityOptionsTitle: TableTitle[] = [{
289
292
  prop: 'sn',
290
293
  label: '单号',
291
- minWidth: 200
294
+ // minWidth: 200
292
295
 
293
296
  }, {
294
297
  prop: 'fileName',
295
298
  label: '文件名',
296
- minWidth: 200
299
+ // minWidth: 200
297
300
  }, {
298
301
  prop: 'createdUserName',
299
- minWidth: 300,
302
+ // minWidth: 300,
300
303
  label: '上传者'
301
304
 
302
305
  }, {
303
306
  prop: 'createdTimeStr',
304
307
  label: '上传时间',
305
- minWidth: 200
308
+ // minWidth: 200
306
309
 
307
310
  }]
308
311
  const selectRef: any = ref<HTMLElement | null>(null)
@@ -360,6 +363,7 @@ const arr = [{
360
363
  createdUserName: '绫波丽0',
361
364
  createdTimeStr: '2024-05-06'
362
365
  }]
366
+ const total = ref(0)
363
367
  const options = ref()
364
368
 
365
369
  const selected = (value: string | number | Array<number | string>, row: any) => {
@@ -399,10 +403,15 @@ const toPage = (page: Page) => {
399
403
  two()
400
404
  }
401
405
  }
406
+ total.value = arr.length
402
407
  console.log(options.value)
403
408
 
404
409
  }
405
- // options.value = arr
410
+ const selectMultiple =(value: string | number | Array<number | string>, row: any) => {
411
+ code.value = value
412
+ // console.log('selected',value)
413
+ // console.log('selected', row)
414
+ }
406
415
 
407
416
 
408
417
  onMounted(() => {
@@ -413,6 +422,7 @@ onMounted(() => {
413
422
  setTimeout(() => {
414
423
  code.value = ['SC201564981241', 'SC201564981243']
415
424
  }, 0)
425
+ total.value = arr.length
416
426
  })
417
427
  const filterMethod = (searchValue: string, page: Page) => {
418
428
  if (page.pageSize > 5) {
@@ -431,7 +441,9 @@ const filterMethod = (searchValue: string, page: Page) => {
431
441
  </script>
432
442
 
433
443
  <style>
434
-
444
+ .zzz{
445
+ width: 200px;
446
+ }
435
447
  </style>
436
448
 
437
449
 
@@ -453,7 +465,7 @@ const filterMethod = (searchValue: string, page: Page) => {
453
465
  | keywords | 关键字配置(value-key 配置)映射关键字 | Option | - | {label: 'label' ,value:'value'} |
454
466
  | reserveSelection | 是否打开翻页多选 需要是多选才有效 | boolean | - | false |
455
467
  | tableHeight | 表格高度 | string | number | 200 |
456
-
468
+ | isAffirmBtn | 是否有确认按钮 当使用此按钮时 selected事件无效 需使用selectMultiple事件 | boolean | - | false |
457
469
 
458
470
  ### 3) Option
459
471
  | 参数 | 说明 | 类型 |
@@ -462,10 +474,11 @@ const filterMethod = (searchValue: string, page: Page) => {
462
474
  | value | 绑定值 | string | number |
463
475
 
464
476
  ### 4) events
465
- | 事件名 | 说明 | 回调参数 |
466
- | -------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
467
- | selected | 单选或多选之后的回调 | 根据多选和单选的模式不同 返回的也有所区别 单选为 (value,row) 多选为(values[],rows[]) |
468
- | toPage | 当没有使用filterMethod时候才会有回调否则没有 | page 表格分页 |
477
+ | 事件名 | 说明 | 回调参数 |
478
+ | -------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
479
+ | selected | 单选或多选之后的回调 | 根据多选和单选的模式不同 返回的也有所区别 单选为 (value,row) 多选为(values[],rows[]) |
480
+ | toPage | 当没有使用filterMethod时候才会有回调否则没有 | page 表格分页 |
481
+ | selectMultiple | 多选确认按钮时的回调 配合isAffirmBtn使用 | (values[],rows[]) |
469
482
 
470
483
  ### 5) Methods
471
484
  | 方法名 | 说明 |