Skip to content

Commit

Permalink
Add vue-popup and dom helper
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Dec 26, 2016
1 parent daec90a commit a906a5f
Show file tree
Hide file tree
Showing 40 changed files with 706 additions and 54 deletions.
4 changes: 2 additions & 2 deletions examples/docs/en-US/button.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { addClass } from 'wind-dom/src/class';
import { addClass } from 'element-ui/src/utils/dom';
export default {
data() {
return {
Expand Down Expand Up @@ -78,7 +78,7 @@ Different colors represent different meanings.
```
:::

### Icon Button
### Icon Button

Use icons to add more meaning to Button. You can use icon alone to save some space, or with text together.

Expand Down
4 changes: 2 additions & 2 deletions examples/docs/en-US/pagination.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Pagination
## Pagination

If you have too much data to display in one page, use pagination.

Expand Down Expand Up @@ -117,7 +117,7 @@ Add more modules based on your scenario.
```
:::
<script>
import { addClass } from 'wind-dom/src/class';
import { addClass } from 'element-ui/src/utils/dom';
export default {
data() {
return {
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/zh-CN/button.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { addClass } from 'wind-dom/src/class';
import { addClass } from 'element-ui/src/utils/dom';
export default {
data() {
return {
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/zh-CN/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
```
:::
<script>
import { addClass } from 'wind-dom/src/class';
import { addClass } from 'element-ui/src/utils/dom';
export default {
methods: {
handleSizeChange(val) {
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
"async-validator": "^1.6.6",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"throttle-debounce": "^1.0.1",
"vue-popup": "^0.2.14",
"wind-dom": "0.0.3"
"throttle-debounce": "^1.0.1"
},
"peerDependencies": {
"vue": "^2.1.6"
Expand Down
1 change: 0 additions & 1 deletion packages/date-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "[email protected]",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/date-picker/src/basic/date-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<script>
import { getFirstDayOfMonth, getDayCountOfMonth, getWeekNumber, getStartDateOfMonth, DAY_DURATION } from '../util';
import { hasClass } from 'wind-dom/src/class';
import { hasClass } from 'element-ui/src/utils/dom';
import Locale from 'element-ui/src/mixins/locale';
const clearHours = function(time) {
Expand Down
2 changes: 1 addition & 1 deletion packages/date-picker/src/basic/month-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<script type="text/babel">
import Locale from 'element-ui/src/mixins/locale';
import { hasClass } from 'wind-dom/src/class';
import { hasClass } from 'element-ui/src/utils/dom';
export default {
props: {
Expand Down
2 changes: 1 addition & 1 deletion packages/date-picker/src/basic/year-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</template>

<script type="text/babel">
import { hasClass } from 'wind-dom/src/class';
import { hasClass } from 'element-ui/src/utils/dom';
export default {
props: {
Expand Down
2 changes: 1 addition & 1 deletion packages/dialog/src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>

<script>
import Popup from 'vue-popup';
import Popup from 'element-ui/src/utils/popup';
export default {
name: 'el-dialog',
Expand Down
1 change: 0 additions & 1 deletion packages/input-number/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"license": "MIT",
"repository": "https://github.com/ElemeFE/element/tree/master/packages/input-number",
"dependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/input-number/src/input-number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</template>
<script>
import ElInput from 'element-ui/packages/input';
import { once, on } from 'wind-dom/src/event';
import { once, on } from 'element-ui/src/utils/dom';
export default {
name: 'ElInputNumber',
Expand Down
1 change: 0 additions & 1 deletion packages/loading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/loading/src/directive.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { addClass, removeClass } from 'wind-dom/src/class';
import { addClass, removeClass } from 'element-ui/src/utils/dom';
let Mask = Vue.extend(require('./loading.vue'));

exports.install = Vue => {
Expand Down
1 change: 0 additions & 1 deletion packages/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
1 change: 0 additions & 1 deletion packages/message-box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/message-box/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
</template>

<script type="text/babel">
import Popup from 'vue-popup';
import Popup from 'element-ui/src/utils/popup';
import Locale from 'element-ui/src/mixins/locale';
import ElInput from 'element-ui/packages/input';
import ElButton from 'element-ui/packages/button';
import { addClass, removeClass } from 'wind-dom/src/class';
import { addClass, removeClass } from 'element-ui/src/utils/dom';
import { t } from 'element-ui/src/locale';
let typeMap = {
Expand Down
2 changes: 1 addition & 1 deletion packages/message/src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { PopupManager } from 'vue-popup';
import { PopupManager } from 'element-ui/src/utils/popup';
let MessageConstructor = Vue.extend(require('./main.vue'));

let instance;
Expand Down
2 changes: 1 addition & 1 deletion packages/notification/src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { PopupManager } from 'vue-popup';
import { PopupManager } from 'element-ui/src/utils/popup';
let NotificationConstructor = Vue.extend(require('./main.vue'));

let instance;
Expand Down
1 change: 0 additions & 1 deletion packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"devDependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/popover/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<script>
import Popper from 'element-ui/src/utils/vue-popper';
import { on, off } from 'wind-dom/src/event';
import { on, off } from 'element-ui/src/utils/dom';
export default {
name: 'el-popover',
Expand Down
1 change: 0 additions & 1 deletion packages/rate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/rate/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>

<script type="text/babel">
import { hasClass } from 'wind-dom/src/class';
import { hasClass } from 'element-ui/src/utils/dom';
export default {
name: 'el-rate',
Expand Down
3 changes: 1 addition & 2 deletions packages/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"license": "MIT",
"repository": "https://github.com/ElemeFE/element/tree/master/packages/select",
"devDependencies": {
"throttle-debounce": "^1.0.1",
"wind-dom": "0.0.3"
"throttle-debounce": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
import ElTag from 'element-ui/packages/tag';
import debounce from 'throttle-debounce/debounce';
import Clickoutside from 'element-ui/src/utils/clickoutside';
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
import { addClass, removeClass, hasClass } from 'element-ui/src/utils/dom';
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
import { t } from 'element-ui/src/locale';
const sizeMap = {
Expand Down
1 change: 0 additions & 1 deletion packages/slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"wind-dom": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/slider/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<script type="text/babel">
import ElInputNumber from 'element-ui/packages/input-number';
import ElTooltip from 'element-ui/packages/tooltip';
import { getStyle } from 'wind-dom/src/style';
import { getStyle } from 'element-ui/src/utils/dom';
export default {
name: 'ElSlider',
Expand Down
3 changes: 2 additions & 1 deletion packages/table/src/table-layout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getScrollBarWidth } from './util';
import Vue from 'vue';

let GUTTER_WIDTH;

Expand All @@ -22,7 +23,7 @@ class TableLayout {
this.bodyHeight = null; // Table Height - Table Header Height
this.fixedBodyHeight = null; // Table Height - Table Header Height - Scroll Bar Height

if (GUTTER_WIDTH === undefined) {
if (GUTTER_WIDTH === undefined && !Vue.prototype.$isServer) {
GUTTER_WIDTH = getScrollBarWidth();
}
this.gutterWidth = GUTTER_WIDTH;
Expand Down
4 changes: 1 addition & 3 deletions packages/theme-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@
"gulp-postcss": "^6.1.1",
"postcss-salad": "^1.0.5"
},
"dependencies": {
"vue-popup": "^0.2.9"
}
"dependencies": {}
}
33 changes: 33 additions & 0 deletions packages/theme-default/src/common/popup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.v-modal-enter {
animation: v-modal-in .2s ease;
}

.v-modal-leave {
animation: v-modal-out .2s ease forwards;
}

@keyframes v-modal-in {
0% {
opacity: 0;
}
100% {
}
}

@keyframes v-modal-out {
0% {
}
100% {
opacity: 0;
}
}

.v-modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.5;
background: #000;
}
2 changes: 1 addition & 1 deletion packages/theme-default/src/dialog.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
@import "./common/var.css";
@import "vue-popup/lib/popup.css";
@import "./common/popup.css";

@component-namespace el {

Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/message-box.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@charset "UTF-8";
@import "./common/var.css";
@import "./common/popup.css";
@import "./button.css";
@import "./input.css";
@import "vue-popup/lib/popup.css";

@component-namespace el {

Expand Down
2 changes: 1 addition & 1 deletion src/utils/clickoutside.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { on } from 'wind-dom/src/event';
import { on } from 'element-ui/src/utils/dom';

const nodeList = [];
const ctx = '@@clickoutsideContext';
Expand Down
Loading

0 comments on commit a906a5f

Please sign in to comment.