123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <dialog-base ref="baseDialog" title="搜索">
- <view class="list-container">
- <input class="input-control" v-model="keywork" placeholder='批次号/产品描述/箱号' />
- <view class="login-btn uni-row" @click="handleConfirm"><text class="label">确认</text></view>
- </view>
- </dialog-base>
- </template>
- <script setup>
- import {
- ref,
- getCurrentInstance
- } from 'vue'
- import {
- defineProps
- } from 'vue'
- const baseDialog = ref(null)
- const keywork = ref("");
-
- const emit = defineEmits(["search"]);
- function open() {
- resetPage();
- baseDialog.value.open();
- init();
- }
- function resetPage() {
- keywork.value = ''
- }
- defineExpose({
- open
- })
- function close() {
- baseDialog.value.close()
- }
- function handleConfirm() {
- emit('search', keywork.value)
- close()
- }
-
- function init() {
- }
- </script>
- <style lang="scss">
- .dialog-body {
- .msg {
- height: 300rpx;
- justify-content: center;
- align-items: center;
- }
- .btn-container {
- margin-top: 32rpx;
- .btn {
- flex: 1;
- margin: 0 10rpx;
- }
- }
- .input-control {
- border: 1px solid #666666;
- padding: 16rpx 24rpx;
- font-size: 32rpx;
- margin-top: 40rpx;
- }
- .login-btn {
- // background-color: #999999;
- background-color: #1684fc;
- margin-top: 32rpx;
- justify-content: center;
- padding: 16rpx 0;
- .label {
- font-size: 40rpx;
- color: #FFFFFF;
- }
- }
- }
- </style>
|