Skip to content

Commit

Permalink
Merge pull request #18 from dreambo8563/develop
Browse files Browse the repository at this point in the history
1.0.5
  • Loading branch information
dreambo8563 authored Apr 19, 2019
2 parents 4418b0d + 2253e78 commit 7fdfdff
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<a name="1.0.5"></a>
## [1.0.5](https://github.com/dreambo8563/vue-simple-drawer/compare/v1.0.4...v1.0.5) (2019-04-19)



<a name="1.0.4"></a>
## [1.0.4](https://github.com/dreambo8563/vue-simple-drawer/compare/v1.0.2...v1.0.4) (2019-04-19)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local:
npm run serve
build:
npm run build
doc:
docs:
npm run pages
report:
npm run report
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ export default {

### Prop Types

| Property | Type | Required? | Description |
| :----------- | :------ | :-------- | :------------------------------------------------------------------------------------ |
| align | String | | One of "left", "up", "right", "down", default is 'right'. the location of the drawer. |
| closeable | Boolean | | show the x - close button, default true |
| mask | Boolean | | show the mask layer - close button, default true |
| maskClosable | Boolean | | emit 'close' event when click on mask layer, default: false |
| Property | Type | Required? | Description |
| :----------- | :------ | :-------- | :------------------------------------------------------------------------------------------------------- |
| align | String | | One of "left", "up", "right", "down", default is 'right'. the location of the drawer. |
| closeable | Boolean | | show the x - close button, default true |
| mask | Boolean | | show the mask layer - close button, default true |
| maskClosable | Boolean | | emit 'close' event when click on mask layer, default: false |
| zIndex | Number | | z-index value for the drawer, the nest drawer's z-index will be increased automatically, default is 1000 |

### Events

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-simple-drawer",
"version": "1.0.4",
"version": "1.0.5",
"author": "dreambo8563",
"main": "dist/vue-simple-drawer.umd.min.js",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<button @click="toggle">Open/Close</button>
<Drawer
:maskClosable="true"
:index="1002"
:zIndex="1002"
@close="toggle"
:align="align"
:closeable="true"
Expand Down
10 changes: 5 additions & 5 deletions src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
type: Boolean,
default: false
},
index: {
zIndex: {
type: Number,
default() {
return this.simpleDrawerIndex;
Expand All @@ -60,7 +60,7 @@ export default {
},
provide() {
return {
simpleDrawerIndex: this.zIndex + 1
simpleDrawerIndex: this.computedIndex + 1
};
},
inject: {
Expand All @@ -78,7 +78,7 @@ export default {
},
indexCls(offset = 0) {
return {
zIndex: this.zIndex + offset
zIndex: this.computedIndex + offset
};
}
},
Expand All @@ -92,8 +92,8 @@ export default {
alighCloseCls() {
return `close-${this.align.toLowerCase()}`;
},
zIndex() {
return this.index || this.simpleDrawerIndex;
computedIndex() {
return this.zIndex || this.simpleDrawerIndex;
}
}
};
Expand Down

0 comments on commit 7fdfdff

Please sign in to comment.