forked from x/volcanos
opt some
This commit is contained in:
parent
fce46d83ae
commit
fb53df69a3
@ -335,13 +335,15 @@ Volcanos("page", {help: "用户界面", ClassList: {
|
|||||||
input.style.height = input.style.height||can.Conf(["feature", html.TEXTAREA, item.name, html.HEIGHT].join(ice.PT))||can.Conf(["feature", html.TEXTAREA, html.HEIGHT].join(ice.PT))
|
input.style.height = input.style.height||can.Conf(["feature", html.TEXTAREA, item.name, html.HEIGHT].join(ice.PT))||can.Conf(["feature", html.TEXTAREA, html.HEIGHT].join(ice.PT))
|
||||||
input.style.width = input.style.width||can.Conf(["feature", html.TEXTAREA, item.name, html.WIDTH].join(ice.PT))||can.Conf(["feature", html.TEXTAREA, html.WIDTH].join(ice.PT))
|
input.style.width = input.style.width||can.Conf(["feature", html.TEXTAREA, item.name, html.WIDTH].join(ice.PT))||can.Conf(["feature", html.TEXTAREA, html.WIDTH].join(ice.PT))
|
||||||
// no break
|
// no break
|
||||||
|
case html.USERNAME:
|
||||||
case html.PASSWORD:
|
case html.PASSWORD:
|
||||||
// no break
|
// no break
|
||||||
case html.TEXT:
|
case html.TEXT:
|
||||||
if (item.username) { item.type = html.TEXT; return item }
|
|
||||||
if (item.password) { return item }
|
|
||||||
item.autocomplete = "off"
|
item.autocomplete = "off"
|
||||||
|
item.name = item.name||item.type
|
||||||
item.value = value||item.value||""
|
item.value = value||item.value||""
|
||||||
|
item.placeholder = item.placeholder||item.name||item.type
|
||||||
|
item.title = item.title||item.placeholder||item.name||item.type
|
||||||
item.className || can.page.ClassList.add(can, item, ctx.ARGS)
|
item.className || can.page.ClassList.add(can, item, ctx.ARGS)
|
||||||
break
|
break
|
||||||
case html.SELECT: input.type = html.SELECT
|
case html.SELECT: input.type = html.SELECT
|
||||||
|
@ -125,7 +125,7 @@ Volcanos("user", {help: "用户操作", agent: {
|
|||||||
},
|
},
|
||||||
login: function(can, cb, method) {
|
login: function(can, cb, method) {
|
||||||
var ui = can.user.input({}, can, [
|
var ui = can.user.input({}, can, [
|
||||||
{username: html.USERNAME}, {password: html.PASSWORD},
|
{type: html.USERNAME}, {type: html.PASSWORD},
|
||||||
], function(event, button, data, list) { return {
|
], function(event, button, data, list) { return {
|
||||||
"登录": function() {
|
"登录": function() {
|
||||||
can.run({}, [aaa.LOGIN, data[html.USERNAME], data[html.PASSWORD]], function(msg) {
|
can.run({}, [aaa.LOGIN, data[html.USERNAME], data[html.PASSWORD]], function(msg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user