update
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
import {Modal, Tag} from "@arco-design/web-vue";
|
||||
import {h} from 'vue';
|
||||
|
||||
const ModalContent = {
|
||||
props: {
|
||||
status: {
|
||||
type: String,
|
||||
default: 'success',
|
||||
},
|
||||
status_text: {
|
||||
type: String,
|
||||
default: null,
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
switch (props.status) {
|
||||
case 'success':
|
||||
return () => h('div', {}, [
|
||||
h('div', {class: 'flex items-center gap-[8px]'}, [
|
||||
h('div', {}, '该子任务状态为:'),
|
||||
h(Tag, {color: 'orangered'}, props.status_text)
|
||||
]),
|
||||
h('div', {class: 'text-[14px] text-[rgb(78, 89, 105)]'}, '点击终止子任务后,达人将无法再领取子任务')
|
||||
]);
|
||||
case 'warning':
|
||||
return () => h('div', {}, [
|
||||
h('div', {class: 'flex items-center gap-[8px]'}, [
|
||||
h('div', {}, '该子任务状态为:'),
|
||||
h(Tag, {color: 'orangered'}, props.status_text)
|
||||
]),
|
||||
h('div', {class: 'text-[14px] text-[rgb(78, 89, 105)]'}, '无法终止')
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const openTerminateTask = (type, status_text = '待上传素材') => {
|
||||
const status = 'success';
|
||||
|
||||
Modal.warning({
|
||||
title: '确认终止子任务',
|
||||
draggable: true,
|
||||
hideCancel: false,
|
||||
content: () =>
|
||||
h(
|
||||
ModalContent,
|
||||
{
|
||||
status: 'success',
|
||||
status_text: status_text
|
||||
}
|
||||
),
|
||||
okButtonProps: {
|
||||
status: 'danger',
|
||||
},
|
||||
okText: status === 'success' ? '确认终止' : '确认',
|
||||
onOk: () => {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default openTerminateTask;
|
||||
Reference in New Issue
Block a user