JSDM

HTML

4
 
1
div.mvc
2
  button(type='button') update
3
  span helloworld
4
div.mvvm
!

CSS

xxxxxxxxxx
2
 
1
.hide
2
  display none
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

33
 
1
//MVVM
2
var vue = new Vue({
3
  el: '.mvvm',
4
  template: '<button type="button" @click="toggle">update</button><span :class="isShow ? \'\' : \'hide\'">Hi</span>',
5
  data: {
6
    isShow: true
7
  },
8
  methods: {
9
    toggle: function(){
10
      this.isShow = !this.isShow
11
    }
12
  }
13
})
14
15
vue.$data.data=10000
16
17
// MVC
18
~function(){
19
var view=$('.mvc span')
20
21
var model={
22
  data: 1
23
}
24
25
var controller = function(model){
26
  view.toggleClass('hide');
27
  model.data++
28
}
29
30
$('.mvc button').on('click', function(){
31
  controller(model)
32
})
33
}()
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................