0.0.9 • Published 9 months ago
@fix-the-world/vue-utils v0.0.9
@fix-the-world/vue-utils
vue3的前端工具包,包含常用css类以及ts工具方法等。
安装
pnpm i @fix-the-world/vue-utils
// 或
yarn add @fix-the-world/vue-utils
使用
- vue项目的main.ts中
import vueUtils from '@fix-the-world/vue-utils';
import '@fix-the-world/vue-utils/dist/index.css';
app.use(vueUtils);
- vue组件中使用
<template>
<div :class="[css.bm('color','red')]">
hello world
</div>
</template>
<script setup lang="ts">
import { utils } from '@fix-the-world/vue-utils';
const encryptStr=utils.aes.encrypt('hello world','encryptKey');
console.log('encryptStr',encryptStr);
</script>
样式列表
TODO
- 用户环境中的css变量的ts支持
- 全局的utils方法,不需要import
- 用户可重写css的相关变量
- 用户可调用相关sass变量和mixin
- 二次封装的组件库