deviceCard.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="box">
  3. <view class="topBox">
  4. <text>{{device.name}}</text>
  5. <text>{{device.online ? '在线':'离线'}}</text>
  6. </view>
  7. <text class="iccid" space="ensp">uuid: {{device.uuid}}</text>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. props: {
  13. device:{
  14. type:Object,
  15. default:function(){
  16. return {
  17. name:'',
  18. ssid:''
  19. }
  20. }
  21. }
  22. },
  23. data: () => ({}),
  24. computed: {},
  25. methods: {},
  26. watch: {},
  27. // 组件周期函数--监听组件挂载完毕
  28. mounted() {},
  29. // 组件周期函数--监听组件激活(显示)
  30. activated() {},
  31. // 组件周期函数--监听组件停用(隐藏)
  32. deactivated() {},
  33. // 组件周期函数--监听组件销毁之前
  34. beforeDestroy() {},
  35. };
  36. </script>
  37. <style>
  38. .box{
  39. display: flex;
  40. flex-direction:column;
  41. justify-content: space-between;
  42. width: 35vw;
  43. height: 22vw;
  44. border: 1rpx solid #333333;
  45. }
  46. .topBox{
  47. display: flex;
  48. flex-direction:row;
  49. justify-content: space-between;
  50. }
  51. .iccid{
  52. word-break: break-all;
  53. /* text-overflow:ellipsis;
  54. overflow: hidden;
  55. white-space: nowrap; */
  56. }
  57. </style>