tiny-vue/examples/sites/demos/mobile-first/app/action-sheet/ellipsis.vue

55 lines
1.4 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<div>
<p>单选{{ activeName1 }}</p>
<tiny-button @click=";(ellipsis = true), (boxVisibility1 = true)">内容超出隐藏</tiny-button>
<tiny-button @click=";(ellipsis = false), (boxVisibility1 = true)">内容超出显示</tiny-button>
</div>
<br />
<div>
<p>多选{{ activeName2 }}</p>
<tiny-button @click=";(ellipsis = true), (boxVisibility2 = true)">内容超出隐藏</tiny-button>
<tiny-button @click=";(ellipsis = false), (boxVisibility2 = true)">内容超出显示</tiny-button>
</div>
<tiny-action-sheet
v-model="activeName1"
title="标题1"
:ellipsis="ellipsis"
:show-footer="true"
:visible="boxVisibility1"
@update:visible="boxVisibility1 = $event"
></tiny-action-sheet>
<tiny-action-sheet
v-model="activeName2"
title="标题2"
multiple
:ellipsis="ellipsis"
:show-footer="true"
:visible="boxVisibility2"
@update:visible="boxVisibility2 = $event"
></tiny-action-sheet>
</div>
</template>
<script>
import { ActionSheet, Button } from '@opentiny/vue'
export default {
components: {
TinyActionSheet: ActionSheet,
TinyButton: Button
},
data() {
return {
activeName1: 1,
activeName2: [],
ellipsis: false,
boxVisibility1: false,
boxVisibility2: false
}
},
methods: {}
}
</script>