( ! ) 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.0007484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.37294109136require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.37884138128include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.37884138128get_header( $name = ???, $args = ??? ).../single.php:10
60.37884138344locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.37884138440load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.37914138984require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.37934146392wp_head( ).../header.php:18
100.37934146392do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.37934146608WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.37934146608WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.37954268808wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.37954268808do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.37954269024WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.37954269024WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.37964270912twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.37984272432wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.37984272432WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.37984272432WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.37984272432_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.37984272752wp_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.37984273504trigger_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.0007484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.37294109136require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.37884138128include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.37884138128get_header( $name = ???, $args = ??? ).../single.php:10
60.37884138344locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.37884138440load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.37914138984require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.37934146392wp_head( ).../header.php:18
100.37934146392do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.37934146608WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.37934146608WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.37954268808wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.37954268808do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.37954269024WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.37954269024WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.37964270912twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.40804274608wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.40804274608WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.40804274608WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.40804274608_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.40804274928wp_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.40814275152trigger_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)
};

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.