如何在 grails 中将 actionSubmitImage 标签与资产管道插件一起使用

How to use actionSubmitImage tag with asset pipeline plugin in grails

actionSubmitImage 标签的 documentation 使用 resource 插件。怎么改成使用asset-pipeline plugin.

例如:

<g:actionSubmitImage action="unassign" value="${message(code: 'default.button.unassign.label', default: 'Unassign')}" 
   onclick="return confirm('${message(code: 'default.button.unassign.confirm.message', default: 'Are you sure to unassign the schema?')}');" 
   title="Remove owner for the current schema" 
   src="${resource(dir: 'skin', file: 'user_delete.png')}" style="display:inline;"/>

src属性如何变化?

src 标签 src="${resource(dir: 'skin', file: 'user_delete.png')}" 应更改为 src="${assetPath(src: 'skin/delete.png')}"assetPath 给出 assets 目录的路径。

<g:actionSubmitImage action="drop" value="${message(code: 'default.button.unassign.label', default: 'Drop')}" 
onclick="return confirm('${message(code: 'default.button.drop.confirm.message', default: 'Are you sure to drop the schema?')}');" 
title="Drop schema"
src="${assetPath(src: 'skin/delete.png')}"/>