Skip to content

vnues/rIf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

如何使用

<div>
  <h1 r-if={height < 170}>good</h1>
  <h1 r-else-if={height >180}>best</h1>
  <h1 r-else>other</h1>
</div>

效果

React.createElement("div", null, (() => {
  if (height < 170) return React.createElement("h1", null, "good");else if (height > 180) return React.createElement("h1", null, "best");else return React.createElement("h1", null, "other");
})());

About

react版本的r-if指令 支持 if、else-if 、else

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published