12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <!--
- 弹窗显示组件
- title:弹窗标题
- options: 显示数组
- showLable: 显示值
- -->
- <template>
- <mu-dialog :open.sync="dialogOpen" :title="title" scrollable>
- <div class="lj-card-item" v-for="item in options">
- <mu-row>
- <mu-col span="12" class="lj-card-secondary-title" style="text-align: center"
- @click="handleSelItem(item)">{{item[showLabel]}}
- </mu-col>
- </mu-row>
- </div>
- </mu-dialog>
- </template>
- <script>
- export default {
- name: "lj-dialog-sel",
- components: {},
- props: {
- // 标签文本
- title: {
- type: String,
- default: "弹窗"
- },
- // 选项数据数组
- options: {
- type: Array
- },
- showLabel: {
- type: String,
- default: ""
- },
- },
- data() {
- return{
- dialogOpen: false,
- }
- },
- created() {
- },
- mounted() {
- },
- methods:{
- open() {
- this.dialogOpen = true;
- },
- close() {
- this.dialogOpen = false;
- },
- handleSelItem(item){
- this.$emit('select-item', {item: item});
- this.close();
- }
- },
- computed: {
- },
- watch: {
- }
- }
- </script>
|