Giter VIP home page Giter VIP logo

shaco's Introduction

shaco

a mini js which help you solve some questions about views-rendering, especially jQuery!

一个可以帮你解决一些关于视图渲染的问题的轻量js,特别是对于jQuery!

When you update data, shaco will automatically render view!It spends less time than jQuery html()!

当你更新数据的时候,shaco将会自动刷新视图,它比jQueryhtml()花费更少的时间!

Show

Live Demos

中文

English

Usage

<div id="app" style="margin-bottom: 50px;">
  <div>
    <div>Shaco</div>
    <div>{{time}} {{username}}</div>
    <div>{{content}}</div>
  </div>
</div>
<script type="text/javascript" src="./dist/shaco.min.js"></script>
<script type="text/javascript">
  var shaco = new Shaco({
    el: '#app',
    data: {
      time: '2017-01-01 11:21:21',
      username: 'Jack',
      content: 'eat fish'
    }
  });
</script>

when you want to update data, you can do this, then views will be updated automatically!

当你想要刷新数据的时候,你可以按照下面这样做,然后视图将会自动刷新。

shaco.$data.username = 'Tom'

If you want get more message, please open index-en.html!

如果你想要了解更多,请阅读index.html文件中的代码!

How to run?

Performance

As shown, jQuery spend much in rendering and painting, but shaco not!

如下图所示,jQuery花费了大量的时间在renderingpainting上,但是shaco却没有!

shaco's People

Contributors

shanamaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shaco's Issues

new Vue

不错不错。借鉴了vue的方式

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.