style: 移除 store 中无用的 Promise 声明以及优化代码格式 增强部分健壮性

This commit is contained in:
FairyEver
2020-04-22 11:03:48 +08:00
parent d249c86406
commit 98eaba77df
18 changed files with 382 additions and 531 deletions

View File

@@ -17,7 +17,7 @@
</template>
<script>
import { BusinessTable1List } from '@api/demo.business.table.1'
import { businessTable1List } from '@api/demo.business.table.1'
export default {
// name 值和本页的 $route.name 一致才可以缓存页面
name: 'demo-business-table-1',
@@ -57,7 +57,7 @@ export default {
this.$notify({
title: '开始请求模拟表格数据'
})
BusinessTable1List({
businessTable1List({
...form,
...this.page
})

View File

@@ -10,7 +10,7 @@ export default `<template>
</template>
<script>
import { BusinessTable1List } from '@api/demo.business.table.1'
import { businessTable1List } from '@api/demo.business.table.1'
export default {
data () {
@@ -57,7 +57,7 @@ export default {
},
fetchData () {
this.loading = true
BusinessTable1List({
businessTable1List({
...this.pagination
}).then(res => {
this.data = res.list

View File

@@ -24,7 +24,7 @@
import '../install'
import doc from './doc.md'
import code from './code.js'
import { BusinessTable1List } from '@api/demo.business.table.1'
import { businessTable1List } from '@api/demo.business.table.1'
export default {
data () {
@@ -73,7 +73,7 @@ export default {
},
fetchData () {
this.loading = true
BusinessTable1List({
businessTable1List({
...this.pagination
}).then(res => {
this.data = res.list

View File

@@ -23,7 +23,7 @@
</template>
<script>
import { PluginMocksAjax } from '@api/demo.plugins.mocks.ajax'
import { pluginMocksAjax } from '@api/demo.plugins.mocks.ajax'
export default {
name: 'demo-plugins-mock-ajax',
data () {
@@ -39,7 +39,7 @@ export default {
},
methods: {
ajax () {
PluginMocksAjax()
pluginMocksAjax()
.then(res => {
this.table.columns = Object.keys(res.list[0]).map(e => ({
label: e,