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

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>
主站蜘蛛池模板: 盐池县| 定兴县| 白水县| 道孚县| 黑水县| 武胜县| 淮滨县| 海伦市| 乐平市| 乌拉特前旗| 鹤山市| 漳州市| 怀来县| 杂多县| 定兴县| 双流县| 原阳县| 霞浦县| 合水县| 枞阳县| 沈丘县| 基隆市| 漳州市| 上栗县| 武陟县| 阳春市| 湟中县| 辉南县| 永春县| 张家界市| 梁河县| 弥勒县| 左贡县| 雅江县| 阳春市| 湛江市| 武汉市| 东明县| 平南县| 广饶县| 黔江区|