Skip to content

Commit

Permalink
docs(timeselect,overlay): edit (jd-opensource#1679)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Sep 20, 2022
1 parent ab3f916 commit e566423
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 56 deletions.
12 changes: 6 additions & 6 deletions src/packages/__VUE/overlay/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ app.use(OverLay);

```html
<template>
<nut-button type="primary" @click="state.show = true">Show mask layer</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000"></nut-overlay>
<nut-button type="primary" @click="state.show = true">Show mask layer</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000"></nut-overlay>
</template>
<script lang="ts">
import { reactive } from 'vue';
Expand All @@ -53,8 +53,8 @@ It can be set through `overlay-style`

```html
<template>
<nut-button type="primary" @click="state.show = true">Show mask layer</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000" :overlay-style="state.overlayStyle"></nut-overlay>
<nut-button type="primary" @click="state.show = true">Show mask layer</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000" :overlay-style="state.overlayStyle"></nut-overlay>
</template>
<script lang="ts">
import { reactive } from 'vue';
Expand Down Expand Up @@ -82,8 +82,8 @@ It can be set through `overlay-style`

```html
<template>
<nut-button type="success" @click="state.show2 = true">Nested content</nut-button>
<nut-overlay v-model:visible="state.show2" :z-index="2000">
<nut-button type="success" @click="state.show2 = true">Nested content</nut-button>
<nut-overlay v-model:visible="state.show2" :z-index="2000">
<div class="wrapper">
<div class="content">Here is the text</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/packages/__VUE/overlay/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ app.use(OverLay);

```html
<template>
<nut-button type="primary" @click="state.show = true">显示遮罩层</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000"></nut-overlay>
<nut-button type="primary" @click="state.show = true">显示遮罩层</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000"></nut-overlay>
</template>
<script lang="ts">
import { reactive } from 'vue';
Expand All @@ -52,8 +52,8 @@ app.use(OverLay);

```html
<template>
<nut-button type="primary" @click="state.show = true">显示遮罩层</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000" :overlay-style="state.overlayStyle"></nut-overlay>
<nut-button type="primary" @click="state.show = true">显示遮罩层</nut-button>
<nut-overlay v-model:visible="state.show" :z-index="2000" :overlay-style="state.overlayStyle"></nut-overlay>
</template>
<script lang="ts">
import { reactive } from 'vue';
Expand Down Expand Up @@ -81,8 +81,8 @@ app.use(OverLay);

```html
<template>
<nut-button type="success" @click="state.show2 = true">嵌套内容</nut-button>
<nut-overlay v-model:visible="state.show2" :z-index="2000">
<nut-button type="success" @click="state.show2 = true">嵌套内容</nut-button>
<nut-overlay v-model:visible="state.show2" :z-index="2000">
<div class="wrapper">
<div class="content">这里是正文</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/overlay/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default create({
zIndex: props.zIndex,
...props.overlayStyle
};
});
}) as CSSProperties;
const onClick = (e: MouseEvent) => {
emit('click', e);
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/overlay/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default create({
zIndex: props.zIndex,
...props.overlayStyle
};
});
}) as CSSProperties;
const touchmove = (e: TouchEvent) => {
if (props.lockScroll) e.preventDefault();
Expand Down
5 changes: 0 additions & 5 deletions src/packages/__VUE/timedetail/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@ export default createDemo({
}
});
</script>

<style lang="scss" scoped>
.demo {
}
</style>
5 changes: 0 additions & 5 deletions src/packages/__VUE/timepannel/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@ export default createDemo({
}
});
</script>

<style lang="scss" scoped>
.demo {
}
</style>
35 changes: 19 additions & 16 deletions src/packages/__VUE/timeselect/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import { TimeSelect, TimePannel, TimeDetail, Popup, Icon, OverLay } from '@nutui
import { TimeSelect, TimePannel, TimeDetail, Popup, Icon, Overlay } from '@nutui/nutui-taro';

const app = createApp();
app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
app.use(TimeSelect);
app.use(TimePannel);
app.use(TimeDetail);
app.use(Popup);
app.use(Icon);
app.use(Overlay);
```

### Basic Usage
Expand Down Expand Up @@ -290,21 +295,19 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
};
</script>
<style lang="scss" scoped>
.demo {
.timeselect-title{
height: 50px;
p{
line-height: 1;
padding: 0;
margin: 0;
&.title{
margin: 10px 0;
font-size: 16px;
font-weight: bold;
}
&.subtitle{
color: #999;
}
.timeselect-title {
height: 50px;
p {
line-height: 1;
padding: 0;
margin: 0;
&.title {
margin: 10px 0;
font-size: 16px;
font-weight: bold;
}
&.subtitle {
color: #999;
}
}
}
Expand Down
35 changes: 19 additions & 16 deletions src/packages/__VUE/timeselect/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import { TimeSelect, TimePannel, TimeDetail, Popup, Icon, OverLay } from '@nutui
import { TimeSelect, TimePannel, TimeDetail, Popup, Icon, Overlay } from '@nutui/nutui-taro';

const app = createApp();
app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
app.use(TimeSelect);
app.use(TimePannel);
app.use(TimeDetail);
app.use(Popup);
app.use(Icon);
app.use(Overlay);
```

### 基本用法
Expand Down Expand Up @@ -290,21 +295,19 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
};
</script>
<style lang="scss" scoped>
.demo {
.timeselect-title{
height: 50px;
p{
line-height: 1;
padding: 0;
margin: 0;
&.title{
margin: 10px 0;
font-size: 16px;
font-weight: bold;
}
&.subtitle{
color: #999;
}
.timeselect-title {
height: 50px;
p {
line-height: 1;
padding: 0;
margin: 0;
&.title {
margin: 10px 0;
font-size: 16px;
font-weight: bold;
}
&.subtitle {
color: #999;
}
}
}
Expand Down

0 comments on commit e566423

Please sign in to comment.