Code Monkey home page Code Monkey logo

supportsite's Introduction

supportsite

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

添加新问题及解决方案

1. 修改src/components/Questions.vue

修改<script>标签下data中的allData数组,按照模板添加数据。

question: 问题 description: 问题描述 id: 问题id,上一个问题id加一

2. 添加对应解决方案

2.1 导入图片资源

在static/solutions下新建对应文件夹,修改名字为solutionx,x为上一步中的问题id。将对应解决方案所需的视频及图片资源导入该文件夹中,建议命名为img1.png、img2.png...。

2.2 添加SolutionX.vue

在src/components/solutions下复制template.vue,并修改名字为SolutionX.vue,其中X为上一步中的问题id。

修改<script>标签下的data,按照模板添加数据。

title: 问题

description: 问题描述

video: 视频资源路径,优酷视频网站下点击分享->复制通用代码->将video设置为通用代码中的src。

steps: 解决步骤数组

​ intro:步骤简介

​ imgs:图片资源数组,建议为 ../../../static/solutions/solutionx/imgx.png

2.3 添加解决方案路由

修改src/router/index.js。

  1. 导入组件:import SolutionX from "..components/solutions/SolutionX"

  2. 修改routes数组:添加路由

    path: /solutionx

    component: SolutionX

supportsite's People

Contributors

ruanzhh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.