Skip to content

Commit 2b6261c

Browse files
committed
update eslint ,cleanup
1 parent cd1d825 commit 2b6261c

File tree

16 files changed

+2366
-1170
lines changed

16 files changed

+2366
-1170
lines changed

โ€Žpackage.json

Lines changed: 10 additions & 9 deletions
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

Lines changed: 3 additions & 6 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 13 additions & 13 deletions
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

Lines changed: 2 additions & 2 deletions
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>

0 commit comments

Comments
ย (0)