我有一个项目,我想使用这种类型的登录:
我已经正确设置了一个模态,我可以毫无问题地解雇它,但我的问题是它需要整个页面,而我只是希望它像图片一样.
我不知道如何在css文件中选择所有页面,已经尝试过*但它对html文件中的内容搞得太多了.
先感谢您 !
编辑:
打开模态的页面上的代码:
showLogin() {
let modal = this.modalCtrl.create(LoginPage);
// this.navCtrl.push(modal);
modal.present();
}
Run Code Online (Sandbox Code Playgroud)
模态代码:HTML:
<ion-navbar class="modal-wrapper" *navbar>
<ion-title>Sample Modal</ion-title>
</ion-navbar>
<ion-content padding class="sample-modal-page">
<p>my sample modal page<p>
<ion-buttons start>
<button (click)="dismiss()">
Cancel
</button>
</ion-buttons>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
CSS:
page-login {
.modal-wrapper {
padding: 30px;
background: rgba(0,0,0,0.5);
}
}
Run Code Online (Sandbox Code Playgroud)
TS:
import { Component } from '@angular/core';
import { NavController, NavParams, ViewController } from 'ionic-angular';
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
constructor(public navCtrl: NavController, public navParams: …Run Code Online (Sandbox Code Playgroud) 我想在子组件上使用watch作为道具,但是它不起作用。
这是我的代码:
props: {
searchStore: {
type: Object
}
},
watch: {
searchStore(newValue) {
alert('yolo')
console.log(newValue)
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,它不起作用
我看了这篇文章,尝试了所有方法,但没有任何效果:VueJs 2.0-如何收听“ props”更改
我用Vue Devtools检查了我的道具,并且它正在改变。
在此先感谢社区!
我只需要没有地图的 mapbox 地理编码自动完成(将带有 lat/lng 的结果放在另一个请求中)
我设法在没有地图的情况下完全单独使用它:
<template>
<div id='geocoder' class='geocoder'></div>
</template>
<script>
import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder'
require('../../node_modules/@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css')
mapboxgl.accessToken = '<your access token here>';
var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken
placeholder: 'Rechercher'
});
document.getElementById('geocoder').appendChild(geocoder.onAdd());
</script>
Run Code Online (Sandbox Code Playgroud)
但是现在我想检索数据(特别是 lat/lng 属性,以便将其保存在我的组件中并使用它)
我怎样才能做到这一点 ?我已经搜索了 mapbox 文档,但没有找到任何相关信息:/
提前感谢社区
我正在使用Angular 4的项目.
我正在使用这样的代码:
<div *ngFor="let item of results">
<p> {{item.location.city}} </p>
<p> {{item.location.country}} </p>
</div>
Run Code Online (Sandbox Code Playgroud)
为了显示json的一些结果,我得到了一个请求.
问题是我的BDD构造不好,有时没有位置.一旦值出现问题,结果的其余部分就会停止显示,这有点烦人.
有没有办法检查值是否存在,如果是这种情况,让角度显示它.我尝试使用ngIf,但遇到了与角度相同的问题,试着看看是否有值,如果没有停止ngfor.
您可以在这里看到问题:http://yunomusic.com/page-search-event(尝试使用paris作为城市广告向下滚动,您将看到:

和我从控制台得到的错误:
vendor.fa8737033d56bf5e7c33.bundle.js:17 ERROR TypeError: Cannot read property 'city' of undefined
at Object.eval [as updateDirectives] (e.ngfactory.js:163)
at Object.updateDirectives (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at ur (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at wr (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at br (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at ur (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at wr (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at br (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at ur (vendor.fa8737033d56bf5e7c33.bundle.js:136)
at wr (vendor.fa8737033d56bf5e7c33.bundle.js:136)
Run Code Online (Sandbox Code Playgroud)
angular尝试读取组件城市,但在我的BDD中的某些元素上我没有.我需要在展示之前检查一下.
提前致谢 !
我的项目正在使用react,redux和redux-thunk。
我想等待功能结束,然后再启动清除页面的功能。不幸的是,我在.then中访问函数时遇到问题
这是我以前的没有承诺的代码,然后:
this.props.dispatch(ScheduleAction(..))
this.props.deleteTab()
Run Code Online (Sandbox Code Playgroud)
问题是在将信息发送到我的服务器之前有时调用了deleteTab(),所以效果不是很好。
然后我做到了:
Promise.resolve(this.props.dispatch(ScheduleAction(..)))
.then(function(response) {
this.props.deleteTab();
console.log("TabDeleted !!!");
return response
})
Run Code Online (Sandbox Code Playgroud)
现在的问题是我无法访问 this.props.deleteTab();
我有这个错误:
未捕获(承诺)TypeError:无法读取未定义的属性“ props”
如果有人对如何通过.then中的道具进行修复有任何想法,请先谢谢!
使用 RN 工具从 0.61.3 升级到 RN 0.62.2 后,用于升级、更新 pod(甚至必须修改 podspec 中的一行以使其正常工作:CocoaPods 找不到 pod“ReactCommon/jscallinvoker”的兼容版本:)
我的应用程序构建但卡在启动屏幕上。它在 RN 0.61.3 上运行良好
这是我在地铁控制台中的内容:
[Wed Apr 22 2020 18:22:25.108] WARN Require cycle: node_modules/react-native-af-video-player/components/index.js -> node_modules/react-native-af-video-player/components/TopBar.js -> node_modules/react-native-af-video-player/components/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
[Wed Apr 22 2020 18:22:25.108] LOG Unable to symbolicate stack trace: Unable to resolve data for blob: (null)
[Wed Apr 22 2020 18:22:25.109] LOG Running "gamefare" with {"rootTag":151,"initialProps":{}} …Run Code Online (Sandbox Code Playgroud) react-native ×2
angular ×1
css ×1
fbflipper ×1
ionic2 ×1
javascript ×1
mapbox ×1
mapbox-gl-js ×1
promise ×1
reactjs ×1
redux ×1
redux-thunk ×1
vue.js ×1