-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
113 additions
and
153 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import img1 from '@/assets/座位图标_可选择座位.png' | ||
import img2 from '@/assets/座位锁定.png' | ||
import img3 from '@/assets/座位图标_已售座位.png' | ||
import img4 from '@/assets/座位图标_已选择座位.png' | ||
|
||
export default { | ||
functional: true, | ||
render(h, { props }) { | ||
const getSeatIcon = (item) => | ||
item.isBroken ? img2 : | ||
item.isOccupied ? img3 : | ||
item.isChoose ? img4 : | ||
img1 | ||
|
||
const { item, index, seatInterval, size } = props | ||
|
||
return h( | ||
'img', | ||
{ | ||
style: { | ||
position: 'absolute', | ||
left: `${size * (+item.columnNum + seatInterval / 2 - 1)}px`, | ||
top: `${size * (+item.rowNum - 1)}px`, | ||
width: size + 'px', | ||
height: size + 'px', | ||
transition: 'all 0.5s cubic-bezier(1, 0, 0, 1)', | ||
padding: '1px', | ||
'touch-action': 'none' | ||
}, | ||
attrs: { | ||
src: getSeatIcon(item), | ||
'data-index': index | ||
} | ||
} | ||
) | ||
} | ||
} |
Oops, something went wrong.