基于vue2.x实现的即时通讯程序仿微信聊天9开发添加好友及我的

2022-11-22  本文已影响0人  风中凌乱的男子
image.png
actions: [
        { text: '添加好友', icon: 'add-o', type: 1 },
        { text: '扫一扫', icon: 'music-o', type: 2 },
        { text: '收付款', icon: 'more-o', type: 3 }
      ],
 <van-popover
          @select="selectPopoverFun"
          v-model="showPopover"
          theme="dark"
          :offset="[17, 8]"
          trigger="click"
          placement="bottom-end"
          :actions="actions"
        >
methods:{
  selectPopoverFun(e){
     console.log(e)
  }
}
switch (e.type) {
        case 1:
         alert('添加好友')
          break
        case 2:
          alert('扫一扫')
          break
        case 3:
          break
        default:
          break
      }
<van-popup v-model="showPopup" position="right" :style="{ width: '100%', height: '100%' }">
     ...
</van-popup>
 data() {
    return {
       showPopup: false,
  }
}

添加好友页面 设计图如下

image.png
<van-nav-bar title="添加好友" left-text="返回" left-arrow @click-left="showPopup = false" />
 <van-search v-model="Searchvalue" show-action placeholder="请输入搜索关键词" @search="onSearch">
        <template #action>
          <div @click="onSearch">搜索</div>
        </template>
</van-search>
 data() {
    return {
       Searchvalue:"",
  }
}
 onSearch() {
       
 },
上一篇下一篇

猜你喜欢

热点阅读