“变形” 是一个 Quasar 指令,它能够在两种状态之间变换 DOM 元素。
¥“Morph” is a Quasar directive that provides the ability to morph DOM elements between two states.
在底层,它使用 Quasar Morph 函数实用程序。
¥Under the hood, it uses the Quasar Morph function util.
用法(Usage)
¥Usage
首先阅读 Morph 函数实用程序 将最有助于你理解此指令的工作原理。
¥Reading the Morph function util first will be best in your understanding of how this directive works.
此指令将组中的一个元素变形为另一个元素。通过更改指令的值(模型)以匹配变形元素的名称来激活变形。
¥This directive morphs one element in a group into another. The morphing is activated by changing the value (model) of the directive to match the name of the morphing element.
警告
“name” 和 “group”(作为指令参数或通过指令的值)是必需的。
¥The “name” and “group” (as directive arg or through the value of the directive) are mandatory.
如果指令的值是对象形式,则 “model” 也是必需的。
¥If the value of the directive is in Object form, then “model” is also mandatory.