├── examples ├── assets │ ├── styles │ │ ├── common.css │ │ └── fonts │ │ │ ├── icomoon.eot │ │ │ ├── icomoon.ttf │ │ │ ├── icomoon.woff │ │ │ └── style.css │ └── images │ │ ├── stars.png │ │ ├── navbar_0.png │ │ ├── navbar_1.png │ │ ├── navbar_2.png │ │ ├── navbar_3.png │ │ ├── qrcode.png │ │ ├── zhinan.png │ │ ├── zujian.png │ │ ├── hamburger.png │ │ ├── element-demo.jpeg │ │ └── fankui.svg ├── docs │ ├── home.md │ ├── breadcrumb.md │ ├── development.md │ ├── quickstart.md │ ├── loading.md │ ├── switch.md │ └── input-number.md ├── icon.json ├── utils │ └── strip-tags.js ├── dom │ └── class.js ├── index.template.html ├── entry.js └── pages │ ├── component.vue │ └── guide.vue ├── packages ├── theme-default │ ├── src │ │ ├── submenu.css │ │ ├── button-group.css │ │ ├── form-item.css │ │ ├── menu-item.css │ │ ├── radio-button.css │ │ ├── radio-group.css │ │ ├── tab-pane.css │ │ ├── table-column.css │ │ ├── breadcrumb-item.css │ │ ├── checkbox-group.css │ │ ├── dropdown-item.css │ │ ├── menu-item-group.css │ │ ├── base.css │ │ ├── fonts │ │ │ ├── element-icons.eot │ │ │ ├── element-icons.ttf │ │ │ └── element-icons.woff │ │ ├── time-picker.css │ │ ├── steps.css │ │ ├── select-dropdown.css │ │ ├── date-picker.css │ │ ├── option-group.css │ │ ├── card.css │ │ ├── core │ │ │ ├── tag.css │ │ │ ├── dropdown.css │ │ │ ├── input.css │ │ │ └── option.css │ │ ├── row.css │ │ ├── breadcrumb.css │ │ ├── col.css │ │ ├── loading.css │ │ ├── spinner.css │ │ ├── rate.css │ │ ├── time-select.css │ │ ├── option.css │ │ ├── badge.css │ │ ├── index.css │ │ ├── cascader.css │ │ ├── dropdown.css │ │ ├── mixins │ │ │ └── _button.css │ │ ├── message.css │ │ ├── notification.css │ │ ├── alert.css │ │ ├── autocomplete.css │ │ ├── form.css │ │ ├── tree.css │ │ └── input-number.css │ ├── README.md │ ├── package.json │ └── gulpfile.js ├── pagination │ ├── README.md │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── group │ ├── index.js │ └── src │ │ └── group.vue ├── icon │ ├── index.js │ └── src │ │ └── icon.vue ├── button │ ├── .npmignore │ ├── index.js │ ├── src │ │ ├── button-group.vue │ │ └── button.vue │ ├── package.json │ └── cooking.conf.js ├── message │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ ├── src │ │ ├── main.js │ │ └── main.vue │ └── assets │ │ ├── success.svg │ │ └── info.svg ├── message-box │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── notification │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── main.js ├── date-picker │ ├── index.js │ ├── src │ │ ├── picker │ │ │ ├── time-select.js │ │ │ ├── time-picker.js │ │ │ └── date-picker.js │ │ ├── css │ │ │ ├── vars.css │ │ │ ├── month-table.css │ │ │ ├── time-range-picker.css │ │ │ ├── year-table.css │ │ │ ├── time-spinner.css │ │ │ ├── date-picker.css │ │ │ ├── date-table.css │ │ │ └── time-picker.css │ │ └── util │ │ │ ├── i18n.js │ │ │ └── dropdown.js │ ├── package.json │ ├── README.md │ └── cooking.conf.js ├── time-picker │ └── index.js ├── time-select │ └── index.js ├── loading │ ├── index.js │ ├── package.json │ ├── src │ │ └── spinner.js │ └── cooking.conf.js ├── card │ ├── index.js │ ├── package.json │ ├── src │ │ └── main.vue │ └── cooking.conf.js ├── rate │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── tag │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── tag.vue ├── tree │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ ├── model │ │ └── tree.js │ │ └── tree.vue ├── alert │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── badge │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── main.vue ├── col │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── col.vue ├── row │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── row.vue ├── step │ └── index.js ├── steps │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── steps.vue ├── form │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── form.vue ├── menu │ ├── index.js │ ├── cooking.conf.js │ └── src │ │ ├── menu-item-group.vue │ │ └── menu-item.vue ├── slider │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── upload │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ ├── upload-list.vue │ │ └── cover.vue ├── input │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── README.md ├── popover │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── table │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── README.md ├── tooltip │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── main.vue ├── radio │ ├── index.js │ ├── package.json │ ├── src │ │ ├── radio-group.vue │ │ ├── radio-button.vue │ │ └── radio.vue │ ├── cooking.conf.js │ └── README.md ├── select │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── option-group.vue ├── dialog │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── README.md ├── option │ └── index.js ├── spinner │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── spinner.vue ├── switch │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── README.md ├── tab-pane │ └── index.js ├── cascader │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ ├── src │ │ └── menu.vue │ └── README.md ├── dropdown │ ├── index.js │ ├── src │ │ ├── dropdown-item.vue │ │ └── dropdown-menu.vue │ ├── package.json │ └── cooking.conf.js ├── progress │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── submenu │ └── index.js ├── checkbox │ ├── index.js │ ├── package.json │ ├── src │ │ └── checkbox-group.vue │ ├── cooking.conf.js │ └── README.md ├── form-item │ └── index.js ├── menu-item │ └── index.js ├── breadcrumb │ ├── index.js │ ├── src │ │ ├── breadcrumb.vue │ │ └── breadcrumb-item.vue │ ├── package.json │ └── cooking.conf.js ├── radio-group │ └── index.js ├── input-number │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── README.md ├── radio-button │ └── index.js ├── autocomplete │ ├── index.js │ ├── package.json │ └── cooking.conf.js ├── button-group │ └── index.js ├── option-group │ └── index.js ├── table-column │ └── index.js ├── dropdown-item │ └── index.js ├── select-dropdown │ ├── index.js │ ├── package.json │ ├── cooking.conf.js │ └── src │ │ └── select-dropdown.vue ├── menu-item-group │ └── index.js ├── checkbox-group │ └── index.js ├── breadcrumb-item │ └── index.js └── tabs │ ├── index.js │ ├── package.json │ ├── src │ ├── tab.vue │ └── tab-pane.vue │ └── cooking.conf.js ├── .eslintignore ├── .travis.yml ├── .babelrc ├── lerna.json ├── .gitignore ├── .eslintrc ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md ├── bin ├── iconInit.js └── build-all.js ├── scripts ├── cooking.common.js ├── cooking.conf.js └── cooking.component.js ├── src ├── utils │ └── clickoutside.js └── mixins │ └── emitter.js ├── LICENSE ├── CHANGELOG.md └── Makefile /examples/assets/styles/common.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/theme-default/src/submenu.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | popper.js 2 | fecha.js 3 | -------------------------------------------------------------------------------- /packages/theme-default/src/button-group.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/form-item.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/menu-item.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/radio-button.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/radio-group.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/tab-pane.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/table-column.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/breadcrumb-item.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/checkbox-group.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/dropdown-item.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme-default/src/menu-item-group.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/pagination/README.md: -------------------------------------------------------------------------------- 1 | ## el-pagination 2 | -------------------------------------------------------------------------------- /packages/group/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/group.vue'); 2 | -------------------------------------------------------------------------------- /packages/icon/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/icon.vue'); 2 | -------------------------------------------------------------------------------- /packages/button/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | npm-debug.log.* 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "5" 5 | script: make dist 6 | -------------------------------------------------------------------------------- /packages/message/index.js: -------------------------------------------------------------------------------- 1 | import Message from './src/main.js'; 2 | 3 | module.exports = Message; 4 | -------------------------------------------------------------------------------- /packages/theme-default/src/base.css: -------------------------------------------------------------------------------- 1 | @import "./common/transition.css"; 2 | @import "./icon.css"; 3 | -------------------------------------------------------------------------------- /packages/message-box/index.js: -------------------------------------------------------------------------------- 1 | import MessageBox from './src/main.js'; 2 | 3 | module.exports = MessageBox; 4 | -------------------------------------------------------------------------------- /examples/assets/images/stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/stars.png -------------------------------------------------------------------------------- /packages/notification/index.js: -------------------------------------------------------------------------------- 1 | import Notification from './src/main.js'; 2 | 3 | module.exports = Notification; 4 | -------------------------------------------------------------------------------- /examples/assets/images/navbar_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/navbar_0.png -------------------------------------------------------------------------------- /examples/assets/images/navbar_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/navbar_1.png -------------------------------------------------------------------------------- /examples/assets/images/navbar_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/navbar_2.png -------------------------------------------------------------------------------- /examples/assets/images/navbar_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/navbar_3.png -------------------------------------------------------------------------------- /examples/assets/images/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/qrcode.png -------------------------------------------------------------------------------- /examples/assets/images/zhinan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/zhinan.png -------------------------------------------------------------------------------- /examples/assets/images/zujian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/zujian.png -------------------------------------------------------------------------------- /packages/date-picker/index.js: -------------------------------------------------------------------------------- 1 | import Picker from '../date-picker/src/picker/date-picker'; 2 | module.exports = Picker; 3 | -------------------------------------------------------------------------------- /packages/time-picker/index.js: -------------------------------------------------------------------------------- 1 | import Picker from '../date-picker/src/picker/time-picker'; 2 | module.exports = Picker; 3 | -------------------------------------------------------------------------------- /packages/time-select/index.js: -------------------------------------------------------------------------------- 1 | import Picker from '../date-picker/src/picker/time-select'; 2 | module.exports = Picker; 3 | -------------------------------------------------------------------------------- /examples/assets/images/hamburger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/hamburger.png -------------------------------------------------------------------------------- /examples/assets/images/element-demo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/images/element-demo.jpeg -------------------------------------------------------------------------------- /examples/assets/styles/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/styles/fonts/icomoon.eot -------------------------------------------------------------------------------- /examples/assets/styles/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/styles/fonts/icomoon.ttf -------------------------------------------------------------------------------- /packages/loading/index.js: -------------------------------------------------------------------------------- 1 | import Loading from './src/directive'; 2 | Loading.name = 'loading'; 3 | 4 | module.exports = Loading; 5 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["es2015", { "loose": true }]], 3 | "plugins": ["transform-vue-jsx"], 4 | "comments": false 5 | } 6 | -------------------------------------------------------------------------------- /examples/assets/styles/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/examples/assets/styles/fonts/icomoon.woff -------------------------------------------------------------------------------- /packages/theme-default/src/fonts/element-icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/packages/theme-default/src/fonts/element-icons.eot -------------------------------------------------------------------------------- /packages/theme-default/src/fonts/element-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/packages/theme-default/src/fonts/element-icons.ttf -------------------------------------------------------------------------------- /packages/theme-default/src/fonts/element-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yjj5855/element/master/packages/theme-default/src/fonts/element-icons.woff -------------------------------------------------------------------------------- /packages/card/index.js: -------------------------------------------------------------------------------- 1 | const Card = require('./src/main'); 2 | 3 | Card.install = function(Vue) { 4 | Vue.component(Card.name, Card); 5 | }; 6 | 7 | module.exports = Card; 8 | -------------------------------------------------------------------------------- /packages/rate/index.js: -------------------------------------------------------------------------------- 1 | const Rate = require('./src/main'); 2 | 3 | Rate.install = function(Vue) { 4 | Vue.component(Rate.name, Rate); 5 | }; 6 | 7 | module.exports = Rate; 8 | -------------------------------------------------------------------------------- /packages/tag/index.js: -------------------------------------------------------------------------------- 1 | const ElTag = require('./src/tag'); 2 | 3 | ElTag.install = function(Vue) { 4 | Vue.component(ElTag.name, ElTag); 5 | }; 6 | 7 | module.exports = ElTag; 8 | -------------------------------------------------------------------------------- /packages/tree/index.js: -------------------------------------------------------------------------------- 1 | const Tree = require('./src/tree.vue'); 2 | 3 | Tree.install = function(Vue) { 4 | Vue.component(Tree.name, Tree); 5 | }; 6 | 7 | module.exports = Tree; 8 | -------------------------------------------------------------------------------- /packages/alert/index.js: -------------------------------------------------------------------------------- 1 | const Alert = require('./src/main'); 2 | 3 | Alert.install = function(Vue) { 4 | Vue.component(Alert.name, Alert); 5 | }; 6 | 7 | module.exports = Alert; 8 | -------------------------------------------------------------------------------- /packages/badge/index.js: -------------------------------------------------------------------------------- 1 | const Badge = require('./src/main'); 2 | 3 | Badge.install = function(Vue) { 4 | Vue.component(Badge.name, Badge); 5 | }; 6 | 7 | module.exports = Badge; 8 | -------------------------------------------------------------------------------- /packages/col/index.js: -------------------------------------------------------------------------------- 1 | const ElCol = require('./src/col'); 2 | 3 | ElCol.install = function(Vue) { 4 | Vue.component('el-col', ElCol); 5 | }; 6 | 7 | module.exports = ElCol; 8 | 9 | -------------------------------------------------------------------------------- /packages/row/index.js: -------------------------------------------------------------------------------- 1 | const ElRow = require('./src/row'); 2 | 3 | ElRow.install = function(Vue) { 4 | Vue.component('el-row', ElRow); 5 | }; 6 | 7 | module.exports = ElRow; 8 | 9 | -------------------------------------------------------------------------------- /packages/step/index.js: -------------------------------------------------------------------------------- 1 | const Step = require('../steps/src/step'); 2 | 3 | Step.install = function(Vue) { 4 | Vue.component(Step.name, Step); 5 | }; 6 | 7 | module.exports = Step; 8 | -------------------------------------------------------------------------------- /packages/steps/index.js: -------------------------------------------------------------------------------- 1 | const Steps = require('./src/steps'); 2 | 3 | Steps.install = function(Vue) { 4 | Vue.component(Steps.name, Steps); 5 | }; 6 | 7 | module.exports = Steps; 8 | -------------------------------------------------------------------------------- /packages/form/index.js: -------------------------------------------------------------------------------- 1 | const ElForm = require('./src/form'); 2 | 3 | ElForm.install = function(Vue) { 4 | Vue.component(ElForm.name, ElForm); 5 | }; 6 | 7 | module.exports = ElForm; 8 | -------------------------------------------------------------------------------- /packages/menu/index.js: -------------------------------------------------------------------------------- 1 | const ElMenu = require('./src/menu'); 2 | 3 | ElMenu.install = function(Vue) { 4 | Vue.component(ElMenu.name, ElMenu); 5 | }; 6 | 7 | module.exports = ElMenu; 8 | -------------------------------------------------------------------------------- /packages/slider/index.js: -------------------------------------------------------------------------------- 1 | const Slider = require('./src/main'); 2 | 3 | Slider.install = function(Vue) { 4 | Vue.component(Slider.name, Slider); 5 | }; 6 | 7 | module.exports = Slider; 8 | -------------------------------------------------------------------------------- /packages/upload/index.js: -------------------------------------------------------------------------------- 1 | const Upload = require('./src/index'); 2 | 3 | Upload.install = function(Vue) { 4 | Vue.component(Upload.name, Upload); 5 | }; 6 | 7 | module.exports = Upload; 8 | -------------------------------------------------------------------------------- /packages/input/index.js: -------------------------------------------------------------------------------- 1 | const ElInput = require('./src/input'); 2 | 3 | ElInput.install = function(Vue) { 4 | Vue.component(ElInput.name, ElInput); 5 | }; 6 | 7 | module.exports = ElInput; 8 | -------------------------------------------------------------------------------- /packages/popover/index.js: -------------------------------------------------------------------------------- 1 | const Popover = require('./src/main'); 2 | 3 | Popover.install = function(Vue) { 4 | Vue.component(Popover.name, Popover); 5 | }; 6 | 7 | module.exports = Popover; 8 | -------------------------------------------------------------------------------- /packages/table/index.js: -------------------------------------------------------------------------------- 1 | const ElTable = require('./src/table'); 2 | 3 | ElTable.install = function(Vue) { 4 | Vue.component('el-table', ElTable); 5 | }; 6 | 7 | module.exports = ElTable; 8 | -------------------------------------------------------------------------------- /packages/tooltip/index.js: -------------------------------------------------------------------------------- 1 | const Tooltip = require('./src/main'); 2 | 3 | Tooltip.install = function(Vue) { 4 | Vue.component(Tooltip.name, Tooltip); 5 | }; 6 | 7 | module.exports = Tooltip; 8 | -------------------------------------------------------------------------------- /packages/radio/index.js: -------------------------------------------------------------------------------- 1 | const ElRadio = require('./src/radio'); 2 | 3 | ElRadio.install = function(Vue) { 4 | Vue.component('el-radio', ElRadio); 5 | }; 6 | 7 | module.exports = ElRadio; 8 | 9 | -------------------------------------------------------------------------------- /packages/select/index.js: -------------------------------------------------------------------------------- 1 | var ElSelect = require('./src/select'); 2 | 3 | ElSelect.install = function(Vue) { 4 | Vue.component(ElSelect.name, ElSelect); 5 | }; 6 | 7 | module.exports = ElSelect; 8 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "2.0.0-beta.18", 3 | "version": "independent", 4 | "publishConfig": { 5 | "ignore": [ 6 | "node_modules", 7 | "log.*" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/dialog/index.js: -------------------------------------------------------------------------------- 1 | const ElDialog = require('./src/component'); 2 | 3 | ElDialog.install = function(Vue) { 4 | Vue.component('el-dialog', ElDialog); 5 | }; 6 | 7 | module.exports = ElDialog; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log 4 | lerna-debug.log 5 | npm-debug.log.* 6 | lerna-debug.log.* 7 | lib 8 | .idea 9 | examples/element-ui 10 | fe.element/element-ui 11 | .npmrc 12 | -------------------------------------------------------------------------------- /packages/option/index.js: -------------------------------------------------------------------------------- 1 | const ElOption = require('../select/src/option'); 2 | 3 | ElOption.install = function(Vue) { 4 | Vue.component(ElOption.name, ElOption); 5 | }; 6 | 7 | module.exports = ElOption; 8 | -------------------------------------------------------------------------------- /packages/spinner/index.js: -------------------------------------------------------------------------------- 1 | const ElSpinner = require('./src/spinner'); 2 | 3 | ElSpinner.install = function(Vue) { 4 | Vue.component(ElSpinner.name, ElSpinner); 5 | }; 6 | 7 | module.exports = ElSpinner; 8 | -------------------------------------------------------------------------------- /packages/switch/index.js: -------------------------------------------------------------------------------- 1 | const ElSwitch = require('./src/component'); 2 | 3 | ElSwitch.install = function(Vue) { 4 | Vue.component('el-switch', ElSwitch); 5 | }; 6 | 7 | module.exports = ElSwitch; 8 | 9 | -------------------------------------------------------------------------------- /packages/tab-pane/index.js: -------------------------------------------------------------------------------- 1 | const TabPane = require('../tabs/src/tab-pane.vue'); 2 | 3 | TabPane.install = function(Vue) { 4 | Vue.component(TabPane.name, TabPane); 5 | }; 6 | 7 | module.exports = TabPane; 8 | -------------------------------------------------------------------------------- /packages/theme-default/src/time-picker.css: -------------------------------------------------------------------------------- 1 | @import "../../date-picker/src/css/picker.css"; 2 | @import "../../date-picker/src/css/time-spinner.css"; 3 | @import "../../date-picker/src/css/time-picker.css"; 4 | -------------------------------------------------------------------------------- /packages/cascader/index.js: -------------------------------------------------------------------------------- 1 | const ElCascader = require('./src/cascader'); 2 | 3 | ElCascader.install = function(Vue) { 4 | Vue.component(ElCascader.name, ElCascader); 5 | }; 6 | 7 | module.exports = ElCascader; 8 | -------------------------------------------------------------------------------- /packages/dropdown/index.js: -------------------------------------------------------------------------------- 1 | const ElDropdown = require('./src/dropdown'); 2 | 3 | ElDropdown.install = function(Vue) { 4 | Vue.component(ElDropdown.name, ElDropdown); 5 | }; 6 | 7 | module.exports = ElDropdown; 8 | -------------------------------------------------------------------------------- /packages/dropdown/src/dropdown-item.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /packages/progress/index.js: -------------------------------------------------------------------------------- 1 | const ElProgress = require('./src/progress'); 2 | 3 | ElProgress.install = function(Vue) { 4 | Vue.component(ElProgress.name, ElProgress); 5 | }; 6 | 7 | module.exports = ElProgress; 8 | -------------------------------------------------------------------------------- /packages/submenu/index.js: -------------------------------------------------------------------------------- 1 | const ElSubmenu = require('../menu/src/submenu'); 2 | 3 | ElSubmenu.install = function(Vue) { 4 | Vue.component(ElSubmenu.name, ElSubmenu); 5 | }; 6 | 7 | module.exports = ElSubmenu; 8 | -------------------------------------------------------------------------------- /packages/checkbox/index.js: -------------------------------------------------------------------------------- 1 | const ElCheckbox = require('./src/checkbox'); 2 | 3 | ElCheckbox.install = function(Vue) { 4 | Vue.component('el-checkbox', ElCheckbox); 5 | }; 6 | 7 | module.exports = ElCheckbox; 8 | 9 | -------------------------------------------------------------------------------- /packages/pagination/index.js: -------------------------------------------------------------------------------- 1 | const Pagination = require('./src/pagination'); 2 | 3 | Pagination.install = function(Vue) { 4 | Vue.component(Pagination.name, Pagination); 5 | }; 6 | 7 | module.exports = Pagination; 8 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ['vue'], 3 | "extends": 'elemefe', 4 | "parserOptions": { 5 | "ecmaFeatures": { 6 | "experimentalObjectRestSpread": true, 7 | "jsx": true 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/form-item/index.js: -------------------------------------------------------------------------------- 1 | const ElFormItem = require('../form/src/form-item'); 2 | 3 | ElFormItem.install = function(Vue) { 4 | Vue.component(ElFormItem.name, ElFormItem); 5 | }; 6 | 7 | module.exports = ElFormItem; 8 | -------------------------------------------------------------------------------- /packages/menu-item/index.js: -------------------------------------------------------------------------------- 1 | const ElMenuItem = require('../menu/src/menu-item'); 2 | 3 | ElMenuItem.install = function(Vue) { 4 | Vue.component(ElMenuItem.name, ElMenuItem); 5 | }; 6 | 7 | module.exports = ElMenuItem; 8 | -------------------------------------------------------------------------------- /packages/breadcrumb/index.js: -------------------------------------------------------------------------------- 1 | const ElBreadcrumb = require('./src/breadcrumb'); 2 | 3 | ElBreadcrumb.install = function(Vue) { 4 | Vue.component(ElBreadcrumb.name, ElBreadcrumb); 5 | }; 6 | 7 | module.exports = ElBreadcrumb; 8 | -------------------------------------------------------------------------------- /packages/radio-group/index.js: -------------------------------------------------------------------------------- 1 | const RadioGroup = require('../radio/src/radio-group.vue'); 2 | 3 | RadioGroup.install = function(Vue) { 4 | Vue.component(RadioGroup.name, RadioGroup); 5 | }; 6 | 7 | module.exports = RadioGroup; 8 | -------------------------------------------------------------------------------- /packages/input-number/index.js: -------------------------------------------------------------------------------- 1 | const ElInputNumber = require('./src/input-number'); 2 | 3 | ElInputNumber.install = function(Vue) { 4 | Vue.component(ElInputNumber.name, ElInputNumber); 5 | }; 6 | 7 | module.exports = ElInputNumber; 8 | -------------------------------------------------------------------------------- /packages/radio-button/index.js: -------------------------------------------------------------------------------- 1 | const RadioButton = require('../radio/src/radio-button.vue'); 2 | 3 | RadioButton.install = function(Vue) { 4 | Vue.component(RadioButton.name, RadioButton); 5 | }; 6 | 7 | module.exports = RadioButton; 8 | -------------------------------------------------------------------------------- /examples/docs/home.md: -------------------------------------------------------------------------------- 1 | # 组件说明文档 2 | 3 | -------------------------------------------------------------------------------- /packages/autocomplete/index.js: -------------------------------------------------------------------------------- 1 | const ElAutocomplete = require('./src/autocomplete'); 2 | 3 | ElAutocomplete.install = function(Vue) { 4 | Vue.component(ElAutocomplete.name, ElAutocomplete); 5 | }; 6 | 7 | module.exports = ElAutocomplete; 8 | -------------------------------------------------------------------------------- /packages/button-group/index.js: -------------------------------------------------------------------------------- 1 | const ElButtonGroup = require('../button/src/button-group'); 2 | 3 | ElButtonGroup.install = function(Vue) { 4 | Vue.component(ElButtonGroup.name, ElButtonGroup); 5 | }; 6 | 7 | module.exports = ElButtonGroup; 8 | -------------------------------------------------------------------------------- /packages/option-group/index.js: -------------------------------------------------------------------------------- 1 | const ElOptionGroup = require('../select/src/option-group'); 2 | 3 | ElOptionGroup.install = function(Vue) { 4 | Vue.component(ElOptionGroup.name, ElOptionGroup); 5 | }; 6 | 7 | module.exports = ElOptionGroup; 8 | -------------------------------------------------------------------------------- /packages/table-column/index.js: -------------------------------------------------------------------------------- 1 | const ElTableColumn = require('../table/src/table-column'); 2 | 3 | ElTableColumn.install = function(Vue) { 4 | Vue.component(ElTableColumn.name, ElTableColumn); 5 | }; 6 | 7 | module.exports = ElTableColumn; 8 | -------------------------------------------------------------------------------- /packages/dropdown-item/index.js: -------------------------------------------------------------------------------- 1 | const ElDropdownItem = require('../dropdown/src/dropdown-item'); 2 | 3 | ElDropdownItem.install = function(Vue) { 4 | Vue.component(ElDropdownItem.name, ElDropdownItem); 5 | }; 6 | 7 | module.exports = ElDropdownItem; 8 | -------------------------------------------------------------------------------- /packages/icon/src/icon.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | -------------------------------------------------------------------------------- /packages/select-dropdown/index.js: -------------------------------------------------------------------------------- 1 | const SelectDropdown = require('./src/select-dropdown.vue'); 2 | 3 | SelectDropdown.install = function(Vue) { 4 | Vue.component(SelectDropdown.name, SelectDropdown); 5 | }; 6 | 7 | module.exports = SelectDropdown; 8 | -------------------------------------------------------------------------------- /packages/menu-item-group/index.js: -------------------------------------------------------------------------------- 1 | const ElMenuItemGroup = require('../menu/src/menu-item-group'); 2 | 3 | ElMenuItemGroup.install = function(Vue) { 4 | Vue.component(ElMenuItemGroup.name, ElMenuItemGroup); 5 | }; 6 | 7 | module.exports = ElMenuItemGroup; 8 | -------------------------------------------------------------------------------- /packages/checkbox-group/index.js: -------------------------------------------------------------------------------- 1 | const ElCheckboxGroup = require('../checkbox/src/checkbox-group.vue'); 2 | 3 | ElCheckboxGroup.install = function(Vue) { 4 | Vue.component(ElCheckboxGroup.name, ElCheckboxGroup); 5 | }; 6 | 7 | module.exports = ElCheckboxGroup; 8 | -------------------------------------------------------------------------------- /packages/breadcrumb-item/index.js: -------------------------------------------------------------------------------- 1 | const ElBreadcrumbItem = require('../breadcrumb/src/breadcrumb-item'); 2 | 3 | ElBreadcrumbItem.install = function(Vue) { 4 | Vue.component(ElBreadcrumbItem.name, ElBreadcrumbItem); 5 | }; 6 | 7 | module.exports = ElBreadcrumbItem; 8 | -------------------------------------------------------------------------------- /packages/tabs/index.js: -------------------------------------------------------------------------------- 1 | const ElTabs = require('./src/tabs'); 2 | const ElTabPane = require('./src/tab-pane'); 3 | 4 | ElTabs.install = function(Vue) { 5 | Vue.component(ElTabs.name, ElTabs); 6 | Vue.component(ElTabPane.name, ElTabPane); 7 | }; 8 | 9 | module.exports = ElTabs; 10 | -------------------------------------------------------------------------------- /packages/button/index.js: -------------------------------------------------------------------------------- 1 | const ElButton = require('./src/button'); 2 | const ElButtonGroup = require('./src/button-group'); 3 | 4 | ElButton.install = function(Vue) { 5 | Vue.component(ElButton.name, ElButton); 6 | Vue.component(ElButtonGroup.name, ElButtonGroup); 7 | }; 8 | 9 | module.exports = ElButton; 10 | -------------------------------------------------------------------------------- /packages/date-picker/src/picker/time-select.js: -------------------------------------------------------------------------------- 1 | import Picker from '../picker'; 2 | import Panel from '../panel/time-select'; 3 | 4 | export default { 5 | mixins: [Picker], 6 | 7 | name: 'ElTimeSelect', 8 | 9 | created() { 10 | this.type = 'time-select'; 11 | this.panel = Panel; 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /packages/theme-default/src/steps.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | @b steps { 6 | font-size: 0; 7 | 8 | > :last-child .el-step__line { 9 | display: none; 10 | } 11 | 12 | @when horizontal { 13 | white-space: nowrap; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/breadcrumb/src/breadcrumb.vue: -------------------------------------------------------------------------------- 1 | 6 | 18 | -------------------------------------------------------------------------------- /packages/button/src/button-group.vue: -------------------------------------------------------------------------------- 1 | 6 | 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please makes sure these boxes are checked before submitting your PR, thank you! 2 | 3 | * [ ] Make sure you follow Element's [Contributing Guide](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md). 4 | * [ ] Rebase before creating a PR to keep commit history clear. 5 | * [ ] Add some descriptions and refer relative issues for you PR. 6 | -------------------------------------------------------------------------------- /examples/icon.json: -------------------------------------------------------------------------------- 1 | ["arrow-down","arrow-left","arrow-right","arrow-up","caret-bottom","caret-left","caret-right","caret-top","check","circle-check","circle-close","circle-cross","close","upload","d-arrow-left","d-arrow-right","d-caret","date","delete","document","edit","information","loading","menu","message","minus","more","picture","plus","search","setting","share","star-off","star-on","time","warning","delete2","upload2","view"] -------------------------------------------------------------------------------- /packages/card/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-card", 3 | "version": "0.0.0", 4 | "description": "A card component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/card", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/rate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-rate", 3 | "version": "0.0.0", 4 | "description": "A rate component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/rate", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/tree/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-tree", 3 | "version": "0.0.0", 4 | "description": "A tree component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/tree", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/alert/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-alert", 3 | "version": "0.0.0", 4 | "description": "A alert component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/alert", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/badge/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-badge", 3 | "version": "0.0.0", 4 | "description": "A badge component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/badge", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/col/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-col", 3 | "version": "1.0.0", 4 | "description": "A row component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/col", 12 | "author": "haiping.zeng@ele.me", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/steps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-steps", 3 | "version": "0.0.0", 4 | "description": "A steps component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/steps", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/switch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-switch", 3 | "version": "1.0.0", 4 | "description": "A switch component for vue.js", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/switch", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/loading/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-loading", 3 | "version": "0.0.0", 4 | "description": "A loading component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/loading", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/message/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-message", 3 | "version": "0.0.0", 4 | "description": "A message component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/message", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/row/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-row", 3 | "version": "1.0.2", 4 | "description": "A row component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/row", 12 | "author": "qingwei-li", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/card/src/main.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 19 | -------------------------------------------------------------------------------- /packages/checkbox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-checkbox", 3 | "version": "1.0.2", 4 | "description": "A checkbox component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/checkbox", 12 | "author": "haiping.zeng@ele.me", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/radio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-radio", 3 | "version": "1.0.0", 4 | "description": "A radio component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/radio", 12 | "author": "qingwei-li", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/notification/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-notification", 3 | "version": "0.0.0", 4 | "description": "A notification component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/notification", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/tabs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-tabs", 3 | "version": "1.0.0", 4 | "description": "A tabs component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/tabs", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/theme-default/src/select-dropdown.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | 6 | @b select-dropdown { 7 | width: 100%; 8 | position: absolute; 9 | z-index: 1001; 10 | border: solid 1px #d3dce6; 11 | border-radius: 2px; 12 | background-color: #fff; 13 | box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); 14 | box-sizing: border-box; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-button", 3 | "version": "1.0.0", 4 | "description": "A button component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/button", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/loading/src/spinner.js: -------------------------------------------------------------------------------- 1 | class Spinner { 2 | constructor() { 3 | let spinner = document.createElement('div'); 4 | spinner.classList.add('el-loading-spinner'); 5 | [1, 2, 3].forEach(index => { 6 | let bubble = document.createElement('div'); 7 | bubble.classList.add('el-loading-bubble', `bubble${ index }`); 8 | spinner.appendChild(bubble); 9 | }); 10 | this.el = spinner; 11 | } 12 | } 13 | 14 | export default Spinner; 15 | -------------------------------------------------------------------------------- /packages/upload/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-upload", 3 | "version": "0.0.0", 4 | "description": "A upload component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/upload", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {}, 15 | "devDependencies": {} 16 | } 17 | -------------------------------------------------------------------------------- /packages/slider/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-slider", 3 | "version": "0.0.0", 4 | "description": "A slider component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/slider", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": { 15 | "wind-dom": "0.0.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/tooltip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-tooltip", 3 | "version": "0.0.0", 4 | "description": "A tooltip component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/tooltip", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": {}, 15 | "devDependencies": {} 16 | } 17 | -------------------------------------------------------------------------------- /packages/dialog/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-dialog", 3 | "version": "1.0.0", 4 | "description": "A dialog component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/dialog", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "vue-popup": "^0.2.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/pagination/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-pagination", 3 | "version": "0.0.0", 4 | "description": "A pagination component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/pagination", 12 | "author": "qingwei-li", 13 | "license": "MIT", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /packages/breadcrumb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-breadcrumb", 3 | "version": "1.0.0", 4 | "description": "A breadcrumb component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/breadcrumb", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/date-picker/src/picker/time-picker.js: -------------------------------------------------------------------------------- 1 | import Picker from '../picker'; 2 | import TimePanel from '../panel/time'; 3 | import TimeRangePanel from '../panel/time-range'; 4 | 5 | export default { 6 | mixins: [Picker], 7 | 8 | name: 'ElTimePicker', 9 | 10 | props: { 11 | isRange: Boolean 12 | }, 13 | 14 | created() { 15 | this.type = this.isRange ? 'timerange' : 'time'; 16 | this.panel = this.isRange ? TimeRangePanel : TimePanel; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /packages/input/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-input", 3 | "version": "1.0.1", 4 | "description": "A input component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component", 10 | "input" 11 | ], 12 | "author": "haiping.zeng ", 13 | "license": "MIT", 14 | "repository": "https://github.com/element-component/element/tree/master/packages/input", 15 | "devDependencies": { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/popover/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-popover", 3 | "version": "0.0.0", 4 | "description": "A popover component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/popover", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "wind-dom": "0.0.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/select-dropdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-select-dropdown", 3 | "version": "0.0.0", 4 | "description": "A select-dropdown component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/select-dropdown", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/table/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-table", 3 | "version": "1.0.0", 4 | "description": "A table component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/dialog", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "throttle-debounce": "^1.0.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/theme-default/src/date-picker.css: -------------------------------------------------------------------------------- 1 | @import "../../date-picker/src/css/date-table.css"; 2 | @import "../../date-picker/src/css/month-table.css"; 3 | @import "../../date-picker/src/css/year-table.css"; 4 | @import "../../date-picker/src/css/time-spinner.css"; 5 | @import "../../date-picker/src/css/picker.css"; 6 | @import "../../date-picker/src/css/date-picker.css"; 7 | @import "../../date-picker/src/css/date-range-picker.css"; 8 | @import "../../date-picker/src/css/time-range-picker.css"; 9 | -------------------------------------------------------------------------------- /packages/date-picker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-datepicker", 3 | "version": "1.0.0", 4 | "description": "A datepicker component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/datepicker", 12 | "author": "long.zhang@ele.me", 13 | "license": "MIT", 14 | "dependencies": { 15 | "wind-dom": "0.0.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/form/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-form", 3 | "version": "1.0.0", 4 | "description": "A form component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/form", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | "async-validator": "^1.6.6" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/message-box/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-message-box", 3 | "version": "0.0.0", 4 | "description": "A message-box component for Vue.js.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/message-box", 12 | "author": "elemefe", 13 | "license": "MIT", 14 | "dependencies": { 15 | "vue-popup": "^0.2.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/progress/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-progress", 3 | "version": "1.0.1", 4 | "description": "A progress component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component", 10 | "progress" 11 | ], 12 | "author": "haiping.zeng ", 13 | "license": "MIT", 14 | "repository": "https://github.com/element-component/element/tree/master/packages/progress", 15 | "devDependencies": { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/dropdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-dropdown", 3 | "version": "1.0.0", 4 | "description": "A dropdown component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/dropdown", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | "vue-clickoutside": "0.0.4" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/spinner/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-spinner", 3 | "version": "1.0.0", 4 | "description": "A input component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component", 10 | "input" 11 | ], 12 | "author": "haiping.zeng@ele.me", 13 | "license": "MIT", 14 | "repository": "https://github.com/element-component/element/tree/master/packages/spinner", 15 | "devDependencies": { 16 | "vue-clickoutside": "0.0.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/tag/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-tag", 3 | "version": "1.0.1", 4 | "description": "A input component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component", 10 | "input" 11 | ], 12 | "author": "haipingZeng ", 13 | "license": "MIT", 14 | "repository": "https://github.com/element-component/element/tree/master/packages/tag", 15 | "devDependencies": { 16 | "vue-clickoutside": "0.0.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/breadcrumb/src/breadcrumb-item.vue: -------------------------------------------------------------------------------- 1 | 6 | 19 | -------------------------------------------------------------------------------- /packages/autocomplete/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-autocomplete", 3 | "version": "1.0.0", 4 | "description": "A autocomplete component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/autocomplete", 12 | "author": "haiping.zeng", 13 | "license": "MIT", 14 | "dependencies": { 15 | "vue-clickoutside": "^0.1.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/cascader/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-cascader", 3 | "version": "1.0.1", 4 | "description": "A cascader component for Vue.", 5 | "keywords": [ 6 | "element", 7 | "vue", 8 | "component" 9 | ], 10 | "main": "./lib/index.js", 11 | "repository": "https://github.com/element-component/element/tree/master/packages/cascader", 12 | "author": "qingwei-li", 13 | "license": "MIT", 14 | "dependencies": { 15 | "object-equal": "^1.0.0", 16 | "vue-clickoutside": "0.0.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/select/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-select", 3 | "version": "1.0.1", 4 | "description": "A el-select component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component" 10 | ], 11 | "author": "qingwei.li", 12 | "license": "MIT", 13 | "repository": "https://github.com/element-component/element/tree/master/packages/select", 14 | "devDependencies": { 15 | "throttle-debounce": "^1.0.1", 16 | "vue-clickoutside": "0.0.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/date-picker/src/css/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --datepicker-color: #475669; 3 | --datepicker-off-color: #ddd; 4 | --datepicker-header-color: #8492a6; 5 | --datepicker-icon-color: #99a9bf; 6 | --datepicker-trigger-color: #c0ccda; 7 | --datepicker-border-color: #d3dce6; 8 | --datepicker-inner-border-color: #e4e4e4; 9 | --datepicker-cell-hover-color: #e5e9f2; 10 | --datepicker-inrange-color: #D3ECFF; 11 | --datepicker-inrange-hover-color: #AFDCFF; 12 | --datepicker-active-color: #20a0ff; 13 | --datepicker-text-hover-color: #20a0ff; 14 | } -------------------------------------------------------------------------------- /packages/checkbox/src/checkbox-group.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /packages/group/src/group.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | -------------------------------------------------------------------------------- /packages/theme-default/src/option-group.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | 6 | @b select-group { 7 | margin: 0; 8 | padding: 0; 9 | 10 | @e wrap { 11 | list-style: none; 12 | margin: 0; 13 | padding: 0; 14 | } 15 | 16 | @e title { 17 | padding-left: 10px; 18 | font-size: 12px; 19 | color: #999; 20 | height: 30px; 21 | line-height: 30px; 22 | } 23 | 24 | & .el-select-dropdown__item { 25 | padding-left: 20px; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/date-picker/README.md: -------------------------------------------------------------------------------- 1 | # __component_name__ 2 | 3 | # Screenshots 4 | 5 | # Demo 6 | 7 | # Installation 8 | > 9 | 10 | # Usage 11 | ```javascript 12 | 13 | ``` 14 | 15 | # Options 16 | 17 | | name | description | type | default | 18 | |-------------|-------------|-------------|-------------| 19 | | | | | | 20 | 21 | # Development 22 | ```shell 23 | make dev 24 | 25 | # test 26 | make test 27 | 28 | # build 29 | make build 30 | ``` 31 | 32 | # License 33 | [MIT](https://opensource.org/licenses/MIT) 34 | -------------------------------------------------------------------------------- /packages/date-picker/src/picker/date-picker.js: -------------------------------------------------------------------------------- 1 | import Picker from '../picker'; 2 | import DatePanel from '../panel/date'; 3 | import DateRangePanel from '../panel/date-range'; 4 | 5 | const getPanel = function(type) { 6 | if (type === 'daterange' || type === 'datetimerange') { 7 | return DateRangePanel; 8 | } 9 | return DatePanel; 10 | }; 11 | 12 | export default { 13 | mixins: [Picker], 14 | 15 | name: 'ElDatePicker', 16 | 17 | props: { 18 | type: String, 19 | default: 'date' 20 | }, 21 | 22 | created() { 23 | this.panel = getPanel(this.type); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /packages/input-number/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "el-input-number", 3 | "version": "1.0.1", 4 | "description": "A input component for Vue.", 5 | "main": "lib/index.js", 6 | "keywords": [ 7 | "element", 8 | "vue", 9 | "component", 10 | "input" 11 | ], 12 | "author": "haipingZeng ", 13 | "license": "MIT", 14 | "repository": "https://github.com/element-component/element/tree/master/packages/input-number", 15 | "dependencies": { 16 | "wind-dom": "0.0.3" 17 | }, 18 | "devDependencies": { 19 | "vue-clickoutside": "0.0.4" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/theme-default/README.md: -------------------------------------------------------------------------------- 1 | # element-theme-default 2 | > element component defualt theme. 3 | 4 | ## Usage 5 | 6 | Use Sass Or postcss-import 7 | ```css 8 | @import 'element-theme-default'; 9 | ``` 10 | 11 | Or Use webpack 12 | ```javascript 13 | import 'element-theme-default'; 14 | ``` 15 | 16 | Or 17 | ```html 18 | 19 | ``` 20 | 21 | ## Import your need 22 | ```javascript 23 | import 'element-theme-default/dist/input.css'; 24 | import 'element-theme-default/dist/select.css'; 25 | 26 | // ... 27 | ``` 28 | -------------------------------------------------------------------------------- /packages/date-picker/src/util/i18n.js: -------------------------------------------------------------------------------- 1 | export default { 2 | datepicker: { 3 | today: '此刻', 4 | clear: '清空', 5 | confirm: '确定', 6 | week: '周次', 7 | weeks: { 8 | sun: '日', 9 | mon: '一', 10 | tue: '二', 11 | wed: '三', 12 | thu: '四', 13 | fri: '五', 14 | sat: '六' 15 | }, 16 | months: { 17 | jan: '一月', 18 | feb: '二月', 19 | mar: '三月', 20 | apr: '四月', 21 | may: '五月', 22 | jun: '六月', 23 | jul: '七月', 24 | aug: '八月', 25 | sep: '九月', 26 | oct: '十月', 27 | nov: '十一月', 28 | dec: '十二月' 29 | } 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /packages/radio/src/radio-group.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 29 | -------------------------------------------------------------------------------- /examples/utils/strip-tags.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * strip-tags 3 | * 4 | * Copyright (c) 2015 Jon Schlinkert, contributors. 5 | * Licensed under the MIT license. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var cheerio = require('cheerio'); 11 | 12 | module.exports = function(str, tags) { 13 | var $ = cheerio.load(str, {decodeEntities: false}); 14 | 15 | if (!tags || tags.length === 0) { 16 | return str; 17 | } 18 | 19 | tags = !Array.isArray(tags) ? [tags] : tags; 20 | var len = tags.length; 21 | 22 | while (len--) { 23 | $(tags[len]).remove(); 24 | } 25 | 26 | return $.html(); 27 | }; 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | ### Element version 6 | 7 | 8 | ### OS/Browers version 9 | 10 | 11 | ### Vue version 12 | 13 | 14 | ### Reproduction Link 15 | 16 | 17 | 18 | 19 | ### Steps to reproduce 20 | 21 | ### What is Expected? 22 | 23 | ### What is actually happening? 24 | -------------------------------------------------------------------------------- /bin/iconInit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var postcss = require('postcss'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | var fontFile = fs.readFileSync(path.resolve(__dirname, '../packages/theme-default/src/icon.css'), 'utf8'); 7 | var nodes = postcss.parse(fontFile).nodes; 8 | var classList = []; 9 | 10 | nodes.forEach((node) => { 11 | var selector = node.selector || ''; 12 | var reg = new RegExp(/\.el-icon-([^:]+):before/); 13 | var arr = selector.match(reg); 14 | 15 | if (arr && arr[1]) { 16 | classList.push(arr[1]); 17 | } 18 | }); 19 | 20 | fs.writeFile(path.resolve(__dirname, '../examples/icon.json'), JSON.stringify(classList)); 21 | -------------------------------------------------------------------------------- /packages/tabs/src/tab.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /scripts/cooking.common.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: './src/index.js', 6 | dist: './lib', 7 | clean: false, 8 | format: 'cjs', 9 | extends: ['vue2'], 10 | minimize: false, 11 | alias: { 12 | main: path.join(__dirname, '../src'), 13 | packages: path.join(__dirname, '../packages'), 14 | examples: path.join(__dirname, '../examples') 15 | }, 16 | externals: { vue: 'vue' } 17 | }); 18 | 19 | cooking.add('output.filename', 'element-ui.common.js'); 20 | cooking.add('loader.js.exclude', /node_modules|utils\/popper\.js|util\/fecha.\js/); 21 | module.exports = cooking.resolve(); 22 | -------------------------------------------------------------------------------- /examples/dom/class.js: -------------------------------------------------------------------------------- 1 | export const hasClass = function(obj, cls) { 2 | return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); 3 | }; 4 | 5 | export const addClass = function(obj, cls) { 6 | if (!hasClass(obj, cls)) obj.className += ' ' + cls; 7 | }; 8 | 9 | export const removeClass = function(obj, cls) { 10 | if (hasClass(obj, cls)) { 11 | const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); 12 | obj.className = obj.className.replace(reg, ' '); 13 | } 14 | }; 15 | 16 | export const toggleClass = function(obj, cls) { 17 | if (hasClass(obj, cls)) { 18 | removeClass(obj, cls); 19 | } else { 20 | addClass(obj, cls); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/col/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCol', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/row/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElRow', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/tag/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElTag', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/theme-default/src/card.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | @b card { 6 | border: 1px solid var(--card-border-color); 7 | border-radius: var(--card-border-radius); 8 | background-color: #fff; 9 | overflow: hidden; 10 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, .12), 11 | 0px 0px 6px 0px rgba(0, 0, 0, .04); 12 | 13 | @e header { 14 | padding: calc(var(--card-padding) - 2) var(--card-padding); 15 | border-bottom: 1px solid var(--card-border-color); 16 | box-sizing: border-box; 17 | } 18 | 19 | @e body { 20 | padding: var(--card-padding); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/theme-default/src/core/tag.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "../common/var.css"; 3 | 4 | @component-namespace element-core { 5 | 6 | @b tag { 7 | background-color: var(--tag-fill); 8 | border: 0; 9 | border-radius: var(--tag-border-radius); 10 | color: var(--tag-color); 11 | height: 22px; 12 | margin: 1px; 13 | outline: 0; 14 | padding: 3px 16px 3px 3px; 15 | position: relative; 16 | 17 | @e button { 18 | color: var(--tag-close-color); 19 | cursor: pointer; 20 | line-height: 1; 21 | 22 | /* 增大可点击面积 */ 23 | padding: 5px; 24 | position: absolute; 25 | right: 0; 26 | top: 0; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/alert/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElAlert', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/badge/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElBadge', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/button/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElButton', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/card/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCard', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/dialog/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElDialog', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/form/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElForm', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/input/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElInput', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/menu/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElMenu', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/rate/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElRate', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/select/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElSelect', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/slider/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElSlider', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/steps/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElSteps', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/table/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElTable', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/tabs/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElTabs', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/tree/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElTree', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/upload/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElUpload', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/cascader/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCascader', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/checkbox/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCheckbox', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/dropdown/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElDropdown', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/loading/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElLoading', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/message/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElMessage', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/popover/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElPopover', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/progress/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElProgress', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/radio/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCascader', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/spinner/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElSpinner', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/switch/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElCascader', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/tooltip/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElTooltip', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/breadcrumb/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElBreadcrumb', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/date-picker/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElDatePicker', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/message-box/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElMessageBox', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/pagination/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElPagination', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/autocomplete/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElAutocomplete', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/input-number/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElInputNumber', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/notification/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElNotification', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /packages/select-dropdown/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: { 6 | index: path.join(__dirname, 'index.js') 7 | }, 8 | dist: path.join(__dirname, 'lib'), 9 | template: false, 10 | format: 'umd', 11 | moduleName: 'ElSelectMenu', 12 | extends: ['vue2'] 13 | }); 14 | 15 | cooking.add('resolve.alias', { 16 | 'main': path.join(__dirname, '../../src'), 17 | 'packages': path.join(__dirname, '../../packages') 18 | }); 19 | 20 | cooking.add('externals', { 21 | vue: { 22 | root: 'Vue', 23 | commonjs: 'vue', 24 | commonjs2: 'vue', 25 | amd: 'vue' 26 | } 27 | }); 28 | 29 | module.exports = cooking.resolve(); 30 | -------------------------------------------------------------------------------- /bin/build-all.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const components = require('../components.json'); 4 | const execSync = require('child_process').execSync; 5 | const existsSync = require('fs').existsSync; 6 | const path = require('path'); 7 | 8 | let componentPaths = []; 9 | 10 | delete components.index; 11 | delete components.font; 12 | 13 | Object.keys(components).forEach(key => { 14 | const filePath = path.join(__dirname, `../packages/${key}/cooking.conf.js`); 15 | 16 | if (existsSync(filePath)) { 17 | componentPaths.push(`packages/${key}/cooking.conf.js`); 18 | } 19 | }); 20 | 21 | const paths = componentPaths.join(','); 22 | const cli = `cooking build -c ${paths} -p`; 23 | 24 | execSync(cli, { 25 | stdio: 'inherit' 26 | }); 27 | -------------------------------------------------------------------------------- /packages/date-picker/src/css/month-table.css: -------------------------------------------------------------------------------- 1 | @import "./vars.css"; 2 | 3 | @component-namespace el { 4 | @b month-table { 5 | font-size: 12px; 6 | margin: -1px; 7 | 8 | td { 9 | text-align: center; 10 | padding: 20px 3px; 11 | cursor: pointer; 12 | 13 | .cell { 14 | width: 48px; 15 | height: 32px; 16 | display: block; 17 | line-height: 32px; 18 | color: var(--datepicker-color); 19 | 20 | &:hover { 21 | background-color: var(--datepicker-cell-hover-color); 22 | } 23 | } 24 | 25 | &.current .cell { 26 | background-color: var(--datepicker-active-color) !important; 27 | color: #fff; 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/date-picker/src/util/dropdown.js: -------------------------------------------------------------------------------- 1 | var dropdowns = []; 2 | 3 | document.addEventListener('click', function(event) { 4 | dropdowns.forEach(function(dropdown) { 5 | var target = event.target; 6 | if (!dropdown || !dropdown.$el) return; 7 | if (target === dropdown.$el || dropdown.$el.contains(target)) { 8 | return; 9 | } 10 | dropdown.onDocumentClick && dropdown.onDocumentClick(event); 11 | }); 12 | }); 13 | 14 | export default { 15 | open(instance) { 16 | if (instance) { 17 | dropdowns.push(instance); 18 | } 19 | }, 20 | 21 | close(instance) { 22 | var index = dropdowns.indexOf(instance); 23 | if (index !== -1) { 24 | dropdowns.splice(instance, 1); 25 | } 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /packages/theme-default/src/row.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | @b row { 6 | position: relative; 7 | box-sizing: border-box; 8 | @utils-clearfix; 9 | 10 | @m flex { 11 | display: flex; 12 | &:before, 13 | &:after { 14 | display: none; 15 | } 16 | 17 | @when justify-center { 18 | justify-content: center; 19 | } 20 | @when justify-end { 21 | justify-content: flex-end; 22 | } 23 | @when justify-space-between { 24 | justify-content: space-between; 25 | } 26 | @when justify-space-around { 27 | justify-content: space-around; 28 | } 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/tag/src/tag.vue: -------------------------------------------------------------------------------- 1 | 13 | 30 | -------------------------------------------------------------------------------- /src/utils/clickoutside.js: -------------------------------------------------------------------------------- 1 | /** 2 | * v-clickoutside 3 | * @desc 点击元素外面才会触发的事件 4 | * @example 5 | * ```vue 6 | *
7 | * ``` 8 | */ 9 | let handler; 10 | 11 | export default { 12 | bind(el, binding, vnode) { 13 | const expression = binding.expression; 14 | handler = function(e) { 15 | if (vnode.context && !el.contains(e.target)) { 16 | vnode.context[expression](); 17 | } 18 | }; 19 | document.addEventListener('click', handler); 20 | }, 21 | 22 | unbind() { 23 | document.removeEventListener('click', handler); 24 | }, 25 | 26 | install(Vue) { 27 | Vue.directive('clickoutside', { 28 | bind: this.bind, 29 | unbind: this.unbind 30 | }); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /examples/index.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Element 7 | 8 | 9 |
10 | 11 | 20 | 21 | -------------------------------------------------------------------------------- /packages/date-picker/src/css/time-range-picker.css: -------------------------------------------------------------------------------- 1 | @import '../css/vars.css'; 2 | 3 | @component-namespace el { 4 | @b time-range-picker { 5 | width: 354px; 6 | overflow: visible; 7 | 8 | @e content { 9 | position: relative; 10 | text-align: center; 11 | padding: 10px; 12 | display: flex; 13 | } 14 | 15 | @e cell { 16 | box-sizing: border-box; 17 | margin: 0; 18 | padding: 4px 7px 7px; 19 | flex: 1; 20 | } 21 | 22 | @e header { 23 | margin-bottom: 5px; 24 | text-align: center; 25 | font-size: 14px; 26 | } 27 | 28 | @e body { 29 | display: flex; 30 | border-radius:2px; 31 | border: 1px solid var(--datepicker-border-color); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/select/src/option-group.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /packages/spinner/src/spinner.vue: -------------------------------------------------------------------------------- 1 | 8 | 28 | -------------------------------------------------------------------------------- /scripts/cooking.conf.js: -------------------------------------------------------------------------------- 1 | var cooking = require('cooking'); 2 | var path = require('path'); 3 | 4 | cooking.set({ 5 | entry: './src/index.js', 6 | dist: './lib', 7 | clean: false, 8 | format: 'umd', 9 | moduleName: 'ELEMENT', 10 | extends: ['vue2'], 11 | alias: { 12 | main: path.join(__dirname, '../src'), 13 | packages: path.join(__dirname, '../packages'), 14 | examples: path.join(__dirname, '../examples') 15 | }, 16 | externals: { 17 | vue: { 18 | root: 'Vue', 19 | commonjs: 'vue', 20 | commonjs2: 'vue', 21 | amd: 'vue' 22 | } 23 | } 24 | }); 25 | 26 | cooking.add('output.filename', 'index.js'); 27 | cooking.add('loader.js.exclude', /node_modules|utils\/popper\.js|util\/fecha.\js/); 28 | module.exports = cooking.resolve(); 29 | -------------------------------------------------------------------------------- /examples/docs/breadcrumb.md: -------------------------------------------------------------------------------- 1 | ## Breadcrumb 面包屑 2 | 显示当前页面的路径,快速返回之前的任意页面。 3 | 4 | ### 基础用法 5 | 6 | 适用广泛的基础用法。 7 | 8 | :::demo 在`el-breadcrumb`中使用`el-breadcrumb-item`标签表示从首页开始的每一级。Element 提供了一个`separator`属性,在`el-breadcrumb`标签中设置它来决定分隔符,它只能是字符串,默认为斜杠`/`。 9 | 10 | ```html 11 | 12 | 首页 13 | 活动管理 14 | 活动列表 15 | 活动详情 16 | 17 | ``` 18 | ::: 19 | 20 | ### Attributes 21 | | 参数 | 说明 | 类型 | 可选值 | 默认值 | 22 | |---------- |-------------- |---------- |-------------------------------- |-------- | 23 | | separator | 分隔符 | string | — | 斜杠'/' | 24 | -------------------------------------------------------------------------------- /packages/badge/src/main.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 38 | -------------------------------------------------------------------------------- /packages/theme-default/src/breadcrumb.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | 6 | @b breadcrumb { 7 | font-size:13px; 8 | color:#475669; 9 | @utils-clearfix; 10 | 11 | @e separator { 12 | margin: 0 8px; 13 | color: #c0ccda; 14 | } 15 | @e item { 16 | float: left; 17 | 18 | &:not(:last-child) { 19 | .el-breadcrumb__item__text { 20 | transition: color .15s linear; 21 | 22 | &:hover { 23 | color: var(--color-primary); 24 | cursor: pointer; 25 | } 26 | } 27 | } 28 | 29 | &:last-child { 30 | color: #99a9bf; 31 | 32 | .el-breadcrumb__separator { 33 | display: none; 34 | } 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/theme-default/src/col.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | .el-col-1, .el-col-2, .el-col-3, .el-col-4, .el-col-5, .el-col-6, .el-col-7, .el-col-8, .el-col-9, .el-col-10, .el-col-11, .el-col-12, .el-col-13, .el-col-14, .el-col-15, .el-col-16, .el-col-17, .el-col-18, .el-col-19, .el-col-20, .el-col-21, .el-col-22, .el-col-23, .el-col-24 { 5 | float: left; 6 | box-sizing: border-box; 7 | } 8 | 9 | @for $i from 1 to 24 { 10 | .el-col-$i { 11 | width: calc(1 / 24 * $(i) * 100)%; 12 | } 13 | .el-col-offset-$i { 14 | margin-left: calc(1 / 24 * $(i) * 100)%; 15 | } 16 | .el-col-pull-$i { 17 | position: relative; 18 | right: calc(1 / 24 * $(i) * 100)%; 19 | } 20 | .el-col-push-$i { 21 | position: relative; 22 | left: calc(1 / 24 * $(i) * 100)%; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/date-picker/src/css/year-table.css: -------------------------------------------------------------------------------- 1 | @import "./vars.css"; 2 | 3 | @component-namespace el { 4 | @b year-table { 5 | font-size: 12px; 6 | margin: -1px; 7 | 8 | .el-icon { 9 | color: var(--datepicker-icon-color); 10 | } 11 | 12 | td { 13 | text-align: center; 14 | padding: 20px 3px; 15 | cursor: pointer; 16 | 17 | .cell { 18 | width: 48px; 19 | height: 32px; 20 | display: block; 21 | line-height: 32px; 22 | color: var(--datepicker-color); 23 | } 24 | 25 | &.available .cell:hover { 26 | background-color: var(--datepicker-cell-hover-color); 27 | } 28 | 29 | &.current .cell { 30 | background-color: var(--datepicker-active-color) !important; 31 | color: #fff; 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /packages/cascader/src/menu.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/steps/src/steps.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 45 | -------------------------------------------------------------------------------- /packages/switch/README.md: -------------------------------------------------------------------------------- 1 | # el-switch 2 | > A el-switch component for Vue.js. 3 | 4 | ## Installation 5 | ```shell 6 | npm i el-switch -D 7 | ``` 8 | 9 | ## Usage 10 | ```javascript 11 | import Vue from 'vue' 12 | import ElSwitch from 'el-switch' 13 | import 'element-theme-default' 14 | 15 | Vue.use(ElSwitch) 16 | ``` 17 | 18 | or 19 | 20 | ```javascript 21 | import Vue from 'vue' 22 | import { ElSwitch } from 'el-switch' 23 | 24 | Vue.component('el-switch', ElSwitch) 25 | ``` 26 | 27 | 28 | ## Options 29 | 30 | | name | description | type | default | 31 | |-------------|-------------|-------------|-------------| 32 | | | | | | 33 | 34 | ## Development 35 | ```shell 36 | make dev 37 | 38 | ## test 39 | make test 40 | 41 | ## build 42 | make build 43 | ``` 44 | 45 | # License 46 | [MIT](https://opensource.org/licenses/MIT) 47 | -------------------------------------------------------------------------------- /packages/theme-default/src/loading.css: -------------------------------------------------------------------------------- 1 | .el-loading-spinner { 2 | height: 12px; 3 | width: 60px; 4 | top: 50%; 5 | left: 50%; 6 | font-size: 0; 7 | text-align: center; 8 | margin-top: -6px; 9 | margin-left: -30px; 10 | z-index: 10001; 11 | } 12 | 13 | .el-loading-bubble { 14 | height: 12px; 15 | width: 12px; 16 | background-color: #fff; 17 | margin: 0 3px; 18 | border-radius: 50%; 19 | display: inline-block; 20 | animation: 1s cubic-bezier(.2,.68,.18,1.08) infinite both bubble-pulse; 21 | } 22 | 23 | .el-loading-bubble.bubble1 { 24 | animation-delay: .16s; 25 | } 26 | 27 | .el-loading-bubble.bubble2 { 28 | animation-delay: .32s; 29 | } 30 | 31 | .el-loading-bubble.bubble3 { 32 | animation-delay: .48s; 33 | } 34 | 35 | @keyframes bubble-pulse { 36 | 0%, 80% { 37 | transform: scale(1); 38 | opacity: 1; 39 | } 40 | 45% { 41 | transform: scale(0); 42 | opacity: 0; 43 | } 44 | } -------------------------------------------------------------------------------- /packages/table/README.md: -------------------------------------------------------------------------------- 1 | # el-table 2 | > A el-table component for Vue.js. 3 | 4 | ## Demo 5 | http://element-component.github.io/el-table 6 | 7 | ## Installation 8 | ```shell 9 | npm i el-table -D 10 | ``` 11 | 12 | ## Usage 13 | ```javascript 14 | import Vue from 'vue' 15 | import ElTable from 'el-table' 16 | import 'element-theme-default' 17 | 18 | Vue.use(ElTable) 19 | ``` 20 | 21 | or 22 | 23 | ```javascript 24 | import Vue from 'vue' 25 | import { ElTable } from 'el-table' 26 | 27 | Vue.component('el-table', ElTable) 28 | ``` 29 | 30 | 31 | ## Options 32 | 33 | | name | description | type | default | 34 | |-------------|-------------|-------------|-------------| 35 | | | | | | 36 | 37 | ## Development 38 | ```shell 39 | make dev 40 | 41 | ## test 42 | make test 43 | 44 | ## build 45 | make build 46 | ``` 47 | 48 | # License 49 | [MIT](https://opensource.org/licenses/MIT) 50 | -------------------------------------------------------------------------------- /packages/theme-default/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "element-theme-default", 3 | "version": "1.0.0", 4 | "description": "Element component default theme.", 5 | "main": "lib/index.css", 6 | "files": [ 7 | "lib" 8 | ], 9 | "scripts": { 10 | "build": "postcss -c postcss.conf.js" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/element-component/element-theme-default.git" 15 | }, 16 | "keywords": [ 17 | "element", 18 | "theme" 19 | ], 20 | "author": "haiping.zeng ", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/element-component/element-theme-default/issues" 24 | }, 25 | "homepage": "https://github.com/element-component/element-theme-default#readme", 26 | "devDependencies": { 27 | "gulp": "^3.9.1", 28 | "gulp-cssmin": "^0.1.7", 29 | "gulp-postcss": "^6.1.1", 30 | "postcss-salad": "^1.0.5" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/theme-default/gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'); 4 | const postcss = require('gulp-postcss'); 5 | const cssmin = require('gulp-cssmin'); 6 | 7 | const salad = require('postcss-salad')({ 8 | browser: ['ie > 9', 'last 2 version'], 9 | features: { 10 | 'bem': { 11 | 'shortcuts': { 12 | 'component': 'b', 13 | 'modifier': 'm', 14 | 'descendent': 'e' 15 | }, 16 | 'separators': { 17 | 'descendent': '__', 18 | 'modifier': '--' 19 | } 20 | } 21 | } 22 | }); 23 | 24 | gulp.task('compile', function() { 25 | return gulp.src('./src/*.css') 26 | .pipe(postcss([salad])) 27 | .pipe(cssmin()) 28 | .pipe(gulp.dest('./lib')); 29 | }); 30 | 31 | gulp.task('copyfont', function() { 32 | return gulp.src('./src/fonts/**') 33 | .pipe(cssmin()) 34 | .pipe(gulp.dest('./lib/fonts')); 35 | }); 36 | 37 | gulp.task('build', ['compile', 'copyfont']); 38 | -------------------------------------------------------------------------------- /packages/dialog/README.md: -------------------------------------------------------------------------------- 1 | # el-dialog 2 | > A el-dialog component for Vue.js. 3 | 4 | ## Demo 5 | http://element-component.github.io/el-dialog 6 | 7 | ## Installation 8 | ```shell 9 | npm i el-dialog -D 10 | ``` 11 | 12 | ## Usage 13 | ```javascript 14 | import Vue from 'vue' 15 | import ElDialog from 'el-dialog' 16 | import 'element-theme-default' 17 | 18 | Vue.use(ElDialog) 19 | ``` 20 | 21 | or 22 | 23 | ```javascript 24 | import Vue from 'vue' 25 | import { ElDialog } from 'el-dialog' 26 | 27 | Vue.component('el-dialog', ElDialog) 28 | ``` 29 | 30 | 31 | ## Options 32 | 33 | | name | description | type | default | 34 | |-------------|-------------|-------------|-------------| 35 | | | | | | 36 | 37 | ## Development 38 | ```shell 39 | make dev 40 | 41 | ## test 42 | make test 43 | 44 | ## build 45 | make build 46 | ``` 47 | 48 | # License 49 | [MIT](https://opensource.org/licenses/MIT) 50 | -------------------------------------------------------------------------------- /packages/theme-default/src/spinner.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | @b time-spinner { 6 | display: flex; 7 | width: 100%; 8 | } 9 | 10 | @b spinner { 11 | display: inline-block; 12 | vertical-align: middle; 13 | } 14 | @b spinner-inner { 15 | animation: rotate 2s linear infinite; 16 | width: 50px; 17 | height: 50px; 18 | 19 | & .path { 20 | stroke: #ececec; 21 | stroke-linecap: round; 22 | animation: dash 1.5s ease-in-out infinite; 23 | } 24 | 25 | } 26 | } 27 | @keyframes rotate { 28 | 100% { 29 | transform: rotate(360deg); 30 | } 31 | } 32 | 33 | @keyframes dash { 34 | 0% { 35 | stroke-dasharray: 1, 150; 36 | stroke-dashoffset: 0; 37 | } 38 | 50% { 39 | stroke-dasharray: 90, 150; 40 | stroke-dashoffset: -35; 41 | } 42 | 100% { 43 | stroke-dasharray: 90, 150; 44 | stroke-dashoffset: -124; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/theme-default/src/rate.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | 6 | @b rate { 7 | height: 20px; 8 | @e item { 9 | display: inline-block; 10 | position: relative; 11 | font-size: 0; 12 | vertical-align: middle; 13 | } 14 | 15 | @e icon { 16 | position: relative; 17 | display: inline-block; 18 | font-size: 18px; 19 | margin-right: 6px; 20 | color: #C6D1DE; 21 | transition: .3s; 22 | &.hover { 23 | transform: scale(1.15); 24 | } 25 | 26 | .path2 { 27 | position: absolute; 28 | left: 0; 29 | top: 0; 30 | } 31 | } 32 | 33 | @e decimal { 34 | position: absolute; 35 | top: 0; 36 | left: 0; 37 | display: inline-block; 38 | overflow: hidden; 39 | } 40 | 41 | @e text { 42 | font-size: 14px; 43 | vertical-align: middle; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/col/src/col.vue: -------------------------------------------------------------------------------- 1 | 15 | 47 | -------------------------------------------------------------------------------- /packages/row/src/row.vue: -------------------------------------------------------------------------------- 1 | 16 | 47 | -------------------------------------------------------------------------------- /packages/theme-default/src/time-select.css: -------------------------------------------------------------------------------- 1 | @import "../../date-picker/src/css/picker.css"; 2 | @import "../../date-picker/src/css/date-picker.css"; 3 | @import "../../date-picker/src/css/vars.css"; 4 | 5 | .time-select { 6 | min-width: 200px; 7 | margin: 5px 0; 8 | width: 100%; 9 | } 10 | 11 | .time-select .el-picker-panel__content { 12 | max-height: 200px; 13 | overflow: hidden; 14 | margin: 0; 15 | 16 | &:hover { 17 | overflow-y: auto; 18 | } 19 | } 20 | 21 | .time-select-item { 22 | padding: 8px 10px; 23 | font-size: 14px; 24 | } 25 | 26 | .time-select-item.selected:not(.disabled) { 27 | background-color: var(--datepicker-active-color); 28 | color: #fff; 29 | 30 | &:hover { 31 | background-color: #1d8ce0; 32 | } 33 | } 34 | 35 | .time-select-item.disabled { 36 | color: var(--datepicker-border-color); 37 | cursor: not-allowed; 38 | } 39 | 40 | .time-select-item:hover { 41 | background-color: var(--datepicker-cell-hover-color); 42 | cursor: pointer; 43 | } 44 | -------------------------------------------------------------------------------- /examples/entry.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import entry from './app'; 3 | import VueRouter from 'vue-router'; 4 | import configRouter from './route.config'; 5 | import Element from 'main/index.js'; 6 | import 'packages/theme-default/src/index.css'; 7 | import demoBlock from './components/demo-block.vue'; 8 | import MainFooter from './components/footer.vue'; 9 | import MainHeader from './components/header.vue'; 10 | import SideNav from './components/side-nav'; 11 | import FooterNav from './components/footer-nav'; 12 | 13 | Vue.use(Element); 14 | Vue.use(VueRouter); 15 | Vue.component('demo-block', demoBlock); 16 | Vue.component('main-footer', MainFooter); 17 | Vue.component('main-header', MainHeader); 18 | Vue.component('side-nav', SideNav); 19 | Vue.component('footer-nav', FooterNav); 20 | 21 | const router = new VueRouter({ 22 | mode: 'hash', 23 | base: __dirname, 24 | routes: configRouter 25 | }); 26 | 27 | new Vue({ // eslint-disable-line 28 | render: h => h(entry), 29 | router 30 | }).$mount('#app'); 31 | -------------------------------------------------------------------------------- /packages/dropdown/src/dropdown-menu.vue: -------------------------------------------------------------------------------- 1 | 6 | 42 | -------------------------------------------------------------------------------- /src/mixins/emitter.js: -------------------------------------------------------------------------------- 1 | function broadcast(componentName, eventName, params) { 2 | this.$children.forEach(child => { 3 | var name = child.$options.componentName; 4 | 5 | if (name === componentName) { 6 | child.$emit.apply(child, [eventName].concat(params)); 7 | } else { 8 | broadcast.apply(child, [componentName, eventName].concat(params)); 9 | } 10 | }); 11 | } 12 | export default { 13 | methods: { 14 | dispatch(componentName, eventName, params) { 15 | var parent = this.$parent; 16 | var name = parent.$options.componentName; 17 | 18 | while (parent && (!name || name !== componentName)) { 19 | parent = parent.$parent; 20 | 21 | if (parent) { 22 | name = parent.$options.componentName; 23 | } 24 | } 25 | if (parent) { 26 | parent.$emit.apply(parent, [eventName].concat(params)); 27 | } 28 | }, 29 | broadcast(componentName, eventName, params) { 30 | broadcast.call(this, componentName, eventName, params); 31 | } 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /packages/theme-default/src/option.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | 6 | @b select-dropdown { 7 | @e item { 8 | font-size: 14px; 9 | padding: 8px 10px; 10 | position: relative; 11 | white-space: nowrap; 12 | overflow: hidden; 13 | text-overflow: ellipsis; 14 | color: #475669; 15 | height: 36px; 16 | line-height: 1.5; 17 | box-sizing: border-box; 18 | cursor: pointer; 19 | 20 | @when disabled { 21 | color: #c0ccda; 22 | cursor: not-allowed; 23 | 24 | &:hover { 25 | background-color: #fff; 26 | } 27 | } 28 | 29 | &.hover { 30 | background-color: #e5e9f2; 31 | } 32 | 33 | &.selected { 34 | color: #fff; 35 | background-color: #20A0FF; 36 | 37 | &.hover { 38 | background-color: #1D8CE0; 39 | } 40 | } 41 | 42 | & span { 43 | line-height: 1.5 !important; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/theme-default/src/badge.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./common/var.css"; 3 | 4 | @component-namespace el { 5 | @b badge { 6 | position: relative; 7 | vertical-align: middle; 8 | display: inline-block; 9 | 10 | @e content { 11 | background-color: var(--badge-fill); 12 | border-radius: var(--badge-radius); 13 | color: #fff; 14 | display: inline-block; 15 | font-size: var(--badge-font-size); 16 | height: var(--badge-size); 17 | line-height: var(--badge-size); 18 | padding: 0 var(--badge-padding); 19 | text-align: center; 20 | white-space: nowrap; 21 | border: 1px solid #fff; 22 | 23 | @when fixed { 24 | position: absolute 0 calc(var(--badge-size) / 2 + 1) * *; 25 | transform: translateY(-50%) translateX(100%); 26 | 27 | @when dot { 28 | right: 5px; 29 | } 30 | } 31 | 32 | @when dot { 33 | size: 8px 8px; 34 | padding: 0; 35 | right: 0; 36 | border-radius: 50%; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/cascader/README.md: -------------------------------------------------------------------------------- 1 | # el-cascader 2 | > A el-cascader component for Vue.js. 3 | 4 | ## Installation 5 | ```shell 6 | npm i el-cascader -D 7 | ``` 8 | 9 | ## Usage 10 | ```javascript 11 | import Vue from 'vue' 12 | import ElCascader from 'el-cascader' 13 | import 'theme-default/dist/cascader.css' 14 | 15 | Vue.use(ElCascader) 16 | ``` 17 | 18 | or 19 | 20 | ```javascript 21 | import Vue from 'vue' 22 | import { ElCascader } from 'el-cascader' 23 | 24 | Vue.component('el-cascader', ElCascader) 25 | ``` 26 | 27 | 28 | ## Options 29 | 30 | ### el-cascader 31 | 32 | | 参数 | 说明 | 类型 | 可选值 | 默认值 | 33 | |--------------------|----------------------------------------------------------|-------------------|-------------|--------| 34 | |model| 绑定值| string | | | 35 | |placeholder| 占位符| string | | | | 36 | 37 | 38 | ## Development 39 | ```shell 40 | make dev 41 | 42 | ## test 43 | make test 44 | 45 | ## build 46 | make build 47 | ``` 48 | 49 | # License 50 | [MIT](https://opensource.org/licenses/MIT) 51 | -------------------------------------------------------------------------------- /examples/docs/development.md: -------------------------------------------------------------------------------- 1 | ## 开发指南 2 | 3 | 开发之前需要配置好 Node.js 和 npm 环境,其中 npm 需要 3.0 或以上版本。 4 | 5 | ### 目录结构 6 | ```text 7 | |- examples/ -------------- 文档及示例页 8 | |- docs/ -------------- 文档 9 | |- component/ 10 | |- src/ --------------- 组件源码 11 | |- packages/ -------------- 组件 12 | |- scripts/ --------------- 打包配置 13 | |- src/ ------------------- 公用代码 14 | |- components.json -------- 组件列表 15 | ``` 16 | 17 | ### 安装依赖 18 | 安装项目所需要的依赖以及子项目内的依赖。 19 | ```bash 20 | npm run bootstrap 21 | ``` 22 | 23 | 如果网络不是很理想,可以用国内镜像下载。新建一个 `.npmrc` 文件在当前项目下,同时配置镜像地址,例如: 24 | ```text 25 | registry=https://registry.npm.taobao.org 26 | ``` 27 | 28 | 然后再运行 `npm run bootstrap` 安装依赖。 29 | 30 | ### 启动开发环境 31 | 32 | 启动完成后浏览器访问 [http://localhost:8085](http://localhost:8085) 33 | 34 | ```bash 35 | npm run dev 36 | ``` 37 | 38 | ### npm scripts 39 | ```bash 40 | npm run dev # 启动开发环境 41 | npm run dist # 打包组件 42 | npm run dist:all # 单独打包每个子项目 43 | npm run lint # 检测 js 代码风格 44 | node bin/new.js [组件名] # 创建新组件 45 | ``` 46 | 47 | ### 贡献代码 48 | 49 | 参考 [贡献者文档](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md)。 50 | -------------------------------------------------------------------------------- /packages/date-picker/src/css/time-spinner.css: -------------------------------------------------------------------------------- 1 | @import "./vars.css"; 2 | 3 | @component-namespace el { 4 | @b time-spinner { 5 | @e wrapper { 6 | height: 190px; 7 | overflow: hidden; 8 | flex: 1; 9 | vertical-align: top; 10 | position: relative; 11 | 12 | &:hover { 13 | overflow-y: auto; 14 | } 15 | } 16 | 17 | @e list { 18 | padding: 0; 19 | margin: 0; 20 | list-style: none; 21 | text-align: center; 22 | 23 | &::after, 24 | &::before { 25 | content: ''; 26 | display: block; 27 | width: 100%; 28 | height: 80px; 29 | } 30 | } 31 | 32 | @e item { 33 | height: 32px; 34 | line-height: 32px; 35 | font-size: 12px; 36 | 37 | &:hover:not(.disabled):not(.active) { 38 | background: #E5E9F2; 39 | cursor: pointer; 40 | } 41 | 42 | &.active:not(.disabled) { 43 | color: #fff; 44 | } 45 | 46 | &.disabled { 47 | color: var(--datepicker-border-color); 48 | cursor: not-allowed; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 element-ui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /packages/input/README.md: -------------------------------------------------------------------------------- 1 | # el-input 2 | > A el-input component for Vue.js. 3 | 4 | # Demo 5 | http://element-component.github.io/el-input 6 | 7 | # Installation 8 | ```shell 9 | npm i el-input -D 10 | ``` 11 | 12 | # Usage 13 | ```javascript 14 | import Vue from 'vue' 15 | import ElInput from 'el-input' 16 | import 'element-theme-default/dist/input.css' 17 | 18 | Vue.use(ElInput) 19 | ``` 20 | 21 | or 22 | 23 | ```javascript 24 | import Vue from 'vue' 25 | import { ElInput } from 'el-input' 26 | 27 | Vue.component('el-input', ElInput) 28 | ``` 29 | 30 | # Options 31 | 32 | | name | description | type | default | 33 | |-------------|-------------|-------------|-------------| 34 | | model | 绑定值,需双向绑定 | string|number || 35 | | placeholder | 输入框占位文本 | string || 36 | | suggestion | 输入建议 | string[] || 37 | | disabled | 是否禁用 | boolean | false | 38 | | cache | 是否需要缓存 | boolean | false | 39 | | effect | 输入框效果,允许 text, number, special | string | text | 40 | 41 | # Development 42 | ```shell 43 | make dev 44 | 45 | # test 46 | make test 47 | 48 | # build 49 | make build 50 | ``` 51 | 52 | # License 53 | [MIT](https://opensource.org/licenses/MIT) 54 | -------------------------------------------------------------------------------- /packages/radio/README.md: -------------------------------------------------------------------------------- 1 | # el-radio 2 | > A el-radio component for Vue.js. 3 | 4 | ## Demo 5 | http://element-component.github.io/el-radio 6 | 7 | ## Installation 8 | ```shell 9 | npm i el-radio -D 10 | ``` 11 | 12 | ## Usage 13 | ```javascript 14 | import Vue from 'vue' 15 | import ElRadio from 'el-radio' 16 | import 'element-theme-default/dist/radio.css' 17 | 18 | Vue.use(ElRadio) 19 | ``` 20 | 21 | or 22 | 23 | ```javascript 24 | import Vue from 'vue' 25 | import { ElRadio } from 'el-radio' 26 | 27 | Vue.component('el-radio', ElRadio) 28 | ``` 29 | 30 | 31 | ## Options 32 | | 参数 | 说明 | 类型 | 可选值 | 默认值 | 33 | |---------- |-------- |---------- |------------- |-------- | 34 | | model | 绑定值 | string | | | 35 | | value | 真实值 | string | | | 36 | | label | 显示值,默认显示 value | string | | | 37 | | disabled | 禁用 | boolean | true, false | false | 38 | 39 | ## Development 40 | ```shell 41 | make dev 42 | 43 | ## test 44 | make test 45 | 46 | ## build 47 | make build 48 | ``` 49 | 50 | # License 51 | [MIT](https://opensource.org/licenses/MIT) 52 | -------------------------------------------------------------------------------- /packages/theme-default/src/core/dropdown.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "../common/var.css"; 3 | @import "./option.css"; 4 | 5 | @component-namespace element { 6 | 7 | @b dropdown { 8 | background-color: var(--dropdown-fill); 9 | border: var(--dropdown-border); 10 | border-radius: var(--dropdown-radius); 11 | box-shadow: var(--dropdown-shadow); 12 | left: 0; 13 | list-style-type: none; 14 | margin: -var(--dropdown-border-width); 15 | margin-top: 5px; 16 | min-width: calc(var(--input-width) + 4); 17 | padding: 0; 18 | position: absolute; 19 | white-space: nowrap; 20 | z-index: var(--index-normal); 21 | 22 | @e empty { 23 | color: var(--dropdown-option-empty-color); 24 | font-size: var(--input-font-size); 25 | padding: 7px; 26 | text-align: center; 27 | } 28 | 29 | @e list { 30 | margin: 0; 31 | max-height: var(--cascader-height); 32 | overflow: auto; 33 | padding: 0; 34 | } 35 | 36 | @e option { 37 | max-height: 250px; 38 | overflow: auto; 39 | } 40 | 41 | &:empty { 42 | display: none; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/input-number/README.md: -------------------------------------------------------------------------------- 1 | # el-input 2 | > A el-input component for Vue.js. 3 | 4 | # Demo 5 | http://element-component.github.io/el-input 6 | 7 | # Installation 8 | ```shell 9 | npm i el-input -D 10 | ``` 11 | 12 | # Usage 13 | ```javascript 14 | import Vue from 'vue' 15 | import ElInput from 'el-input' 16 | import 'element-theme-default/dist/input.css' 17 | 18 | Vue.use(ElInput) 19 | ``` 20 | 21 | or 22 | 23 | ```javascript 24 | import Vue from 'vue' 25 | import { ElInput } from 'el-input' 26 | 27 | Vue.component('el-input', ElInput) 28 | ``` 29 | 30 | # Options 31 | 32 | | name | description | type | default | 33 | |-------------|-------------|-------------|-------------| 34 | | model | 绑定值,需双向绑定 | string|number || 35 | | placeholder | 输入框占位文本 | string || 36 | | suggestion | 输入建议 | string[] || 37 | | disabled | 是否禁用 | boolean | false | 38 | | cache | 是否需要缓存 | boolean | false | 39 | | effect | 输入框效果,允许 text, number, special | string | text | 40 | 41 | # Development 42 | ```shell 43 | make dev 44 | 45 | # test 46 | make test 47 | 48 | # build 49 | make build 50 | ``` 51 | 52 | # License 53 | [MIT](https://opensource.org/licenses/MIT) 54 | -------------------------------------------------------------------------------- /packages/theme-default/src/index.css: -------------------------------------------------------------------------------- 1 | @import "./base.css"; 2 | @import "./button.css"; 3 | @import "./input.css"; 4 | @import "./select.css"; 5 | @import "./alert.css"; 6 | @import "./notification.css"; 7 | @import "./slider.css"; 8 | @import "./checkbox.css"; 9 | @import "./radio.css"; 10 | @import "./switch.css"; 11 | @import "./dropdown.css"; 12 | @import "./loading.css"; 13 | @import "./dialog.css"; 14 | @import "./table.css"; 15 | @import "./pagination.css"; 16 | @import "./popover.css"; 17 | @import "./tooltip.css"; 18 | @import "./autocomplete.css"; 19 | @import "./message.css"; 20 | @import "./message-box.css"; 21 | @import "./date-picker.css"; 22 | @import "./time-picker.css"; 23 | @import "./time-select.css"; 24 | @import "./input-number.css"; 25 | @import "./tag.css"; 26 | @import "./breadcrumb.css"; 27 | @import "./form.css"; 28 | @import "./tabs.css"; 29 | @import "./progress.css"; 30 | @import "./tree.css"; 31 | @import "./menu.css"; 32 | @import "./upload.css"; 33 | @import "./row.css"; 34 | @import "./col.css"; 35 | @import "./spinner.css"; 36 | @import "./badge.css"; 37 | @import "./card.css"; 38 | @import "./rate.css"; 39 | @import "./steps.css"; 40 | @import "./step.css"; 41 | -------------------------------------------------------------------------------- /packages/theme-default/src/cascader.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./input.css"; 3 | @import "./common/var.css"; 4 | /*@import "./core/dropdown.css";*/ 5 | 6 | @component-namespace element { 7 | 8 | @b cascader { 9 | display: inline-block; 10 | position: relative; 11 | 12 | @e dropdown { 13 | background-color: var(--cascader-menu-fill); 14 | border: var(--cascader-menu-border); 15 | border-radius: var(--cascader-menu-radius); 16 | box-shadow: var(--cascader-menu-submenu-shadow); 17 | margin-top: 5px; 18 | max-height: var(--cascader-height); 19 | position: absolute; 20 | white-space: nowrap; 21 | z-index: 10; 22 | } 23 | 24 | @e wrap { 25 | overflow: hidden; 26 | } 27 | 28 | @e menu { 29 | border: 0; 30 | box-shadow: none; 31 | display: inline-block; 32 | margin: 0; 33 | position: relative; 34 | vertical-align: top; 35 | 36 | &::before { 37 | border-left: var(--cascader-menu-border); 38 | content: " "; 39 | height: var(--cascader-height); 40 | left: 0; 41 | position: absolute; 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 更新日志 2 | 3 | ### 1.0.0-rc.4(待发布) 4 | 5 | *2016-XX-XX* 6 | 7 | - 修复 Select 多选时选项变为空数组后 placeholder 不出现的问题 8 | - 修复 Time Picker 时间选择可滚动 9 | - 修复 Tooltip 有时会错位的问题 10 | 11 | #### 非兼容性更新 12 | - Select 组件样式的 `display` 属性默认值修改为 `block` 13 | 14 | ### 1.0.0-rc.3 15 | 16 | *2016-09-09* 17 | 18 | - 修复 Slider 存在输入框时,输入框与 Slider 的值不同步的问题 19 | - 修复 Steps 样式 20 | - 修复 无法安装的问题 21 | 22 | ### 1.0.0-rc.2 23 | 24 | *2016-09-09* 25 | 26 | - 修复 Upload 上传的问题,并增加上传成功和失败的钩子函数 27 | - Button 组件增加 `nativeType` 属性,用于组件内 `