reactjs拨打电话
import React from 'react';
function PhoneCall({ phoneNumber }) {
const handleCall = () => {
window.location.href = `tel:${phoneNumber}`;
};
return (
<button onClick={handleCall}>
Call {phoneNumber}
</button>
);
}
export default PhoneCall;