<template> <div class="test"> <h4>机构选择</h4> <div class="flex items-center"> <van-button type="primary" size="small" @click="unitData.visible = true">选择机构</van-button> <span class="ml-2">{{unitData.value}}</span> </div> <DocUnit v-model:show="unitData.visible" v-model:value="unitData.value"/> </div> </template> <script> import DocUnit from '@/doctor/components/docUnit/DocUnit.vue' export default { components:{ DocUnit }, data(){ return { unitData: { visible: false, value: undefined } } }, created() { sessionStorage.setItem('token', 'dd16fd27-4cfc-492e-a772-c817033133bb') } } </script> <style lang="less" scoped> </style>