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
Hide 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 {
// https://go.nuxtjs.dev/axios
'
@nuxtjs/axios
'
,
'
@nuxtjs/auth-next
'
,
'
@nuxtjs/toast
'
,
'
@pinia/nuxt
'
'
@nuxtjs/toast
'
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
...
...
pages/categories/index.vue
View file @
4e23304f
...
...
@@ -612,7 +612,7 @@ export default {
}
})
.then((response) => {
self.$toast.success('
User
updated successfully!', {
self.$toast.success('
Category
updated successfully!', {
duration: 3000
})
this.editedItem = response.data.data
...
...
pages/posts/index.vue
View file @
4e23304f
...
...
@@ -106,12 +106,11 @@
</v-col>
<v-col
cols=
"12"
text-align=
" left"
>
<v-img
v-for=
"(imageEdit, index) in eImages"
:key=
"index"
v-if=
"typeof eImages === 'string'"
contain
height=
"100px"
width=
"150px"
:src=
"
imageEdit
"
:src=
"
eImages
"
/>
</v-col>
</v-row>
...
...
@@ -630,7 +629,7 @@ export default {
})
.catch((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
})
})
...
...
pages/products/index.vue
View file @
4e23304f
...
...
@@ -761,6 +761,7 @@ export default {
this
.
eImages
=
item
.
images
this
.
editedIndex
=
this
.
products
.
indexOf
(
item
)
console
.
log
(
item
.
variants
)
console
.
log
(
typeof
this
.
eImages
)
this
.
dialog3
=
true
},
updateProduct
(
ID
)
{
...
...
@@ -784,26 +785,28 @@ export default {
}
}
const
currentPostIndex
=
this
.
editedIndex
try
{
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
)
.then((response) => {
self.$toast.success('Product updated successfully!', {
duration: 3000
})
console.log(response)
this.editedItem = response.data.data
Object.assign(this.products[currentPostIndex], this.editedItem)
}
)
.then((response) => {
self.$toast.success('Product updated successfully!', {
duration: 3000
})
} catch (error) {
console.log(error)
}
console.log(response)
this.editedItem = response.data.data
Object.assign(this.products[currentPostIndex], this.editedItem)
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying update!', {
duration: 3000
})
})
},
addMore () {
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