SlideShare a Scribd company logo
1 of 43
Download to read offline
947B/UI%- 
02
• AC 
• 9 · 2+5K2012 ~L 
• MCOSUI 
• M@)8
.
 
•
)+'#!UI$ 
• COSUI 
• COSUI'#!
)+'#! 
• D.
)+'#! 
• D.  
• G1
)+'#! 
• D.  
• G1 
• 6( 
searchbox 
table 
pagination
)+'#! 
• D.  
• G1 
• 6( 
searchbox 
table 
pagination
)+'#! 
• D.  
• G1 
• 6( 
• : lcƒ8€c
…‚
)+UI$ 
• H,7
... #
)+UI$ 
• /! 
“”]dh 
crm.html 
div class=crm-bar{{c}}/div 
crm.css 
... 
“6”]dh 
gis.html 
div class=crm-bar{{g}}/div 
crm.css 
...
)+UI$ 
• HTML*3/Jclass?; 
• 'FE	 
•
!
 
• ...
D= 
I$J?;J9 
0UI@
%-
COSUI 
Component 
Base 
Twitter Bootstrap 
Layout 
YUI 
jQuery 
... 
S: 
~, 
CQ ro 0
CSS4 
Grid system 
Typography 
Code 
Tables 
Forms 
Buttons 
Images 
Helper classes 
Responsive utilities 
Component4 
Glyphicons 
Dropdowns 
Button groups 
Button 
dropdowns 
Input groups 
Navs 
Navbar 
Breadcrumbs 
Pagination 
Labels 
Badges 
Jumbotron 
Page header 
Thumbnails 
Alerts 
Progress bars 
Media object 
List group 
Panels 
Wells 
JavaScript4 
Transitions 
Modal 
Dropdown 
Scrollspy 
Tab 
Tooltip 
Popover 
Alert 
Button 
Collapse 
Carousel 
Affix 
• - ootstrap
• H ootstrap 
Bootstrap]w„ 
• %t~`p^7m,ƒJ;M|R 
• +DCustomize0ƒ`q 
• cD~BvƒJfW|R 
• j.(z2k]:/Nƒ[JSEUXw9J}T 
• AjQuery
Bootstrap]w„ 
• %t~`p^7m,ƒJ;M|R 
• +DCustomize0ƒ`q 
 s~, 
• cD~BvƒJfW|R 
• j.(z2k]:/Nƒ[JSEUXw9J}T 
• AjQuery 
• H ootstrap
• H ootstrap 
Bootstrap]w„ 
• %t~`p^7m,ƒJ;M|R 
• +DCustomize0ƒ`q 
 s~, 
• cD~BvƒJfW|R 
• j.(z2k]:/Nƒ[JSEUXw9J}T 
I)S + :/N 
• AjQuery
• H ootstrap 
Bootstrap]w„ 
• %t~`p^7m,ƒJ;M|R 
• +DCustomize0ƒ`q 
 s~, 
