Browse Source

无JIRA任务 图标换一换,demo删一删,名字改一改

es6
windy 6 years ago
parent
commit
78d38d2fcb
  1. 1
      demo/js/base/demo.label.js
  2. 215
      demo/js/category/customATree/demo.multilayerselecttree.leveltree.js
  3. 4
      demo/js/config/category.js
  4. 2
      dist/bundle.css
  5. 6
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 4
      dist/bundle.min.js
  8. 2
      dist/core.css
  9. 2
      dist/core_without_normalize.css
  10. 219
      dist/demo.js
  11. 2
      dist/fineui.css
  12. 6
      dist/fineui.js
  13. 2
      dist/fineui.min.css
  14. 4
      dist/fineui.min.js
  15. 6
      dist/fineui_without_jquery_polyfill.js
  16. BIN
      dist/images/cursor/disable.cur
  17. 2
      dist/utils.min.js
  18. 6
      dist/widget.js
  19. 4
      public/less/var.less
  20. 2
      src/css/core/utils/common.css
  21. 2
      src/less/core/utils/common.less
  22. 1
      src/less/var.less
  23. 2
      src/widget/singleselect/search/singleselect.search.loader.js
  24. 2
      src/widget/singleselect/singleselect.item.js
  25. 2
      src/widget/singleselect/singleselect.loader.js
  26. 4
      ui/less/var.less

1
demo/js/base/demo.label.js

