If you pushPage from a page with double ons-page, a new page will be added twice.

Asked 2 years ago, Updated 2 years ago, 73 views

Double-located in html invoked by pushPage

.
<ons-page modifier="p2">
  <img src="img/top.png"/>

  <ons-page modifier="p2_c1">
    <img src="img/image.png"/>
  </ons-page>

  <span id="ipt13">move</span>
</ons-page>

Once I tap the element on this page, pushPage will transition to a new page.
The page addition process has been performed twice in a row.

Also, when I stopped duplication of and only one page was moved, the page migration was done without any problems.
Is there a problem with using double like this?

The reason I have duplicated is that I want to be able to scroll only to some elements of the page.
The modifier="p2" part of the above source should not be scrolled by the CSS, and the modifier="p2_c1" part should be
Allow scrolling.

onsen-ui

2022-09-30 20:48

1 Answers

OnsenUI probably does not expect ons-page to nest.Use ons-scroller instead of ons-page for some elements in the page to be scrollable.
http://ja.onsen.io/reference/ons-scroller.html


2022-09-30 20:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.