@a2simcode/ui 0.0.105 → 0.0.106

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.
@@ -5,6 +5,8 @@
5
5
  :records="records"
6
6
  :actions="actions"
7
7
  :action-filter="actionFilter"
8
+ :row-key="'id'"
9
+ :is-multiple="true"
8
10
  />
9
11
  </div>
10
12
  </template>
@@ -102,18 +104,22 @@ const actions = ref([
102
104
  const actionFilter = ({
103
105
  action,
104
106
  record,
107
+ selected,
105
108
  }: {
106
109
  action: { id: string }
107
110
  record: Record<string, any>
111
+ selected: boolean
108
112
  }) => {
113
+ console.log(action, selected, { disabled: !selected })
109
114
  if (action.id === 'delete') {
110
- return { display: record.status !== '已归档' }
115
+ return { display: record.status !== '已归档', disabled: !selected }
111
116
  }
112
117
  if (action.id === 'edit') {
113
- return { disabled: record.status === '已完成' }
118
+ console.log(action, selected, { disabled: !selected })
119
+ return { disabled: !selected }
114
120
  }
115
121
  if (action.id === 'approve') {
116
- return { display: record.status === '待审核' }
122
+ return { display: record.status === '待审核', disabled: !selected }
117
123
  }
118
124
  return { display: true }
119
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2simcode/ui",
3
- "version": "0.0.105",
3
+ "version": "0.0.106",
4
4
  "description": "A Vue 3 UI Component Library",
5
5
  "type": "module",
6
6
  "main": "./dist/simcode-ui.umd.js",