Реакция несоответствия родной версии

У Криса отличный ответ. В качестве альтернативы вы можете сделать это, используя только javascript. Поместите следующий javascript на страницы, где вы хотите различные варианты времени.

DateTimeShortcuts.overrideTimeOptions = function () {
    // Find the first time element
    timeElement = django.jQuery("ul.timelist li").eq(0).clone();
    originalHref = timeElement.find('a').attr('href');

    // remove all existing time elements
    django.jQuery("ul.timelist li").remove();

    // add new time elements representing those you want
    var i=0;
    for (i=0;i<=23;i++) {
        // use a regular expression to update the link
        newHref = originalHref.replace(/Date\([^\)]*\)/g, "Date(1970,1,1," + i + ",0,0,0)");
        // update the text for the element
        timeElement.find('a').attr('href', newHref).text(i+"h");
        // Add the new element into the document
        django.jQuery("ul.timelist").append(timeElement.clone());
    }
}

addEvent(window, 'load', DateTimeShortcuts.overrideTimeOptions);
141
задан Val 16 May 2018 в 02:56
поделиться

1 ответ

Я обновляю версию реагировать-собственного-компонента: 0.57.4 к 0.59.8 и я получающий следующее сообщение "Несоответствие версии Реагировать-собственного-компонента"

Это решение работает на меня:

1.- In the folder of the project, update all the code react-native in the Android Studio:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

2.- Go to Android Studio and FILE->>INVALIDATE CACHES/RESTART
3.- In Android Studio, BUILD->>CLEAN PROJECT
4.- In Android Studio, BUILD->>REBUILD PROJECT
5.- Delete App in simulator or Devices
6.- Run...

я надеюсь помочь Вам!

0
ответ дан 23 November 2019 в 21:07
поделиться
Другие вопросы по тегам:

Похожие вопросы: