Skip to content

Commit

Permalink
重构prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhubaofu committed Nov 3, 2014
1 parent c2b96d7 commit 021c3bb
Show file tree
Hide file tree
Showing 12 changed files with 316 additions and 288 deletions.
2 changes: 1 addition & 1 deletion example/Calendar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -468,4 +468,4 @@ require(['jquery', 'ui/Calendar'], function ($, Calendar) {
});
```

{%/filter%}
{%/filter%}
8 changes: 4 additions & 4 deletions example/City.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
margin: 0;
outline: none;
}
.line button {
margin: 0 10px;
}
Expand Down Expand Up @@ -73,7 +73,7 @@ require(['ui/City'], function (City) {
prefix: 'ecl-ui-city',
triggers: $('.city-trigger').toArray(),
//target: 'city',
onBeforeShow: function (arg) {
var e = arg.event;
var target = e.target;
Expand Down Expand Up @@ -188,7 +188,7 @@ require(['ui/City'], function (City) {
prefix: 'ecl-ui-city',
triggers: $('.city-trigger').toArray(),
//target: 'city',
onBeforeShow: function (arg) {
var e = arg.event;
var target = e.target;
Expand Down Expand Up @@ -291,4 +291,4 @@ require(['ui/City'], function (City) {
});
</script>
</script>
16 changes: 16 additions & 0 deletions example/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @file moye 主入口
* @author Leon([email protected])
*/
define(function (require) {
var Control = require('./Control');
var exports = {};

exports.init = function (container, options) {



};

return exports;
});
11 changes: 9 additions & 2 deletions src/css/variable.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
@footer-z-index: 1000;
@modal-z-index: 1050;

// 前缀配置
@moye-common-prefix: ui;
@moye-card-prefix: ecl-ui;

// 默认全局配置
@moye-prefix: @moye-common-prefix;

// 翻页器
@pager-prefix: ecl-ui-pager;
@pager-item-color: #03c;
Expand All @@ -36,14 +43,14 @@
@pager-item-triangle-color: #666;
@pager-item-disabled-color: #999;

@button-prefix: ui-button;
@button-prefix: replace(~"prefix-button", 'prefix', @moye-prefix);
@button-background: #2196ff;
@button-color: #fff;
@button-border-color: #f3f3f3;
@butotn-disabled-background-color: #e7e7e7;

// 日历
@cal-prefix: ecl-ui-cal;
@cal-prefix: replace(~"prefix-calendar", 'prefix', @moye-prefix);

// 城市控件
@city-prefix: ecl-ui-city;
Expand Down
3 changes: 0 additions & 3 deletions src/ui/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ define(function (require) {
// 控件渲染主容器
main: '',

// 控件class前缀,同时将作为main的class之一
prefix: 'ui-button',

text: null,

width: '',
Expand Down
Loading

0 comments on commit 021c3bb

Please sign in to comment.