12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <el-table
- :data="tableData"
- style="width: 100%">
- <el-table-column
- prop="code"
- label="编码"
- width="180">
- </el-table-column>
- <el-table-column
- prop="name"
- label="名称"
- width="180">
- </el-table-column>
- </el-table>
- </template>
- <script>
- import Vue from 'vue';
- import ElementUI from 'element-ui';
- import Axios from 'axios';
- import 'element-ui/lib/theme-chalk/index.css';
- Vue.use(ElementUI);
- // http://api.sagacloud.cn/data-platform-3/dict/query/climate
- export default{
- data: function () {
- return {
- tableData: []
- };
- },
- components: {},
- created: function () {
- this.getData()
- },
- mounted: function () {
- },
- computed: {},
- methods: {
- getData(){
- Axios.get('http://api.sagacloud.cn/data-platform-3/dict/query/climate',{}).then(res=>{
- this.tableData = res.data.Content;
- })
- }
- },
- }
- </script>
|