🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

sanchi

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanchi

基于Element-ui的业务组件库

latest
npmnpm
Version
0.1.10
Version published
Weekly downloads
21
250%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 15 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts