san-iview
v1.2.6
Published
A high quality UI components Library with San
Downloads
49
Maintainers
Readme
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安装
- 通过
npm
安装
npm install san-iview --save
- 全局引入样式
// 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'));
- 使用时引入所需组件
// App.san
<template>
<div>
<icon type="ionic"></icon>
</div>
</template>
<script>
import {Icon} from 'san-iview';
export default {
components: {
'icon': Icon
}
};
</script>
Links
License
Copyright (c) 2017-present, san-view