
@egjs/ 儿童差异
QQ 模块,用于检查 diff 当添加、去除或更改孩子元素时.
* 安装
$ npm i @egjs/children-differ
<script src="//naver.github.io/egjs-children-differ/release/latest/dist/children-differ.pkgd.min.js"></script>
页:1
- 见 文档 页 次.
- 引入列表差异以跟踪数据和跟踪变化(单位:千美元)한국어(中文(简体) )
- 如何建立跨框架构成部分(单位:千美元)한국어(中文(简体) )
• 软件包
| 软件包 | 版本 | 说明 |
|---|---|---|
| @egjs/ react- children-differ (英语) | ||
| @egjs/ngx- 儿童- differ | ||
| @egjs/vue- children-differ (英语) |
使用方法
用法类似于 @ egjs/ list- divers。 。 。 .
检查 diff
<div id="container">
<div>0</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</div>
<script>
import ChildrenDiffer from "@egjs/children-differ";
// Value is key
const differ = new ChildrenDiffer(conatiner.children);
container.removeChild(container.children[5]);
container.removeChild(container.children[2]);
const result = differ.update(container.children);
// [2, 5]
console.log(result.removed);
</script>
捐款
见 捐款额。 。 。 .
* 反馈
请存档 问题。 。 。 .
许可证
@egjs/list-differ 在下方发布 麻省理工学院许可证。 。 。 .
Copyright (c) 2019-present NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.