• cD~BvƒJfW|R 
• j.(z2k]:/Nƒ[JSEUXw9J}T 
I)S + :/N 
• AjQuery 
YUI, jQuery ... 
and more !
Box Corner 
form-table 
• “L$”S 
and more...
COSUI 
Component 
Base 
Twitter Bootstrap 
Layout 
YUI 
jQuery 
... 
S: 
~, 
CQ ro 0
input id=date name=testDate data-widget=datepicker 
data-params={mindate: 2014-01-01} / 
HTML 
// YUI 
Y.use('w-date', function(Y) { 
var auto = new Y.mt.widget.Datepicker({ 
node: Y.one(date), 
mindate: 2014-01-01 
}); 
}); 
// jQuery 
$(#date).datepicker({ 
mindate: 2014-01-01 
}); 
or 
JavaScript 
„FK?
5 
COSUI'#! 
4yO1 Pn 
D:/ 
roh 
YLZb 
CQA
1 2* 
!DOCTYPE html 
html 
head 
titleCOSUI/title 
!-- COSUI -- 
link href=static/node_modules/mtfe_cos-ui/cos-ui.min.css 
rel=stylesheet 
/head 
body class=theme-cos 
... 
script src=static/node_modules/mtfe_cos-ui/base/base.min.js/script 
/body 
/html
1 xLayout
Header 
#main#nav 
Sidebar Content 
Footer 
#l#hd 
#l#bd 
#l#ft 
95% 
1 xLayout
1 xLayout 
div id=doc 
div id=l-hd 
div class=l-hd-left 
div class=l-hd-main 
span class=logo/span 
h1a href=/
/a/h1 
span class=version${_config.system_version!}/span 
/div 
#include 'menu.ftl' encoding=UTF-8 
/div 
#include 'userinfo.ftl' encoding=UTF-8 
/div 
div id=wrapper 
#include 'sidebar.ftl' encoding=UTF-8 
div id=l-bd class=main${body}/div 
/div 
div id=l-ft 
#64; 2014 meituan 
/div 
/div
1 2a
1 2a
!-- )(title -- 
div class=page-header 
h2
%/h2 
/div 
!-- Search Box -- 
div class=box 
div class=box-content 
form class=form-inline action= 
! *input type=text name=date data-widget=datepicker / 
!
*input type=text name=patnersname / 
input type=submit class=btn btn-info value= / 
! /form 
/div 
/div 
!-- % -- 
table class=table table-striped table-bordered 
thead 
! tr
!	/tr 
! ... 
/thead 
tbody 
! ... 
/tbody 
/table 
!-- ) -- 
div class=pagination 
... 
/div
'LESS 
! base 
# ! base-var.less 
# ! base.css 
# ! base.html 
# $ base.less 
! box 
# ! box-var.less 
# ! box.css 
# ! box.html 
# $ box.less 
! font-awesome 
# ! FontAwesome.otf 
# ! font-awesome.css 
# ! font-awesome.less 
# ! fontawesome-webfont.eot 
# ! fontawesome-webfont.svg 
# ! fontawesome-webfont.ttf 
# $ fontawesome-webfont.woff 
! ...
box.less 
@import ../base/base-var.less; 
@import ./box-var.less; 
.box { 
border: 1px solid @box-border; 
margin-bottom: @line-height-base; 
position: relative; 
// ' 
.box-collapsed { 
.box-header { 
.actions .box-collapse i:before { 
content: f078; 
} 
} 
.box-content { 
display: none; 
} 
} 
} 
box-var.less 
@box-border: #ddd; 
@box-color-highlight: @theme-color-base; 
@box-padding-vertical: 10px; 
@box-padding-vertical-middle: floor((@box-padding-vertical 
* 0.9)); 
@box-padding-vertical-small: floor((@box-padding-vertical 
* 0.8)); 
@box-padding-horizontal: 10px; 
@box-padding-common: 20px; 
@box-padding-double: @box-padding-common * 2; 
@box-header-background: #fcfcfc; 
@box-header-color: @text-color; 
@box-header-color-light: #fff; // #$$ 
@box-header-actions-link-color: #c4c4c4; 
@box-header-font-size: 18px; 
@box-header-font-weight: 400; 
@box-header-height: @line-height-base - 2px; 
 'LESS
@}T
(zS@
 
. 
$ newmodule 
! newmodule-var.less 
! newmodule.html 
! newmodule.less 
$ someimg.png 
Pull Request
3, t~
3, )dh
x

More Related Content

What's hot

การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์เทวัญ ภูพานทอง
 
Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Even Wu
 
jQuery入門 - 芸大 Webデザイン演習B
jQuery入門 - 芸大 Webデザイン演習BjQuery入門 - 芸大 Webデザイン演習B
jQuery入門 - 芸大 Webデザイン演習BAtsushi Tadokoro
 
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーjQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーAtsushi Tadokoro
 
