0.0.9 • Published 8 years ago

component-descendant-selectors v0.0.9

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

组件后代选择器

给定一个最小选择器和全选择器, 从一批选择器中筛选出权重最高的选择器

代码目录结构

  • src: 源代码文件夹。
  • test: mocha执行的单元测试代码文件夹。

如何使用

import DescendantSelectors from 'component-descendant-selectors';
/*
@param String min: 符合条件的最小选择器(由某个子级组件名单独或与其父级组件名组成)
@param String full: 全选择器(由某个子级组件到其某个父级组件的组件名组成)
@param Array arr: 一个需要筛选的选择器组成的数组
*/
const ds = new DescendantSelectors('button', 'div span button', ['button', 'div button']);
//return String str: 从数组中返回权重最高的选择器
const str = ds.getMaxPriority();
0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago