Inclusion Criteria:  Age> 18 years old, female KPS≥70 HER2-positive breast cancer is confirmed by the pathology laboratory with an immunohistochemical (IHC) score of 3+ and/or 2+ and a positive in situ hybridization (ISH) test (ISH amplification rate ≥ 2.0) Brain metastasis confirmed by MRI, in line with the indications for whole brain radiotherapy At least one measurable brain lesion exists according to the RECIST 1.1 standard Unlimited number of previous chemotherapy lines Have not used capecitabine in the past, or progressed 6 months after capecitabine stopped, or progressed after capecitabine as adjuvant therapy stopped for one year The expected survival period is more than 12 weeks  Patients must have adequate organ function, criteria as follows.  Blood routine examination：Absolute Neutrophil Count (ANC)≥1.5×109/L；PLT ≥100×109/L； Hb ≥90g/L Blood chemistry test：TBIL ≤1.5 times the upper limit of normal (ULN); ALT and AST≤3 times ULN; For patients with liver metastases, ALT and AST≤5×ULN; BUN and Cr≤1×ULN and creatinine clearance ≥50mL/min (CockcroftGault formula); Ultrasonic cardiogram: LVEF≥50% 12-lead ECG: The QT interval (QTcF) corrected by Fridericia's method is < 470 ms Patients with known hormone receptor status Patients need to voluntarily join this study after they fully understand and sign the informed consent form. Patients need to have good compliance and be willing to cooperate with follow-up.  Exclusion Criteria:  Patients with brain metastases with extensive meningeal metastasis Brain metastases within 5 mm of the hippocampus There are many factors that affect the administration and absorption of drugs, for example: inability to swallow, chronic diarrhea and intestinal obstruction Those who have received chemotherapy, surgical treatment (excluding local puncture) or molecular targeted therapy within 4 weeks before enrollment; those who have received anti-tumor endocrine therapy after the screening period Participated in other drug clinical trials within 4 weeks before enrollment Have used or are currently using HER2 tyrosine kinase inhibitors (lapatinib, niratinib, pyrotinib, etc.) Suffered from other malignant tumors in the past 5 years, excluding cured cervical carcinoma in situ, skin basal cell carcinoma or skin squamous cell carcinoma Receive any other anti-tumor therapy at the same time Those who are known to have a history of allergies to the drug; have a history of immunodeficiency, including positive HIV tests, HCV, active hepatitis B, or other acquired or congenital immunodeficiency diseases, or organ transplants history Have ever suffered from any heart disease, including: (1) arrhythmia requiring medication or clinical significance; (2) myocardial infarction; (3) heart failure; (4) anyone judged by the researcher as unsuitable for participation becase of other heart diseases in this trial, etc. Female patients during pregnancy and lactation, female patients with fertility and a positive baseline pregnancy test, or female patients of childbearing age who are unwilling to take effective contraceptive measures during the entire trial period According to the judgment of the investigator, there are accompanying diseases that seriously endanger the safety of the patient or affect the completion of the study (including but not limited to severe hypertension that cannot be controlled by drugs, severe diabetes, active infection, etc.) The patient has not recovered from the toxicity of the previous treatment to grade 0-1 (except for hair loss) Have a clear history of neurological or psychiatric disorders, including epilepsy or dementia Concomitant use of CYP3A4 inhibitors or inducers or drugs that prolong the QT interval Any other circumstances that are not suitable for inclusion in this study (investigator assessment)