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
ef2d4838
Commit
ef2d4838
authored
Jan 12, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix upload image function
parent
831cfb88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
categories.vue
pages/home/categories.vue
+12
-9
No files found.
pages/home/categories.vue
View file @
ef2d4838
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<!-- create modal -->
<!-- create modal -->
<b-modal
id=
"modal-create"
title=
"Create Category"
class=
"modal fade"
>
<b-modal
id=
"modal-create"
title=
"Create Category"
class=
"modal fade"
>
<p
class=
"my-4"
>
<p
class=
"my-4"
>
<form
@
submit.prevent=
""
>
<form
@
submit.prevent=
"
createCategory
"
>
<label>
Name :
</label>
<label>
Name :
</label>
<input
<input
type=
"text"
type=
"text"
...
@@ -302,23 +302,26 @@ export default {
...
@@ -302,23 +302,26 @@ export default {
ordering
:
this
.
ordering
,
ordering
:
this
.
ordering
,
parent_id
:
this
.
parent_id
,
parent_id
:
this
.
parent_id
,
image
:
this
.
image
,
image
:
this
.
image
,
},
{
headers
:
{
"
Content-Type
"
:
"
multipart/form-data
"
,
"
Authorization
"
:
"
bearer
"
+
this
.
$auth
.
$storage
.
getUniversal
(
"
token
"
)
}
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
// $bvModal.hide('modal-login');
this
.
$bvModal
.
hide
(
'
modal-create
'
)
self
.
$toast
.
success
(
'
Category created successfully!
'
,{
self
.
$toast
.
success
(
'
Category created successfully!
'
,
{
duration
:
3000
duration
:
3000
});
})
console
.
log
(
response
);
})
})
.
catch
(
errors
=>
{
.
catch
(
errors
=>
{
this
.
$bvModal
.
hide
(
'
modal-create
'
)
this
.
$bvModal
.
hide
(
'
modal-create
'
)
console
.
log
(
errors
.
response
.
data
.
message
);
console
.
log
(
errors
.
response
.
data
.
message
);
this
.
message
=
errors
.
response
.
data
.
message
;
this
.
message
=
errors
.
response
.
data
.
message
;
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,{
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,{
duration
:
3000
duration
:
3000
});
});
});
});
},
},
fileSelected
(
event
){
fileSelected
(
event
){
console
.
log
(
event
)
console
.
log
(
event
)
...
...
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