Attic»论坛 前端 VUE vue3

vue3

[复制链接]
发表于 2025-10-9 13:40:21 | 显示全部楼层 |阅读模式

map 语法

// 解析 sn 字符串转为数组,a,b,c=>[a,b,c]
  const snList = data?.sn ? data.sn.split(',').map((s: string) => s.trim()).filter(Boolean) : [''];

  // 转换为组件需要的格式
  serialNumbers.value = snList.map((value: string, index: number) => ({
    id: index + 1,
    value: value
  }));

刷新表格

1、const tableKey = ref(0);
2、tableKey.value += 1;
3、<publicFormAgGrid :key="tableKey" :agGridConfig="agGridConfig" style="height: 400px;"></publicFormAgGrid>

开启过滤

filterable:true el-select的属性

formJson: [
    {type: 'text', field: 'rfidNo', label: 'RFID', clearable: true},
    { type: 'select', field: 'salesOrderItemNo', label: '项目号', otherField: 'salesOrderItemNo', parentId: 'business:PD_SALES_ORDER_ITEM_SQL_DICT', dictParams: { grpFlg },clearable: true,
      filterable: true, },
  ]

GMT+8, 2025-10-17 02:10 , Processed in 0.089964 second(s), 35 queries Archiver|手机版|小黑屋|Attic ( 京ICP备2020048627号 )

快速回复 返回顶部 返回列表