1.0.39 • Published 3 years ago

@ilabcode/components v1.0.39

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@ilab/components

基于 Vue 3 + TypeScript + Vite + element-plus 封装通用组件

安装使用

npm install @ilab/components -S

// main.js 引入
import ILowcode from '@ilab/components';
import '@ilab/components/dist/style.css';

// 项目中使用富文本编辑器需手动引入
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import "@wangeditor/editor/dist/css/style.css";

app.component('Editor', Editor);
app.component('Toolbar', Toolbar);

// 项目中使用省市区联动需手动引入
import '@ilab/area-list';
console.info(window.AREA_LIST);

// 项目中使用排序需手动引入
import draggable from "vuedraggable";
app.component('draggable', draggable);

app.use(ILowcode);

form 表单校验规则 rules 见 校验规则 async-validator

在线换肤

提供换肤组件 i-modify-theme

// App.vue 中加载主题

<script setup lang="ts">
import {useTheme} from "@ilab/components";

const { initTheme } = useTheme();

initTheme();
</script>

ts 类型支持

@ilab/components/types/*

组件更新发布

// 发布需更改 package.json 版本号

// 如当前npm源为淘宝镜像则需设置为默认
npm config set registry https://registry.npmjs.org/

// 使用 https://www.npmjs.com/ 账号登录
npm login

// 发布
npm publish

// 发布成功后可设置源为淘宝镜像
npm config set registry https://registry.npm.taobao.org/