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
4e23304f
Commit
4e23304f
authored
Feb 16, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix string image
parent
b7aa4a55
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
nuxt.config.js
nuxt.config.js
+1
-2
index.vue
pages/categories/index.vue
+1
-1
index.vue
pages/posts/index.vue
+3
-4
index.vue
pages/products/index.vue
+21
-18
No files found.
nuxt.config.js
View file @
4e23304f
...
@@ -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 @
4e23304f
...
@@ -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 @
4e23304f
...
@@ -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>
...
@@ -630,7 +629,7 @@ export default {
...
@@ -630,7 +629,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
})
})
})
})
...
...
pages/products/index.vue
View file @
4e23304f
...
@@ -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