@wqhash1/libray-ui

Vue 3 component library (离线安装包)
739
Install
npm install @wqhash1/libray-ui
Latest Version:0.0.4
Vue:3
License:MIT
Last Updated:Sep 22, 2026
Links: npm
Maintainer: wqhash1

@rsengine/libray-ui 离线安装包

版本信息

  • 包名: @rsengine/libray-ui
  • 版本: 1.0.2
  • 构建时间: 2026/9/22 09:36:36
  • 打包依赖数: 17 个 (直接依赖 + 传递依赖)

✅ 完全离线可用

本安装包已包含所有运行时依赖,无需联网即可安装使用。

包含的依赖:maplibre-gl、@turf/turf、html2canvas、jspdf、jszip、papaparse、proj4、shapefile、wellknown、xlsx 等 17 个包。

安装方式

方法一:使用 npm 安装(推荐)

# 直接安装目录
npm install ./offline-package

# 或者安装压缩包(如果打包生成了 .tgz 文件)
npm install ./libray-ui-*.tgz

方法二:在 package.json 中声明

{
  "dependencies": {
    "@rsengine/libray-ui": "file:./offline-package"
  }
}

然后运行 npm install。

⚠️ pnpm 用户注意

pnpm 的离线安装机制与 npm 不同。如果使用 pnpm:

# 方法 1: 不要使用 --offline 标志
pnpm add ./offline-package

# 方法 2: 先用 npm 安装,再切换到 pnpm
npm install ./offline-package
# 之后可以继续使用 pnpm

不建议使用 pnpm add ./offline-package --offline,因为 pnpm 会检查其 store 缓存,即使依赖已打包也会报错。

使用方式

完整引入

import { createApp } from 'vue'
import LibrayUI from '@rsengine/libray-ui'
import '@rsengine/libray-ui/dist/style.css'

const app = createApp(App)
app.use(LibrayUI)

按需引入

import { LrButton, LrCard } from '@rsengine/libray-ui'
import '@rsengine/libray-ui/dist/style.css'

系统要求

必需依赖

本组件库需要 Vue 3 作为 peer dependency:

npm install vue@^3.0.0

Node.js 版本

建议 Node.js >= 16

注意事项

1. 样式文件

必须引入样式文件:

import '@rsengine/libray-ui/dist/style.css'

2. 地图容器高度

MapLibre GL 地图组件需要容器有明确的高度:

.map-container {
  width: 100%;
  height: 100vh; /* 或其他具体高度 */
}

3. 字体文件

本包已包含地图标注所需的字体文件 (dist/fonts/)。

内置依赖列表

本离线包已包含以下运行时依赖:

依赖包 用途
maplibre-gl 地图渲染引擎
maplibre-gl-draw 绘图工具
maplibre-gl-measures 测量工具
@maplibre/maplibre-gl-compare 地图对比
@turf/turf 地理空间分析
html2canvas HTML 转图片
jspdf PDF 生成
jszip ZIP 压缩
papaparse CSV 解析
proj4 坐标转换
shapefile Shapefile 解析
wellknown WKT 格式支持
xlsx Excel 解析
events 事件处理

问题排查

安装失败

  1. 检查 Vue 3 是否已安装
  2. 清除 npm 缓存:npm cache clean --force
  3. 删除 node_modules 重新安装

地图不显示

  1. 检查地图容器是否有明确的高度
  2. 检查浏览器控制台是否有错误

样式不生效

确保正确引入了样式文件。

技术支持

如有问题,请联系维护者:lvshaoli

Related Packages

@wra-gov/vue-components

Vue component library created by Welsh Revenue Authority

7,901 0
ocelot-ui

Ocelot UI (OUI), a UI framework built with Vue 3 and Tailwind CSS, is designed t...

4,590 0
vue-offline

Offline states and storage for Vue.js apps and Progressive Web Apps

73,964 344
savor-ui

A Vue3 Components Library

11,930

Version History

Version Released Vue License
0.0.4 >=3.0.0 MIT
0.0.3 >=3.0.0 MIT
0.0.2 >=3.0.0 MIT
0.0.1 >=3.0.0 MIT