| | |
| | | <script setup> |
| | | import {nextTick, ref} from 'vue' |
| | | import {ArrowRight, Search} from "@element-plus/icons-vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | |
| | | let indexFlag = $ref(1) |
| | | |
| | |
| | | indexFlag = index |
| | | } |
| | | |
| | | /* |
| | | |
| | | //提示信息 |
| | | //信息内容,显示方式,显示标题,类型 |
| | | const MessageShow = (content, type = 'success') =>{ |
| | | ElMessage({ |
| | | message: content, |
| | | type: type, |
| | | showClose: true, |
| | | }) |
| | | } |
| | | |
| | | //操作确认类信息:操作类型,提示内容,提示标头,提示类型 |
| | | const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => { |
| | | ElMessageBox.confirm( |
| | | content, |
| | | title, |
| | | { |
| | | cancelButtonText: '取消', |
| | | confirmButtonText: '确定', |
| | | type: type, |
| | | center: true, |
| | | } |
| | | ) |
| | | //点击了确定 |
| | | .then(() => { |
| | | switch (czType) { |
| | | case '确定': |
| | | //多选退货逻辑代码TODO |
| | | MessageShow('操作成功!', 'success'); |
| | | break; |
| | | case '退货': |
| | | //单退货逻辑代码TODO |
| | | MessageShow('操作成功!', 'success'); |
| | | break; |
| | | default: |
| | | MessageShow('未知操作!', 'error'); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | }) |
| | | //点击了取消 |
| | | .catch(() => { |
| | | return false; |
| | | }) |
| | | } |
| | | |
| | | //弹窗信息 |
| | | const MessageAlertShow = (content, title, type = 'info') => { |
| | | |
| | | ElMessageBox.alert(content, title, { |
| | | // 禁止自动对焦 |
| | | //autofocus: false, |
| | | confirmButtonText: 'OK', |
| | | /!*callback: (action: Action) => { |
| | | MessageShow(`action: ${action}`,type) |
| | | },*!/ |
| | | }) |
| | | } |
| | | |
| | | */ |
| | | |
| | | </script> |
| | | |
| | | |