forked from AkkomaGang/admin-fe
fix eslint warning
This commit is contained in:
parent
da9d9332b4
commit
785c3beaf5
8 changed files with 106 additions and 117 deletions
|
@ -54,7 +54,7 @@
|
|||
"eslint-friendly-formatter": "2.0.7",
|
||||
"eslint-import-resolver-webpack": "0.8.1",
|
||||
"eslint-loader": "1.6.3",
|
||||
"eslint-plugin-html": "2.0.0",
|
||||
"eslint-plugin-html": "2.0.1",
|
||||
"eslint-plugin-import": "2.2.0",
|
||||
"eventsource-polyfill": "0.9.6",
|
||||
"express": "4.14.1",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<script>
|
||||
import Dropzone from 'dropzone';
|
||||
import 'dropzone/dist/dropzone.css';
|
||||
import { getToken } from 'api/qiniu';
|
||||
// import { getToken } from 'api/qiniu';
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
|
@ -69,6 +69,7 @@
|
|||
},
|
||||
sending: (file, xhr, formData) => {
|
||||
/* 七牛*/
|
||||
console.log(file, xhr, formData)
|
||||
// formData.append('token', file.token);
|
||||
// formData.append('key', file.key);
|
||||
vm.initOnce = false;
|
||||
|
|
|
@ -63,11 +63,6 @@
|
|||
return this.active ? 'col-resize' : ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const element = this.$el;
|
||||
const elementOffset = element.getBoundingClientRect();
|
||||
// this.height = elementOffset.height+'px';
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
if (!this.hasMoved) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import editorVideo from './components/editorVideo';
|
||||
import editorSlide from './components/editorSlide';
|
||||
import editorImage from './components/editorImage';
|
||||
import { getToken, upload } from 'api/qiniu'; // 七牛
|
||||
// import { getToken, upload } from 'api/qiniu'; // 七牛
|
||||
// 业务需求可删除
|
||||
export default {
|
||||
name: 'tinymce',
|
||||
|
|
|
@ -54,66 +54,57 @@ const Theme = resolve => require(['../views/theme/index'], resolve);
|
|||
const DynamicTable = resolve => require(['../views/example/dynamictable'], resolve);
|
||||
const Table = resolve => require(['../views/example/table'], resolve);
|
||||
const Form1 = resolve => require(['../views/example/form1'], resolve);
|
||||
const Form2 = resolve => require(['../views/example/form2'], resolve);
|
||||
// const Form2 = resolve => require(['../views/example/form2'], resolve);
|
||||
|
||||
/* permission */
|
||||
const Permission = resolve => require(['../views/permission/index'], resolve);
|
||||
|
||||
/* admin*/
|
||||
// const AdminCreateUser = resolve => require(['../views/admin/createUser'], resolve);
|
||||
// const QuicklyCreateUser = resolve => require(['../views/admin/quicklycreate'], resolve);
|
||||
// const UserProfile = resolve => require(['../views/admin/profile'], resolve);
|
||||
// const UsersList = resolve => require(['../views/admin/usersList'], resolve);
|
||||
|
||||
|
||||
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
export default new Router({
|
||||
// mode: 'history', //后端支持可开
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: [
|
||||
// mode: 'history', //后端支持可开
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: [
|
||||
{ path: '/login', component: Login, hidden: true },
|
||||
{ path: '/authredirect', component: authRedirect, hidden: true },
|
||||
{ path: '/sendpwd', component: sendPWD, hidden: true },
|
||||
{ path: '/reset', component: reset, hidden: true },
|
||||
{ path: '/404', component: Err404, hidden: true },
|
||||
{ path: '/401', component: Err401, hidden: true }, {
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
name: '首页',
|
||||
hidden: true,
|
||||
children: [{ path: 'dashboard', component: dashboard }]
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
name: '首页',
|
||||
hidden: true,
|
||||
children: [{ path: 'dashboard', component: dashboard }]
|
||||
}, {
|
||||
path: '/introduction',
|
||||
component: Layout,
|
||||
redirect: '/introduction/index',
|
||||
name: '简述',
|
||||
icon: 'xinrenzhinan',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
path: '/introduction',
|
||||
component: Layout,
|
||||
redirect: '/introduction/index',
|
||||
icon: 'xinrenzhinan',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
{ path: 'index', component: Introduction, name: '简述' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/permission',
|
||||
component: Layout,
|
||||
redirect: '/permission/index',
|
||||
name: '权限测试',
|
||||
icon: 'quanxian',
|
||||
meta: { role: ['admin'] },
|
||||
noDropdown: true,
|
||||
children: [
|
||||
path: '/permission',
|
||||
component: Layout,
|
||||
redirect: '/permission/index',
|
||||
name: '权限测试',
|
||||
icon: 'quanxian',
|
||||
meta: { role: ['admin'] },
|
||||
noDropdown: true,
|
||||
children: [
|
||||
{ path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/components',
|
||||
component: Layout,
|
||||
redirect: '/components/index',
|
||||
name: '组件',
|
||||
icon: 'zujian',
|
||||
children: [
|
||||
path: '/components',
|
||||
component: Layout,
|
||||
redirect: '/components/index',
|
||||
name: '组件',
|
||||
icon: 'zujian',
|
||||
children: [
|
||||
{ path: 'index', component: componentsIndex, name: '介绍 ' },
|
||||
{ path: 'tinymce', component: Tinymce, name: '富文本编辑器' },
|
||||
{ path: 'markdown', component: Markdown, name: 'Markdown' },
|
||||
|
@ -125,72 +116,72 @@ export default new Router({
|
|||
{ path: 'sticky', component: Sticky, name: 'Sticky' },
|
||||
{ path: 'countto', component: CountTo, name: 'CountTo' },
|
||||
{ path: 'mixin', component: Mixin, name: '小组件' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/charts',
|
||||
component: Layout,
|
||||
redirect: '/charts/index',
|
||||
name: '图表',
|
||||
icon: 'tubiaoleixingzhengchang',
|
||||
children: [
|
||||
path: '/charts',
|
||||
component: Layout,
|
||||
redirect: '/charts/index',
|
||||
name: '图表',
|
||||
icon: 'tubiaoleixingzhengchang',
|
||||
children: [
|
||||
{ path: 'index', component: chartIndex, name: '介绍' },
|
||||
{ path: 'keyboard', component: KeyboardChart, name: '键盘图表' },
|
||||
{ path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' },
|
||||
{ path: 'line', component: LineMarker, name: '折线图' },
|
||||
{ path: 'mixchart', component: MixChart, name: '混合图表' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/errorpage',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '错误页面',
|
||||
icon: '404',
|
||||
children: [
|
||||
path: '/errorpage',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '错误页面',
|
||||
icon: '404',
|
||||
children: [
|
||||
{ path: '401', component: Err401, name: '401' },
|
||||
{ path: '404', component: Err404, name: '404' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/errlog',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'errlog',
|
||||
icon: 'bug',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
path: '/errlog',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'errlog',
|
||||
icon: 'bug',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
{ path: 'log', component: ErrorLog, name: '错误日志' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/excel',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'excel',
|
||||
icon: 'EXCEL',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
path: '/excel',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'excel',
|
||||
icon: 'EXCEL',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
{ path: 'download', component: ExcelDownload, name: '导出excel' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/theme',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'theme',
|
||||
icon: 'theme',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
path: '/theme',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'theme',
|
||||
icon: 'theme',
|
||||
noDropdown: true,
|
||||
children: [
|
||||
{ path: 'index', component: Theme, name: '换肤' }
|
||||
]
|
||||
]
|
||||
}, {
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '综合实例',
|
||||
icon: 'zonghe',
|
||||
children: [
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: '综合实例',
|
||||
icon: 'zonghe',
|
||||
children: [
|
||||
{ path: 'dynamictable', component: DynamicTable, name: '动态table' },
|
||||
{ path: 'table', component: Table, name: '综合table' },
|
||||
{ path: 'form1', component: Form1, name: '综合form1' }
|
||||
// { path: 'form2', component: Form2, name: '综合form2' }
|
||||
]
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/admin',
|
||||
|
@ -206,5 +197,5 @@ export default new Router({
|
|||
// ]
|
||||
// },
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
components: { Dropzone },
|
||||
methods: {
|
||||
dropzoneS(file) {
|
||||
console.log(file)
|
||||
this.$message({ message: '上传成功', type: 'success' });
|
||||
},
|
||||
dropzoneR(file) {
|
||||
console.log(file)
|
||||
this.$message({ message: '删除成功', type: 'success' });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { isWscnEmail } from 'utils/validate';
|
||||
import { getQueryObject } from 'utils';
|
||||
// import { getQueryObject } from 'utils';
|
||||
import socialSign from './socialsignin';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -94,26 +94,26 @@
|
|||
},
|
||||
methods: {
|
||||
setPWD() {
|
||||
this.loading = true;
|
||||
const _this = this;
|
||||
this.$refs.resetForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
email: this.resetForm.email,
|
||||
code: this.resetForm.code,
|
||||
new_password: this.resetForm.checkPass
|
||||
};
|
||||
// restPWD(data).then(() => {
|
||||
// this.$message.success('密码设置成功,五秒后调整到登录页');
|
||||
// setTimeout(() => {
|
||||
// _this.$router.push({ path: '/login' })
|
||||
// }, 5 * 1000)
|
||||
// });
|
||||
} else {
|
||||
this.$message.error('error submit!!');
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
// this.loading = true;
|
||||
// const _this = this;
|
||||
// this.$refs.resetForm.validate(valid => {
|
||||
// if (valid) {
|
||||
// const data = {
|
||||
// email: this.resetForm.email,
|
||||
// code: this.resetForm.code,
|
||||
// new_password: this.resetForm.checkPass
|
||||
// };
|
||||
// restPWD(data).then(() => {
|
||||
// this.$message.success('密码设置成功,五秒后调整到登录页');
|
||||
// setTimeout(() => {
|
||||
// _this.$router.push({ path: '/login' })
|
||||
// }, 5 * 1000)
|
||||
// });
|
||||
// } else {
|
||||
// this.$message.error('error submit!!');
|
||||
// }
|
||||
// this.loading = false;
|
||||
// });
|
||||
},
|
||||
togglePasswordType() {
|
||||
if (this.passwordType === 'text') {
|
||||
|
|
Loading…
Reference in a new issue