Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
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
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
d1b0d336
Commit
d1b0d336
authored
Feb 17, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/update' into 'dev'
Hotfix/update See merge request
!21
parents
b7aa4a55
2a08846f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
29 deletions
+29
-29
nuxt.config.js
nuxt.config.js
+1
-2
index.vue
pages/categories/index.vue
+1
-1
index.vue
pages/posts/index.vue
+6
-8
index.vue
pages/products/index.vue
+21
-18
No files found.
nuxt.config.js
View file @
d1b0d336
...
@@ -48,8 +48,7 @@ export default {
...
@@ -48,8 +48,7 @@ export default {
// https://go.nuxtjs.dev/axios
// https://go.nuxtjs.dev/axios
'
@nuxtjs/axios
'
,
'
@nuxtjs/axios
'
,
'
@nuxtjs/auth-next
'
,
'
@nuxtjs/auth-next
'
,
'
@nuxtjs/toast
'
,
'
@nuxtjs/toast
'
'
@pinia/nuxt
'
],
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
// Axios module configuration: https://go.nuxtjs.dev/config-axios
...
...
pages/categories/index.vue
View file @
d1b0d336
...
@@ -612,7 +612,7 @@ export default {
...
@@ -612,7 +612,7 @@ export default {
}
}
})
})
.then((response) => {
.then((response) => {
self.$toast.success('
User
updated successfully!', {
self.$toast.success('
Category
updated successfully!', {
duration: 3000
duration: 3000
})
})
this.editedItem = response.data.data
this.editedItem = response.data.data
...
...
pages/posts/index.vue
View file @
d1b0d336
...
@@ -106,12 +106,11 @@
...
@@ -106,12 +106,11 @@
</v-col>
</v-col>
<v-col
cols=
"12"
text-align=
" left"
>
<v-col
cols=
"12"
text-align=
" left"
>
<v-img
<v-img
v-for=
"(imageEdit, index) in eImages"
v-if=
"typeof eImages === 'string'"
:key=
"index"
contain
contain
height=
"100px"
height=
"100px"
width=
"150px"
width=
"150px"
:src=
"
imageEdit
"
:src=
"
eImages
"
/>
/>
</v-col>
</v-col>
</v-row>
</v-row>
...
@@ -213,7 +212,6 @@
...
@@ -213,7 +212,6 @@
v-model=
"category_id"
v-model=
"category_id"
:items=
"categories"
:items=
"categories"
:search=
"search"
:search=
"search"
:filter=
"filter"
item-text=
"name"
item-text=
"name"
item-value=
"id"
item-value=
"id"
label=
"Category"
label=
"Category"
...
@@ -630,7 +628,7 @@ export default {
...
@@ -630,7 +628,7 @@ export default {
})
})
.catch((error) => {
.catch((error) => {
console.log(error)
console.log(error)
self.$toast.error('something went wrong while trying
cre
ate!', {
self.$toast.error('something went wrong while trying
upd
ate!', {
duration: 3000
duration: 3000
})
})
})
})
...
@@ -668,7 +666,7 @@ export default {
...
@@ -668,7 +666,7 @@ export default {
padding-left
:
90px
!important
;
padding-left
:
90px
!important
;
}
}
img
{
img
{
width
:
100%
;
width
:
100px
;
height
:
100%
;
height
:
150px
;
}
}
</
style
>
</
style
>
pages/products/index.vue
View file @
d1b0d336
...
@@ -761,6 +761,7 @@ export default {
...
@@ -761,6 +761,7 @@ export default {
this
.
eImages
=
item
.
images
this
.
eImages
=
item
.
images
this
.
editedIndex
=
this
.
products
.
indexOf
(
item
)
this
.
editedIndex
=
this
.
products
.
indexOf
(
item
)
console
.
log
(
item
.
variants
)
console
.
log
(
item
.
variants
)
console
.
log
(
typeof
this
.
eImages
)
this
.
dialog3
=
true
this
.
dialog3
=
true
},
},
updateProduct
(
ID
)
{
updateProduct
(
ID
)
{
...
@@ -784,7 +785,6 @@ export default {
...
@@ -784,7 +785,6 @@ export default {
}
}
}
}
const
currentPostIndex
=
this
.
editedIndex
const
currentPostIndex
=
this
.
editedIndex
try
{
this
.
$axios
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
.
post
(
`/products/update/
${
this
?.
eId
}
`,
fd, {
fd, {
...
@@ -801,9 +801,12 @@ export default {
...
@@ -801,9 +801,12 @@ export default {
this.editedItem = response.data.data
this.editedItem = response.data.data
Object.assign(this.products[currentPostIndex], this.editedItem)
Object.assign(this.products[currentPostIndex], this.editedItem)
})
})
} catch (error)
{
.catch((error) =>
{
console.log(error)
console.log(error)
}
self.$toast.error('something went wrong while trying update!', {
duration: 3000
})
})
},
},
addMore () {
addMore () {
this.variants.push({
this.variants.push({
...
...
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