dever 6 years ago
parent
commit
504178af63
3 changed files with 25 additions and 1 deletions
  1. 18 0
      assets/dever/core.js
  2. 1 1
      assets/lib/layui/upload.js
  3. 6 0
      assets/lib/manage/main.js

+ 18 - 0
assets/dever/core.js

@@ -42,6 +42,24 @@ var Dever =
         this.Extend();
         //this.Target();
         //this.Pjax();
+        this.AutoComplete();
+    }
+
+    ,AutoComplete : function()
+    {
+        if ($("input").length) {
+            $("input").each(function()
+            {
+                $(this).attr('autocomplete', 'new-password');
+                /*
+                $(this).attr('readonly', true);
+                $(this).focus(function()
+                {
+                    $(this).attr('readonly', false);
+                });
+                */
+            });
+        }
     }
     
     ,Pjax : function()

+ 1 - 1
assets/lib/layui/upload.js

@@ -6,7 +6,7 @@ function loadUpload(i,e,key,url,assets)
 {
 	var value = e.attr('v');
 	if (typeof(upload[value]) != "undefined") {
-		return;
+		//return;
 	}
 	upload[value] = true;
 	upload_pic[value] = [];

+ 6 - 0
assets/lib/manage/main.js

@@ -713,6 +713,12 @@ function checking(name, e, data)
 
 function autocomplete()
 {
+	if ($("input").length) {
+        $("input").each(function()
+        {
+            $(this).attr('autocomplete', 'new-password');
+        });
+    }
 	if($("input[complete]").length)
 	{
 		$("input[complete]").each(function()