Interactions du paludisme et autres maladies infectieuses
Interactions du paludisme et autres maladies infectieusesInteractions du paludisme et autres maladies infectieuses
Interactions du paludisme et autres maladies infectieusesInstitut Pasteur de Madagascar
 
Dreamweaver CS3 CE. Ćwiczenia praktyczne
Dreamweaver CS3 CE. Ćwiczenia praktyczneDreamweaver CS3 CE. Ćwiczenia praktyczne
Dreamweaver CS3 CE. Ćwiczenia praktyczneWydawnictwo Helion
 
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...Eric Eggert
 
Informed 2010 telecuidados - osarean
Informed 2010   telecuidados - osareanInformed 2010   telecuidados - osarean
Informed 2010 telecuidados - osareanOsarean
 
Increase company’s profits by using courier services
Increase company’s profits by using courier servicesIncrease company’s profits by using courier services
Increase company’s profits by using courier servicesSonia Singh
 
JS for Rails developers
JS for Rails developersJS for Rails developers
JS for Rails developersTimur Vafin
 
观剧卡免费赠读者
观剧卡免费赠读者观剧卡免费赠读者
观剧卡免费赠读者sugeladi
 
Atom structure
Atom structureAtom structure
Atom structuresatapisat
 
สื่อประสม
สื่อประสมสื่อประสม
สื่อประสมchukiat008
 
スマホウェブの本命 jQueryMobile
スマホウェブの本命 jQueryMobileスマホウェブの本命 jQueryMobile
スマホウェブの本命 jQueryMobileManabu Uekusa
 
Основы CSS препроцессоров и их использование в WordPress
Основы CSS препроцессоров и их использование в WordPressОсновы CSS препроцессоров и их использование в WordPress
Основы CSS препроцессоров и их использование в WordPressDmitry Mayorov
 

What's hot (20)

การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
 
Templating WordPress
Templating WordPressTemplating WordPress
Templating WordPress
 
Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形
 
jQuery入門 - 芸大 Webデザイン演習B
jQuery入門 - 芸大 Webデザイン演習BjQuery入門 - 芸大 Webデザイン演習B
jQuery入門 - 芸大 Webデザイン演習B
 
dojo.basix
dojo.basixdojo.basix
dojo.basix
 
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーjQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
 
Tutorial subir videos you_tube (3)
Tutorial subir videos  you_tube (3)Tutorial subir videos  you_tube (3)
Tutorial subir videos you_tube (3)
 
My Visual Resume
My Visual ResumeMy Visual Resume
My Visual Resume
 
Interactions du paludisme et autres maladies infectieuses
Interactions du paludisme et autres maladies infectieusesInteractions du paludisme et autres maladies infectieuses
Interactions du paludisme et autres maladies infectieuses
 
การแทรกรูปภาพ
การแทรกรูปภาพการแทรกรูปภาพ
การแทรกรูปภาพ
 
Dreamweaver CS3 CE. Ćwiczenia praktyczne
Dreamweaver CS3 CE. Ćwiczenia praktyczneDreamweaver CS3 CE. Ćwiczenia praktyczne
Dreamweaver CS3 CE. Ćwiczenia praktyczne
 
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...
Neue aufregende Web Technologien, HTML5 + CSS3 anhand von Praxisbeispielen le...
 
Informed 2010 telecuidados - osarean
Informed 2010   telecuidados - osareanInformed 2010   telecuidados - osarean
Informed 2010 telecuidados - osarean
 
Increase company’s profits by using courier services
Increase company’s profits by using courier servicesIncrease company’s profits by using courier services
Increase company’s profits by using courier services
 
JS for Rails developers
JS for Rails developersJS for Rails developers
JS for Rails developers
 
观剧卡免费赠读者
观剧卡免费赠读者观剧卡免费赠读者
观剧卡免费赠读者
 
Atom structure
Atom structureAtom structure
Atom structure
 
