You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.0 KiB
88 lines
2.0 KiB
2 years ago
|
<template>
|
||
|
<div class="search-row">
|
||
|
<div class="left">
|
||
|
<span class="title" v-if="title">{{ title }}</span>
|
||
2 years ago
|
<NoobButton v-if="fresh" type="info" icon="Refresh" @click="emit('query')"> </NoobButton>
|
||
|
<NoobButton v-if="add" type="primary" icon="Plus" @click="emit('add')">
|
||
|
{{ t('base.add') }}
|
||
|
</NoobButton>
|
||
|
<NoobButton v-if="del" type="danger" icon="Delete" @click="emit('delete')">
|
||
|
{{ t('base.delete') }}
|
||
|
</NoobButton>
|
||
2 years ago
|
<slot name="left"></slot>
|
||
|
</div>
|
||
|
<div class="query">
|
||
|
<slot></slot>
|
||
2 years ago
|
<NoobButton v-if="query" type="primary" icon="Search" @click="emit('query')">
|
||
|
{{ t('base.select') }}
|
||
|
</NoobButton>
|
||
2 years ago
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts" setup>
|
||
2 years ago
|
import { onMounted } from "vue";
|
||
|
import { useStore } from "vuex";
|
||
2 years ago
|
import { useI18n } from 'vue3-i18n';
|
||
|
import { NoobButton } from 'noob-mengyxu';
|
||
|
const { t } = useI18n();
|
||
2 years ago
|
const { state } = useStore();
|
||
2 years ago
|
const prop = defineProps({
|
||
|
title: {
|
||
|
type: String,
|
||
|
default: null
|
||
|
},
|
||
|
fresh: {
|
||
|
type: Boolean,
|
||
|
default: true,
|
||
|
},
|
||
|
add: {
|
||
|
type: Boolean,
|
||
|
default: true,
|
||
|
},
|
||
|
del: {
|
||
|
type: Boolean,
|
||
|
default: true,
|
||
|
},
|
||
|
query: {
|
||
|
type: Boolean,
|
||
|
default: true,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const emit = defineEmits(["query", "add", "delete"]);
|
||
|
|
||
|
onMounted(() => { });
|
||
|
</script>
|
||
|
<style lang="scss" scoped>
|
||
|
//@import url(); 引入公共css类
|
||
2 years ago
|
.search-row {
|
||
|
padding: v-bind('state.size.searchRowPad');
|
||
|
background-color: v-bind('state.style.searchRowBg');
|
||
|
}
|
||
|
|
||
2 years ago
|
.query {
|
||
2 years ago
|
// align-items: right;
|
||
2 years ago
|
text-align: right;
|
||
|
float: right;
|
||
2 years ago
|
// width: 50%;
|
||
2 years ago
|
}
|
||
|
|
||
|
.left {
|
||
|
float: left;
|
||
2 years ago
|
// width: 50%;
|
||
2 years ago
|
}
|
||
|
|
||
|
.search-row,
|
||
|
.query,
|
||
|
.left {
|
||
|
height: v-bind('state.size.searchRowHeight');
|
||
2 years ago
|
}
|
||
|
|
||
|
.title {
|
||
|
font-weight: bold;
|
||
|
padding-right: 15px;
|
||
2 years ago
|
font-size: v-bind('state.size.titleSize');
|
||
2 years ago
|
min-width: 20px;
|
||
|
}
|
||
|
</style>
|