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

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>
主站蜘蛛池模板: 哈尔滨市| 静安区| 威远县| 阿坝县| 莱阳市| 临朐县| 襄垣县| 旌德县| 宣恩县| 金沙县| 抚顺县| 四子王旗| 崇礼县| 白银市| 定日县| 达孜县| 株洲市| 太原市| 蓬安县| 南投市| 商河县| 山阳县| 赣州市| 阿克陶县| 增城市| 澄城县| 济南市| 巴青县| 南投市| 宕昌县| 都昌县| 宁远县| 黄平县| 余庆县| 安西县| 仲巴县| 荥经县| 铜川市| 西城区| 丹阳市| 靖边县|