我一直在使用cordova和Android一段时间了,一切正常,
问题是我想添加IOS并运行项目,所以我可以检查准备工作,
问题是它构建良好(日志)但运行时我得到:
Running command: /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/run --emulator
Building project : /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/funcook.xcodeproj
Configuration : Debug
Platform : emulator
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator
SDKROOT = iphonesimulator9.1
SHARED_PRECOMPS_DIR = /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/sharedpch
VALID_ARCHS = i386
Build settings from configuration file '/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/build-debug.xcconfig':
CODE_SIGN_IDENTITY = iPhone Developer
ENABLE_BITCODE = NO
=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET funcook OF PROJECT funcook WITH CONFIGURATION Debug ===
Check dependencies
PhaseScriptExecution Copy\ …Run Code Online (Sandbox Code Playgroud) 有人知道为什么这个输入接受 .php 文件扩展名吗?
(至少在最新版本的chrome中是这样)
<input type="file" accept=".doc,.pdf,.txt,.rtl">Run Code Online (Sandbox Code Playgroud)
我在应用程序商店中使用Cordova发布了一个IOS应用程序.
现在,我做了几处更改,但似乎我无法更新苹果商店中的应用程序,因为(它使用相同的版本号提交):
如何更新xcode中的版本号,以便我不会收到此错误?
我搜索了整个(Cordova)项目中的版本号,但我没有找到结果,所以问题是:
我该如何更改此值?(来自cordova项目(平台/ ios)或xcode项目)
我在Xcode中设置了这种方式(显然改变了正确的"mybundle":
但该错误仍然引用了之前的(去年发布)版本
我有这个js类:
export class ScrollBehaviorComponent {
init() {
const body = document.querySelector('body')
let previousScroll = window.pageYOffset || 0
let scrollDirIsUp = false
window.addEventListener('scroll', function(e) {
const currentScroll = window.pageYOffset // never gets updated
scrollDirIsUp = currentScroll > 0 && previousScroll >= currentScroll // never gets updated
body.classList.toggle('body--scroll-up', scrollDirIsUp) // never gets updated
alert('scroll is up: ', window.pageYOffset) // never happens
})
console.log(window) // I see this log, o_0
}
}
export default ScrollBehaviorComponent
Run Code Online (Sandbox Code Playgroud)
我之前已经使用过,但是对于这个特定项目,事件不会被触发。
我像这样加载它:
import ScrollBehaviorComponent from 'Shared/scroll-behavior/scroll-behavior.component'
export const …Run Code Online (Sandbox Code Playgroud) 基本上
我有很少的div具有灵活的高度和固定的填充,所以很难让它们都具有相同的高度,
我这样想:
$(document).ready(function(){
$('.LevelCnt_2,.LevelCnt_2 .content,.LevelCnt_1,.LevelCnt_1 .content').outerHeight( $('header:eq(0)').outerHeight() );
console.log($('header:eq(0)').outerHeight(true));
});
Run Code Online (Sandbox Code Playgroud)
但问题是标题不是总是最高的,所以我需要
检查一个更高(考虑到有多个.content元素)
将outerHeight应用于所有人
但我找不到一个好的/美丽的方式(有一个解决方案,但我需要很多if和变量)来做到这一点
任何线索?
-编辑-
在等待的时候我想出了这个
$(document).ready(function(){
var height = 0;
$('.LevelCnt_2,.LevelCnt_2 .content,.LevelCnt_1,.LevelCnt_1 .content,header').each(function(){
if($(this).outerHeight() > height){
height = $(this).outerHeight();
}
});
$('.LevelCnt_2,.LevelCnt_2 .content,.LevelCnt_1,.LevelCnt_1 .content,header').each(function(){
$(this).outerHeight(height);
});
console.log('highest height is '+height); //it doesn't output the highest value
});
Run Code Online (Sandbox Code Playgroud)
但这些div中的大多数都是display:none问题所在?
我想取消任何链接并为每个链接添加额外的属性.以下是我如何实现这一目标.
function anularEnlaces(){
$('nav a').each(function(){
var href = $(this).attr('href');
var id = $(this).attr('id');
$(this).attr('href','javascript:void(0)');
$(this).attr('hrefnot',href);
$(this).attr('nivel','uno');
$(this).attr('seccion','dos');
});
}
Run Code Online (Sandbox Code Playgroud)
我的问题是,这是一种有效/推荐的添加自定义属性的方法吗?
我想<select></select>根据具有以下格式的Excel文件动态创建(或者可能是具有自动完成的文本框)输入文件:
Airport Code Airport Name Language Code
AAC Al Arish en
AAE Annaba Les Saline en
AAH Aachen Merzbruck en
AAL Aalborg en
AAN Al Ain en
AAQ Anapa en
AAR Aarhus Tirstrup en
AAU Asau en
Run Code Online (Sandbox Code Playgroud)
(还有更多)
我需要打开.xls文件并读取每一行,以便我可以将两个第一列作为锚点和值.
这是我发现的最相关的内容,链接被破坏如何使用JavaScript读取和写入文件
有没有一个适用于IE7的解决方案
actualizarTituloWeb('brand name - '+seccion.toLowerCase().replace(/(?:_| |\b)(\w)/g, function(str, p1) { return p1.toUpperCase()}));
Run Code Online (Sandbox Code Playgroud)
哪里
function actualizarTituloWeb(titulo){
$( 'title' ).html ( titulo );
}
Run Code Online (Sandbox Code Playgroud)
还试过:
function actualizarTituloWeb(titulo){
titulo = titulo[0].toUpperCase() + titulo.substring(1);
titulo = titulo.toLowerCase();
$( 'title' ).text ( titulo );
return false;
}
Run Code Online (Sandbox Code Playgroud)
和seccion有'reserva','ofertas'等值.
我不确定为什么不工作,但这实际上使整个脚本崩溃(可在此处进行测试:http://toniweb.us/gm2)在IE7中并且当前文档的标题既未更新,
知道我错过了什么吗?
-编辑-
刚刚意识到问题出在这一行!为什么?
titulo = titulo[0].toUpperCase() + titulo.substring(1);
Run Code Online (Sandbox Code Playgroud)
请注意:我们不能在这里使用CSS来实现这一点,因为它将用于document.title
我正在触发fancybox打开onclick像这样:
$('.telefonosOtrosPaises').fancybox({
'type' : 'iframe',
'href' : 'http://es.solmelia.com/nMenus/jsp/telefonosOtrosPaises.jsp',
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
/*'easingIn' : 'easeInOutBack',
'easingOut' : 'easeInOutBack', */
/*onComplete : function(){ $('#fancybox-content').css({'height':'380px','width':'570px','background':'white','padding':'20px'})}*/
onComplete : function(){ $('#fancybox-content').css({'width':'630px','background':'white','paddingTop':'15px'})}
});
Run Code Online (Sandbox Code Playgroud)
但是,当我需要它时,我怎样才能在我的js代码中打开它?
基本上我试图在项目悬停时具有不同的过渡时间,而不是当项目是鼠标离开时,
#bar{ position:fixed; bottom:-25px; } /*here you only get to see a piece of the bar */
#bar:hover{ transform: .2s linear; bottom:0; }
Run Code Online (Sandbox Code Playgroud)
等等
/*this only represents my made out status to cover what i need*/
#bar:mouseLeaved{ transform: 2s linear }
Run Code Online (Sandbox Code Playgroud)
这样,显示需要0.2秒,隐藏2秒
我可以这样做而不需要javascript吗?