Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

pit-imodel-ui-test

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pit-imodel-ui-test

湖南创智艾泰克科技有限公司

latest
npmnpm
Version
0.1.81
Version published
Weekly downloads
15
275%
Maintainers
1
Weekly downloads
 
Created
Source

pit-bimwin-ui

更新日志

2023-05-20 版本:0.1.795

更新内容

  • 功能按钮的优化
  • 新增事件@onToolChange="onToolChange";工具切换时触发该事件;参数(type:事件类型, platform: 模型实例化对象, toolbarMenuList: 所有操作按钮的集合)

2023-05-20 版本:0.1.794

更新内容

  • 暴露版本号和name

介绍

无需使用专业设计软件,用户可以在 Web 浏览器端、移动客户端中查看、操作图纸模型。基于轻量化引擎可以开发更加丰富、更有价值的 BIM 应用。

安装

npm 安装

推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用。

npm i pit-bimwim-ui

快速上手

完整引入

在 main.js 中写入以下内容

import Vue from "vue";
import PitBimWinUi from "pit-bimwin-ui";
import "pit-bimwin-ui/lib/PIT.css";
Vue.use(PitBimWinUi);

pit-bim-win-ui 组件

加载一个模型及相关的配置

<template>
  <pit-bim-win-ui
    ref="pitBimWinUi"
    :options="options"
  ></pit-bim-win-ui>
</template>

<script>
export default {
  data() {
    return {
      options: {
        url: "http://172.18.1.72:9983/",
      },
    };
  },
};
</script>

属性

参数名类型描述参数
optionsobject具体请看 options 下表-
hiddenToolbararray需要隐藏的底部功能按钮-
customToolbarToolbar[]自定义按钮-
dialogStyleObject自定义弹窗样式;如:dialogStyle="{ directoryTree: { top: '10px' }, } directoryTree是弹窗的id与按钮id一致directoryTree/componentDetails/measurement-

Toolbar属性字段说明

参数名类型描述示例
groupingstring指定按钮在第几组'group2'
offsetnumber按钮在当前组往右偏移多少个2
idany按钮的唯一标识'xxx'
type'icon'、'img'、'text'按钮的类型:icon时class必填,img时imgPath与imgHoverPath必填,text时title必填'el-icon-plus'
titlestring按钮展示的文字和toolTip,type为text,该项必填title: '按钮'
imgHoverPathstring、base64type为img,该项必填,按钮选中时展示的图片-
imgPathstring、base64type为img,该项必填,按钮未选中时展示的图片-
isShowboolean控制按钮是否显示-
classstring按钮的class样式类名-
visibleboolean按钮的是否选中状态-
callbackfunction按钮点击时触发的方法-

options 属性字段说明

参数名类型描述参数
urlstringiframe的src-

hiddenToolbar id 说明

id描述分组图标/图片
fitView窗口自适应group1icon
PanViewTool平移group1img
RotateViewTool旋转group1img
WindowAreaTool框选放大group1icon
mainPerspective主视角group2icon
currentMainPerspective设置当前为主视图group2img
resetMainPerspective重置主视图group2img
directoryTree目录树group2img
fullScreen全屏group2img
measurement测量group2icon
section剖切group2img
axialSection轴向剖切group2img
WalkViewTool漫游模式group3icon
componentDetails构件属性group3img
annotation批注group3icon
basicInformation基本信息group3icon
test隐藏选中构件/显示所有构件/隔离选中构件group3icon

事件

platform: connection.promise.then((platform))

事件名返回参数描述
loadModelplatform、list(所有模型)模型加载成功回调
onModelLoadedplatform模型加载成功回调
onPropertyLoadedplatform模型加载成功回调
onPickPointplatform/info(被点击的构建详情)鼠标左键点击事件
onToolChangetoolName、platform、toolbarMenuList工具切换触发事件
annotationSaveImageimage(base64), platform批注保存截图事件

Keywords

vue

FAQs

Package last updated on 17 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts