0.5.2 • Published 5 days ago

lj-utils v0.5.2

Weekly downloads
2
License
MIT
Repository
-
Last release
5 days ago

lj-utils

stars Website release license

介绍

lj-utils 为本人整理的 js 通用库,目录结构:

  • lj-utils/index:公共 JavaScript 工具函数和常量,适用于各种前端框架和 node 应用程序。
  • lj-utils/microApi: 基于 uniapp 小程序开发 API 封装。
  • lj-utils/mixins:Vue.js 混入(mixins)。
  • lj-utils/class:通用类。
  • lj-utils/directive:Vue.js 自定义指令(directive)
  • lj-utils/scss:通用的 SCSS 样式库
  • lj-utils/less:通用的样式库 less 版本

仓库

github https://github.com/LinJieLinLin/utils

gitee https://gitee.com/uni-pro/utils

安装教程(npm/yarn/pnpm)

  • npm i lj-utils
  • yarn add lj-utils
  • pnpm i lj-utils

使用说明:

esm 引用

import { setTitle } from 'lj-utils'
setTitle('hi')
// 或
import * as ljUtils from 'lj-utils'
ljUtils.setTitle('hi')

node 引用

const ljUtils = require('lj-utils')

浏览器中引用,挂载在 window.ljFn 中

<head>
  <script src="https://lj4.top/utils/lj-utils/index.umd.js"></script>
  <script>
    window.onload = function () {
      console.log(window.ljFn)
    }
  </script>
</head>

在线文档

访问 latest: https://linjielinlin.github.io/utils/lj-utils/index.html

或访问 http://lj4.top/utils/lj-utils/index.html

若编译失败,在 vue.config.js 添加以下代码

transpileDependencies: ['lj-utils'],

自动引入 lj-utils/index 公共函数(unplugin-auto-import/vite)

// vite.config.ts
import AutoImport from 'unplugin-auto-import/vite';
import { ljResolver } from 'lj-utils/resolver.js';
AutoImport({
  ...,
  resolvers: [ljResolver()],
})

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
0.5.2

5 days ago

0.5.1

15 days ago

0.5.0

2 months ago

0.3.12

2 months ago

0.3.11

2 months ago

0.3.10

2 months ago

0.4.0

2 months ago

0.3.9

7 months ago

0.3.8

12 months ago

0.3.7

1 year ago

0.3.0

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.2.0

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago