forked from fanruan/fineui
Browse Source
* commit 'a1a2587fe0506d0623279bc51315ff17489fbdbd': (181 commits) BI-115904 fix: 【来源内测BUG】展开下拉树子节点,会出现重复数据 同步 Pull request #3195: KERNEL-13158: context跳过popup REPORT-83685 fix: BI.parseDateTime方法对%l:%M:%S %p这种格式的日期解析出错(后面带%p 这种的都是同类型的报错) REPORT-83685 fix: BI.parseDateTime方法对%l:%M:%S %p这种格式的日期解析出错(后面带%p 这种的都是同类型的报错) auto upgrade version to 2.0.20221101100519 auto upgrade version to 2.0.20221031221611 REPORT-82014 fix:补齐AFTER_HIDEVIEW事件 auto upgrade version to 2.0.20221031190602 auto upgrade version to 2.0.20221031135635 BI-115201 fix: 【6.0.3.3】下拉树下拉后不选择任何内容,前端多发一个data请求 BI-115201 fix: 【6.0.3.3】下拉树下拉后不选择任何内容,前端多发一个data请求 auto upgrade version to 2.0.20221031101438 auto upgrade version to 2.0.20221031095439 bugfix auto upgrade version to 2.0.20221028191610 feature: 增加instruction组件 feature: 增加instruction组件 REPORT-83214 fix: 不允许编辑的下拉树展示多了滚动条(finui的bi.multilayer_single_tree_combo组件) auto upgrade version to 2.0.20221028145548 auto upgrade version to 2.0.20221028143506 ...master
superman
2 years ago
172 changed files with 2241 additions and 1500 deletions
@ -1,67 +0,0 @@
|
||||
/** |
||||
* Created by astronaut007 on 2018/8/8 |
||||
*/ |
||||
// 牵扯到国际化这些常量在页面加载后再生效
|
||||
// full day names
|
||||
BI.Date = BI.Date || {}; |
||||
BI.Date._DN = ["星期日", |
||||
"星期一", |
||||
"星期二", |
||||
"星期三", |
||||
"星期四", |
||||
"星期五", |
||||
"星期六", |
||||
"星期日"]; |
||||
|
||||
// short day names
|
||||
BI.Date._SDN = ["日", |
||||
"一", |
||||
"二", |
||||
"三", |
||||
"四", |
||||
"五", |
||||
"六", |
||||
"日"]; |
||||
|
||||
// Monday first, etc.
|
||||
BI.Date._FD = 1; |
||||
|
||||
// full month namesdat
|
||||
BI.Date._MN = [ |
||||
"一月", |
||||
"二月", |
||||
"三月", |
||||
"四月", |
||||
"五月", |
||||
"六月", |
||||
"七月", |
||||
"八月", |
||||
"九月", |
||||
"十月", |
||||
"十一月", |
||||
"十二月"]; |
||||
|
||||
// short month names
|
||||
BI.Date._SMN = [0, |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11]; |
||||
|
||||
BI.Date._QN = ["", "第1季度", |
||||
"第2季度", |
||||
"第3季度", |
||||
"第4季度"]; |
||||
|
||||
/** Adds the number of days array to the Date object. */ |
||||
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; |
||||
|
||||
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
|
||||
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6]; |
@ -0,0 +1,99 @@
|
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title></title> |
||||
<!-- <link rel="stylesheet" type="text/css" href="../dist/2.0/fineui.min.css"/> |
||||
<script src="../dist/2.0/fineui.js"></script> --> |
||||
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css"/> |
||||
<!-- <script src="http://fanruan.design/fineui/2.0/fineui.min.js"></script>--> |
||||
<script src="http://localhost:9001/fineui.js"></script> |
||||
</head> |
||||
<body> |
||||
<div id="wrapper"></div> |
||||
<script> |
||||
var Model = BI.inherit(BI.Model, { |
||||
state: function () { |
||||
return { |
||||
theme: "light" |
||||
}; |
||||
}, |
||||
childContext: ["theme"], |
||||
|
||||
actions: { |
||||
toggle: function () { |
||||
this.model.theme = this.model.theme === "light" ? "dark" : "light"; |
||||
} |
||||
} |
||||
}); |
||||
BI.model("demo.model", Model); |
||||
|
||||
var Child = BI.inherit(BI.Widget, { |
||||
render: function () { |
||||
var label; |
||||
return { |
||||
type: "bi.context", |
||||
context: "theme", |
||||
watch: function (newValue, oldValue) { |
||||
label.setText(newValue); |
||||
}, |
||||
items: [(context) => { |
||||
return { |
||||
type: "bi.label", |
||||
height: 30, |
||||
ref: function (_ref) { |
||||
label = _ref; |
||||
}, |
||||
text: context.model.theme |
||||
} |
||||
}] |
||||
|
||||
}; |
||||
} |
||||
}); |
||||
BI.shortcut("demo.child", Child); |
||||
|
||||
var Widget = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "my-parent" |
||||
}, |
||||
_store: function () { |
||||
return BI.Models.getModel("demo.model"); |
||||
}, |
||||
setup: function () { |
||||
var child; |
||||
var store = BI.useStore(); |
||||
return function () { |
||||
return { |
||||
type: "bi.vertical", |
||||
vgap: 20, |
||||
items: [{ |
||||
type: "demo.child", |
||||
ref: function (_ref) { |
||||
child = _ref; |
||||
} |
||||
}, { |
||||
type: "bi.button", |
||||
text: "改变主题", |
||||
handler: function () { |
||||
store.toggle(); |
||||
} |
||||
}] |
||||
}; |
||||
}; |
||||
} |
||||
}); |
||||
BI.shortcut("demo.parent", Widget); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "demo.parent" |
||||
}, |
||||
top: 100, |
||||
left: 100 |
||||
}], |
||||
element: "#wrapper" |
||||
}); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,76 @@
|
||||
BI.Instruction = BI.inherit(BI.Widget, { |
||||
_defaultConfig: function () { |
||||
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); |
||||
return BI.extend(conf, { |
||||
baseCls: (conf.baseCls || "") + " bi-instruction", |
||||
height: 20, |
||||
level: "error", |
||||
textAlign: "left", |
||||
whiteSpace: "nowrap", |
||||
hgap: 5 |
||||
}); |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this, o = this.options; |
||||
|
||||
return { |
||||
type: "bi.label", |
||||
ref: function (_ref) { |
||||
self.text = _ref; |
||||
}, |
||||
cls: "instruction-" + o.level, |
||||
textAlign: o.textAlign, |
||||
whiteSpace: o.whiteSpace, |
||||
textHeight: o.height, |
||||
height: o.height, |
||||
hgap: o.hgap, |
||||
rgap: o.rgap, |
||||
lgap: o.lgap, |
||||
vgap: o.vgap, |
||||
text: o.text, |
||||
keyword: o.keyword, |
||||
value: o.value, |
||||
py: o.py |
||||
}; |
||||
}, |
||||
|
||||
doRedMark: function () { |
||||
this.text.doRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unRedMark: function () { |
||||
this.text.unRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
doHighLight: function () { |
||||
this.text.doHighLight.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unHighLight: function () { |
||||
this.text.unHighLight.apply(this.text, arguments); |
||||
}, |
||||
|
||||
setText: function (v) { |
||||
this.options.text = v; |
||||
this.text.setText(v); |
||||
}, |
||||
|
||||
getText: function () { |
||||
return this.options.text; |
||||
}, |
||||
|
||||
setStyle: function (css) { |
||||
this.text.setStyle(css); |
||||
}, |
||||
|
||||
setValue: function (v) { |
||||
this.text.setValue(v); |
||||
}, |
||||
|
||||
getValue: function () { |
||||
this.text.getValue(); |
||||
} |
||||
}); |
||||
|
||||
BI.shortcut("bi.instruction", BI.Instruction); |
@ -1,66 +0,0 @@
|
||||
BI.prepares.push(function () { |
||||
BI.Date = BI.Date || {}; |
||||
// 牵扯到国际化这些常量在页面加载后再生效
|
||||
// full day names
|
||||
BI.Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
||||
BI.i18nText("BI-Basic_Monday"), |
||||
BI.i18nText("BI-Basic_Tuesday"), |
||||
BI.i18nText("BI-Basic_Wednesday"), |
||||
BI.i18nText("BI-Basic_Thursday"), |
||||
BI.i18nText("BI-Basic_Friday"), |
||||
BI.i18nText("BI-Basic_Saturday"), |
||||
BI.i18nText("BI-Basic_Sunday")]; |
||||
|
||||
// short day names
|
||||
BI.Date._SDN = [BI.i18nText("BI-Basic_Simple_Sunday"), |
||||
BI.i18nText("BI-Basic_Simple_Monday"), |
||||
BI.i18nText("BI-Basic_Simple_Tuesday"), |
||||
BI.i18nText("BI-Basic_Simple_Wednesday"), |
||||
BI.i18nText("BI-Basic_Simple_Thursday"), |
||||
BI.i18nText("BI-Basic_Simple_Friday"), |
||||
BI.i18nText("BI-Basic_Simple_Saturday"), |
||||
BI.i18nText("BI-Basic_Simple_Sunday")]; |
||||
|
||||
// Monday first, etc.
|
||||
BI.Date._FD = 1; |
||||
|
||||
// full month namesdat
|
||||
BI.Date._MN = [ |
||||
BI.i18nText("BI-Basic_January"), |
||||
BI.i18nText("BI-Basic_February"), |
||||
BI.i18nText("BI-Basic_March"), |
||||
BI.i18nText("BI-Basic_April"), |
||||
BI.i18nText("BI-Basic_May"), |
||||
BI.i18nText("BI-Basic_June"), |
||||
BI.i18nText("BI-Basic_July"), |
||||
BI.i18nText("BI-Basic_August"), |
||||
BI.i18nText("BI-Basic_September"), |
||||
BI.i18nText("BI-Basic_October"), |
||||
BI.i18nText("BI-Basic_November"), |
||||
BI.i18nText("BI-Basic_December")]; |
||||
|
||||
// short month names
|
||||
BI.Date._SMN = [0, |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11]; |
||||
|
||||
BI.Date._QN = ["", BI.i18nText("BI-Quarter_1"), |
||||
BI.i18nText("BI-Quarter_2"), |
||||
BI.i18nText("BI-Quarter_3"), |
||||
BI.i18nText("BI-Quarter_4")]; |
||||
|
||||
/** Adds the number of days array to the Date object. */ |
||||
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; |
||||
|
||||
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
|
||||
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6]; |
||||
}); |
@ -0,0 +1,31 @@
|
||||
@import "../../index.less"; |
||||
|
||||
.bi-instruction { |
||||
.border-radius(2px); |
||||
|
||||
&.instruction-error{ |
||||
background: @color-bi-background-bubble-error; |
||||
color: @color-bi-text-failure; |
||||
} |
||||
|
||||
&.instruction-common{ |
||||
background: @color-bi-background-bubble-normal; |
||||
color: @color-bi-text-highlight; |
||||
} |
||||
|
||||
&.instruction-success{ |
||||
background: @color-bi-background-bubble-success; |
||||
color: @color-bi-text-success; |
||||
} |
||||
|
||||
&.instruction-warning{ |
||||
background: @color-bi-background-bubble-warning; |
||||
color: @color-bi-text-redmark; |
||||
} |
||||
} |
||||
|
||||
.bi-theme-dark { |
||||
.bi-instruction.instruction-error { |
||||
background: @color-bi-background-bubble-error-theme-dark; |
||||
} |
||||
} |
@ -0,0 +1,90 @@
|
||||
@import "../../index.less"; |
||||
|
||||
.tree-first-solid-line-conn-background { |
||||
&:before { |
||||
position: absolute; |
||||
bottom: 0; |
||||
left: -1px; |
||||
width: 50%; |
||||
height: 50%; |
||||
border-right: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
|
||||
&:after { |
||||
position: absolute; |
||||
top: 0; |
||||
right: 0; |
||||
height: 50%; |
||||
width: 50%; |
||||
border-bottom: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
} |
||||
|
||||
|
||||
.tree-mid-solid-line-conn-background { |
||||
&:before { |
||||
position: absolute; |
||||
top: 0; |
||||
left: -1px; |
||||
width: 50%; |
||||
height: 100%; |
||||
border-right: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
|
||||
&:after { |
||||
position: absolute; |
||||
top: 0; |
||||
right: 0; |
||||
height: 50%; |
||||
width: 50%; |
||||
border-bottom: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
} |
||||
|
||||
.tree-last-solid-line-conn-background { |
||||
&:before { |
||||
position: absolute; |
||||
top: 0; |
||||
left: -1px; |
||||
width: 50%; |
||||
height: 50%; |
||||
border-right: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
|
||||
&:after { |
||||
position: absolute; |
||||
top: 0; |
||||
right: 1px; |
||||
height: 50%; |
||||
width: 50%; |
||||
border-bottom: 1px solid @border-color-dark-gray-line; |
||||
content: ''; |
||||
} |
||||
} |
||||
|
||||
.bi-theme-dark { |
||||
.tree-first-solid-line-conn-background, .tree-mid-solid-line-conn-background { |
||||
&:before { |
||||
border-right: 1px solid @border-color-dark-gray-line-theme-dark; |
||||
} |
||||
|
||||
&:after { |
||||
border-bottom: 1px solid @border-color-dark-gray-line-theme-dark; |
||||
} |
||||
} |
||||
|
||||
.tree-last-solid-line-conn-background { |
||||
&:before { |
||||
border-right: 1px solid @border-color-dark-gray-line-theme-dark; |
||||
} |
||||
|
||||
&:after { |
||||
border-bottom: 1px solid @border-color-dark-gray-line-theme-dark; |
||||
} |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue