Skip to content

Commit 192fe98

Browse files
committed
update eslint ,cleanup
1 parent 29156fb commit 192fe98

16 files changed

+2366
-1170
lines changed

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,37 @@
1212
"@antv/data-set": "^0.10.1",
1313
"ant-design-vue": "~1.3.2",
1414
"axios": "^0.18.0",
15-
"dayjs": "^1.7.5",
1615
"enquire.js": "^2.1.6",
1716
"js-cookie": "^2.2.0",
1817
"lodash.get": "^4.4.2",
1918
"lodash.pick": "^4.4.0",
2019
"md5": "^2.2.1",
20+
"moment": "^2.24.0",
2121
"nprogress": "^0.2.0",
2222
"viser-vue": "^2.3.3",
23-
"vue": "^2.5.17",
23+
"vue": "^2.5.22",
2424
"vue-clipboard2": "^0.2.1",
2525
"vue-cropper": "^0.4.4",
2626
"vue-ls": "^3.2.0",
2727
"vue-router": "^3.0.1",
28-
"vuex": "^3.0.1"
28+
"vuex": "^3.1.0"
2929
},
3030
"devDependencies": {
31-
"@vue/cli-plugin-babel": "^3.2.0",
32-
"@vue/cli-plugin-eslint": "^3.2.0",
31+
"@vue/cli-plugin-babel": "^3.3.0",
32+
"@vue/cli-plugin-eslint": "^3.3.0",
3333
"@vue/cli-plugin-unit-jest": "^3.3.0",
34-
"@vue/cli-service": "^3.2.0",
34+
"@vue/cli-service": "^3.2.1",
3535
"@vue/eslint-config-standard": "^4.0.0",
3636
"@vue/test-utils": "^1.0.0-beta.20",
3737
"babel-core": "7.0.0-bridge.0",
3838
"babel-eslint": "^10.0.1",
3939
"babel-jest": "^23.6.0",
40-
"eslint": "^5.8.0",
41-
"eslint-plugin-vue": "^5.0.0-0",
40+
"eslint": "^5.12.1",
41+
"eslint-plugin-html": "^5.0.0",
42+
"eslint-plugin-vue": "^5.1.0",
4243
"less": "^3.8.1",
4344
"less-loader": "^4.1.0",
44-
"vue-template-compiler": "^2.5.17"
45+
"vue-template-compiler": "^2.5.22"
4546
},
4647
"eslintConfig": {
4748
"root": true,

public/index.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>logo.png">
88
<title>Ant Design Pro</title>
9-
<style>.preloading-animate{background:#ffffff;width:100%;height:100%;position:fixed;left:0;top:0;z-index:299;}.preloading-animate .preloading-wrapper{position:absolute;width:5rem;height:5rem;left:50%;top:50%;transform:translate(-50%,-50%);}.preloading-animate .preloading-wrapper .preloading-balls{font-size:5rem;}</style>
9+
<style>#preloadingAnimation{position:fixed;left:0;top:0;height:100%;width:100%;background:#ffffff;user-select:none;z-index: 9999;overflow: hidden}.lds-roller{display:inline-block;position:relative;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(0.5,0,0.5,1) infinite;transform-origin:32px 32px;}.lds-roller div:after{content:" ";display:block;position:absolute;width:6px;height:6px;border-radius:50%;background:#13c2c2;margin:-3px 0 0 -3px;}.lds-roller div:nth-child(1){animation-delay:-0.036s;}.lds-roller div:nth-child(1):after{top:50px;left:50px;}.lds-roller div:nth-child(2){animation-delay:-0.072s;}.lds-roller div:nth-child(2):after{top:54px;left:45px;}.lds-roller div:nth-child(3){animation-delay:-0.108s;}.lds-roller div:nth-child(3):after{top:57px;left:39px;}.lds-roller div:nth-child(4){animation-delay:-0.144s;}.lds-roller div:nth-child(4):after{top:58px;left:32px;}.lds-roller div:nth-child(5){animation-delay:-0.18s;}.lds-roller div:nth-child(5):after{top:57px;left:25px;}.lds-roller div:nth-child(6){animation-delay:-0.216s;}.lds-roller div:nth-child(6):after{top:54px;left:19px;}.lds-roller div:nth-child(7){animation-delay:-0.252s;}.lds-roller div:nth-child(7):after{top:50px;left:14px;}.lds-roller div:nth-child(8){animation-delay:-0.288s;}.lds-roller div:nth-child(8):after{top:45px;left:10px;}#preloadingAnimation .load-tips{color: #13c2c2;font-size:2rem;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin-top:80px;text-align:center;width:400px;height:64px;} @keyframes lds-roller{0%{transform:rotate(0deg);} 100%{transform:rotate(360deg);}}</style>
1010
</head>
1111
<body>
1212
<noscript>
1313
<strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1414
</noscript>
15-
<div id="preloadingWrapper" class="preloading-animate">
16-
<div class="preloading-wrapper">
17-
<img src="/loading/option2/loading.svg" />
18-
</div>
15+
<div id="app">
16+
<div id="preloadingAnimation"><div class=lds-roller><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div><div class=load-tips>Loading</div></div>
1917
</div>
20-
<div id="app"></div>
2118
<!-- built files will be auto injected -->
2219
</body>
2320
</html>

src/components/chart/MiniArea.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</template>
1111

1212
<script>
13-
import moment from 'dayjs'
13+
import moment from 'moment'
1414
const data = []
1515
const beginDay = new Date().getTime()
1616

src/components/chart/MiniBar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</template>
1111

1212
<script>
13-
import moment from 'dayjs'
13+
import moment from 'moment'
1414
const data = []
1515
const beginDay = new Date().getTime()
1616

src/components/setting/SettingDrawer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
<div style="height: 20px">
4848
<a-tooltip class="setting-drawer-theme-color-colorBlock" v-for="(item, index) in colorList" :key="index">
49-
<template slot='title'>
49+
<template slot="title">
5050
{{ item.key }}
5151
</template>
5252
<a-tag :color="item.color" @click="changeColor(item.color)">
@@ -90,7 +90,7 @@
9090
<a-list :split="false">
9191
<a-list-item>
9292
<a-tooltip slot="actions">
93-
<template slot='title'>
93+
<template slot="title">
9494
该设定仅 [顶部栏导航] 时有效
9595
</template>
9696
<a-select size="small" style="width: 80px;" :defaultValue="contentWidth" @change="handleContentWidthChange">

src/core/bootstrap.js

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
DEFAULT_FIXED_SIDEMENU,
1313
DEFAULT_CONTENT_WIDTH_TYPE
1414
} from '@/store/mutation-types'
15-
import { removeLoadingAnimate } from '@/utils/util'
1615
import config from '@/config/defaultSettings'
1716

1817
export default function Initializer () {
@@ -27,5 +26,4 @@ export default function Initializer () {
2726
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
2827
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
2928
// last step
30-
removeLoadingAnimate('preloadingWrapper', 1500)
3129
}

src/permission.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ router.afterEach(() => {
7171
* Action 权限指令
7272
* 指令用法:
7373
* - 在需要控制 action 级别权限的组件上使用 v-action:[method] , 如下:
74-
* <a-button v-action:add >添加用户</a-button>
74+
* <i-button v-action:add >添加用户</a-button>
7575
* <a-button v-action:delete>删除用户</a-button>
7676
* <a v-action:edit @click="edit(record)">修改</a>
7777
*

src/utils/filter.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vue from 'vue'
2-
import * as dayjs from 'dayjs'
2+
import moment from 'moment'
33

44
Vue.filter('NumberFormat', function (value) {
55
if (!value) {
@@ -9,10 +9,10 @@ Vue.filter('NumberFormat', function (value) {
99
return intPartFormat
1010
})
1111

12-
Vue.filter('dayjs', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
13-
return dayjs(dataStr).format(pattern)
12+
Vue.filter ('dayjs', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
13+
return moment(dataStr).format(pattern)
1414
})
1515

16-
Vue.filter('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
17-
return dayjs(dataStr).format(pattern)
16+
Vue.filter ('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
17+
return moment(dataStr).format(pattern)
1818
})

src/views/list/PermissionList.vue

+13-13
Original file line numberDiff line numberDiff line change
@@ -70,51 +70,51 @@
7070
<a-form-item
7171
:labelCol="labelCol"
7272
:wrapperCol="wrapperCol"
73-
label='唯一识别码'
73+
label="唯一识别码"
7474
hasFeedback
75-
validateStatus='success'
75+
validateStatus="success"
7676
>
77-
<a-input placeholder='唯一识别码' v-model="mdl.id" id='no' disabled="disabled" />
77+
<a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" />
7878
</a-form-item>
7979

8080
<a-form-item
8181
:labelCol="labelCol"
8282
:wrapperCol="wrapperCol"
83-
label='权限名称'
83+
label="权限名称"
8484
hasFeedback
85-
validateStatus='success'
85+
validateStatus="success"
8686
>
87-
<a-input placeholder='起一个名字' v-model="mdl.name" id='permission_name' />
87+
<a-input placeholder="起一个名字" v-model="mdl.name" id="permission_name" />
8888
</a-form-item>
8989

9090
<a-form-item
9191
:labelCol="labelCol"
9292
:wrapperCol="wrapperCol"
93-
label='状态'
93+
label="状态"
9494
hasFeedback
95-
validateStatus='warning'
95+
validateStatus="warning"
9696
>
9797
<a-select v-model="mdl.status">
98-
<a-select-option value='1'>正常</a-select-option>
99-
<a-select-option value='2'>禁用</a-select-option>
98+
<a-select-option value="1">正常</a-select-option>
99+
<a-select-option value="2">禁用</a-select-option>
100100
</a-select>
101101
</a-form-item>
102102

103103
<a-form-item
104104
:labelCol="labelCol"
105105
:wrapperCol="wrapperCol"
106-
label='描述'
106+
label="描述"
107107
hasFeedback
108108
>
109-
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id='describe'/>
109+
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/>
110110
</a-form-item>
111111

112112
<a-divider />
113113

114114
<a-form-item
115115
:labelCol="labelCol"
116116
:wrapperCol="wrapperCol"
117-
label='赋予权限'
117+
label="赋予权限"
118118
hasFeedback
119119
>
120120
<a-select

src/views/list/TableInnerEditList.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@
9595
</div>
9696
</template>
9797
<template slot="action" slot-scope="text, record, index">
98-
<div class='editable-row-operations'>
98+
<div class="editable-row-operations">
9999
<span v-if="record.editable">
100100
<a @click="() => save(record)">保存</a>
101101
<a-divider type="vertical" />
102-
<a-popconfirm title='真的放弃编辑吗?' @confirm="() => cancel(record)">
102+
<a-popconfirm title="真的放弃编辑吗?" @confirm="() => cancel(record)">
103103
<a>取消</a>
104104
</a-popconfirm>
105105
</span>

src/views/list/TableList.vue

+16-16
Original file line numberDiff line numberDiff line change
@@ -118,53 +118,53 @@
118118
<a-form-item
119119
:labelCol="labelCol"
120120
:wrapperCol="wrapperCol"
121-
label='规则编号'
121+
label="规则编号"
122122
hasFeedback
123-
validateStatus='success'
123+
validateStatus="success"
124124
>
125-
<a-input placeholder='规则编号' v-model="mdl.no" id='no' />
125+
<a-input placeholder="规则编号" v-model="mdl.no" id="no" />
126126
</a-form-item>
127127

128128
<a-form-item
129129
:labelCol="labelCol"
130130
:wrapperCol="wrapperCol"
131-
label='服务调用次数'
131+
label="服务调用次数"
132132
hasFeedback
133-
validateStatus='success'
133+
validateStatus="success"
134134
>
135135
<a-input-number :min="1" id="callNo" v-model="mdl.callNo" style="width: 100%" />
136136
</a-form-item>
137137

138138
<a-form-item
139139
:labelCol="labelCol"
140140
:wrapperCol="wrapperCol"
141-
label='状态'
141+
label="状态"
142142
hasFeedback
143-
validateStatus='warning'
143+
validateStatus="warning"
144144
>
145-
<a-select defaultValue='1' v-model="mdl.status">
146-
<a-select-option value='1'>Option 1</a-select-option>
147-
<a-select-option value='2'>Option 2</a-select-option>
148-
<a-select-option value='3'>Option 3</a-select-option>
145+
<a-select defaultValue="1" v-model="mdl.status">
146+
<a-select-option value="1">Option 1</a-select-option>
147+
<a-select-option value="2">Option 2</a-select-option>
148+
<a-select-option value="3">Option 3</a-select-option>
149149
</a-select>
150150
</a-form-item>
151151

152152
<a-form-item
153153
:labelCol="labelCol"
154154
:wrapperCol="wrapperCol"
155-
label='描述'
155+
label="描述"
156156
hasFeedback
157-
help='请填写一段描述'
157+
help="请填写一段描述"
158158
>
159-
<a-textarea :rows="5" v-model="mdl.description" placeholder="..." id='description'/>
159+
<a-textarea :rows="5" v-model="mdl.description" placeholder="..." id="description"/>
160160
</a-form-item>
161161

162162
<a-form-item
163163
:labelCol="labelCol"
164164
:wrapperCol="wrapperCol"
165-
label='更新时间'
165+
label="更新时间"
166166
hasFeedback
167-
validateStatus='error'
167+
validateStatus="error"
168168
>
169169
<a-date-picker
170170
style="width: 100%"

src/views/list/UserList.vue

+13-13
Original file line numberDiff line numberDiff line change
@@ -84,51 +84,51 @@
8484
<a-form-item
8585
:labelCol="labelCol"
8686
:wrapperCol="wrapperCol"
87-
label='唯一识别码'
87+
label="唯一识别码"
8888
hasFeedback
89-
validateStatus='success'
89+
validateStatus="success"
9090
>
91-
<a-input placeholder='唯一识别码' v-model="mdl.id" id='no' disabled="disabled" />
91+
<a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" />
9292
</a-form-item>
9393

9494
<a-form-item
9595
:labelCol="labelCol"
9696
:wrapperCol="wrapperCol"
97-
label='角色名称'
97+
label="角色名称"
9898
hasFeedback
99-
validateStatus='success'
99+
validateStatus="success"
100100
>
101-
<a-input placeholder='起一个名字' v-model="mdl.name" id='role_name' />
101+
<a-input placeholder="起一个名字" v-model="mdl.name" id="role_name" />
102102
</a-form-item>
103103

104104
<a-form-item
105105
:labelCol="labelCol"
106106
:wrapperCol="wrapperCol"
107-
label='状态'
107+
label="状态"
108108
hasFeedback
109-
validateStatus='warning'
109+
validateStatus="warning"
110110
>
111111
<a-select v-model="mdl.status">
112-
<a-select-option value='1'>正常</a-select-option>
113-
<a-select-option value='2'>禁用</a-select-option>
112+
<a-select-option value="1">正常</a-select-option>
113+
<a-select-option value="2">禁用</a-select-option>
114114
</a-select>
115115
</a-form-item>
116116

117117
<a-form-item
118118
:labelCol="labelCol"
119119
:wrapperCol="wrapperCol"
120-
label='描述'
120+
label="描述"
121121
hasFeedback
122122
>
123-
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id='describe'/>
123+
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/>
124124
</a-form-item>
125125

126126
<a-divider />
127127

128128
<a-form-item
129129
:labelCol="labelCol"
130130
:wrapperCol="wrapperCol"
131-
label='拥有权限'
131+
label="拥有权限"
132132
hasFeedback
133133
>
134134
<a-row :gutter="16" v-for="(permission, index) in mdl.permissions" :key="index">

0 commit comments

Comments
 (0)