0

我在 angular js 中使用xeditable插件。它具有e-formclass将类提供给表单的属性,并且可以正常工作,textbox但是当我使用它时textarea它不起作用。

文本区域

var app = angular.module("app", ["xeditable"]);

app.run(function(editableOptions) {
  editableOptions.theme = 'bs3';
});

app.controller('Ctrl', function($scope, $filter) {
  $scope.user = {
    desc: 'Awesome user \ndescription!'
  };
});
div[ng-app] { margin: 50px; }
<link href="https://vitalets.github.io/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"/>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.min.js"></script>
<script src="https://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>



<h4>Angular-xeditable Textarea (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
  <a href="#" editable-textarea="user.desc" e-formclass="clss1" e-rows="7" e-cols="40">
    <pre>{{ user.desc || 'no description' }}</pre>
  </a>
</div>

这是文本框的片段

var app = angular.module("app", ["xeditable"]);

app.run(function(editableOptions) {
  editableOptions.theme = 'bs3';
});

app.controller('Ctrl', function($scope) {
  $scope.user = {
    name: 'awesome user'
  };
});
div[ng-app] { margin: 50px; }
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://vitalets.github.io/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.min.js"></script>
<script src="https://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>




<h4>Angular-xeditable Text (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
  <a href="#" e-formclass="hello" editable-text="user.name">{{ user.name || 'empty' }}</a>
</div>

文本框文本 区域

4

0 回答 0