Code Monkey home page Code Monkey logo

jui-ui's Introduction

Installation

NPM

npm install juijs-ui

Browser

<link rel="stylesheet" href="../dist/jui-ui.classic.css" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdn.rawgit.com/juijs/jui-core/es6/dist/jui-core.js"></script>
<script src="../dist/jui-ui.js"></script>

ES Modules

The difference with the existing method is that you need to add the module directly using the 'use' function.

import jui from 'juijs-ui'
import TimepickerComp from 'juijs-ui/src/components/timepicker.js'
import Styles from './index.less'

jui.use(TimepickerComp);

Below is the index.less file. You can only use the style you want to bundle.

.jui {
  @import "../node_modules/juijs-ui/src/styles/base/mixins.less";
  @import "../node_modules/juijs-ui/src/styles/common.less";
  @import "../node_modules/juijs-ui/src/styles/common.theme.less";
  @import "../node_modules/juijs-ui/src/styles/icon.less";
  @import "../node_modules/juijs-ui/src/styles/icon.theme.less";
  @import "../node_modules/juijs-ui/src/styles/timepicker.less";
  @import "../node_modules/juijs-ui/src/styles/timepicker.theme.less";
  @import "../node_modules/juijs-ui/src/styles/theme/classic.less";
}

Usage

<body class="jui">
    <div id="timepicker_date" class="timepicker calendar small" style="margin-right: 3px;">
        <input type="input" class="year" maxlength="4" />-<input type="input" class="month" maxlength="2" />-<input type="input" class="date" maxlength="2" />
        <i class="icon-calendar"></i>
    </div>
    
    <div id="timepicker_time" class="timepicker small">
        <input type="input" class="hours" maxlength="2" value="00" /> :
        <input type="input" class="minutes" maxlength="2" value="00" />
        <i class="icon-arrow7"></i>
    </div>
</body>

The UI component creation code is the same as the existing one.

jui.ready([ "ui.timepicker" ], function(timepicker) {
    timepicker("#timepicker_date");
    timepicker("#timepicker_time");
});

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.