0.0.1 • Published 3 years ago
enniot-lte-conf v0.0.1
目录结构
── enniot-lte-conf
├── LTE.vue
├── README.md
├── lte.schema.json
└── package.json
Props
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
schema | 规定 form 格式的 json 文件 | json | — | — |
data | 用于将后台读取的数据填入 form 组件;以及获取 form 中数据,并将这些数据打包作为参数提交。 | object | — | — |
Data
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
apn | APN | string | — | — |
pin | PIN | string | — | — |
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();
},
}
0.0.1
3 years ago