GithubHelp home page GithubHelp logo

f-basic-quiz's Introduction

Basic Quiz 前端需求说明

MOCKUP

  1. 按照效果图完成需求,通过访问http://localhost:1234/users/${id}可查看用户基本信息和教育信息
  2. 若无用户数据,可不做特殊处理,页面显示原始HTML,不去渲染用户信息

代码规范要求

  1. 使用语义化HTML

  2. 使用Sass,样式值可依据src/style/_variables.scss

  3. 添加jest单元测试

  4. 小步提交,至少3个提交,提交信息要表意

  5. (扩展)可以使用Json Server访问模拟数据做调试

    • 启动Json Server(参加Setup 3)
    • http://localhost:3000/users/1获取user基本信息
    • http://localhost:3000/users/1/educations获取user教育信息
  6. (扩展)操作DOM可使用jQuery 设置元素的内容

    $('#id').html("value");

    在元素结尾插入内容

    const item = 'Item 1';
    $('ul').append(`<li>${item}</li>`)

    设置图片src

    $("img").attr("src", imageUrl);
  7. (扩展要求!)通过eslint测试(命令参加Setup 4)

命令行脚本

1.安装包依赖

npm install

2.启动服务 http://localhost:1234,更新文件会实时加载

npm start

3.启动Json Server http://localhost:3000

npm run server

4.代码风格检测:

npm run lint

5.运行测试

npm run test
npm run test:watch
npm run test:coverage

f-basic-quiz's People

Contributors

dujuanxian avatar liaowenqiang828 avatar

Watchers

 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.