Skip to content

Commit

Permalink
style(lint): publish package and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dreambo8563 committed Apr 19, 2019
1 parent e4602b9 commit 2253e78
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
25 changes: 18 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,45 @@
<div id="app">
<div class="demo-container">
<div>
<input type="radio" id="left" value="left" v-model="align">
<input type="radio" id="left" value="left" v-model="align" />
<label for="left">left</label>
</div>

<div>
<input type="radio" id="right" value="right" v-model="align">
<input type="radio" id="right" value="right" v-model="align" />
<label for="right">right</label>
</div>

<div>
<input type="radio" id="up" value="up" v-model="align">
<input type="radio" id="up" value="up" v-model="align" />
<label for="up">up</label>
</div>

<div>
<input type="radio" id="down" value="down" v-model="align">
<input type="radio" id="down" value="down" v-model="align" />
<label for="down">down</label>
</div>
</div>

<button @click="toggle">Open/Close</button>
<Drawer :maskClosable="true" :zIndex="1002" @close="toggle" :align="align" :closeable="true">
<Drawer
:maskClosable="true"
:zIndex="1002"
@close="toggle"
:align="align"
:closeable="true"
>
<div v-if="open">
<span @click="clickContent">
content here content here content here content here content here
content here content here
</span>
<Drawer :maskClosable="true" @close="innerOpen = false" :align="align" :closeable="true">
<Drawer
:maskClosable="true"
@close="innerOpen = false"
:align="align"
:closeable="true"
>
<div v-if="innerOpen">content here content here content here</div>
</Drawer>
</div>
Expand Down Expand Up @@ -61,7 +72,7 @@ export default {
}
},
watch: {
align: function () {
align: function() {
this.open = false;
}
}
Expand Down
14 changes: 11 additions & 3 deletions src/index.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<template>
<div>
<transition name="fade" mode="out-in">
<div :style="indexCls()" @click="onMask" v-if="$slots.default" :class="{ mask }"></div>
<div
:style="indexCls()"
@click="onMask"
v-if="$slots.default"
:class="{ mask }"
></div>
</transition>
<transition :enter-active-class="alignInCls" :leave-active-class="alignOutCls">
<transition
:enter-active-class="alignInCls"
:leave-active-class="alignOutCls"
>
<div
key="content"
:class="{ closeable, [align.toLowerCase()]: true }"
Expand All @@ -26,7 +34,7 @@ export default {
align: {
type: String,
default: "right",
validator: function (value) {
validator: function(value) {
// The value must match one of these strings
return ["left", "up", "right", "down"].indexOf(value) !== -1;
}
Expand Down

0 comments on commit 2253e78

Please sign in to comment.