<script>
export default {
}
</script>

<template>
<div>
  <div class="stylus-method-general">
    {{'getsize(zoom) { //一般调用\n'
    + '  2 * zoom\n'
    + '}\n'
    + '.stylus-method-general {\n'
    + '  font-size: getsize(7);\n'
    + '}'}}
  </div>

  <div class="stylus-method-named">
    {{'getsize(zoom) { //具名参数\n'
    + '  2 * zoom\n'
    + '}\n'
    + '.stylus-method-named {\n'
    + '  font-size: getsize(zoom: 7);\n'
    + '}'}}
  </div>

  <div class="stylus-method-varargs">
    {{'getsize(args...) { //不定参数\n'
    + '  2 * args\n'
    + '}\n'
    + '.stylus-method-varargs {\n'
    + '  font-size: getsize(7);\n'
    + '}'}}
  </div>
</div>
</template>

<style scoped lang="stylus">
getsize(zoom) { // 一般调用
  2 * zoom
}
.stylus-method-general {
  font-size: getsize(7);

  color: #126085
  left: 10;
  top: 10;
  width: 240;
  height: 140;
}

getsize(zoom) { // 具名参数
  2 * zoom
}

.stylus-method-named {
  font-size: getsize(zoom: 7);

  color: #126085;
  left: 10;
  top: 140;
  width: 240;
  height: 140;
}

getsize(args...) { // 不定参数
  2 * args
}

.stylus-method-varargs {
  font-size: getsize(7);

  color: #126085;
  left: 10;
  top: 270;
  width: 240;
  height: 140;
}
</style>