Skip to content

zhanfang/san-iview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

san-iview

一套桌面端 San Ui 组件库。基于 iView样式进行开发

使用指南

CDN引入

<!-- import san -->
<script src="//unpkg.com/san@latest"></script>
<!-- import stylesheet -->
<link rel="stylesheet" href="//unpkg.com/san-iview/dist/styles/san-iview.css">
<!-- import san-iview -->
<script src="//unpkg.com/san-iview/dist/san-iview.min.js"></script>

示例

const {Button, Message} = window['san-iview'];

const Demo = san.defineComponent({
    template: `
        <div class="parent">
            <btn type="primary" on-select="change">
                add child
            </btn>
        </div>`,
    components: {
      btn: Button
    },
    change() {
        Message.success('hello world');
    }
});

const demo = new Demo();

demo.attach(document.body);

NPM安装

  1. 通过npm安装
npm install san-iview --save
  1. 全局引入样式
// main.js
import san from 'san';
import 'san-iview/dist/styles/san-iview.css';

import App from './App';

const app = new App();
app.attach(document.getElementById('app'));
  1. 使用时引入所需组件
// App.san
<template>
<div>
    <icon type="ionic"></icon>
</div>
</template>
<script>
import {Icon} from 'san-iview';

export default {
    components: {
        'icon': Icon
    }
};
</script>

Links

License

MIT

Copyright (c) 2017-present, san-view

About

A san ui toolkit built on san.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published