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

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>
主站蜘蛛池模板: 郴州市| 轮台县| 盱眙县| 黄大仙区| 龙山县| 武威市| 朝阳区| 交城县| 富锦市| 临江市| 梁山县| 炎陵县| 江陵县| 边坝县| 天峻县| 镇安县| 汽车| 松潘县| 那曲县| 德昌县| 云阳县| 防城港市| 濮阳县| 九台市| 佛坪县| 莒南县| 科尔| 于田县| 新丰县| 光泽县| 鞍山市| 乡城县| 涿州市| 京山县| 莎车县| 江西省| 盐津县| 普陀区| 定州市| 句容市| 仪陇县|