appList.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="box">
  3. <navigator class="nav-box" v-for="item in appList" :key="item.name" :url="item.path" hover-class="navigator-hover">
  4. <image v-if="item.cover" class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
  5. <text v-else>{{ item.remark }}</text>
  6. </navigator>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. model: {
  13. type: String
  14. }
  15. }, data() {
  16. return {
  17. appList: []
  18. }
  19. }, mounted() {
  20. try {
  21. this.appList = this.getApps(this.model)
  22. console.log(this.model, this.appList)
  23. } catch (error) {
  24. console.log("未获取到授权信息")
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss">
  30. .box {
  31. padding: 0 10px;
  32. box-sizing: border-box;
  33. display: flex;
  34. justify-content: space-between;
  35. flex-wrap: wrap;
  36. .nav-box {
  37. width: 172.5px;
  38. height: 104px;
  39. flex-shrink: 0;
  40. margin-top: 10px;
  41. .image {
  42. width: 100%;
  43. height: 100%;
  44. }
  45. }
  46. }
  47. </style>