您使用customize_controls_enqueue_scripts
动作钩。然后像往常一样将脚本排队。像这样:
function wpse256911_customizer_enqueue() {
wp_enqueue_script( \'my-customizer\', get_stylesheet_directory_uri() . \'/js/my-customizer.js\', array( \'jquery\', \'customize-controls\' ) );
}
add_action( \'customize_controls_enqueue_scripts\', \'wpse256911_customizer_enqueue\' );