Day 5 of the project [official website] - Coding of query result page

Project [official website] day 5 - Coding of query result page

Project development process

General directory: the birth of the project [official website]

The first day of the project [official website] - building the overall framework of the back end

The second day of the project [official website] - Preparation of back-end C-end interface

Day 3 of the project [official website] - front end framework construction

Day 4 of the project [official website] - Preparation of the home page

Page description

  • From main Vue page Jump is to jump to home Vue page, that is, information display page
  • First, there is a search box
  • The following is a choice of labels. I'm going to do something interesting
  • Then there is the iframe tag used for display

The effect is as follows

Start writing code

[official website]

<span class="el_table_font" >Official website</span>

For style positioning, the font part needs to be adjusted. Local fonts may be added, which can be added when thinning

.el_table_font {
  text-decoration: none;
  position: relative;
  top: 8%;
  left: 32%;
  font-size: 320%;
  font-family: "Fangzheng shutI","YouYuan","Chinese official script", "FZShuTi","Microsoft YaHei ";
  z-index: 4;

Search box

    style="position: relative;width: 20%;top: 0%;left: 36%;z-index: 6"
    placeholder="Please enter the content to query"

Events and requests kl and bl are the input focus events of the mask layer as before. The variable value can be changed to display the mask layer

The z-index has been written, so I won't say anything else. If you don't understand, you can read the content of the fourth day

 getList(e){'/directory/selectName',e).then(res => {

    kl (){
      this.module = true
    bl (){

And the function needs to be executed after the page Jump is completed

mounted () {
    this.input = this.$route.query.input

There's another thing. The input box color of element is a little gray. Modify the default color of the input box (it's also on the home page, I forgot to write it)

 /deep/ .el-input__inner {
   background-color: #f1f3f4;


  <div v-if=this.module class="mask">

  z-index: 5;
  background-color: rgb(0,0,0);
  opacity: 0.3;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

Then there is the display of content

Now there are two tabs. Write one first and the other later. I've already figured out what to write

<el-tabs  style="position:relative;left: 30%;margin-top: 20px;width: 40%;margin-bottom: -10px;" v-model="activeName" type="card">
  <el-tab-pane label="Query results" name="first">
    <el-row   style="position: relative;top: 15%" >
      <el-card v-if="directorys.length==0" class="box-card">
        <div slot="header" class="clearfix">
        <span>No application can be added to the query table</span>
      <el-card v-for="directory in directorys" class="box-card">
        <a target="_blank"  :href="" >
          <div slot="header" class="clearfix">
            <span style="font-weight: bold;font-size: 20px">{{}}</span>
        <p style="font-size: 15px">{{directory.content}}</p>
        <el-card  style="height: 210px;width: 460px">
          <div style="width: 200px;height: 200px;overflow: hidden;">
            <iframe :src="("  style="height: 800px;width: 1800px;transform: scale(0.25);position: absolute;left: -640px;top: -200px;border-radius: 36px" ></iframe>

  <el-tab-pane  label="XXXX" name="second" >

a {
   color: black;
   text-decoration-line: none;
   text-decoration-line: underline;
   font-size: 10px;
  display: table;
  clear: both;
.box-card {
  position: relative;
  left: 1%;
  width: 500px;
  margin-top: 18px;
  padding-left: 10px;
.on {
  overflow: hidden;

I think it's good to embed the official website content in the page, although it's a little small now and will be improved later

The following is the effect. Click QQ to jump to QQ's official website. The data should be entered into the database by yourself

More content can be paid attention to the official account [on the road].

Keywords: Front-end Vue Vue.js

Added by KeitaroHimura on Sun, 09 Jan 2022 15:26:42 +0200