Vue开发实战十八:官网搭建全过程


本来打算写个七八篇做一个官网搭建的系列,之前写过一篇十七新闻资讯的实现,后来的模块和之前的基本类似就不在重复,这篇文章从前后端到服务器,详细介绍下官网搭建的全过程。

1.最终效果图

官网数据及权限全开展示

1.1轮播图

image

1.2首页

image

1.3案例管理模块

image

image

1.4服务流程

image

1.5新闻资讯

image

image

1.6合作伙伴

image

1.7关于我们

image

1.8联系我们

image

1.9后台管理管理员

image

2.0后台体验用户

image

2.1体验用户只能查看没有新增、修改、删除权限

image

2.2官网前端数据只开首页及案例如下

image

点击底部的后台管理进入后台管理系统登录界面,可在关于模块动态设置是否展示

image

隐藏后如下
image

2.官网前端页面的实现

   <BinnerItem :text="binnerText"></BinnerItem>

    <div v-for="(item,index) in menuArr"
         :key="index">
      <title-item :title="item.title"></title-item>
      <div v-if="item.path=='/' ">
        <SiteIndexItem></SiteIndexItem>
      </div>

      <div v-else-if="item.path=='/example' ">
        <SiteExampleItem></SiteExampleItem>
        <div class="moer-btn-box">
          <router-link to="/example"
                       class="moer-btn">更多案例展示</router-link>
        </div>
      </div>

      <div v-else-if="item.path=='/service' ">
        <SiteServiceItem></SiteServiceItem>
      </div>

      <div v-else-if="item.path=='/news' ">
        <SiteNewsItem></SiteNewsItem>
        <div class="moer-btn-box">
          <router-link to="/news"
                       class="moer-btn">更多资讯</router-link>
        </div>
      </div>

      <div v-else-if="item.path=='/partner' ">
        <SitePartnerItem></SitePartnerItem>
      </div>

      <div v-else-if="item.path=='/about' ">
        <SiteCompanyItem></SiteCompanyItem>
        <AboutItem></AboutItem>
      </div>

      <div v-else-if="item.path=='/contact' ">
        <SiteContactItem></SiteContactItem>
      </div>

      <div v-else>

      </div>

    </div>

菜单是否展示及数据如下

image

每个模块都是个组件方便在点击右上角顶部的按钮时切换到对应的组件中

官网前端运行命令yarn run serve
官网前端打包命令yarn run build
打包后生成dist文件夹等会上传到linux服务器上

3.后端管理系统页面

已案例模块为例

