zoukankan      html  css  js  c++  java
  • Vue EasyUI 调整大小v-Resizable的坑

    具体安装,参考

    https://www.w3cschool.cn/vueeasyui/vueeasyui-p8h937nn.html

    坑:

    这样无效  v-Resizable 直接套在  LayoutPanel 标签里面

    <template>
      <div>
        <Layout style=" 700px; height: 250px">
          <LayoutPanel region="north" style="height: 50px">
            <div class="title">North Region</div>
          </LayoutPanel>
          <LayoutPanel region="south" style="height: 50px">
            <div class="title">South Region</div>
          </LayoutPanel>
          <LayoutPanel region="west" style=" 120px">
            <div class="title">West Region</div>
          </LayoutPanel>
          <LayoutPanel region="east" style=" 120px">
            <div class="title">East Region</div>
          </LayoutPanel>
          <LayoutPanel region="center" id="center" 
              v-Resizable="{
                resizeStart: () => resize(),
                resizing:() => resize(),
                resizeStop: () => resize()
              }">
              <div class="title">Center Region</div>
              <div class="title">Center Region</div>
          </LayoutPanel>
        </Layout>
      </div>
    </template>
    <script>
    export default {
      methods: {
        resize () {
          console.log(111)
        }
      }
    };
    </script>

    这样有效 LayoutPanel  里面在套一层 div, v-Resizable才会生效

    <template>
      <div>
        <Layout style=" 700px; height: 250px">
          <LayoutPanel region="north" style="height: 50px">
            <div class="title">North Region</div>
          </LayoutPanel>
          <LayoutPanel region="south" style="height: 50px">
            <div class="title">South Region</div>
          </LayoutPanel>
          <LayoutPanel region="west" style=" 120px">
            <div class="title">West Region</div>
          </LayoutPanel>
          <LayoutPanel region="east" style=" 120px">
            <div class="title">East Region</div>
          </LayoutPanel>
          <LayoutPanel region="center" id="center" >
            <div 
              v-Resizable="{
                resizeStart: () => resize(),
                resizing:() => resize(),
                resizeStop: () => resize()
              }">
              <div class="title">Center Region</div>
              <div class="title">Center Region</div>
            </div>
          </LayoutPanel>
        </Layout>
      </div>
    </template>
    <script>
    export default {
      methods: {
        resize () {
          console.log(111)
        }
      }
    };
    </script>
  • 相关阅读:
    ubuntn16.04指令
    [Array]283. Move Zeroes
    spring框架
    Redis服务器搭建/配置/及Jedis客户端的使用方法
    [Java Performance] 数据库性能最佳实践
    iOS 序列化和反序列化
    SSH 获取GET/POST参数
    MAC中安卓开发环境的下载
    MAC OS下使用OpenSSL生成私钥和公钥的方法
    如何使用TestFlight进行Beta测试
  • 原文地址:https://www.cnblogs.com/-roc/p/14646843.html
Copyright © 2011-2022 走看看