Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
85cca73e
Commit
85cca73e
authored
Nov 10, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8ab25ad4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
161 additions
and
0 deletions
+161
-0
ListCar.vue
src/components/hotel/ListCar.vue
+90
-0
Table-Operation.vue
src/components/hotel/Table-Operation.vue
+71
-0
No files found.
src/components/hotel/ListCar.vue
0 → 100644
View file @
85cca73e
<
template
>
<q-card
class=
"bg-white q-pb-md"
style=
"width: 500px;"
>
<div
class=
"drawerTop row justify-between items-center q-py-md q-px-lg"
>
<q-btn
rounded
class=
"q-mr-md"
color=
"red"
icon=
"shopping_cart"
>
<q-badge
class=
"text-red"
color=
"white"
rounded
floating
>
4
</q-badge>
</q-btn>
<q-icon
class=
"cursor-pointer"
name=
"close"
size=
"18px"
color=
"grey-5"
@
click=
"$emit('close')"
></q-icon>
</div>
<q-separator
color=
"grey-3"
class=
"q-my-sm"
/>
<div
style=
"height: 800px;"
>
<q-scroll-area
:thumb-style=
"scrollStyle.thumbStyle"
:bar-style=
"scrollStyle.barStyle"
class=
"full-height"
>
<q-list>
<q-item
class=
"rounded-borders q-py-sm"
>
<q-item-section>
<q-card
bordered
class=
"q-px-md q-py-md"
>
<div
v-for=
"(item,index) in 3"
>
<div
class=
"row no-wrap items-center justify-between"
>
<div
class=
"text-dark"
style=
"width: 50px;"
>
<img
src=
"../../assets/images/lg-logo.png"
style=
"width: 50px;"
/>
</div>
<div
class=
"row no-wrap justify-between items-center q-pl-md"
style=
"flex-grow: 1;"
>
<div
class=
"q-px-md"
>
<div
class=
"q-pb-xs ListCar-title f12"
>
标题标题标题标题标题标题标题标题标题标题标题标题
</div>
<div
class=
"text-red"
>
<span
class=
"fz10"
>
¥
</span>
<span
class=
"fz16 q-pl-sm"
>
522
</span>
</div>
</div>
<div
class=
"row items-center"
style=
"flex-shrink: 0;"
>
<div
class=
"q-pr-sm fz12"
>
标间
</div>
<div
class=
"text-red"
>
<span
class=
"fz16"
>
1
</span>
<span>
{{
$t
(
'hotel.car.between'
)
}}
</span>
</div>
</div>
</div>
</div>
<q-separator
v-if=
"index!=2"
color=
"grey-3"
class=
"q-my-sm"
/>
</div>
</q-card>
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</div>
</q-card>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
provide
,
onMounted
,
inject
}
from
'vue'
import
{
SitLang
}
from
'../../@types'
;
import
{
useI18n
}
from
'vue-i18n'
import
{
dispatchAction
}
from
'../../store/utils'
;
import
{
UserActionsType
}
from
'../../store/modules/user/actions'
;
import
useScrollModule
from
'../../module/scrollbar/scrollModule'
import
message
from
'../../utils/message'
export
default
defineComponent
({
props
:
{
// rightCarOpen:{
// type: Boolean,
// require: true
// }
},
setup
(
props
)
{
const
{
locale
,
t
}
=
useI18n
();
const
data
=
reactive
({
scrollStyle
:
{}
as
any
,
addNum
:
1
,
})
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
const
methods
=
{
}
onMounted
(()
=>
{
})
return
{...
toRefs
(
data
),...
methods
}
}
})
</
script
>
<
style
>
.ListCar-title
{
white-space
:
wrap
;
}
</
style
>
\ No newline at end of file
src/components/hotel/Table-Operation.vue
0 → 100644
View file @
85cca73e
<
template
>
<q-card
flat
class=
"q-pa-md bg-grey-1"
style=
"shadow: 0px 0px 50px 0px rgba(82, 63, 105, 0.15)"
:style=
"
{'width':$q.platform.is.desktop?'260px':'260px'}">
<div
class=
"row no-wrap items-center"
>
<div>
<q-btn
rounded
dense
color=
"white"
text-color=
"black"
size=
"xs"
icon=
"remove"
@
click=
'addGoods(0)'
/>
</div>
<div
class=
"q-px-sm"
>
<q-input
style=
"width: 100%;"
v-model=
"addNum"
class=
"col q-mr-md"
mask=
"#.##"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.shopping.labelNum')"
/>
</div>
<div>
<q-btn
rounded
dense
color=
"primary"
size=
"xs"
icon=
"add"
@
click=
'addGoods(1)'
/>
</div>
</div>
<div
class=
"row justify-end q-pt-md"
>
<div
class=
"q-pl-md"
>
<q-btn
round
class=
"border-radius"
color=
"red"
size=
"sm"
icon=
"shopping_cart"
:title=
"$t('hotel.car.addShopping')"
@
click=
"join"
/>
</div>
</div>
</q-card>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
provide
,
onMounted
,
inject
}
from
'vue'
import
{
SitLang
}
from
'../../@types'
;
import
{
useI18n
}
from
'vue-i18n'
import
{
dispatchAction
}
from
'../../store/utils'
;
import
{
UserActionsType
}
from
'../../store/modules/user/actions'
;
import
message
from
'../../utils/message'
export
default
defineComponent
({
props
:
{
hotelInfor
:{
type
:
Object
,
require
:
true
}
},
setup
(
props
)
{
const
{
locale
,
t
}
=
useI18n
();
const
data
=
reactive
({
addNum
:
1
,
hotelInfor
:
props
.
hotelInfor
,
})
console
.
log
(
props
.
hotelInfor
,
'===='
)
data
.
addNum
=
inject
(
'addNum'
)
const
methods
=
{
addGoods
(
type
:
any
){
if
(
type
==
1
&&
data
.
addNum
<
data
.
hotelInfor
.
RemainingInventory
){
data
.
addNum
++
}
else
if
(
type
==
0
&&
data
.
addNum
>
1
){
data
.
addNum
--
}
},
join
(){
if
(
data
.
addNum
<
1
){
message
.
errorMsg
(
`
${
t
(
'hotel.shopping.small'
)}
1
${
t
(
'hotel.shopping.big'
)}${
data
.
hotelInfor
.
RemainingInventory
}
`
)
}
}
}
onMounted
(()
=>
{
})
return
{...
toRefs
(
data
),...
methods
}
}
})
</
script
>
<
style
>
</
style
>
\ No newline at end of file
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