| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?import javafx.geometry.*?>
- <?import javafx.scene.control.*?>
- <?import javafx.scene.layout.*?>
- <VBox fx:id="browsePane" xmlns="http://javafx.com/javafx/23" xmlns:fx="http://javafx.com/fxml/1">
- <HBox spacing="10" styleClass="well" style="-fx-background-radius: 0; -fx-border: none; -fx-effect: none;">
- <padding><Insets top="12" right="16" bottom="12" left="16"/></padding>
- <TextField fx:id="searchField" promptText="搜索书名、作者..." styleClass="form-control" HBox.hgrow="ALWAYS"/>
- <ComboBox fx:id="categoryCombo" prefWidth="140" styleClass="form-control"/>
- <Button text="搜索" onAction="#handleSearch" styleClass="btn,btn-primary" prefWidth="90"/>
- </HBox>
- <SplitPane dividerPositions="0.68" VBox.vgrow="ALWAYS">
- <ScrollPane fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
- <TilePane fx:id="bookCardGrid" prefTileWidth="210" prefTileHeight="240" hgap="16" vgap="16" styleClass="well" style="-fx-background-radius: 0; -fx-border: none; -fx-effect: none;">
- <padding><Insets top="16" right="16" bottom="16" left="16"/></padding>
- </TilePane>
- </ScrollPane>
- <VBox fx:id="detailPanel" spacing="16" styleClass="detail-panel" visible="false" managed="false">
- <padding><Insets top="20" right="16" bottom="20" left="16"/></padding>
- <HBox alignment="CENTER_LEFT" spacing="8">
- <Label fx:id="detailTitle" text="选择一本书" styleClass="detail-title" HBox.hgrow="ALWAYS"/>
- <Button text="✕" onAction="#handleCloseDetail" styleClass="btn,btn-secondary" style="-fx-padding: 4px 10px; -fx-font-size: 14px;"/>
- </HBox>
- <HBox spacing="8">
- <Label fx:id="detailCategory" styleClass="label,label-primary" text="-"/>
- <Label fx:id="detailStock" styleClass="label" text="-"/>
- </HBox>
- <Label text="作者" styleClass="detail-label"/>
- <Label fx:id="detailAuthor" text="-"/>
- <Separator/>
- <HBox spacing="12" alignment="CENTER_LEFT">
- <VBox>
- <Label text="原价" styleClass="detail-label"/>
- <Label fx:id="detailOriginalPrice" styleClass="book-original-price" text="-"/>
- </VBox>
- <VBox>
- <Label text="售价" styleClass="detail-label"/>
- <Label fx:id="detailPrice" styleClass="detail-price" text="-"/>
- </VBox>
- </HBox>
- <Separator/>
- <HBox spacing="8" alignment="CENTER_LEFT">
- <Label text="数量" styleClass="detail-label"/>
- <TextField fx:id="quantityField" text="1" styleClass="form-control" maxWidth="80"/>
- </HBox>
- <Button text="立即购买" onAction="#handlePurchase" maxWidth="Infinity" styleClass="btn,btn-success" prefHeight="42"/>
- </VBox>
- </SplitPane>
- <HBox spacing="10" alignment="CENTER" styleClass="well" style="-fx-background-radius: 0; -fx-border: none; -fx-effect: none;">
- <padding><Insets top="8" right="16" bottom="8" left="16"/></padding>
- <Button fx:id="prevPageBtn" text="‹ 上一页" onAction="#handlePrevPage" styleClass="btn,btn-secondary" disable="true"/>
- <Label fx:id="pageInfoLabel" text="第 1 页 / 共 1 页" style="-fx-font-size: 13px; -fx-padding: 0 16px;"/>
- <Button fx:id="nextPageBtn" text="下一页 ›" onAction="#handleNextPage" styleClass="btn,btn-secondary" disable="true"/>
- <Region HBox.hgrow="ALWAYS"/>
- <Label text="每页:" style="-fx-font-size: 13px;"/>
- <ComboBox fx:id="pageSizeCombo" prefWidth="70"/>
- </HBox>
- </VBox>
|