Blame view

example/popover.html 1.26 KB
3a3ecabe   Imshann   init
1
2
3
4
5
6
  <!DOCTYPE html>
  <html>
  
  <head>
      <meta charset="UTF-8" />
      <title></title>
3a3ecabe   Imshann   init
7
8
9
  </head>
  
  <body>
6fcf6aec   Imshann   feat(popover): 优化组件
10
      <div ng-app="esNgAntd" ng-controller="mainCtrl">
3a3ecabe   Imshann   init
11
          <div class="container" style="margin: 200px">
6fcf6aec   Imshann   feat(popover): 优化组件
12
13
              <es-popover placement="bottom" content="{{content}}" title="Title">
                  <es-button>Hover me</es-button>
3a3ecabe   Imshann   init
14
              </es-popover>
6fcf6aec   Imshann   feat(popover): 优化组件
15
              <!-- <es-popover placement="top" content="{{content}}" context="context">
3a3ecabe   Imshann   init
16
17
18
19
                  <button>Top</button>
              </es-popover>
              <es-popover style="position: fixed; left: 200px; top: 200px" placement="top" content="{{content}}" context="context" get-popup-container="handlePopupContainer" id="test">
                  <button>Fixed</button>
6fcf6aec   Imshann   feat(popover): 优化组件
20
              </es-popover> -->
3a3ecabe   Imshann   init
21
22
23
          </div>
      </div>
      <script src="https://cdn.staticfile.org/angular.js/1.2.28/angular.min.js"></script>
6fcf6aec   Imshann   feat(popover): 优化组件
24
      <script src="../dist/ng-antd.js"></script>
3a3ecabe   Imshann   init
25
26
      <script>
          angular
6fcf6aec   Imshann   feat(popover): 优化组件
27
              .module("esNgAntd")
3a3ecabe   Imshann   init
28
              .controller("mainCtrl", function ($scope) {
6fcf6aec   Imshann   feat(popover): 优化组件
29
30
                  
                  $scope.content = `<div><p>Content</p><p>Content</p></div>`;
3a3ecabe   Imshann   init
31
  
6fcf6aec   Imshann   feat(popover): 优化组件
32
33
                  $scope.handleClick = function () {
                      alert("I am click");
3a3ecabe   Imshann   init
34
35
36
                  }
              });
      </script>
3a3ecabe   Imshann   init
37
38
39
  </body>
  
  </html>