# sanchi

> 基于Element-ui的业务组件库

Latest version **0.1.10** (published 2020-04-15) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install sanchi
pnpm add sanchi
yarn add sanchi
bun add sanchi
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2020-04-15 |
| First published | 2020-04-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | izhangxu |

## Links

- npm: https://www.npmjs.com/package/sanchi
- Repository: git@git.int.ybm100.com:zhangxu3/sanchi
- npm.io page: https://npm.io/package/sanchi

## Dependencies (16)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [vuex](https://npm.io/package/vuex.md) ^3.1.3
- [dayjs](https://npm.io/package/dayjs.md) ^1.8.24
- [jsonp](https://npm.io/package/jsonp.md) ^0.2.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [core-js](https://npm.io/package/core-js.md) ^3.6.4
- [element-ui](https://npm.io/package/element-ui.md) ^2.4.5
- [sortablejs](https://npm.io/package/sortablejs.md) ^1.10.2
- [vue-router](https://npm.io/package/vue-router.md) ^3.1.6
- [markdown-it](https://npm.io/package/markdown-it.md) ^10.0.0
- [font-awesome](https://npm.io/package/font-awesome.md) ^4.7.0
- [normalize.css](https://npm.io/package/normalize.css.md) ^8.0.1
- [fetch-detector](https://npm.io/package/fetch-detector.md) ^1.0.1
- [vue-gemini-scrollbar](https://npm.io/package/vue-gemini-scrollbar.md) ^2.0.1
- [markdown-it-container](https://npm.io/package/markdown-it-container.md) ^2.0.0

## Recent versions

- 0.1.10 (latest) — 2020-04-15
- 0.1.9 — 2020-04-15
- 0.1.8 — 2020-04-15
- 0.1.7 — 2020-04-14
- 0.1.6 — 2020-04-14
- 0.1.5 — 2020-04-14
- 0.1.4 — 2020-04-13
- 0.1.3 — 2020-04-13
- 0.1.2 — 2020-04-13
- 0.1.1 — 2020-04-13

## README

# sanchi 业务组件库
`sanchi` 是基于Element-ui的业务组件库。
组件库包含Configuration, Engine两类业务组件。Configuration为一般业务组件；Engine为页面级组件，可以由多个一般业务组件组成。

## 如何使用

### 使用 `npm` 安装
```javascript
$ npm i sanchi
```

### 在main.js引入
```javascript
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Sanchi from 'sanchi';
import App from './App.vue';

Vue.use(ElementUI);
Vue.user(Sanchi);

new Vue({
  el: '#app',
  render: h => h(App)
});
```
以上代码完成了`Sanchi`的引入。`Sanchi`默认的样式文件需要单独引入。

### 使用组件
```vue
<template>
  <yui-custom-query :filters="filters"
    :query-method="service.searchRepos"
    :query-params="params"
    :table-columns="tableColumns"
    :form-attrs="formAttrs"
    :table-attrs="tableAttrs"
    :downloadable="true"
    :downloadCallback="downloadCallback"
    @submit="handleSubmit"
    @reset="handleReset">
  </yui-custom-query>
</template>
<script>
export default {}
</script>
```

## 开发

### 开发环境搭建

需要Nodejs 10+，yarn和npm。项目使用yarn进行依赖版本的锁定，不要使用`npm install`安装依赖。
```shell
git clone git@git.int.ybm100.com:fe-common/sanchi.git
yarn serve

# open http://localhost:8001
```
> **提示**：在本地修改 `docs/[组件目录]/*.md]` 文件，调用你修改后的组件`components/[组件文件]`，访问 [http://localhost:8085](http://localhost:8085)，查看修改效果。组件修改后需要重新构建库。


### 打包代码

```shell
yarn dist
```

### 构建库

```shell
yarn build
```

---
_Source: https://npm.io/package/sanchi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
