How to use esui - 10 common examples

To help you get started, we’ve selected a few esui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.2 / src / colorPicker / FullColorPicker.js View on Github external
this.addState(newMode);
            this.currentMode = newMode;
        }

        function updateAdvancedColorPicker() {
            // 更新色盘
            var colorPicker = this.getChild('advanced');
            if (colorPicker) {
                var color = this.displayHex;
                colorPicker.updateHex(color);
                var alpha = this.displayAlpha;
                colorPicker.updateAlpha(alpha);
            }
        }

        esui.register(FullColorPicker);
        return FullColorPicker;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.2 / src / selectors / RichSelector.js View on Github external
function search(e) {
            this.search();
        }

        function resetSearchState(control) {
            // 删除搜索状态
            control.removeState('queried');

            // 清空搜索框
            var searchBox = control.getSearchBox();
            if (searchBox) {
                searchBox.set('text', '');
            }
        }

        esui.register(RichSelector);
        return RichSelector;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.3 / src / chart / RegionChart.js View on Github external
}

        // PIE左边距极限值。小于这个的话,就和地图重叠了。
        var LEFT_EXTREME_POSITION = 640;
        // 容器宽度界定值。容器比这个大的话,可以放得更宽松。
        var WINDOW_WIDTH = 1200;

        function getPieLeftPosition(mainWidth) {
            var pieLeftPosition = mainWidth - (mainWidth > WINDOW_WIDTH ? 400 : 220);
            if (pieLeftPosition < LEFT_EXTREME_POSITION) {
                pieLeftPosition = LEFT_EXTREME_POSITION;
            }
            return pieLeftPosition;
        }

        require('esui').register(RegionChart);
        return RegionChart;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.3 / src / Slider.js View on Github external
// 存住活动的对象
            this.activeCursorElement = cursorElement;

            // 增加active的样式
            $(cursorElement).addClass(this.helper.getPartClassName('body-cursor-active'));

            // 点击的时候再初始化各种坐标 为了一些初始化时不在屏幕内的控件
            initBodyElements(this);

            // 滑块首先移动到鼠标点击位置
            mousemoveHandler.call(this, e);

            return true;
        }

        esui.register(Slider);
        return Slider;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.2 / src / TokenField.js View on Github external
if (!this.rawValue) {
                // 第一次没有设置的时候设置一个空值进来
                this.rawValue = [];
            }
            var rawValue = this.rawValue.slice(0);
            rawValue.push(inputValue);
            this.setProperties({rawValue: rawValue});

            if (beforeValue === this.getValue() && inputValue.length) {
                return;
            }
            // token创建成功,清空输入框
            input.setRawValue('');
        }

        esui.register(TokenField);
        return TokenField;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.3 / src / MediaPreview.js View on Github external
}

        var helper = this.helper;
        var toolTpl = '<span data-tool-role="${iconRole}" class="${iconClass}" data-role="tool"></span>';
        u.each(toolRole.split(','), function (role) {
            $(helper.getPart('tool')).append(lib.format(
                toolTpl,
                {
                    iconClass: helper.getIconClass() + '-' + role,
                    iconRole: role
                }
            ));
        });
    }

    esui.register(MediaPreview);
    return MediaPreview;
});
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.2 / src / selectors / TableRichSelectorWithFilter.js View on Github external
else {
                        this.clearQuery();
                    }
                },

                /**
                 * 获取筛选区Panel
                 * @return {esui.Panel}
                 */
                getFilter: function () {
                    return this.getChild('body').getChild('searchBoxArea').getChild('filter');
                }
            }
        );

        esui.register(TableRichSelectorWithFilter);
        return TableRichSelectorWithFilter;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.2 / src / selectors / ToggleSelector.js View on Github external
}
        }

        /**
         * 添加数据时才控制展开收起
         *
         * @event
         * @param {Object} e 事件对象
         */
        function addHandler(e) {
            if (this.collapseAfterChange) {
                this.toggleContent();
            }
        }

        esui.register(ToggleSelector);
        return ToggleSelector;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta.3 / src / selectors / PagingTree.js View on Github external
/**
         * 销毁控件
         *
         * @protected
         * @override
         */
        exports.dispose = function () {
            this.$super(arguments);
            this.nodeIndex = null;
            this.selectedNodes = null;
            this.selectedNodeIndex = null;
        };

        var Tree = require('eoo').create(Control, exports);

        require('esui').register(Tree);
        return Tree;
    }
);
github ecomfe / esui-family / dep / ub-ria-ui / 1.0.0-beta / src / selectors / TableRichSelectorWithFilter.js View on Github external
else {
                this.clearQuery();
            }
        };

        /**
         * 获取筛选区Panel
         * @return {esui.Panel}
         */
        exports.getFilter = function () {
            return this.getChild('body').getChild('filter');
        };

        var TableRichSelectorWithFilter = require('eoo').create(TableRichSelector, exports);

        require('esui').register(TableRichSelectorWithFilter);

        return TableRichSelectorWithFilter;
    }
);

esui

esui

Unknown
Latest version published 7 years ago

Package Health Score

36 / 100
Full package analysis

Popular esui functions

Similar packages