( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0006484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.33244110680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.33774258568include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.33774258568get_header( $name = ???, $args = ??? ).../archive.php:19
60.33774258784locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.33784258880load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.33824259424require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.33844266832wp_head( ).../header.php:18
100.33844266832do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.33844267048WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.33844267048WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.33864270464wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.33864270464do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.33864270680WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.33864270680WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.33884272568twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.33914274088wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.33914274088WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.33914274088WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.33914274088_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.33914274408wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.33924275160trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0006484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.33244110680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.33774258568include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.33774258568get_header( $name = ???, $args = ??? ).../archive.php:19
60.33774258784locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.33784258880load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.33824259424require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.33844266832wp_head( ).../header.php:18
100.33844266832do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.33844267048WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.33844267048WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.33864270464wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.33864270464do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.33864270680WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.33864270680WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.33884272568twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.36714276264wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.36714276264WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.36714276264WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.36724276264_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.36724276584wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.36724276808trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

圖片上傳在ios中click事件無效

addImage方法中的this.input.click()在ios中無法生效。
網上提供的幾種解決方法,供大家參考:

1、​將click 事件直接綁定到目標​元素(​​即.target)上;
2、將目標​元素換成a 或者button 等可點擊的​元素;
​3、將click 事件委託到​​​​​非document 或body 的​​父級元素上;
​4、給​目標元素加一條樣式規則cursor: pointer。

我最後採用了直接調用dom的原生方法觸發input的點擊事件

addImage = () => {
const event = document.createEvent(‘MouseEvents’);
event.initMouseEvent(‘click’,false,false);
this.input.dispatchEvent(event)
};