This package has been deprecated

Author message:

delete

sanchi

0.1.10 • Public • Published

sanchi 业务组件库

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

如何使用

使用 npm 安装

$ npm i sanchi

在main.js引入

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默认的样式文件需要单独引入。

使用组件

<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安装依赖。

git clone git@git.int.ybm100.com:fe-common/sanchi.git
yarn serve
 
# open http://localhost:8001 

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

打包代码

yarn dist

构建库

yarn build

Readme

Keywords

none

Package Sidebar

Install

npm i sanchi

Weekly Downloads

1

Version

0.1.10

License

ISC

Unpacked Size

2.15 MB

Total Files

69

Last publish

Collaborators

  • izhangxu