小编Ton*_*ony的帖子

ionic 3.2 - 如何禁用离子含量的滚动?

我正在开发Ionic 3.2版本的应用程序.我在离子卷轴内有一个离子复习器.我想禁用滚动,ion-content并希望在滚动时显示ion-refresher内部.但它失败了.ion-scrollion-list

  • 我试过no-bounce(<ion-content no-bounce>)和disable-scroll(<ion-content disable-scroll>)但内容仍在滚动
  • 我试着将ion-fixed内部content和内部放在div正下方content.但后来ion-refresher不行.
  • 我试过scroll="false"(比如在离子1.0中)但仍在滚动

代码下方;

    <ion-content scroll="false">
    <ion-scroll scrollY="true" style="width: 100% !important;height:30% !important"> 
        <ion-refresher (ionRefresh)="fill_data($event)">
          <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="{{ 'pull_to_refresh' | translate }}" refreshingSpinner="circles"
            refreshingText="{{ 'refreshing' | translate }}">
          </ion-refresher-content>
        </ion-refresher> 
        <ion-list>
          //data filling here
        </ion-list>
      </ion-scroll>
    </ion-content>
Run Code Online (Sandbox Code Playgroud)

请帮我...

cordova ionic-framework ionic2 ionic3

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

ionic 4-添加插件时出现Uncaught TypeError

我创建了一个离子项目(版本:4.0.6)。从https://beta.ionicframework.com/docs/native/social-sharing添加插件cordova-plugin-x-socialsharing后,我出现以下错误 。我被困在这里。有人可以帮我吗。

index.js:413 Uncaught TypeError: Object(...) is not a function
    at index.js:413
    at Object../node_modules/@ionic-native/social-sharing/index.js (index.js:590)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app.module.ts (app.global.ts:10)
    at __webpack_require__ (bootstrap:81)
    at Object../src/main.ts (environment.ts:15)
    at __webpack_require__ (bootstrap:81)
    at Object.0 (main.ts:12)
    at __webpack_require__ (bootstrap:81)
    at checkDeferredModules (bootstrap:43)
Run Code Online (Sandbox Code Playgroud)

更新:我今天找到了一个解决方案!步骤1:将package.json中的插件版本更改为package.json中显示的@ ionic-native / core相同版本。步骤2:删除node_module并运行npm install。第三步:在导入时,在末尾添加“ / ngx”,如下所示;从“ @ ionic-native / social-sharing / ngx”导入{SocialSharing};步骤4:与离子2或离子3一样休息

ionic4

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

标签 统计

cordova ×1

ionic-framework ×1

ionic2 ×1

ionic3 ×1

ionic4 ×1