From a8b5196597b41b37d0cbcb4869dc44ca18e80c53 Mon Sep 17 00:00:00 2001 From: shaoying Date: Wed, 21 Oct 2020 16:15:31 +0800 Subject: [PATCH] opt some --- frame.js | 25 ++++++++++--------------- plugin/local/code/inner.js | 3 +++ plugin/local/code/vimer.js | 4 ---- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/frame.js b/frame.js index 1d499c21..e84d4612 100644 --- a/frame.js +++ b/frame.js @@ -124,12 +124,14 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, ]}, }}, "product": {name: "产品群", storm: { - "office": {name: "办公 office", index: [ - "web.wiki.feel", - "web.wiki.draw", - "web.wiki.data", - "web.team.plan", - "web.wiki.word", + "office": {name: "办公 office", action: [ + {name: "feel", help: "影音", index: "web.wiki.feel"}, + {name: "draw", help: "绘图", index: "web.wiki.draw"}, + {name: "data", help: "数据", index: "web.wiki.data"}, + {name: "plan", help: "计划", index: "web.team.plan"}, + {name: "think", help: "智库", index: "web.wiki.word", args: ["usr/learning/"]}, + {name: "index", help: "索引", index: "web.wiki.word", args: ["usr/learning/index.shy"]}, + {name: "context", help: "编程", index: "web.wiki.word", args: ["usr/learning/自然/编程/context.shy"]}, ]}, "english": {name: "英汉 english", action: [ {name: "english", help: "英汉", index: "web.wiki.alpha.alpha", args: ["word", "hi"]}, @@ -195,19 +197,12 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, "mysql": {name: "数据 mysql", action: [ {name: "mysql", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/main.shy"]}, ]}, - "context": {name: "环境 context", action: [ - {name: "think", help: "智库", index: "web.wiki.word", args: ["usr/learning/"]}, - {name: "index", help: "索引", index: "web.wiki.word", args: ["usr/learning/index.shy"]}, - {name: "context", help: "编程", index: "web.wiki.word", args: ["usr/learning/自然/编程/context.shy"]}, - ]}, }}, "profile": {name: "测试群", storm: { "pprof": {name: "pprof", index: [ - "web.code.pprof", "web.code.bench", - "web.favor", - "web.cache", - "web.share", + "web.code.pprof", + "web.code.favor", ]}, }}, "operate": {name: "运维群", storm: { diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 9e7ac344..fc77948e 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -171,6 +171,9 @@ Volcanos("onaction", {help: "控件交互", list: [], }, onclick: function(event) { can.onkeymap && can.onkeymap._mode(can, "insert") can.onaction.selectLine(can, ui.tr) + can.onkeymap && can.ui.editor.focus() + // can.ui.editor.setSelectionRange(0, 0) + // can.ui.editor.setSelectionRange(event.offsetX/10, event.offsetX/10) }, ondblclick: function(event) { var str = ui.text.innerText diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index c2264fc1..6d2079ce 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -300,10 +300,6 @@ Volcanos("onkeymap", {help: "键盘交互", list: ["command", "normal", "insert" height: item.offsetHeight, width: item.offsetWidth, left: item.offsetLeft, top: item.offsetTop + can.ui.profile.offsetHeight-100, }}) - - can.ui.editor.focus() - // can.ui.editor.setSelectionRange(0, 0) - // can.ui.editor.setSelectionRange(event.offsetX/10, event.offsetX/10) }, insertLine: function(can, value, before) { var line = can.onaction.appendLine(can, value)