Narcissistic Passion Minified

    troila3d-ui
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.69 • Public • Published

    troila3d-ui

    Getting Started

    Install dependencies,

    npm i troila3d-ui

    使用:

    import { ui } from 'troila3d-ui';
    import 'troila3d-ui/dist/index.css';
    
    
    // 场景 ID
    {
      '卓朗' 'ZLScene'
      '4号楼''FourScene'
      '首页':'Dashboard'
      '房间':'MachineRoom'
      '设备': 'Device'
      '楼层':'Floor'
      '绑定':'BindScene';
      '摄像头': 'Monitor'
    }
    
    
    /**
     * 公有方法 与 某个场景方法不能一起生效
    */
    
    ui.on('common:deviceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    ui.on('common:spaceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 进入某个场景 spaceID 不是必传项, 传入内部会调用changeLocationNavigator 改变LOCATION
    ui.entry('ZLScene', spaceID);
    
    
    // 首页 点击“进入系统”
    ui.on('Dashboard:onEnter', (key) => {
      console.warn('key', key);
    });
    
    // 卓朗 设备选择
    ui.on('ZLScene:deviceTreeSelect', (key) => {
      console.warn('key', key);
    });
    // 环视
    ui.on('ZLScene:around', (bool) => {
      console.warn('bool', bool);
    });
    
    // 卓朗 空间选择
    ui.on('ZLScene:spaceTreeSelect', (key) => {
      console.warn('key', key);
      ui.entry('FourScene');
    });
    // 4号楼 设备选择
    ui.on('FourScene:deviceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 4号楼 空间选择
    ui.on('FourScene:spaceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 环视
    ui.on('FourScene:around', (bool) => {
      console.warn('bool', bool);
    });
    
    // 合并 展开
    
    ui.on('FourScene:open', (bool) => {
      console.warn('bool', bool);
    });
    
    // 楼层 设备选择
    ui.on('Floor:deviceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 楼层 空间选择
    ui.on('Floor:spaceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 楼层 点击最近告警
    ui.on('Floor:lasterWarnClick', (key) => {
      console.warn('key', key);
    });
    
    
    // 楼层 切换楼层
    ui.on('Floor:floorSelect', (key) => {
      console.warn('key', key);
    });
    
    // 楼层 切换房间
    ui.on('Floor:roomSelect', (key) => {
      console.warn('key', key);
    });
    
    // 楼层 点击监控
    ui.on('Floor:monitorSelect', (key) => {
      console.warn('key', key);
    });
    
    // 绑定点击行
    ui.on('BindScene:bindRowSelect', (key) => {
      console.warn('key', key);
    });
    
    
    // 传入模型ID ,改变空间面包屑
    ui.changeLocationNavigator('0_136');
    
    // 点击模型 传入ID, 触发事件 clickModel
    ui.clickModel('0_108');
    
    // 点击摄像头 传入ID,显示弹框
    ui.monitorClick('0_108');
    
    // 点击异常设备模型 传入ID, 触发事件 clickWarnFlash
    ui.clickWarnFlash('0_108');
    
    
    // 房间 设备选择
    ui.on('MachineRoom:deviceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 房间 空间树选择
    ui.on('MachineRoom:spaceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    // 房间 点击最近告警
    ui.on('MachineRoom:lasterWarnClick', (key) => {
      console.warn('key', key);
    });
    
    // 房间 切换房间
    ui.on('MachineRoom:roomSelect', (key) => {
      console.warn('roomSelect', key);
    });
    
    // 房间 点击温度
    ui.on('MachineRoom:temperatureSelect', (temperatures) => {
      console.warn('temperatureSelect', temperatures);
    });
    
    
    // 房间 鼠标移入线图
    ui.on('MachineRoom:lineMouseEnter', (id) => {
      console.warn('id', id);
    });
    
    // 房间 鼠标移出线图
    ui.on('MachineRoom:lineMouseLeave', (id) => {
      console.warn('id', id);
    });
    
    
    //设备 空间树选择
    ui.on('Device:spaceTreeSelect', (key) => {
      console.warn('key', key);
    });
    
    //设备 左下角小地图房间切换
    ui.on('Device:roomSelect', (key) => {
      console.warn('key', key);
    });
    

    Keywords

    none

    Install

    npm i troila3d-ui

    DownloadsWeekly Downloads

    67

    Version

    0.1.69

    License

    none

    Unpacked Size

    1.61 MB

    Total Files

    70

    Last publish

    Collaborators

    • iamjjc