@ -9,6 +9,7 @@ Demo.Label = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
cls: "layout-bg6", cls: "layout-bg6",
text: "这是一个label控件,默认居中", text: "这是一个label控件,默认居中",
disabled: true,
textAlign: "center" textAlign: "center"
}, { }, {
type: "bi.label", type: "bi.label",

215
demo/js/category/customATree/demo.multilayerselecttree.leveltree.js

@ -1,215 +0,0 @@
/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items));
});
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
});
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {// 根节点
callback([{
id: 1,
pId: 0,
text: "A",
value: 1,
isParent: true
}, {
id: 2,
pId: 0,
text: "B",
value: 2,
isParent: true,
open: true
}]);
} else {
if (op.node.id == 1) {
callback([
{
id: 11,
pId: 1,
text: "test11",
value: 11,
layer: 1,
isParent: true
},
{
id: 12,
pId: 1,
text: "test12",
value: 12,
layer: 1
},
{
id: 13,
pId: 1,
text: "test13",
value: 13,
layer: 1
},
{
id: 14,
pId: 1,
text: "test14",
value: 14,
layer: 1,
height: 35
},
{
id: 15,
pId: 1,
text: "test15",
value: 15,
layer: 1
},
{
id: 16,
pId: 1,
text: "test16",
value: 16,
layer: 1
},
{id: 17, pId: 1, text: "test17", layer: 1, value: 17}
]);
} else if (op.node.id == 2) {
callback([{
id: 21,
pId: 2,
text: "test21",
value: 21,
layer: 1
},
{
id: 22,
pId: 2,
text: "test22",
value: 22,
layer: 1
}]);
} else if (op.node.id == 11) {
callback([{
id: 111,
pId: 11,
text: "test111",
value: 111,
layer: 2
}]);
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);

4
demo/js/config/category.js

@ -1,10 +1,6 @@
Demo.CATEGORY_CONFIG = [{ Demo.CATEGORY_CONFIG = [{
id: 100000, id: 100000,
text: "专题" text: "专题"
}, {
pId: 100000,
text: "自定义一棵树",
value: "demo.platform_level_tree"
}, { }, {
pId: 100000, pId: 100000,
text: "可以排序的树", text: "可以排序的树",

2
dist/bundle.css vendored

@ -288,7 +288,7 @@ textarea {
border: 1px solid #3a3c53; border: 1px solid #3a3c53;
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url('images/cursor/disable.cur'), auto !important;
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.base-disabled .bi-input { .base-disabled .bi-input {

6
dist/bundle.js vendored

@ -74307,7 +74307,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -75062,7 +75062,7 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/** BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -75300,7 +75300,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

@ -288,7 +288,7 @@ textarea {
border: 1px solid #3a3c53; border: 1px solid #3a3c53;
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url('images/cursor/disable.cur'), auto !important;
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.base-disabled .bi-input { .base-disabled .bi-input {

2
dist/core_without_normalize.css vendored

@ -7,7 +7,7 @@ textarea {
border: 1px solid #3a3c53; border: 1px solid #3a3c53;
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url('images/cursor/disable.cur'), auto !important;
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.base-disabled .bi-input { .base-disabled .bi-input {

219
dist/demo.js vendored

@ -349,6 +349,7 @@ BI.shortcut("demo.icon_label", Demo.IconLabel);Demo.Label = BI.inherit(BI.Widget
type: "bi.label", type: "bi.label",
cls: "layout-bg6", cls: "layout-bg6",
text: "这是一个label控件,默认居中", text: "这是一个label控件,默认居中",
disabled: true,
textAlign: "center" textAlign: "center"
}, { }, {
type: "bi.label", type: "bi.label",
@ -2644,220 +2645,6 @@ BI.shortcut("demo.select_text_trigger", Demo.Func);Demo.Func = BI.inherit(BI.Wid
} }
}); });
BI.shortcut("demo.text_trigger", Demo.Func);/** BI.shortcut("demo.text_trigger", Demo.Func);/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items));
});
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
});
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {// 根节点
callback([{
id: 1,
pId: 0,
text: "A",
value: 1,
isParent: true
}, {
id: 2,
pId: 0,
text: "B",
value: 2,
isParent: true,
open: true
}]);
} else {
if (op.node.id == 1) {
callback([
{
id: 11,
pId: 1,
text: "test11",
value: 11,
layer: 1,
isParent: true
},
{
id: 12,
pId: 1,
text: "test12",
value: 12,
layer: 1
},
{
id: 13,
pId: 1,
text: "test13",
value: 13,
layer: 1
},
{
id: 14,
pId: 1,
text: "test14",
value: 14,
layer: 1,
height: 35
},
{
id: 15,
pId: 1,
text: "test15",
value: 15,
layer: 1
},
{
id: 16,
pId: 1,
text: "test16",
value: 16,
layer: 1
},
{id: 17, pId: 1, text: "test17", layer: 1, value: 17}
]);
} else if (op.node.id == 2) {
callback([{
id: 21,
pId: 2,
text: "test21",
value: 21,
layer: 1
},
{
id: 22,
pId: 2,
text: "test22",
value: 22,
layer: 1
}]);
} else if (op.node.id == 11) {
callback([{
id: 111,
pId: 11,
text: "test111",
value: 111,
layer: 2
}]);
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);/**
* Created by roy on 16/5/23. * Created by roy on 16/5/23.
*/ */
BI.DetailTableCell = BI.inherit(BI.Widget, { BI.DetailTableCell = BI.inherit(BI.Widget, {
@ -3486,10 +3273,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
}];Demo.CATEGORY_CONFIG = [{ }];Demo.CATEGORY_CONFIG = [{
id: 100000, id: 100000,
text: "专题" text: "专题"
}, {
pId: 100000,
text: "自定义一棵树",
value: "demo.platform_level_tree"
}, { }, {
pId: 100000, pId: 100000,
text: "可以排序的树", text: "可以排序的树",

2
dist/fineui.css vendored

@ -288,7 +288,7 @@ textarea {
border: 1px solid #3a3c53; border: 1px solid #3a3c53;
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url('images/cursor/disable.cur'), auto !important;
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.base-disabled .bi-input { .base-disabled .bi-input {

6
dist/fineui.js vendored

@ -74549,7 +74549,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -75304,7 +75304,7 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/** BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -75542,7 +75542,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/fineui_without_jquery_polyfill.js vendored

@ -57414,7 +57414,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -58169,7 +58169,7 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/** BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -58407,7 +58407,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

BIN
dist/images/cursor/disable.cur vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/widget.js vendored

@ -15766,7 +15766,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -16521,7 +16521,7 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/** BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* 选择列表 * 选择列表
* *
* Created by GUY on 2015/11/1. * Created by GUY on 2015/11/1.
@ -16759,7 +16759,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

4
public/less/var.less

@ -1,4 +1,6 @@
@webUrl: 'https://fanruan.coding.me/fineui/dist/'; @webUrl: 'https://fanruan.coding.me/fineui/dist/';
@fontUrl: '@{webUrl}font/'; //图片的基本地址 @fontUrl: '@{webUrl}font/'; //图片的基本地址
@imageUrl: '@{webUrl}images/1x/'; //图片的基本地址 @imageUrl: '@{webUrl}images/1x/'; //图片的基本地址
@image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址 @image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址
@disabledCursor: '@{webUrl}images/cursor/disable_cursor.cur';

2
src/css/core/utils/common.css

@ -7,7 +7,7 @@ textarea {
border: 1px solid #3a3c53; border: 1px solid #3a3c53;
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url('images/cursor/disable.cur'), auto !important;
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.base-disabled .bi-input { .base-disabled .bi-input {

2
src/less/core/utils/common.less

@ -13,7 +13,7 @@ textarea {
} }
.base-disabled { .base-disabled {
cursor: not-allowed !important; cursor: url(@disabledCursor), auto !important;
color: @color-bi-text-disabled !important; color: @color-bi-text-disabled !important;
& .bi-input { & .bi-input {
color: @color-bi-text-disabled !important; color: @color-bi-text-disabled !important;

1
src/less/var.less

@ -1,6 +1,7 @@
@fontUrl: 'font/'; //字体存放路径 @fontUrl: 'font/'; //字体存放路径
@imageUrl: 'images/1x/'; //图片的基本地址 @imageUrl: 'images/1x/'; //图片的基本地址
@image2xUrl: 'images/2x/'; //2x图片的基本地址 @image2xUrl: 'images/2x/'; //2x图片的基本地址
@disabledCursor: 'images/cursor/disable.cur';
@zIndex-layer: 100000; @zIndex-layer: 100000;
@zIndex-popover: 1000000; @zIndex-popover: 1000000;

2
src/widget/singleselect/search/singleselect.search.loader.js

@ -82,7 +82,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false

2
src/widget/singleselect/singleselect.item.js

@ -64,4 +64,4 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem); BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);

2
src/widget/singleselect/singleselect.loader.js

@ -103,7 +103,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo.item", type: "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

4
ui/less/var.less

@ -2,4 +2,6 @@
@fontUrl: '@{webUrl}font/'; //图片的基本地址 @fontUrl: '@{webUrl}font/'; //图片的基本地址
@imageUrl: '@{webUrl}images/1x/'; //图片的基本地址 @imageUrl: '@{webUrl}images/1x/'; //图片的基本地址
@image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址 @image2xUrl: '@{webUrl}images/2x/'; //2倍图片的基本地址
@disabledCursor: '@{webUrl}images/cursor/disable_cursor.cur';
Loading…
Cancel
Save