npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vzi-element

v0.0.8

Published

臻识云平台前端组件

Readme

vzi-element

A Vue.js component for Vzenith

Build Setup

npm install
npm run serve
npm run build

lib Setup:打包组件

1.修改版本号:package.json 
2.打包:npm run lib 
3.发布:npm publish

安装

推荐使用 npm 的方式

npm i vzi-element -S

在 main.js 中写入以下内容:

import VziElement from 'vzi-element';

Vue.use(VziElement);

在页面使用组件:

<vzi-img-viewer />

组件

1.vziImg 图片

<vzi-img src="" :width="600"/>

Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |:------| :---- | :---- | :----: | :----: | | alt| 同原生 | string | — | "" | src | 同原生 | string | — | "" | fit | 同原生 object-fit | string | fill / contain / cover / none / scale-down | — | width| 宽度 | Number | — | 600 | height | 高度 | string | — | auto | draw-line | 是否开启坐标画线,一般用于车载项目 | boolean | true/false | false | down-load| 是否触摸显示下载按钮 | boolean | true/false | false | draw-list | 画线坐标数据 | Object | — | { berth_pos:"泊位坐标", car_pos:"车身坐标",parking_pos:"车牌坐标",resolution:"原始图片的宽高",img:"图片地址" } | img-viewer | 点击图片预览 | boolean | true/false | false | trigger-tip | 显示图片信息 | string | hover/fixed | fixed

1.图片开启draw-line时,必须同时传入width,height
2.eg:draw-list:{
berth_pos: "{\"point\":[{\"x\":544,\"y\":469},{\"x\":1018,\"y\":363},{\"x\":1018,\"y\":1746},{\"x\":151,\"y\":1636}],\"point_num\":4,\"reco_zone_size_factor\":{\"factor_h\":2048,\"factor_w\":2048}}",
car_pos: "{\"bottom\":266,\"left\":404,\"right\":1008,\"top\":3}",
img: "http://qiniu-test.vzicar.com/imgs/98e099eb-772d070f/20220303/1646271804_-939437491_98e099eb-772d070f_0_48262853_T1089_full.jpg",
resolution: "{\"height\":1080,\"width\":1920}",
parking_pos: "{\"point\":[{\"x\":1069,\"y\":458},{\"x\":1506,\"y\":528},{\"x\":1830,\"y\":1135},{\"x\":2009,\"y\":1854},{\"x\":1092,\"y\":1906}],\"point_num\":5,\"reco_zone_size_factor\":{\"factor_h\":2048,\"factor_w\":2048}}"
}

Events

| 事件名称 | 说明 | 回调参数 |:------| :---- | :----
| on-click | 图片点击事件 | —

Slot

| 参数 | 说明
|:------| :----
| tooltip | 触发 triggerTip 显示的自定义HTML元素,与triggerTip搭配使用

2.vziImgViewer 图片预览

<vzi-img-viewer :url-list="[{url:''}]" />

Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |:------| :---- | :---- | :----: | :----: | | initial-index | 初始展示图序列号 | Number | — |0 | url-list | 预览图列表 | Array | — | [{url:'',...}] | z-index | 图片预览的 z-index | Number | — | 20000 | close-on-press-escape | 是否可以通过按下 ESC 关闭 Dialog | boolean | true/false | true | draw-line | 是否开启坐标画线,一般用于车载项目 | boolean | true/false | false

Events

| 事件名称 | 说明 | 回调参数 |:------| :---- | :----
| on-close | 关闭全屏预览按钮 | — | on-switch | 切换图片 | index

1.图片开启draw-line时,必须同时传入width,height
2.eg:url-list:[{
    img:'',//必须
}]

3.vzi-dialog 弹框

<vzi-dialog/>

Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |:------| :---- | :---- | :----: | :----: | | drag | 弹框是否可拖拽 | boolean | true/false |false | direction | 弹框打开方向 | String | left/right/center/bottom/top | center | z-index | 图片预览的 z-index | Number | — | 20000 | close-on-press-escape | 是否可以通过按下 ESC 关闭 Dialog | boolean | true/false | true | width | 弹框宽度 | String | — | 60%

Events

| 事件名称 | 说明 | 回调参数 |:------| :---- | :----
| on-close | 关闭全屏预览按钮 | —

4.vzi-video 实时视频

目前公司采用Jessibuca(纯H5直播流播放器),即本组件是基于Vue版本的Jessibuca播放器,加以自定义UI的二次封装

<vzi-video/>

Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |:------| :---- | :---- | :----: | :----: | | play | | boolean | true/false |false

Events

| 事件名称 | 说明 | 回调参数 |:------| :---- | :----
| on-close | 关闭播放 | —