1.0.14 • Published 4 months ago

hqit-plugin-plus v1.0.14

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

hqit-plugin-plus

Installation

npm

npm install hqit-plugin-plus

yarn

yarn add hqit-plugin-plus

Usage

权限路由 && 自定义指令
import Vue from 'vue'
import App from './App.vue'
import router, {asyncRouterMap} from "./router"
import {getUser} from "./api"
import hqitPluginPlus from "hqit-plugin-plus"

type Elmessage {
	warning: (message: string) => void {
		// Indicates routing error,called by the plugin
	}
}

type Config {
  router: router,
  asyncRouterMap: asyncRouterMap<{...route,roles: [{key: resourceId,value: privilege}]}>,
  getUser: getUser,
  authKey?: "authorities",// defaultValue:"authorities"
  Message: ElMessage
}

const config<Config>;

const app = createApp(App);
app.use(init, {...config});


// 单个权限,利用自定义指令
<button v-permission="{key: resourceId, value: privilege}" />

Utils

import { _utils, compressImage, initRem} from "hqit-plugin-plus"

//图片压缩
interface CompressOptions {
  quality?: number; //默认0.92
  noCompressIfLarger?: boolean;
  maxWidth?: number;
  maxHeight?: number;
}
const _blob = await compressImage(file, compressOptions):Blob

const baseSize<number> = 192;
initRem(baseSize)
1.0.14

4 months ago

1.0.13

4 months ago

1.0.9

4 months ago

1.0.11

4 months ago

1.0.12

4 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.7-beta

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4-beta

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.4-rc-2

1 year ago

1.0.3-beta-1

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.4-RC

1 year ago

1.0.3-rc-2

1 year ago

1.0.3-rc-1

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago