From d29978c582a91e8d8afbf182a07edda7397fe780 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Tue, 27 Jul 2021 17:01:42 +0800 Subject: [PATCH] opt mall --- frame.js | 2 +- lib/user.js | 5 +++-- page/index.css | 10 +++++----- publish/client/mp/pages/action/action.js | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frame.js b/frame.js index c67786bd..a7f71f10 100644 --- a/frame.js +++ b/frame.js @@ -159,7 +159,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta, sub.page.Modify(sub, sub._legend, { onmouseenter: function(event) { - sub.user.carte(event, sub, sub.onaction, sub.onaction.list.concat([["所有 ->"].concat(can.core.Item(meta.feature.trans))])) + sub.user.carte(event, sub, sub.onaction, sub.onaction.list.concat([["所有 ->"].concat(can.core.Item(meta.feature._trans))])) }, }) diff --git a/lib/user.js b/lib/user.js index f13738c7..45578c08 100644 --- a/lib/user.js +++ b/lib/user.js @@ -46,7 +46,7 @@ Volcanos("user", {help: "用户操作", agent: { } if (typeof text == "function") { text = text.name || "" } - return can._trans&&can._trans[text] || can.Conf("trans."+text) || can.Conf("feature.trans."+text) || { + return can._trans&&can._trans[text] || can.Conf("trans."+text) || can.Conf("feature._trans."+text) || { "submit": "提交", "cancel": "取消", "open": "打开", "close": "关闭", "begin": "启动", "end": "结束", @@ -178,7 +178,8 @@ Volcanos("user", {help: "用户操作", agent: { var msg = can.request(event, can.Option()) var ui = can.page.Append(can, document.body, [{view: ["input"], style: {left: 0, top: 0}, list: [ {view: ["option", "table"], list: can.core.List(form, function(item) { - (item._input == "select"||item.values) && (item = {select: [[item.name].concat(item.values)], data: item, name: item.name, _trans: item._trans}) + (item._input == "textarea") && (item = {type: "textarea", data: item, name: item.name, _trans: item._trans}); + (item._input == "select"||item.values) && (item = {select: [[item.name].concat(item.values)], data: item, name: item.name, _trans: item._trans}); item = typeof item == "string"? {input: item, name: item}: item.length > 0? {select: [item], name: item[0]}: item item.type = item.type||"input", item.type == "input" && (item.data=item.data||{}, item.data.type = item.data.type||"text") diff --git a/page/index.css b/page/index.css index 12b1eced..94021731 100644 --- a/page/index.css +++ b/page/index.css @@ -294,9 +294,10 @@ div.input { z-index:50; } div.input textarea { - background-color:cyan; - margin:2px; padding:4px; - width:145px; height:45px; + border-radius:6px; + border:2px solid #14a58e; + width:144px; height:60px; + padding:4px; } div.input div.item { float:left; @@ -442,7 +443,7 @@ fieldset>div.status>div.item { height:18px; } fieldset>div.status>div.item>label { - font-size:10px; color:gray; + font-size:10px; color:#504242e0; } fieldset div.output { @@ -541,7 +542,6 @@ body.white input[type=text] { background-color:white; color:black; border-radius:6px 6px 6px 6px; border:2px solid #14a58e; - } body.white input[type=text]:hover { background-color:cyan; diff --git a/publish/client/mp/pages/action/action.js b/publish/client/mp/pages/action/action.js index facb89cb..c6edc618 100644 --- a/publish/client/mp/pages/action/action.js +++ b/publish/client/mp/pages/action/action.js @@ -23,7 +23,7 @@ Page({ } line.inputs.forEach(function(input) { input.action = input.action || input.value - input.value = kit.Value(line, "feature.trans."+input.name) || input.value + input.value = kit.Value(line, "feature._trans."+input.name) || input.value input.value == "auto" && (input.value = "") if (input.value && input.value.indexOf("@") == 0) {