<template>
  <div class="app-container">
    <el-form :model="queryParams"
             ref="queryForm"
             :inline="true"
             v-show="showSearch"
             label-width="68px">
      <el-form-item label="标题"
                    prop="title">
        <el-input v-model="queryParams.title"
                  placeholder="请输入标题"
                  clearable
                  size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary"
                   icon="el-icon-search"
                   size="mini"
                   @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh"
                   size="mini"
                   @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10"
            class="mb8">
      <el-col :span="1.5">
        <el-button type="primary"
                   plain
                   icon="el-icon-plus"
                   size="mini"
                   @click="handleAdd"
                  >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success"
                   plain
                   icon="el-icon-edit"
                   size="mini"
                   :disabled="single"
                   @click="handleUpdate"
                   v-hasPermi="['site:example:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger"
                   plain
                   icon="el-icon-delete"
                   size="mini"
                   :disabled="multiple"
                   @click="handleDelete"
                   v-hasPermi="['site:example:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning"
                   plain
                   icon="el-icon-download"
                   size="mini"
                   @click="handleExport"
                   v-hasPermi="['site:example:export']">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch"
                     @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading"
              :data="exampleList"
              @selection-change="handleSelectionChange">
      <el-table-column type="selection"
                       width="55"
                       align="center" />
      <el-table-column label="标题"
                       align="center"
                       prop="title" />
      <el-table-column label="分类"
                       align="center"
                       prop="type" />
      <el-table-column label="内容"
                       align="center"
                       prop="content" show-overflow-tooltip  />
      <el-table-column label="跳转地址"
                       align="center"
                       prop="urlAddress" show-overflow-tooltip />
      <el-table-column label="图片"
                       align="center"
                       prop="iconBase64" show-overflow-tooltip  />
      <el-table-column label="创建人"
                       align="center"
                       prop="createUser" />
      <el-table-column label="是否开启0关闭;1开启"
                       align="center"
                       prop="isUse" />
      <el-table-column label="是否删除0正常;1删除"
                       align="center"
                       prop="isDel" />
      <el-table-column label="操作"
                       align="center"
                       class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="handleUpdate(scope.row)">修改</el-button>
          <el-button size="mini"
                     type="text"
                     icon="el-icon-delete"
                      v-hasPermi="['site:example:remove']"
                     @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total>0"
                :total="total"
                :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize"
                @pagination="getList" />

    <!-- 添加或修改案例对话框 -->
    <el-dialog :title="title"
               :visible.sync="open"
               width="800px"
               append-to-body>
      <el-form ref="form"
               :model="form"
               :rules="rules"
               label-width="150px">
        <el-form-item label="标题"
                      prop="title">
          <el-input v-model="form.title"
                    placeholder="请输入标题" />
        </el-form-item>
        <el-form-item label="内容">
          <!-- <editor v-model="form.content"
                  :min-height="192" /> -->

          <el-input type="textarea"
                    :autosize="{ minRows: 2, maxRows: 8}"
                    placeholder="请输入内容"
                    v-model="form.content">
          </el-input>
        </el-form-item>
        <el-form-item label="跳转地址"
                      prop="urlAddress">
          <el-input v-model="form.urlAddress"
                    placeholder="请输入跳转地址" />
        </el-form-item>
        <el-form-item label="图片">
          <imageUpload v-model="form.iconBase64" />
        </el-form-item>
        <el-form-item label="创建人"
                      prop="createUser">
          <el-input v-model="form.createUser"
                    placeholder="请输入创建人" />
        </el-form-item>

        <el-form-item label="是否开启0关闭;1开启"
                      prop="isUse">
          <el-input v-model="form.isUse"
                    placeholder="请输入是否开启0关闭;1开启" />
        </el-form-item>
        <el-form-item label="是否删除0正常;1删除"
                      prop="isDel">
          <el-input v-model="form.isDel"
                    placeholder="请输入是否删除0正常;1删除" />
        </el-form-item>
      </el-form>
      <div slot="footer"
           class="dialog-footer">
        <el-button type="primary"
                   @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listExample,
  getExample,
  delExample,
  addExample,
  updateExample,
} from '@/api/site/example'

export default {
  name: 'Example',
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 案例表格数据
      exampleList: [],
      // 弹出层标题
      title: '',
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        title: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    }
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询案例列表 */
    getList() {
      this.loading = true
      listExample(this.queryParams).then((response) => {
        this.exampleList = response.rows
        this.total = response.total
        this.loading = false
      })
    },
    // 取消按钮
    cancel() {
      this.open = false
      this.reset()
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        title: null,
        type: null,
        content: null,
        urlAddress: null,
        iconBase64: null,
        isUse: '0',
      }
      this.resetForm('form')
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1
      this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm('queryForm')
      this.handleQuery()
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset()
      this.open = true
      this.title = '添加案例'
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset()
      const id = row.id || this.ids
      getExample(id).then((response) => {
        this.form = response.data
        this.open = true
        this.title = '修改案例'
      })
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateExample(this.form).then((response) => {
              this.$modal.msgSuccess('修改成功')
              this.open = false
              this.getList()
            })
          } else {
            addExample(this.form).then((response) => {
              this.$modal.msgSuccess('新增成功')
              this.open = false
              this.getList()
            })
          }
        }
      })
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids
      this.$modal
        .confirm('是否确认删除案例编号为"' + ids + '"的数据项?')
        .then(function () {
          return delExample(ids)
        })
        .then(() => {
          this.getList()
          this.$modal.msgSuccess('删除成功')
        })
        .catch(() => {})
    },
  },
}
</script>

说明:为了方便体验用户体验,因此将新增按钮及修改按钮的权限控制去除,但是后台权限还是有的,因此在页面能看到按钮,实际在调用接口方法的时候仍旧是无权限的。

后台管理页面运行命令 npm run dev
后台管理页面打包命令 npm run build:prod
最终也是生成dist文件,一会我们也会放到服务器上

4.后台接口的实现

以案例模块为例

package xxx.controller;
......