สื่อประสม
สื่อประสมสื่อประสม
สื่อประสม
 
スマホウェブの本命 jQueryMobile
スマホウェブの本命 jQueryMobileスマホウェブの本命 jQueryMobile
スマホウェブの本命 jQueryMobile
 
Основы CSS препроцессоров и их использование в WordPress
Основы CSS препроцессоров и их использование в WordPressОсновы CSS препроцессоров и их использование в WordPress
Основы CSS препроцессоров и их использование в WordPress
 

美团业务系统通用Ui方案

  • 2. • AC • 9 · 2+5K2012 ~L • MCOSUI • M@)8
  • 4. )+'#!UI$ • COSUI • COSUI'#!
  • 6. )+'#! • D. • G1
  • 7. )+'#! • D. • G1 • 6( searchbox table pagination
  • 8. )+'#! • D. • G1 • 6( searchbox table pagination
  • 9. )+'#! • D. • G1 • 6( • : lcƒ8€c …‚
  • 11. ... #
  • 12. )+UI$ • /! “”]dh crm.html div class=crm-bar{{c}}/div crm.css ... “6”]dh gis.html div class=crm-bar{{g}}/div crm.css ...
  • 16. COSUI Component Base Twitter Bootstrap Layout YUI jQuery ... S: ~, CQ ro 0
  • 17. CSS4 Grid system Typography Code Tables Forms Buttons Images Helper classes Responsive utilities Component4 Glyphicons Dropdowns Button groups Button dropdowns Input groups Navs Navbar Breadcrumbs Pagination Labels Badges Jumbotron Page header Thumbnails Alerts Progress bars Media object List group Panels Wells JavaScript4 Transitions Modal Dropdown Scrollspy Tab Tooltip Popover Alert Button Collapse Carousel Affix • - ootstrap
  • 18. • H ootstrap Bootstrap]w„ • %t~`p^7m,ƒJ;M|R • +DCustomize0ƒ`q • cD~BvƒJfW|R • j.(z2k]:/Nƒ[JSEUXw9J}T • AjQuery
  • 19. Bootstrap]w„ • %t~`p^7m,ƒJ;M|R • +DCustomize0ƒ`q s~, • cD~BvƒJfW|R • j.(z2k]:/Nƒ[JSEUXw9J}T • AjQuery • H ootstrap
  • 20. • H ootstrap Bootstrap]w„ • %t~`p^7m,ƒJ;M|R • +DCustomize0ƒ`q s~, • cD~BvƒJfW|R • j.(z2k]:/Nƒ[JSEUXw9J}T I)S + :/N • AjQuery
  • 21. • H ootstrap Bootstrap]w„ • %t~`p^7m,ƒJ;M|R • +DCustomize0ƒ`q s~, • cD~BvƒJfW|R • j.(z2k]:/Nƒ[JSEUXw9J}T I)S + :/N • AjQuery YUI, jQuery ... and more !
  • 22. Box Corner form-table • “L$”S and more...
  • 23. COSUI Component Base Twitter Bootstrap Layout YUI jQuery ... S: ~, CQ ro 0
  • 24. input id=date name=testDate data-widget=datepicker data-params={mindate: 2014-01-01} / HTML // YUI Y.use('w-date', function(Y) { var auto = new Y.mt.widget.Datepicker({ node: Y.one(date), mindate: 2014-01-01 }); }); // jQuery $(#date).datepicker({ mindate: 2014-01-01 }); or JavaScript „FK?
  • 25. 5 COSUI'#! 4yO1 Pn D:/ roh YLZb CQA
  • 26. 1 2* !DOCTYPE html html head titleCOSUI/title !-- COSUI -- link href=static/node_modules/mtfe_cos-ui/cos-ui.min.css rel=stylesheet /head body class=theme-cos ... script src=static/node_modules/mtfe_cos-ui/base/base.min.js/script /body /html
  • 28. Header #main#nav Sidebar Content Footer #l#hd #l#bd #l#ft 95% 1 xLayout
  • 29. 1 xLayout div id=doc div id=l-hd div class=l-hd-left div class=l-hd-main span class=logo/span h1a href=/
  • 30. /a/h1 span class=version${_config.system_version!}/span /div #include 'menu.ftl' encoding=UTF-8 /div #include 'userinfo.ftl' encoding=UTF-8 /div div id=wrapper #include 'sidebar.ftl' encoding=UTF-8 div id=l-bd class=main${body}/div /div div id=l-ft #64; 2014 meituan /div /div
  • 31. 1 2a
  • 32. 1 2a
  • 33. !-- )(title -- div class=page-header h2
  • 34. %/h2 /div !-- Search Box -- div class=box div class=box-content form class=form-inline action= ! *input type=text name=date data-widget=datepicker / !
  • 35. *input type=text name=patnersname / input type=submit class=btn btn-info value= / ! /form /div /div !-- % -- table class=table table-striped table-bordered thead ! tr
  • 36. ! /tr ! ... /thead tbody ! ... /tbody /table !-- ) -- div class=pagination ... /div
  • 37. 'LESS ! base # ! base-var.less # ! base.css # ! base.html # $ base.less ! box # ! box-var.less # ! box.css # ! box.html # $ box.less ! font-awesome # ! FontAwesome.otf # ! font-awesome.css # ! font-awesome.less # ! fontawesome-webfont.eot # ! fontawesome-webfont.svg # ! fontawesome-webfont.ttf # $ fontawesome-webfont.woff ! ...
  • 38. box.less @import ../base/base-var.less; @import ./box-var.less; .box { border: 1px solid @box-border; margin-bottom: @line-height-base; position: relative; // ' .box-collapsed { .box-header { .actions .box-collapse i:before { content: f078; } } .box-content { display: none; } } } box-var.less @box-border: #ddd; @box-color-highlight: @theme-color-base; @box-padding-vertical: 10px; @box-padding-vertical-middle: floor((@box-padding-vertical * 0.9)); @box-padding-vertical-small: floor((@box-padding-vertical * 0.8)); @box-padding-horizontal: 10px; @box-padding-common: 20px; @box-padding-double: @box-padding-common * 2; @box-header-background: #fcfcfc; @box-header-color: @text-color; @box-header-color-light: #fff; // #$$ @box-header-actions-link-color: #c4c4c4; @box-header-font-size: 18px; @box-header-font-weight: 400; @box-header-height: @line-height-base - 2px; 'LESS
  • 39. @}T
  • 40. (zS@ . $ newmodule ! newmodule-var.less ! newmodule.html ! newmodule.less $ someimg.png Pull Request
  • 43. x
  • 44. ~,
  • 45. ... =}e!S √ √ √ √ √ √ √ √ √ cosui.css cosui.zdy.css
  • 46. /-+ Siro • Class# • ro • V{ • -5 • ...
  • 47. /-+ S@ ro • _3gO • C# • V{uG • Pull-request • ...
  • 48. %( cosui git:(master) ls dist 1.0.0 1.0.2 1.0.4 1.0.6 1.1.1 1.1.11 1.1.2 1.1.4 1.1.6 1.1.8 1.2.0 1.2.10 1.2.12 1.2.2 1.2.4 1.2.6 1.0.1 1.0.3 1.0.5 1.1.0 1.1.10 1.1.13 1.1.3 1.1.5 1.1.7 1.1.9 1.2.1 1.2.11 1.2.13 1.2.3 1.2.5 1.2.9 { name: mtfe_cos-ui, version: 1.2.13, description: COSUI, scripts: { prepublish: bash prepublish.sh, build: node deploy.js, deploy: bash deploy.sh, ... }, ... } npm install -r http://***.com mtfe_cos-ui@1.2.9 * git checkout 1.2.9
  • 49. Q A