Files
ClassContent/历届学生/罗朝/2019-05-14/笔记.txt
2024-09-27 02:06:13 +08:00

30 lines
747 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Vue.js
概念:前端 m(model)v(view)v(view)m(model) 框架
model: 数据(ajax请求后返回的json)
viewmodel (vm): 数据和页面的中间层 在ajax数据请求成功后每次都需要获取父元素然后遍历数据再innerhtml到页面上
view 视图层
后端mvc
model(数据) view(视图 html + css + js) controller(控制器)
1: view 就是前端用户看到的页面
2: controller 接受用户在view层产生的具体意图然后把用户的意图转发到具体的model交给model来处理
3model 主要和数据库进行打交道,完成 controller 传过来的意图
view ---> controller ----> model
model ---> controller --> view
Vue用法
1传统js用法
2用过node来使用