选中一行,行内点击选中或者checkbox选中都无法获取行号或索引,真是无比坑爹的设计
拿到数据再去数组里做map或foreach,
可以说一句 fuck么
当selection-change事件触发后,写入以下代码
https://blog.csdn.net/zhanglongdream/article/details/67637518
https://www.cnblogs.com/wangyunhui/p/8178392.html
Vue是什么?
Vue.js(读音 /vjuː/, 类似于 view) 是一套构建用户界面的 渐进式框架。与其他重量级框架不同的是,Vue 采用自底向上增量开发的设计。Vue 的核心库只关注视图层,并且非常容易学习,非常容易与其它库或已有项目整合。另一方面,Vue 完全有能力驱动采用单文件组件和 Vue 生态系统支持的库开发的复杂单页应用。
Vue.js 的目标是通过尽可能简单的 API 实现响应的数据绑定和组合的视图组件。
易用(已经会了HTML,CSS,JavaScript 即可轻松上手)、灵活(简单小巧的核心,渐进式技术栈,足以应付任何规模的应用)、性能(17kb min+gzip 运行大小、超快虚拟DOM、最省心的优化)、渐进式JavaScript 框架。
Vue.js 是我在2014年2月开源的一个前端开发库,通过简洁的 API 提供高效的数据绑定和灵活的组件系统。在前端纷繁复杂的生态中,Vue.js有幸受到一定程度的关注,目前在 GitHub上已经有快6000+的star。
vux github ui demo:https://github.com/airyland/vux
vant https://github.com/youzan/vant
Mint UI
项目主页:http://mint-ui.github.io/#!/zh-cn
demo:http://elemefe.github.io/mint-ui/#/
github地址:https://github.com/ElemeFE/mint-ui
中文文档地址:http://mint-ui.github.io/docs/#!/zh-cn
iview
iView 配套的工作流:https://github.com/icarusion/vue-vueRouter-webpack
github地址:https://github.com/iview/iview
官网:https://www.iviewui.com/
vue-mui
官网:http://mui.yaobieting.com/
github地址:https://github.com/creatshare/vue-mui
radon-ui
中文文档:https://luojilab.github.io/radon-ui/#!/
github:https://github.com/luojilab/radon-ui
antd vue
中文文档:http://okoala.github.io/vue-antd/#!/components
github:https://github.com/okoala/vue-antd
weex
社区:http://www.weex.help/
官网:http://weex-project.io/cn/
github:https://github.com/alibaba/weex
中文文档:http://www.weex.help/topic/57792770eb60516a48db5485
element(饿了么后台)
Element 是由饿了么UED设计、饿了么大前端开发的一套基于 Vue 2.0 的桌面端组件库。
官网:http://element.eleme.io/#/zh-CN
饿了么github:http://github.com/elemefe
N3
官网:https://n3-components.github.io/N3-components/
中文文档:https://n3-components.github.io/N3-components/component.html
英文文档:https://github.com/N3-components/N3-components
vuikit
github:https://github.com/vuikit/vuikit
英文文档:https://vuikit.js.org/#/
https://github.com/freedomdebug/dynamicRouter
手动存取 localStorage 的方式还可以做得更简便。那就是引入 vuex-persist 插件,它就是为 Vuex 持久化存储而生的一个插件。不需要你手动存取 storage ,而是直接将状态保存至 cookie 或者 localStorage 中。
使用方法
通过以上设置,在图3中各个页面之间跳转,如果刷新某个视图,数据并不会丢失,依然存在,并且不需要在每个 mutations 中手动存取 storage 。
vuex-persist 的详细属性-
属性 类型 描述
key string 将状态存储在存储中的键。默认: 'vuex'
storage Storage (Web API) 可传localStorage, sessionStorage, localforage 或者你自定义的存储对象. 接口必须要有get和set. 默认是: window.localStorage
saveState function (key, state[, storage]) 如果不使用存储,这个自定义函数将保存状态保存为持久性。
restoreState function (key[, storage]) => state 如果不使用存储,这个自定义函数处理从存储中检索状态
reducer function (state) => object 将状态减少到只需要保存的值。默认情况下,保存整个状态。
filter function (mutation) => boolean 突变筛选。看mutation.type并返回true,只有那些你想坚持写被触发。所有突变的默认返回值为true
modules string[] 要持久化的模块列表。
github:https://github.com/olado/doT
使用熟知的“Mustache”语法 (双大括号) 来嵌入数据,脚本会解析占位符
exp:
PWA所倡导的一些核心技术特性有:
可以在主屏幕上创建图标
可以离线运行
可以利用后台线程与服务端通讯
对搜索引擎友好
响应式界面,支持各种类型的终端和屏幕
方便分享,用户可以方便地把URL地址分享出去
下面是个demo项目:https://github.com/freedomdebug/vuejs-pwa-demo1