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.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
|
||||
case html.USERNAME:
|
||||
case html.PASSWORD:
|
||||
// no break
|
||||
case html.TEXT:
|
||||
if (item.username) { item.type = html.TEXT; return item }
|
||||
if (item.password) { return item }
|
||||
item.autocomplete = "off"
|
||||
item.name = item.name||item.type
|
||||
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)
|
||||
break
|
||||
case html.SELECT: input.type = html.SELECT
|
||||
|
@ -125,7 +125,7 @@ Volcanos("user", {help: "用户操作", agent: {
|
||||
},
|
||||
login: function(can, cb, method) {
|
||||
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() {
|
||||
can.run({}, [aaa.LOGIN, data[html.USERNAME], data[html.PASSWORD]], function(msg) {
|
||||
@ -235,7 +235,7 @@ Volcanos("user", {help: "用户操作", agent: {
|
||||
can.page.Modify(can, ui._target, {style: {left: event.clientX, top: event.clientY}})
|
||||
},
|
||||
|
||||
input: function(event, can, form, cb, button) { if (!form || form.length == 0) { return cb()}
|
||||
input: function(event, can, form, cb, button) { if (!form || form.length == 0) { return cb() }
|
||||
var msg = can.request(event)
|
||||
var ui = can.page.Append(can, document.body, [{view: [html.INPUT], style: {left: 0, top: 0}, list: [
|
||||
{view: [chat.OPTION, html.TABLE], list: can.core.List(form, function(item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user