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 🙏

© 2026 – Pkg Stats / Ryan Hefner

enniot-serial-conf

v0.0.7

Published

"fix: 修改样式显示"

Readme

目录结构

── enniot-serial-conf
    ├── interface_com.vue
    ├── README.md
    ├── com-model.json
    └── package.json

Props

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | ------ | ------------------------------------------------------------ | ------ | ------------------------------ | ------------------------- | | schema | 规定 form 格式的 json 文件 | json | — | — | | data | 用于将后台读取的数据填入 form 组件;以及获取 form 中数据,并将这些数据打包作为参数提交。 | object | — | — | | config | 用于根据传入参数控制 form 中组件的显示与隐藏 | object | { dynamicComType: false/true } | { dynamicComType: false } |

Fields

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | -------------- | -------- | ------- | ----------------------------- | ------ | | enabled | 是否启用 | boolean | true/false | — | | type | 类型 | string | 485/232 | — | | baud_rate | 波特率 | string | 1200B-230400B | 1200B | | factor_name | 因子名称 | string | — | — | | data_bit | 数据位 | int | 7-16 | 8 | | parity | 校验位 | string | None/Odd/Even | Even | | stop_bit | 停止位 | int | 1/2 | 8 | | data_type | 数据类型 | string | "int"/"float"/"byte"/"double" | "int" | | heart_interval | 帧间隔 | int | 100-1000 | — |

config 对象中的 dynamicComType,当 { dynamicComType : true } 时,data 中可以设置 type,而当 { dynamicComType : false } 时,data 中没有 type字段

Model

用法示例

<template>
	<el-row>
        <el-tabs
              v-model="comActiveName"
              :tab-position="apiTabPosition"
              @tab-click="handleComClick"
            >
              <el-tab-pane
                v-for="index in serial.length"
                :key="index"
                :label="'COM'+ index + '(' + serial[index-1].type + ')'"
                :name="String(index-1)"
              >
                <COM
                  v-if="comType==='fourth'"
                  ref="COMData"
                  :data="comForm"
                  :config="{is_dynamic: serial[index-1].is_dynamic}"
                  style="width: 60%"
                />
                <el-button
                  type="primary"
                  style="margin-left: 585px"
                  @click="onInterfaceSubmit(index-1)"
                >
                  保存
                </el-button>
              </el-tab-pane>
            </el-tabs>
    </el-row>
</template>

<script>
	import COM from 'enniot-serial-conf';
    import deviceConf from '../../../../device-conf.js';
    import axios from "axios";
    export default {
        data() {
            const {lan, serial} = deviceConf;
            return {
      			comForm: {},
            }
        },
        methods: {
            // 接口设置查询
            async onGetCOMForm(id) {
              const api = `${baseUrl}/api/serial/${id}`;
              const res = await this.$api.get(api);
              res.is_dynamic = res.is_dynamic || false;
              res.type = this.serial[id].type;
              this.comForm = res;
            },
            //  接口设置修改
            async onInterfaceSubmit(id) {
              const api = `${baseUrl}/api/serial/${id}`;
              const res = await this.$api.post(api, this.$refs.COMData[id].data);
              this.comForm = res;
            },
    }