A method for calculating directional pattern of a leaky-wave antenna, the method is performed by a device for calculating directional pattern of a leaky-wave antenna, the device comprises a slot transmission matrix obtaining module , an antenna transmission matrix obtaining module and an antenna directional pattern generating module that are sequentially connected, the leaky-wave antenna comprising a plurality of slot units, the method comprising the following steps: S1. obtaining, by the slot transmission matrix obtaining module, a total scattering parameter of a single-slot waveguide corresponding to a single slot unit and a transmission matrix of a seamless waveguide through measurement, and obtaining an equivalent transmission matrix of the single slot unit according to the total scattering parameter of the single-slot waveguide and the transmission matrix of the seamless waveguide (S101); S2. obtaining, by the antenna transmission matrix obtaining module, an arrangement and combination mode of the slot units and a beam pointing control code representing on or off state of each slot unit, and simulating a transmission matrix Ta of the leaky-wave antenna in the form of a transmission matrix cascading mode according to the arrangement and combination mode and the beam pointing control code; and S3. obtaining an equivalent input-to-output ratio of a single slot unit according to the transmission matrix Ta of the leaky-wave antenna; obtaining the directional pattern of the single-slot waveguide excited at the left end and the directional pattern of the single-slot waveguide excited at the right end; and obtaining the composite directional pattern according to the directional pattern of the single-slot waveguide excited at the left end, the directional pattern of the single-slot waveguide excited at the right end, and the equivalent input-to-output ratio of the single slot unit; evaluating, according to the composite directional pattern of the leaky-wave antenna, electrical performance indicators of a leaky-wave antenna, wherein the electrical performance indicators comprise a beam pointing angle, main lobe 3dB beam width, a first null width, a side lobe level, a front-to-rear ratio S1. obtaining, by the slot transmission matrix obtaining module, a total scattering parameter of a single-slot waveguide corresponding to a single slot unit and a transmission matrix of a seamless waveguide through measurement, and obtaining an equivalent transmission matrix of the single slot unit according to the total scattering parameter of the single-slot waveguide and the transmission matrix of the seamless waveguide (S101); S2. obtaining, by the antenna transmission matrix obtaining module, an arrangement and combination mode of the slot units and a beam pointing control code representing on or off state of each slot unit, and simulating a transmission matrix Ta of the leaky-wave antenna in the form of a transmission matrix cascading mode according to the arrangement and combination mode and the beam pointing control code; and S3. obtaining an equivalent input-to-output ratio of a single slot unit according to the transmission matrix Ta of the leaky-wave antenna; obtaining the directional pattern of the single-slot waveguide excited at the left end and the directional pattern of the single-slot waveguide excited at the right end; and obtaining the composite directional pattern according to the directional pattern of the single-slot waveguide excited at the left end, the directional pattern of the single-slot waveguide excited at the right end, and the equivalent input-to-output ratio of the single slot unit; evaluating, according to the composite directional pattern of the leaky-wave antenna, electrical performance indicators of a leaky-wave antenna, wherein the electrical performance indicators comprise a beam pointing angle, main lobe 3dB beam width, a first null width, a side lobe level, a front-to-rear ratio <EOS>