This repository was archived by the owner on Jan 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +35
-38
lines changed
src/resources/assets/js/components Expand file tree Collapse file tree 3 files changed +35
-38
lines changed Original file line number Diff line number Diff line change 11<template ></template >
22
33<script >
4- export default {
5- props: [' count' ],
6- data () {
7- return {
8- itemsCount: this .count
9- };
10- },
11- methods: {
12- DelItem (event , name ) {
4+ export default {
5+ props: [' count' ],
6+ data () {
7+ return {
8+ itemsCount: this .count
9+ }
10+ },
11+ methods: {
12+ DelItem (event , name ) {
1313
14- let that = this ;
14+ let that = this
1515
16- $ .ajax ({
17- url: event .target .action ,
18- type: ' DELETE' ,
19- success (res ) {
20- if (res .done ) {
21- EventHub .fire (' showNotif' , {
22- title: ' Success' ,
23- body: ` "${ name} " was removed` ,
24- type: ' success' ,
25- duration: 1 ,
26- icon: false
27- })
16+ $ .ajax ({
17+ url: event .target .action ,
18+ type: ' DELETE' ,
19+ success (res ) {
20+ if (res .done ) {
21+ EventHub .fire (' showNotif' , {
22+ title: ' Success' ,
23+ body: ` "${ name} " was removed` ,
24+ type: ' success' ,
25+ duration: 1 ,
26+ icon: false
27+ })
2828
29- $ (` #${ event .target .dataset .id } ` ).remove ();
29+ $ (` #${ event .target .dataset .id } ` ).remove ()
3030
31- // for sidebar menu
32- if ($ (` li[data-id="${ event .target .dataset .id } "]` )) {
33- $ (` li[data-id="${ event .target .dataset .id } "]` ).remove ();
34- }
35-
36- that .itemsCount = -- that .itemsCount ;
31+ // for sidebar menu
32+ if ($ (` li[data-id="${ event .target .dataset .id } "]` )) {
33+ $ (` li[data-id="${ event .target .dataset .id } "]` ).remove ()
3734 }
35+
36+ that .itemsCount = -- that .itemsCount
3837 }
39- })
40- }
41- },
38+ }
39+ })
40+ }
4241 }
42+ }
4343 </script >
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ export default {
2323 })
2424 })
2525 },
26- updated () {
27- admin_sticky_sidebar ()
28- },
2926 methods: {
3027 getPages () {
3128 $ .get (this .getMenuPages , (res ) => {
@@ -81,7 +78,7 @@ export default {
8178 e .moved .element .created_at = null
8279 }
8380 },
84- classObj (item ){
81+ classObj (item ) {
8582 if (this .checkFrom (item)) {
8683 return ' is-warning'
8784 }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export default {
4444 methods: {
4545 deleteChild (item ) {
4646 $ .post (this .delChild , {
47- child_id: item .id ,
47+ child_id: item .id
4848 }, (res ) => {
4949 if (res .done ) {
5050 this .childs .splice (this .childs .indexOf (item), 1 )
@@ -79,7 +79,7 @@ export default {
7979 pushBackToList (item ) {
8080 return item .from == ' pages' ? this .pages .unshift (item) : this .allPages .unshift (item)
8181 },
82- classObj (item ){
82+ classObj (item ) {
8383 if (this .checkFrom (item)) {
8484 return ' is-warning'
8585 }
You can’t perform that action at this time.
0 commit comments