设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 软件追踪 查看内容

Vue 1.0.0 Beta 3发布,轻量级JavaScript框架

2015-10-6 20:04| 发布者: joejoe0332| 查看: 546| 评论: 0|原作者: oschina|来自: oschina

摘要: Vue 1.0.0 Beta 3 发布,此版本更新信息如下:新特性:v-model: multiple checkbox input can now be bound to the same v-model value (must be an Array):inputtype="checkbox"value="Jack"v-model="checkedNames ...

Vue 1.0.0 Beta 3 发布,此版本更新信息如下:

新特性:

  • v-model: multiple checkbox input can now be bound to the same v-model value (must be an Array):

    <input type="checkbox" value="Jack" v-model="checkedNames"><input type="checkbox" value="John" v-model="checkedNames"><input type="checkbox" value="Mike" v-model="checkedNames">

    With checkedNames' initial value being an Array, the checked boxes' values will be pushed into the Array, while unchecked ones will be removed from it. For example, if we check the first two boxes, checkedNames will have the value ["Jack", "John"]. Of course, you can also dynamically bind the value with v-bind.

  • v-on: added two modifiers, .stop and .prevent which automatically calls event.stopPropagation() and event.preventDefault() for you:

    <!-- event won't propagate --><a v-on:click.stop="doThis"></a><!-- this will no longer reload the page! --><form v-on:submit.prevent="onSubmit"></form>

修改:

  • vm.$dispatch: now also triggers the event on self.

  • Array.prototype.$remove: now always treats the argument as the item to search for. (Previously it treats the argument as an index if the argument is a number).

Bug 修复:

  • Improved attribute interpolation validity check by including a11y and a more complete list of global attributes.

  • #1363 partial: dynamic partial resolved in wrong scope when inside v-for

  • #1370 observer: v-for alias not reactive when replaced

  • #1378 props: error parsing path for two-way props with dynamic paths

详细信息请查看:https://github.com/yyx990803/vue

Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。

主要特性:

  • 可扩展的数据绑定

  • 将普通的 JS 对象作为 model

  • 简洁明了的 API

  • 组件化 UI 构建

  • 配合别的库使用

支持的浏览器:https://saucelabs.com/u/vuejs


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部