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

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>
主站蜘蛛池模板: 重庆市| 兰州市| 南溪县| 鄯善县| 永川市| 佛冈县| 治县。| 陵川县| 浪卡子县| 广河县| 英德市| 鹤山市| 泸定县| 新泰市| 涞水县| 连平县| 西藏| 丁青县| 江陵县| 陵川县| 宜昌市| 泸西县| 滦平县| 余姚市| 新建县| 汕尾市| 淮南市| 垦利县| 陆河县| 南溪县| 湄潭县| 永兴县| 扶沟县| 淄博市| 象山县| 南皮县| 城步| 寿阳县| 泽普县| 巨野县| 苏尼特左旗|