/**
 * 案例Controller
 * 
 * @author yingch
 * @date 2022-03-10
 */
@RestController
@RequestMapping("/site/example")
public class SiteExampleController extends BaseController
{
    @Autowired
    private ISiteExampleService siteExampleService;

    /**
     * 查询案例列表
     */
    @GetMapping("/list")
    public TableDataInfo list(SiteExample siteExample)
    {
        startPage();
        List<SiteExample> list = siteExampleService.selectSiteExampleList(siteExample);
        return getDataTable(list);
    }

    /**
     * 导出案例列表
     */
    @PreAuthorize("@ss.hasPermi('site:example:export')")
    @Log(title = "案例", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, SiteExample siteExample)
    {
        List<SiteExample> list = siteExampleService.selectSiteExampleList(siteExample);
        ExcelUtil<SiteExample> util = new ExcelUtil<SiteExample>(SiteExample.class);
        util.exportExcel(response, list, "案例数据");
    }

    /**
     * 获取案例详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return AjaxResult.success(siteExampleService.selectSiteExampleById(id));
    }

    /**
     * 新增案例
     */
    @PreAuthorize("@ss.hasPermi('site:example:add')")
    @Log(title = "案例", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody SiteExample siteExample)
    {
        return toAjax(siteExampleService.insertSiteExample(siteExample));
    }

    /**
     * 修改案例
     */
    @PreAuthorize("@ss.hasPermi('site:example:edit')")
    @Log(title = "案例", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody SiteExample siteExample)
    {
        return toAjax(siteExampleService.updateSiteExample(siteExample));
    }

    /**
     * 删除案例
     */
    @PreAuthorize("@ss.hasPermi('site:example:remove')")
    @Log(title = "案例", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(siteExampleService.deleteSiteExampleByIds(ids));
    }
}

