|
@@ -17455,6 +17455,7 @@ appFormly.config(function config(formlyConfigProvider) {
|
17455
|
17455
|
$scope.uploadimgs = [];
|
17456
|
17456
|
var model = $parse("upload_img");
|
17457
|
17457
|
var modelSetter = model.assign;
|
|
17458
|
+ var maxNum = $scope.options.templateOptions.maxNum || 3;
|
17458
|
17459
|
|
17459
|
17460
|
var uploader = ($scope.uploader =
|
17460
|
17461
|
$scope.options.templateOptions.fileUploader);
|
|
@@ -17482,7 +17483,7 @@ appFormly.config(function config(formlyConfigProvider) {
|
17482
|
17483
|
var file = document.querySelector("input[type=file]").files[0];
|
17483
|
17484
|
$scope.uploadimgs.push(file); //这里是放着传给后台的数据file,下面controller的时候会有
|
17484
|
17485
|
console.log($scope.imgshows, $scope.uploadimgs);
|
17485
|
|
- if ($scope.imgshows.length < 3) {
|
|
17486
|
+ if ($scope.imgshows.length < maxNum) {
|
17486
|
17487
|
$("#upup").show();
|
17487
|
17488
|
} else {
|
17488
|
17489
|
$("#upup").hide();
|