• Stars
    star
    410
  • Rank 105,468 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

《前端会客厅第一期代码》和尤大聊vue3的 提升

vue3-vs-vue2

Vue3和Vue2细致比较

@todo mvc样式

环境

三种体验vue3的方式

  1. vue-cli
    • Vue create vue3-demo-cli
    • Vue add vue-next
    • 代码文件 vue3-demo-cli
  2. webpack
    1. 代码文件 vue-demo-webpack
    2. 代码仓库
  3. 新工具vite
    1. create-vite-app
    2. 代码文件 vue3-demo-vite

Reactivity & Fragment

Winter奇思妙想 代码

├── Fragment.vue
├── HTTPRequest.js    数据源响应式
├── HTTPRequest.vue 
├── List.vue
├── LocalStorage.js   利用响应式,无缝切换localstorage
├── LocalStorage.vue
├── Three.vue
├── ThreeRender.js
├── TimeLine.js
├── Timer.js          
├── assets
│   └── logo.png
├── main.js
└── vanilla-main.js   原生js双向绑定

SSR

测试vue2和vue3再ssr的环境的表现,使用wrk压测,测试组件 静态动态三比一

{
    template: `<div>
    <div v-for="n in 1000">
    <ul >
      <li>kkb</li>
      <li>kkb</li>
      <li>kkb</li>
      <li>kkb</li>
      <li>kkb</li>
      <li>kkb</li>
      <li v-for="todo in todos" >{{n}}--{{todo}}</li>
    </ul>
    </div>
    </div>`,
    data(){
      return {
        todos:['吃饭','睡觉']
      }
    }
  }

再vue-comp里执行npm link 然后ssr2和ssr3里npm install共享

// vue2 12个进程,300个并发,压19秒
➜  ~ wrk -t12 -c400 -d10s http://localhost:9092/
Running 10s test @ http://localhost:9092/
  12 threads and 400 connections
