Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing-opeartion
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gic-web
marketing-opeartion
Commits
659e4ebb
Commit
659e4ebb
authored
Jun 20, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
fb421d8e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
main.js
src/main.js
+2
-2
index.js
src/utils/index.js
+18
-0
template-detail.vue
src/views/activity/template-detail.vue
+0
-0
template-list.vue
src/views/activity/template-list.vue
+3
-1
No files found.
src/main.js
View file @
659e4ebb
...
...
@@ -8,7 +8,7 @@ import App from './App.vue';
import
router
from
'./router'
;
import
{
isRequest
}
from
'@/config'
;
import
filters
from
'@/filters'
;
import
{
scrollToError
}
from
'@/utils'
;
// 复制粘贴
import
VueClipboard
from
'vue-clipboard2'
;
Vue
.
use
(
VueClipboard
);
...
...
@@ -16,7 +16,7 @@ axios.defaults.headers.common = Object.assign(axios.defaults.headers.common, isR
axios
.
defaults
.
withCredentials
=
true
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
prototype
.
axios
=
axios
;
Vue
.
prototype
.
scrollToError
=
scrollToError
;
// 开启vue devtools.....
/* eslint-disable-next-line */
Vue
.
config
.
devtools
=
process
.
env
.
NODE_ENV
!==
'production'
;
...
...
src/utils/index.js
View file @
659e4ebb
...
...
@@ -28,3 +28,21 @@ export function getFirstMenu(list) {
};
return
travel
(
list
);
}
/** 表单校验滚动到第一个错误项
* @param {Object} that vue实例
* this.scrollToError(this);
*/
export
const
scrollToError
=
that
=>
{
that
.
$nextTick
(
_
=>
{
const
isError
=
document
.
getElementsByClassName
(
'is-error'
);
isError
[
0
].
scrollIntoView
({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block
:
'center'
,
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior
:
'smooth'
});
});
};
src/views/activity/template-detail.vue
View file @
659e4ebb
This diff is collapsed.
Click to expand it.
src/views/activity/template-list.vue
View file @
659e4ebb
...
...
@@ -27,7 +27,7 @@
</
template
>
</el-table-column>
<el-table-column
label=
"模板名称"
min-width=
"290px"
prop=
"templateName"
>
</el-table-column>
<el-table-column
label=
"展示数量"
min-width=
"310px"
prop=
"
prizeMax
"
>
</el-table-column>
<el-table-column
label=
"展示数量"
min-width=
"310px"
prop=
"
viewPrize
"
>
</el-table-column>
<el-table-column
label=
"模板状态"
min-width=
"306px"
prop=
"statusFlag"
>
<
template
slot-scope=
"{ row }"
>
<el-switch
v-model=
"row.statusFlag"
@
change=
"handleSwitch(row.statusFlag, row.templateId)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
...
...
@@ -101,6 +101,8 @@ export default {
}).
then
(()
=>
{
fetch
.
updateTemplateStatus
({
statusFlag
,
templateId
}).
then
((
res
)
=>
{
this
.
getList
();
}).
catch
(
_
=>
{
this
.
list
.
filter
(
item
=>
item
.
templateId
==
templateId
)[
0
].
statusFlag
=
statusFlag
==
0
?
1
:
0
;
});
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment