发表于: 2019-10-21 23:13:25

1 845


今天完成的事情:

1.写了一个半页面(其实就是一个):

<template>
  <div class="search">
    <nav>
      <img src="../assets/images/热门推荐/u538.svg" alt class="navImgLeft" />
      <p class="navWord">搜索</p>
      <img src="../assets/images/首页-视频1/u10.svg" alt class="navImgRight" />
    </nav>
    <div class="keyWord">
      <img src="../assets/images/首页-视频1/u42.svg" alt />
      <input type="text" placeholder="请输入关键词" />
      <span>取消</span>
    </div>
    <main>
      <div class="sorry" v-if="sorry">
        <p>抱歉,没有发现的相关内容</p>
        <p>换个关键词试试吧</p>
      </div>
      <div class="record">
        <p>搜索记录</p>
        <p>清空</p>
      </div>
      <div class="recordWord">
        <span v-for="(recordindexin searchRecord" :key="index">{{record}}</span>
      </div>
    </main>
    <footer>
      <div class="foot">
        <img src="../assets/images/首页-视频1/u15.svg" alt />
        <p>首页</p>
      </div>
      <div class="foot">
        <img src="../assets/images/首页-视频1/u20.svg" alt />
        <p>学习</p>
      </div>
      <div class="foot">
        <img src="../assets/images/首页-视频1/u19.svg" alt />
        <p>论坛</p>
      </div>
      <div class="foot">
        <img src="../assets/images/首页-视频1/u18.svg" alt />
        <p>我的</p>
      </div>
    </footer>
  </div>
</template>

<script>
export default {
  name: "search",
  data() {
    return {
      sorry: true,
      searchRecord: [
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优",
        "名师提优"
      ]
    };
  }
};
</script>

<style lang="scss" scope>
.search {
  nav {
    positionfixed;
    displayflex;
    justify-contentspace-between;
    align-itemscenter;
    top50px;
    width100%;
    height44px;
    background-color#e9e516;
    .navImgLeft {
      margin-left10px;
    }
    .navImgRight {
      margin-right10px;
    }
  }
  .keyWord {
    positionrelative;
    margin-top80px;
    padding0 10px;
    img {
      positionabsolute;
      left12px;
      top50%;
      width20px;
      height14px;
      margin-top-7px;
    }
    input {
      width75%;
      height25px;
      padding-left22px;
      margin-right10px;
      font-size14px;
      border1px solid #aaa5a5;
      border-radius5px;
      outlinenone;
    }
  }
  main {
    .sorry {
      displayflex;
      flex-flowcolumn nowrap;
      justify-contentcenter;
      align-itemscenter;
      padding-top20px;
    }
    .record {
      displayflex;
      justify-contentspace-between;
      padding0 20px;
    }
    .recordWord {
      displayflex;
      flex-flowrow wrap;
      padding0 15px;
      span {
        font-size12px;
        margin5px;
        padding0 5px;
        color#7f7f7f;
        background-color#e3e3e3;
        border1px solid #7f7f7f;
        border-radius5px;
      }
    }
  }
  footer {
    positionfixed;
    bottom0;
    height49px;
    displayflex;
    justify-contentspace-between;
    align-itemscenter;
    width90%;
    padding0 5%;
    background-color#e3e3e3;
    .foot {
      displayflex;
      flex-flowcolumn nowrap;
      justify-contentcenter;
      align-itemscenter;
      p {
        margin0;
        font-size12px;
      }
    }
  }
}
</style>


明天计划:

写两个页面(逐渐加速)


返回列表 返回列表
评论

    分享到