1.0.33 • Published 5 years ago

sui-design v1.0.33

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

SUI-DESIGN 使用手册 demo

快速上手

1. NPM 安装

$ npm install sui-design --save

2. 引入 SUI-DESIGN

全局引入:

一般在 webpack 入口 main.js 中如下配置:

import Vue from 'vue'
import App from './App.vue'
// 添加样式
import 'sui-design/lib/sui.css'
// 导入 sui-design
import SUI from 'sui-design'
// 注册
Vue.use(SUI)

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')
按需引入:

借助插件 babel-plugin-import可以实现按需加载组件,减少文件体积

  1. npm install 并配置 .babelrc 文件
// shell
$ npm install babel-plugin-import --save-dev

// .babelrc
"plugins": [["import", {
  "libraryName": "sui-design",
  "libraryDirectory": "src/components"
}, "sui-design"]]
  1. 使用 ES6 Module 按需引入组件
import { button } from 'sui-design'
Vue.component('sxButton', button)

特别提醒

  • 不要在项目中同时 全部引入按需引入 (存在冲突)
  • 全局引入和按需引用都必须导入样式,即在 main.js 或根组件执行 import 'sui-design/lib/sui.css'
  • 由于封装库强依赖: iView Element-Ui Moment 请确保项目中引入对应库
1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.19

5 years ago

1.0.20

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago