0.0.1 • Published 3 years ago

enniot-lte-conf v0.0.1

Weekly downloads
4
License
ISC
Repository
-
Last release
3 years ago

目录结构

── enniot-lte-conf
    ├── LTE.vue
    ├── README.md
    ├── lte.schema.json
    └── package.json

Props

参数说明类型可选值默认值
schema规定 form 格式的 json 文件json
data用于将后台读取的数据填入 form 组件;以及获取 form 中数据,并将这些数据打包作为参数提交。object

Data

参数说明类型可选值默认值
apnAPNstring
pinPINstring
username用户名string
password密码string
authentication认证类型string"无"/"PAP"/"CHAP"

Usage

<template>
	<el-row>
       <el-tab-pane
          label="蜂窝网络"
           name="third"
       >
         <LTE
            ref="lte"
            :data='lteForm'
            style="width: 50%"
          />
          <el-button
            type="primary"
            style="margin-left: 44%"
            @click="onLteSubmit()"
          >
            保存
          </el-button>
        </el-tab-pane>
     </el-tabs>
  </el-row>
</template>

<script>
	import LTE from '@/views/components/lte/LTE.vue';
    import axios from "axios";
    export default {
        data() {
            return {
      			lteForm: {},
            }
        },
        methods: {
            // LTE 查询
            async onGetLteForm() {
              const api = `${baseUrl}/api/lte-4g`;
              const res = await this.$api.get(api);
              this.lteForm = res;
            },
            //  LTE 修改
            async onLteSubmit() {
              const api = `${baseUrl}/api/lte-4g`;
              await this.$api.post(api, this.lteForm);
              await this.onGetLteForm();
            },
    }