小编mil*_*oth的帖子

IONIC 4 离子菜单 打开关闭时出现菜单错误

我希望你们一切都好。

我在 IONIC 4 应用程序上遇到菜单控制器问题。

当用户单击菜单并打开它并关闭它几次时,我会收到错误,当它注销并重新登录时,它会使应用程序崩溃:

helpers-46f4a262.js:44 ASSERT: _before() should be called while animating

Uncaught (in promise) Error: ASSERT: _before() should be called while animating
    at assert (helpers-46f4a262.js:46)
    at Menu.afterAnimation (ion-menu_4-md.entry.js:340)
    at Menu._setOpen (ion-menu_4-md.entry.js:200)


beforeAnimation(shouldOpen) {
        assert(!this.isAnimating, '_before() should not be called while animating');
        // this places the menu into the correct location before it animates in
        // this css class doesn't actually kick off any animations
        this.el.classList.add(SHOW_MENU);
        if (this.backdropEl) {
            this.backdropEl.classList.add(SHOW_BACKDROP);
        }
        this.blocker.block();
        this.isAnimating = true;
        if (shouldOpen) { …
Run Code Online (Sandbox Code Playgroud)

error-handling menu ionic-framework angular ionic4

6
推荐指数
1
解决办法
2074
查看次数

Ionic 4 禁用 iOS 仅在一页中滑动返回

iOS只想在一页中禁用而不是全局禁用,所以让 \xe2\x80\x99s 说用户结账并付款,我不希望用户在获得后返回到他所在的位置收据。我希望用户留在该页面而不能向后滑动,在 android 中我已经禁用了硬件按钮,而在iOS我有点挣扎。

\n\n

我已经添加到app.module:

\n\n
IonicModule.forRoot({ swipeBackEnabled: false })\n
Run Code Online (Sandbox Code Playgroud)\n\n

这会禁用全局向后滑动,这就是我不想要的,我也尝试过这个:

\n\n

关于禁用向后滑动的文章

\n\n

我跟着它,但仍然无法达到我想要的,

\n\n

我也不明白用户最后说的话:

\n\n

当前的实现仅适用于应用程序中的单个实例IonRouterInstance,但如果您在自己的应用程序中需要,可以通过支持其他实例来增强它。

\n\n

他所说的“作品与单曲”是什么意思?

\n\n

非常感谢,任何帮助将不胜感激。

\n

back swipe ios ionic-framework ionic-native

3
推荐指数
1
解决办法
3268
查看次数

小部件中的颤动相机预览,而不是全屏

有什么方法可以创建一个 Flutter 小部件,该小部件将是一个绝对位置(在 CSS 中),该小部件内的哪个将是相机预览?

我已经创建了小部件,当我访问页面时,我可以在屏幕的右下角看到它,但是当我从 Flutter 添加 CameraPreview 插件时,它会使其全屏显示。

我需要的是在我创建的页面/屏幕的右下角小部件上进行应用程序预览的选项。

Square 小部件,是我只想显示相机的地方。

import 'package:flutter/material.dart';

[![class CameraAppTest extends StatelessWidget {
  static const routeName = '/videoRecordScreen';
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('test'),
      ),
      body: Container(
        // width: 200,
        alignment: Alignment.center,
        // margin: EdgeInsets.all(24),
        // padding: EdgeInsets.all(24),
        decoration: BoxDecoration(),
        // decoration: ,
        child: Container(child: Demo()),
      ),
    );
  }
}

class Square extends StatelessWidget {
  final color;
  final size;

  Square({this.color, this.size});
  @override
  Widget build(BuildContext context) {
    return Container( …
Run Code Online (Sandbox Code Playgroud)

camera widget preview flutter

1
推荐指数
1
解决办法
2657
查看次数