<template>
    <div  class="page-cell">
        <co-header title="窗口">
            <a @click="goBack()" slot="left">
                <co-button icon="back"></co-button>
            </a>
        </co-header>
        <div class="wrapper">
            <co-cell @click.native="openWindow('newWin')" title="打开一个窗口"></co-cell>
            <co-cell @click.native="closeWindow()" title="关闭一个窗口"></co-cell>
            <co-cell @click.native="openFloatWindow()" title="打开一个浮动窗口"></co-cell>
            <co-cell @click.native="closeFloatWindow()" title="关闭浮动窗口"></co-cell>
            <co-cell @click.native="windowHistoryBack()" title="回退浮动窗口的浏览器历史记录堆栈"></co-cell>
            <co-cell @click.native="windowHistoryForward()" title="前进浮动窗口的浏览器历史记录堆栈"></co-cell>
            <co-cell @click.native="evaluateScriptInMain()" title="执行主窗口中的方法"></co-cell>
            <co-cell @click.native="evaluateScriptInFloat()" title="执行浮动窗口中的方法"></co-cell>
            <co-cell @click.native="setGlobalNotification()" title="在应用页面中定义一个全局消息方法"></co-cell>
            <co-cell @click.native="postGlobalNotification()" title="调用其他页面定义的setGlobalNotification方法"></co-cell>
            <co-cell @click.native="subscribeChannelNotification()" title="定义一个监听事件" label="其他页面执行该监听事件的时候，会执行对应的回调函数"></co-cell>
            <co-cell @click.native="publishChannelNotification()" title="在页面中向监听事件发送执行通知"></co-cell>
            <co-cell @click.native="openMultiFloatWindow()" title="在主窗口中打开一个多浮动窗口"></co-cell>
            <co-cell @click.native="closeMultiFloatWindow()" title="关闭多浮动窗口"></co-cell>
            <co-cell @click.native="setMultiFWindowFlippingEnbaled()" title="设置多浮动窗口是否支持手势滑动"></co-cell>
            <co-cell @click.native="setSelectedInMultiFWindow()" title="设置多浮动窗口中跳转到子窗口的索引"></co-cell>
            <co-cell @click.native="onchangeInMultiFWindow()" title="手势滑动切换浮动窗口时的监听事件"></co-cell>
            <co-cell @click.native="evaluteMultiFWindowScript()" title="执行多浮动窗口中页面的脚本"></co-cell>
            <co-cell @click.native="setFloatWindowFrame()" title="设置浮动窗口的位置和大小"></co-cell>
            <co-cell @click.native="setMultiFWindowFrame()" title="设置浮动窗口的位置和大小"></co-cell>
            <co-cell @click.native="bringFloatWindowToFront()" title="置顶当前浮动窗口"></co-cell>
            <co-cell @click.native="sendFloatWindowToBack()" title="置底当前浮动窗口"></co-cell>
            <co-cell @click.native="bringFloatWindowToFrontByName()" title="置顶指定浮动窗口" label="只有在主窗口中执行有效"></co-cell>
            <co-cell @click.native="sendFloatWindowToBackByName()" title="置底指定浮动窗口" label="只有在主窗口中执行有效"></co-cell>
            <co-cell @click.native="moveFloatWindowToPosition()" title="移动当前窗口(主窗口)位置"></co-cell>
            <co-cell @click.native="setFloatWindowVisbility()" title="设置浮动窗口是否显示"></co-cell>
            <co-cell @click.native="setSlidingWindow()" title="在主窗口中设置侧滑抽屉窗口"></co-cell>
            <co-cell @click.native="setSlidingWindowEnabled()" title="设置侧滑窗口是否可用"></co-cell>
            <co-cell @click.native="toggleSlidingWindow()" title="打开侧滑窗口"></co-cell>
            <co-cell @click.native="refresh()" title="刷新页面"></co-cell>
            <co-cell @click.native="setSwipeWinCloseEnabled()" title="禁止或者重新允许当前页面是否支持手势侧滑关闭" label="仅对支持手势侧滑关闭的window有效!"></co-cell>
            <co-cell @click.native="setBounceEnabled()" title="设置窗口是否弹动"></co-cell>
            <co-cell @click.native="setBounceParams()" title="下拉弹动刷新效果"></co-cell>
            <co-cell @click.native="resetBounce()" title="设置窗口是否弹动"></co-cell>
            <co-cell @click.native="autoTopBounceRefresh()" title="调用后执行下拉刷新效果"></co-cell>
            <co-cell @click.native="showStatusBar()" title="显示状态栏"></co-cell>
            <co-cell @click.native="hideStatusBar()" title="隐藏状态栏"></co-cell>
            <co-cell @click.native="setStatusBarTitleColor()" title="设置状态栏字体颜色"></co-cell>
            <co-cell @click.native="onSwipeLeft()" title="界面手势左滑事件监听"></co-cell>
            <co-cell @click.native="onSwipeRight()" title="界面手势右滑事件监听"></co-cell>
            <co-cell @click.native="onScrollToTop()" title="页面滚动条滚动到顶部监听方法"></co-cell>
            <co-cell @click.native="onScrollToBottom()" title="页面滚动条滚动到底部监听方法"></co-cell>
            <co-cell @click.native="setOrientation()" title="设置屏幕方向"></co-cell>
            <co-cell @click.native="setWindowScrollbarVisibility()" title="设置滚动条是否显示"></co-cell>
            <co-cell @click.native="sendStatusBarNotification()" title="发送消息到状态栏" label="iOS 10.0+系统才支持将消息添加至通知中心"></co-cell>
            <co-cell @click.native="setLoadingImagePath()" title="设置应用启动图片，在启动页之后显示"></co-cell>
            <co-cell @click.native="onKeyPressed()" title="监听设备返回键" label="此方法只能在主窗口中调用,只对Android有效"></co-cell>
        </div>
    </div>
</template>
<style>
</style>
<script>
  export default {
    data() {
      return {
        nativeList: []
      };
    },
    methods: {
      goBack: function() {
        history.go(-1);
      },
      openWindow: function(name) {
        corNative.openWindow({
          name: name,
          data: './../../../assets/newWin.html',
          animID: 10,
          flag: 1024
        });
      }
    }
  };
</script>