xml中sql语句如下

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="xxx.mapper.SiteExampleMapper">
    
    <resultMap type="SiteExample" id="SiteExampleResult">
        <result property="id"    column="id"    />
        <result property="title"    column="title"    />
        <result property="type"    column="type"    />
        <result property="content"    column="content"    />
        <result property="urlAddress"    column="url_address"    />
        <result property="iconBase64"    column="icon_base64"    />
        <result property="iconPath"    column="icon_path"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="isUse"    column="is_use"    />
        <result property="isDel"    column="is_del"    />
        <result property="remark1"    column="remark1"    />
        <result property="remark2"    column="remark2"    />
        <result property="remark3"    column="remark3"    />
        <result property="remark4"    column="remark4"    />
        <result property="remark5"    column="remark5"    />
    </resultMap>

    <sql id="selectSiteExampleVo">
        select id, title, type, content, url_address, icon_base64, icon_path, create_user, create_time, is_use, is_del, remark1, remark2, remark3, remark4, remark5 from site_example
    </sql>

    <select id="selectSiteExampleList" parameterType="SiteExample" resultMap="SiteExampleResult">
        <include refid="selectSiteExampleVo"/>
        <where>  
            <if test="title != null  and title != ''"> and title like concat('%', #{title}, '%')</if>
            <if test="type != null  and type != ''"> and type = #{type}</if>
            <if test="content != null  and content != ''"> and content = #{content}</if>
            <if test="urlAddress != null  and urlAddress != ''"> and url_address = #{urlAddress}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="isUse != null  and isUse != ''"> and is_use = #{isUse}</if>
            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
            <if test="remark1 != null  and remark1 != ''"> and remark1 = #{remark1}</if>
            <if test="remark2 != null  and remark2 != ''"> and remark2 = #{remark2}</if>
            <if test="remark3 != null  and remark3 != ''"> and remark3 = #{remark3}</if>
            <if test="remark4 != null  and remark4 != ''"> and remark4 = #{remark4}</if>
            <if test="remark5 != null  and remark5 != ''"> and remark5 = #{remark5}</if>
        </where>
    </select>
    
    <select id="selectSiteExampleById" parameterType="Long" resultMap="SiteExampleResult">
        <include refid="selectSiteExampleVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertSiteExample" parameterType="SiteExample" useGeneratedKeys="true" keyProperty="id">
        insert into site_example
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="title != null">title,</if>
            <if test="type != null">type,</if>
            <if test="content != null">content,</if>
            <if test="urlAddress != null">url_address,</if>
            <if test="iconBase64 != null">icon_base64,</if>
            <if test="iconPath != null">icon_path,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isUse != null">is_use,</if>
            <if test="isDel != null">is_del,</if>
            <if test="remark1 != null">remark1,</if>
            <if test="remark2 != null">remark2,</if>
            <if test="remark3 != null">remark3,</if>
            <if test="remark4 != null">remark4,</if>
            <if test="remark5 != null">remark5,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="title != null">#{title},</if>
            <if test="type != null">#{type},</if>
            <if test="content != null">#{content},</if>
            <if test="urlAddress != null">#{urlAddress},</if>
            <if test="iconBase64 != null">#{iconBase64},</if>
            <if test="iconPath != null">#{iconPath},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isUse != null">#{isUse},</if>
            <if test="isDel != null">#{isDel},</if>
            <if test="remark1 != null">#{remark1},</if>
            <if test="remark2 != null">#{remark2},</if>
            <if test="remark3 != null">#{remark3},</if>
            <if test="remark4 != null">#{remark4},</if>
            <if test="remark5 != null">#{remark5},</if>
         </trim>
    </insert>

    <update id="updateSiteExample" parameterType="SiteExample">
        update site_example
        <trim prefix="SET" suffixOverrides=",">
            <if test="title != null">title = #{title},</if>
            <if test="type != null">type = #{type},</if>
            <if test="content != null">content = #{content},</if>
            <if test="urlAddress != null">url_address = #{urlAddress},</if>
            <if test="iconBase64 != null">icon_base64 = #{iconBase64},</if>
            <if test="iconPath != null">icon_path = #{iconPath},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isUse != null">is_use = #{isUse},</if>
            <if test="isDel != null">is_del = #{isDel},</if>
            <if test="remark1 != null">remark1 = #{remark1},</if>
            <if test="remark2 != null">remark2 = #{remark2},</if>
            <if test="remark3 != null">remark3 = #{remark3},</if>
            <if test="remark4 != null">remark4 = #{remark4},</if>
            <if test="remark5 != null">remark5 = #{remark5},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteSiteExampleById" parameterType="Long">
        delete from site_example where id = #{id}
    </delete>

    <delete id="deleteSiteExampleByIds" parameterType="String">
        delete from site_example where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>

案例的数据库如下

image

接口写完后我们之间用idea打包即可如下

image

打包成功后标识如下

image

然后我们去target目录下找到生成的jar文件重命名下等待一会上传服务器

image

5.Linux服务器上传文件及配置启动

默认linux已经搭建好java环境并配置好项目环境了,如果没配置可以参考下我的这篇文章《Linux搭建后台管理系统》,将之前打包好的两个dist文件分别放到下面的目录中,将jar包放到jar目录下

image

image

注意dist文件的替换不需要重启nginx也不需要其他多余的操作,直接替换就行,jar的替换需要杀死进程并重启,命令如下

#jar进程查看 8080为项目端口号:
netstat -nlp|grep 8080 
#或者用:
ps -ef|grep java

#进程关闭 23568为进程查看得到的进程号
kill 23568

#jar包启动
nohup java -jar xx.jar &

6.Nginx的配置

官网前端Nginx配置如下

image

官网后台管理页面配置如下

image

注意:监听的端口,我默认的80端口作为官网的访问,那我的服务器绑定域名后,用户可以直接通过域名不加端口访问,后端管理页面则必通过域名+8001端口访问才行,由于我的官网是从之前php搭建的转到vue来的,因此在官网的配置中还能看index.php的文件,实际上就是访问dist文件下的index.html

注:可以有偿提供类似官网及后台管理系统搭建及部署,需要的私信即可

  • 13
    点赞
  • 106
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 13
    评论
### 回答1: 在vue实战入门基础篇二中,我们将会从零开始搭建一个仿门户网站的实例,这个实例包括了前端页面的设计和后端API的实现。在开始这个实例之前,我们需要选定一个开发框架,这个框架将会支持我们在开发中的需求,并且方便我们的团队协作和项目管理。 在选择框架之前,我们需要考虑以下因素:开发速度、团队协作、可维护性和可扩展性。因此,我们应该选择一个适合我们现有技术栈的框架,并且具备这些因素。 在这个实例中,我们选择了vue.js作为我们的开发框架。vue.js是一个流行的JavaScript框架,它提供了强大的工具来开发富客户端应用程序。它易于使用和学习,并且对于大多数应用程序而言,它具有良好的性能。 在搭建框架时,我们采用了vue-cli工具来建立vue.js的项目模板。vue-cli可以为我们自动配置开发环境、构建工具和其他常见的开发工具,从而减少我们的开发时间。使用vue-cli搭建框架时,我们可以根据我们的需求选择所支持的特性,并且自定义构建配置。 搭建好框架后,我们还需要依次配置vue-router、vuex、axios等工具,用于路由管理、状态管理和API请求。这些工具可以加速我们的开发过程,并且有助于我们在开发过程中实现更好的代码组织,提高代码质量和可维护性。 总之,搭建一个好的开发框架是成功的开发的关键之一。我们应该选择一个适合我们项目需求的框架,同时尽可能地利用现有的工具和库来支持我们的开发过程。 ### 回答2: Vue实战入门基础篇二:从零开始仿门户网站实例-开发框架搭建,主要是介绍如何使用Vue.js开发一个门户网站的搭建方法。在此基础篇中,我们将会学习如何使用vue-cli建立Vue.js的基本项目框架,并结合Bootstrap、FontAwesome等前端开发产品来丰富我们的门户网站页面。 首先,我们需要安装Vue CLI,这是Vue.js官方提供的脚手架工具,可以快速生成Vue.js项目的基本架构。安装Vue CLI之后,我们可以通过命令行在终端中进入到目标项目目录,并通过vue create projectName命令来创建一个Vue.js项目。 接下来,我们需要安装Bootstrap和FontAwesome,因为它们是实现我们门户网站样式和布局的重要工具。我们可以通过npm命令来安装它们:npm install bootstrap @fortawesome/fontawesome-free。 安装成功之后,我们可以在Vue.js的组件中使用Bootstrap和FontAwesome提供的样式和图标。在项目开发中,我们可以通过组件化的思想,将各个部分拆分为独立的组件,再通过父子组件的嵌套来构建整个门户网站的页面。 在搭建门户网站页面的过程中,还需要注意一些细节问题。比如在Vue.js中如何使用路由功能来实现不同页面之间的跳转,如何进行页面的布局和调整等等。通过综合运用Vue.js的基本语法和其它前端产品,我们可以初步完成一个仿门户网站的实例。 总之,Vue实战入门基础篇二:从零开始仿门户网站实例-开发框架搭建,是一个非常实用的课程,可以帮助我们了解Vue.js在实际项目开发中的具体应用。掌握这些基础知识之后,我们可以更加专业、高效地进行门户网站开发工作。 ### 回答3: 本次教程是基于Vue.js框架来实现仿门户网站的实例教程,本文将重点介绍如何搭建开发框架。 首先,我们需要安装Vue.js框架,可以通过官网下载或者使用npm命令行工具安装,具体方法可以参考Vue.js官网上的介绍。 安装好Vue.js之后,我们需要使用Vue.js提供的命令行工具Vue CLI来搭建开发框架。首先,我们需要在命令行中输入以下命令: ``` npm install -g @vue/cli ``` 接着,我们可以创建一个新的Vue项目,可以使用以下命令: ``` vue create project-name ``` 其中,project-name是你自定义的项目名称。接下来,我们可以根据自己的需求选择不同的配置。例如,我们可以选择手动配置,来选择需要的插件和功能。然后,我们需要安装一些Vue.js的插件,例如Vue Router和Vuex。 ``` npm install vue-router vuex --save ``` 安装好插件之后,我们需要在项目中创建一些组件和页面。这些组件和页面可以根据实际需求来创建,例如首页组件、新闻组件、产品组件等。在创建组件和页面之前,我们需要在src目录下创建一个views文件夹来存放页面组件,在src/components文件夹下创建组件。 接着,我们可以使用Vue.js提供的语法来编写组件、页面和路由等。在编写代码的过程中,我们可以参考Vue.js官方文档和各种教程、博客等。 总而言之,搭建开发框架是Vue.js实现仿门户网站的第一步。在开发过程中,我们需要不断学习和掌握Vue.js的语法、功能和特点,结合实际需求来不断优化和完善代码,最终实现一个完整的门户网站。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

博主逸尘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值