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

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>
主站蜘蛛池模板: 岐山县| 休宁县| 沂南县| 怀来县| 靖州| 克拉玛依市| 穆棱市| 桐柏县| 绥芬河市| 岢岚县| 景宁| 黎川县| 晋中市| 新龙县| 焉耆| 土默特左旗| 枣庄市| 河南省| 定结县| 叙永县| 塔城市| 五峰| 陕西省| 大新县| 呈贡县| 长兴县| 伊金霍洛旗| 正定县| 涞源县| 兴安县| 东光县| 沅陵县| 临城县| 宁城县| 遵义市| 铜山县| 焦作市| 五华县| 太康县| 桐乡市| 和龙市|