Skip to content
On this page

Params

参数处理

设置v-params,参数不存在,显示-

参数为空处理:
参数有值:6666
vue
<template>
  <div>
    <span>参数为空处理:</span>
    <span v-params>{{ isNull }}</span>
  </div>
  <div class="mt20">
    <span>参数有值:</span>
    <span v-params>{{ value }}</span>
  </div>
</template>

<script setup>
import { ref } from 'vue';

const isNull = ref(null);

const value = ref('6666');
</script>