^[[A  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.48s   442.21ms   1.80s    89.88%
    Req/Sec    24.62     20.56    88.00     59.73%
  1319 requests in 10.10s, 173.65MB read
  Socket errors: connect 157, read 183, write 0, timeout 74
Requests/sec:    130.58
Transfer/sec:     17.19MB
// vue3 12个进程,300个并发,压19秒
➜  ~ wrk -t12 -c400 -d10s http://localhost:9093/
Running 10s test @ http://localhost:9093/
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   770.76ms  165.36ms   1.89s    89.11%
    Req/Sec    63.99     56.81   252.00     74.34%
  2912 requests in 10.10s, 411.12MB read
  Socket errors: connect 157, read 31, write 0, timeout 0
Requests/sec:    288.21
Transfer/sec:     40.69MB

QPS大概是有2.2倍的提升 真赞

update 对比

vue2-demo
vue3-demo-cli

测试组件代码 500个组件,静态动态三比一

Vue2 render和update 大概50% 稍微有点波动

vue3-update

vue2-update

composition vs option

官网的对比代码

todo mvc 对比

@todo 需要加点样式

@todo 把storage和http的响应式,放在todomvc里

自定义renderer

canvas和three.js

pixi renderer打飞机demo

import { createApp } from './three-renderer';
import App from "./App.vue";

// canvas
// import { createApp } from './renderer';
// import App from "./App1.vue";
createApp(App).mount("#app")

vue3-canvas

vue3-three

image-20200529165704762

More Repositories

1

programmer-job-blacklist

🙈程序员找工作黑名单,换工作和当技术合伙人需谨慎啊 更新有赞
Shell
28,408
star
2

fe-advanced-interview

前端进阶面试指南
JavaScript
1,309
star
3

email-helper

Generate your business emails in seconds (by OpenAI)
TypeScript
743
star
4

it-roadmap

大圣的前端学习路线图
Python
527
star
5

self-employed-workbook

写给自己的程序员自由职业工作手册
394
star
6

woniu-cmdb

👻写配置文件生成增删改查系统
HTML
266
star
7

geektime-vue-course

极客时间代码
Vue
241
star
8

imooc-echarts

imooc的echarts入门教程
HTML
223
star
9

vue-tiny-rate

⭐️ The smallest rating component for Vue2.x , use character★ and ☆ support mpvue
Vue
181
star
10

vue3-book

vue3源码分析3.0.0-beta.12 https://www.yuque.com/woniuppp/vue3
Vue
172
star
11

file-upload

面试造火箭系列
Vue
143
star
12

algorithm-camp

javascript算法训练营
JavaScript
141
star
13

footprint

🎎记录去过的足迹
HTML
136
star
14

iblockchain

Learn blockchain by building one in node.js
JavaScript
134
star
15

iconjs

:trollface: favico for fun
JavaScript
97
star
16

upload

文件上传思路
Vue
96
star
17

vue-master-lesson

Vue精英训练营
Vue
85
star
18

ailemente

vite+ts的组件库演示代码,element音译 ailemente
Vue
46
star
19

weiyouyi

JavaScript
44
star
20

benben

笨笨小助理(by OpenAI)
TypeScript
42
star
21

kkb-vue3

JavaScript
41
star
22

interview

我常问的一些面试题
41
star
23

understand-preact

preact+compat源码注释
JavaScript
34
star
24

hongbaoshu

红宝书精读训练营
HTML
30
star
25

professional-javascript-for-web-developer

红宝书第四版代码
JavaScript
30
star
26

js-algorithm

学习算法的js实现
JavaScript
27
star
27

tiny-rate

The Smallest Rating Component for fun
JavaScript
25
star
28

react-tiny-rate

⭐️ The smallest rating component for React , use character★ and ☆
JavaScript
22
star
29

react_bronze_to_king

React 从青铜到王者系列教程代码
JavaScript
17
star
30

shengxinjing.cn

个人博客
Vue
17
star
31

vue-master

vue学习代码
16
star
32

pytail

python实现tail -f功能,仅供学习
Python
16
star
33

douban_spider

豆瓣图书爬虫,根据isbn查信息
JavaScript
14
star
34

angular-lite

学习es6 webpack 手写angular造个轮子
JavaScript
13
star
35

reverse-print

反转打印的88W行代码JS实现
JavaScript
12
star
36

moyu

摸鱼
Python
12
star
37

shengxinjing

关于我
9
star
38

vue-action-next

vue实战课程代码
TypeScript
7
star
39

kkb-mp

小程序公开课代码
JavaScript
6
star
40

fullstack-challenges

前端挑战题解
5
star
41

awesome-pm

教产品经理和程序员撕逼教程
5
star
42

marrow-of-javascript

前端会客厅第二期代码-爱民老师
HTML
5
star
43

react-boss

react+node最佳实践的招聘应用
4
star
44

vue3-workshop

vue3训练营
4
star
45

saoleide

TypeScript
3
star
46

cuir

toy vue3 for education
3
star
47

f2eblog

写一点前端基础教程
JavaScript
3
star
48

zhihu_zhuanhan

知乎专栏文章收集工具
Python
2
star
49

static

static files
Shell
2
star
50

fis-postprocessor-annotate

在fis里继承ng-annotate的功能
JavaScript
2
star
51

jarvis

程序员个人助理小程序
2
star
52

blogimgs

1
star
53

sandbox-vue

sandbox wapper for vue3
1
star
54

zhixing_top10

知行十大小程序
JavaScript
1
star
55

awesome-books

读书笔记,gitbook
1
star
56

pythonmyadmin

phpmyadmin的python简易版
1
star
57

vue3-static-table

JavaScript
1
star
58

for-debug

1
star
59

funny-frontend

HTML
1
star
60

scroll-demo

HTML
1
star
61

zhixing_spider

Python
1
star
62

react-dev-to-online

目录
1
star
63

books_to_read

狗哥和蘑菇想读的书
1
star
64

learn-vue3-by-build-one

学习vue3
1
star