Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Nguyễn Hải Sơn
quasar-web-base
Commits
ebd76982
Commit
ebd76982
authored
May 10, 2021
by
hong-IT-99
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
49a74b25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
21 deletions
+43
-21
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+24
-10
index.vue
...ponents/artist-information/personal-information/index.vue
+19
-11
No files found.
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
ebd76982
import
{
defineComponent
,
ref
}
from
'vue'
;
import
{
defineComponent
,
ref
,
Ref
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
...
...
@@ -37,7 +37,7 @@ export default defineComponent({
UploadImage
,
},
setup
(
_
,
context
)
{
const
BirthdayDatePicker
=
ref
(
moment
().
format
(
'YYYY/MM/DD'
))
const
BirthdayDatePicker
=
ref
(
moment
().
format
(
'YYYY/MM/DD'
))
;
const
selectedFile
=
(
value
:
FileList
)
=>
{
// console.log(value);
// console.log(URL.createObjectURL(value[0]));
...
...
@@ -146,12 +146,23 @@ export default defineComponent({
console
.
log
(
'object'
);
context
.
emit
(
'deleteAvatar'
);
};
const
selectDatePicker
=
(
value
:
string
)
=>
{
context
.
emit
(
'UpdateBirtday'
,
fomatDatePicker
(
value
))
}
const
fomatDatePicker
=
(
value
:
string
)
=>
{
return
moment
(
value
).
format
(
'DD/MM/YYYY'
)
}
const
selectDatePicker
=
(
value
:
string
)
=>
{
context
.
emit
(
'UpdateBirtday'
,
fomatDatePicker
(
value
));
};
const
fomatDatePicker
=
(
value
:
string
)
=>
{
return
moment
(
value
).
format
(
'DD/MM/YYYY'
);
};
const
openDialog
:
Ref
<
boolean
>
=
ref
(
false
);
const
onOKClick
=
()
=>
{
// console.log(BirthdayDatePicker.value);
selectDatePicker
(
BirthdayDatePicker
.
value
);
openDialog
.
value
=
false
;
};
// const onOKClick = () => {};
const
onCancelClick
=
()
=>
{
openDialog
.
value
=
false
;
};
return
{
artistCodeRules
,
fullNameRules
,
...
...
@@ -172,7 +183,10 @@ export default defineComponent({
deleteAvatar
,
BirthdayDatePicker
,
selectDatePicker
,
fomatDatePicker
fomatDatePicker
,
openDialog
,
onOKClick
,
onCancelClick
,
};
},
emits
:
[
...
...
@@ -198,6 +212,6 @@ export default defineComponent({
'addNewArtist'
,
'SetAvatar'
,
'deleteAvatar'
,
'UpdateBirtday'
'UpdateBirtday'
,
],
});
src/components/artist-information/personal-information/index.vue
View file @
ebd76982
...
...
@@ -94,21 +94,29 @@
class=
"q-my-sm"
readonly
outlined
@
click=
"openDialog = true"
dense
hide-bottom-space
>
<template
v-slot:default
>
<q-menu
transition-show=
"flip-right"
transition-hide=
"flip-left"
auto-close
>
<q-date
v-model=
"BirthdayDatePicker"
first-day-of-week=
"1"
@
update:model-value=
"selectDatePicker($event)"
></q-date>
</q-menu>
<q-dialog
ref=
"dialogRef"
v-model=
"openDialog"
>
<q-card
class=
"q-dialog-plugin"
>
<q-date
style=
"width: 100%"
v-model=
"BirthdayDatePicker"
first-day-of-week=
"1"
></q-date>
<q-card-actions
align=
"right"
>
<q-btn
color=
"primary"
label=
"Cancel"
@
click=
"onCancelClick"
/>
<q-btn
color=
"primary"
label=
"OK"
@
click=
"onOKClick"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
</q-input>
</div>
...
...
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