官术网_书友最值得收藏!

Expressions

If a directive requires a value, it will be anexpression.

In the JavaScript language, expressions are small, evaluable statements that produce a single value. Expressions can be used wherever a value is expected, for example in the parenthesis of anifstatement:

if (expression) {
  ...
}

The expression here could be any of the following:

  • A mathematical expression, for examplex + 7
  • A comparison, for examplev <= 7
  • A Vuedataproperty, for examplethis.myval

Directives and text interpolations both accept expression values:

<p v-dir="someExpression">{{ firstName + " " + lastName }}</p>
主站蜘蛛池模板: 昌平区| 柞水县| 临江市| 沧源| 当阳市| 开原市| 资中县| 东港市| 察雅县| 松江区| 隆昌县| 绥滨县| 柯坪县| 沛县| 灵川县| 丽江市| 苗栗市| 乌拉特前旗| 修水县| 景宁| 中西区| 高邮市| 通州市| 丹东市| 克什克腾旗| 临清市| 同德县| 丹棱县| 射洪县| 色达县| 奉新县| 平湖市| 台东市| 句容市| 高平市| 启东市| 松阳县| 法库县| 皮山县| 比如县| 松潘县|