forked from x/volcanos
action opt text some
This commit is contained in:
parent
58a5c410c7
commit
693f1e3aeb
12
frame.js
12
frame.js
@ -530,6 +530,18 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
}
|
}
|
||||||
return {type: "td", inner: value, click: function(event) {
|
return {type: "td", inner: value, click: function(event) {
|
||||||
var target = event.target; if (target.tagName == "INPUT" && target.type == "button") {
|
var target = event.target; if (target.tagName == "INPUT" && target.type == "button") {
|
||||||
|
if (can.Conf("feature")[target.value]) {
|
||||||
|
can.user.input(event, can, can.Conf("feature")[target.value], function(event, button, data, list) {
|
||||||
|
var msg = can.request(event); can.core.Item(can.Option(), msg.Option)
|
||||||
|
can.core.Item(line, msg.Option)
|
||||||
|
can.run(event, ["action", target.value].concat(list), function(msg) {
|
||||||
|
can.user.toast(can, target.value+"成功", "paste")
|
||||||
|
}, true)
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch (target.value) {
|
switch (target.value) {
|
||||||
case "复制":
|
case "复制":
|
||||||
navigator.clipboard.writeText(line.text).then(function() {
|
navigator.clipboard.writeText(line.text).then(function() {
|
||||||
|
@ -11,6 +11,7 @@ Volcanos("onaction", {help: "控件交互", list: [],
|
|||||||
var feature = can.sup.Conf("feature")
|
var feature = can.sup.Conf("feature")
|
||||||
var input = feature && feature[can.Conf("name")]; if (input) {
|
var input = feature && feature[can.Conf("name")]; if (input) {
|
||||||
return can.user.input(event, can, input,function(event, button, data, list) {
|
return can.user.input(event, can, input,function(event, button, data, list) {
|
||||||
|
var msg = can.request(event); can.core.Item(can.sup.Option(), msg.Option)
|
||||||
var args = ["action", can.Conf("name")]; can.core.Item(data, function(key, value) {
|
var args = ["action", can.Conf("name")]; can.core.Item(data, function(key, value) {
|
||||||
key && value && args.push(key, value)
|
key && value && args.push(key, value)
|
||||||
})
|
})
|
||||||
|
@ -52,7 +52,6 @@ fieldset.editor>div.output div.content {
|
|||||||
font-size:16px; font-family:monospace;
|
font-size:16px; font-family:monospace;
|
||||||
border-left:solid 2px red;
|
border-left:solid 2px red;
|
||||||
min-height:20px;
|
min-height:20px;
|
||||||
min-width:200px;
|
|
||||||
max-width:1000px;
|
max-width:1000px;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
float:left;
|
float:left;
|
||||||
@ -62,7 +61,6 @@ fieldset.editor>div.output div.content>pre.item {
|
|||||||
height:20px; border:solid 1px black;
|
height:20px; border:solid 1px black;
|
||||||
padding:0; margin:0;
|
padding:0; margin:0;
|
||||||
padding-left:10px;
|
padding-left:10px;
|
||||||
min-width:120px;
|
|
||||||
background-color:black;
|
background-color:black;
|
||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
@ -50,9 +50,9 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb,
|
|||||||
can.file = file, can.parse = can.base.Ext(file||path), can.max = 0
|
can.file = file, can.parse = can.base.Ext(file||path), can.max = 0
|
||||||
can.onsyntax._init(can, can._msg)
|
can.onsyntax._init(can, can._msg)
|
||||||
|
|
||||||
var width = can._target.offsetWidth - can.ui.project.offsetWidth - can.ui.preview.offsetWidth - 40
|
var width = can._target.offsetWidth - can.ui.project.offsetWidth - can.ui.preview.offsetWidth - 60
|
||||||
can.Status("当前行", can.onexport.position(can, parseInt(can.Option("line")))-1)
|
can.Status("当前行", can.onexport.position(can, parseInt(can.Option("line")))-1)
|
||||||
// can.page.Modify(can, can.ui.content, {style: {"max-width": width+"px"}})
|
can.page.Modify(can, can.ui.content, {style: {"max-width": width+"px"}})
|
||||||
}
|
}
|
||||||
if (can.tabview[path+file]) { return show() }
|
if (can.tabview[path+file]) { return show() }
|
||||||
|
|
||||||
|
2
proto.js
2
proto.js
@ -33,6 +33,8 @@ var Volcanos = shy("火山架", {cache: {}, index: 1, order: 1, debug: {
|
|||||||
var conf = {}, conf_cb = {}, cache = {}
|
var conf = {}, conf_cb = {}, cache = {}
|
||||||
can = can || {}, list.push(can) && (can.__proto__ = {_name: name, _root: "volcano", _create_time: new Date(), _load: function(name, cb) {
|
can = can || {}, list.push(can) && (can.__proto__ = {_name: name, _root: "volcano", _create_time: new Date(), _load: function(name, cb) {
|
||||||
for (var cache = meta.cache[name] || []; meta.index < list.length; meta.index++) {
|
for (var cache = meta.cache[name] || []; meta.index < list.length; meta.index++) {
|
||||||
|
if (name == "/plugin/input/date.css" && cache.length > 0) { continue }
|
||||||
|
if (name == "/lib/base.js" && cache.length > 0) { continue }
|
||||||
if (list[meta.index] == can) { continue }
|
if (list[meta.index] == can) { continue }
|
||||||
cache.push(list[meta.index])
|
cache.push(list[meta.index])
|
||||||
// 加载缓存
|
// 加载缓存
|
||||||
|
Loading…
x
Reference in New Issue
Block a user