|
216 | 216 | :spinning="actionLoading" |
217 | 217 | v-ctrl-enter="handleSubmit" |
218 | 218 | > |
219 | | - <span v-if="currentAction.message"> |
| 219 | + <span v-if="currentAction.messageString"> |
220 | 220 | <div v-if="selectedRowKeys.length > 0"> |
221 | 221 | <a-alert |
222 | 222 | v-if="['delete-outlined', 'DeleteOutlined', 'poweroff-outlined', 'PoweroffOutlined'].includes(currentAction.icon)" |
|
228 | 228 | style="padding-left: 5px" |
229 | 229 | v-html="`<b>${selectedRowKeys.length} ` + $t('label.items.selected') + `. </b>`" |
230 | 230 | /> |
231 | | - <span v-html="currentAction.message" /> |
| 231 | + <span v-html="currentAction.messageString" /> |
232 | 232 | </template> |
233 | 233 | </a-alert> |
234 | 234 | <a-alert |
|
240 | 240 | v-if="selectedRowKeys.length > 0" |
241 | 241 | v-html="`<b>${selectedRowKeys.length} ` + $t('label.items.selected') + `. </b>`" |
242 | 242 | /> |
243 | | - <span v-html="currentAction.message" /> |
| 243 | + <span v-html="currentAction.messageString" /> |
244 | 244 | </template> |
245 | 245 | </a-alert> |
246 | 246 | </div> |
247 | 247 | <div v-else> |
248 | 248 | <a-alert type="warning"> |
249 | 249 | <template #message> |
250 | | - <span v-html="currentAction.message" /> |
| 250 | + <span v-html="currentAction.messageString" /> |
251 | 251 | </template> |
252 | 252 | </a-alert> |
253 | 253 | </div> |
@@ -1369,9 +1369,11 @@ export default { |
1369 | 1369 | this.currentAction.paramFilters = [] |
1370 | 1370 | if ('message' in action) { |
1371 | 1371 | if (typeof action.message === 'function') { |
1372 | | - action.message = action.message(action.resource) |
| 1372 | + action.messageString = action.message(action.resource) |
| 1373 | + } else { |
| 1374 | + action.messageString = action.message |
1373 | 1375 | } |
1374 | | - action.message = Array.isArray(action.message) ? this.$t(...action.message) : this.$t(action.message) |
| 1376 | + action.messageString = Array.isArray(action.messageString) ? this.$t(...action.messageString) : this.$t(action.messageString) |
1375 | 1377 | } |
1376 | 1378 | this.getArgs(action, isGroupAction, paramFields) |
1377 | 1379 | this.getFilters(action, isGroupAction, paramFields) |
|
0 commit comments