tiny-vue_version0/examples/sites/demos/pc/app/select/no-data-text.vue

49 lines
1.1 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>
<p>场景1默认</p>
<br />
<tiny-select v-model="value">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-select>
<br /><br />
<p>场景2自定义空数据文本</p>
<br />
<tiny-select v-model="value" no-data-text="暂无数据">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-select>
<br /><br />
<p>场景3显示空数据图片</p>
<br />
<tiny-select v-model="value" no-data-text="None" :show-empty-image="true">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-select>
</div>
</template>
<script>
import { Select, Option } from '@opentiny/vue'
export default {
components: {
TinySelect: Select,
TinyOption: Option
},
data() {
return {
options: [],
value: ''
}
}
}
</script>
<style lang="less" scoped>
.tiny-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>