committed by
GitHub
42 changed files with 255 additions and 178 deletions
@ -0,0 +1,46 @@ |
|||||
|
<template> |
||||
|
<BasicModal |
||||
|
@register="registerModal" |
||||
|
:title="L('Share')" |
||||
|
@ok="handleSubmit" |
||||
|
> |
||||
|
<BasicForm @register="registerForm" /> |
||||
|
</BasicModal> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { nextTick } from 'vue'; |
||||
|
import { useLocalization } from '/@/hooks/abp/useLocalization'; |
||||
|
import { useMessage } from '/@/hooks/web/useMessage'; |
||||
|
import { BasicForm, useForm } from '/@/components/Form'; |
||||
|
import { BasicModal, useModalInner } from '/@/components/Modal'; |
||||
|
import { getShareModalSchemas } from './data'; |
||||
|
import { share } from '/@/api/oss-management/private'; |
||||
|
|
||||
|
const { L } = useLocalization(['AbpOssManagement', 'AbpUi']); |
||||
|
const { createMessage } = useMessage(); |
||||
|
const [registerForm, { validate, resetFields, setFieldsValue }] = useForm({ |
||||
|
labelAlign: 'left', |
||||
|
labelWidth: 120, |
||||
|
showActionButtonGroup: false, |
||||
|
schemas: getShareModalSchemas(), |
||||
|
}); |
||||
|
const [registerModal, { changeOkLoading, closeModal }] = useModalInner((data) => { |
||||
|
nextTick(() => { |
||||
|
resetFields(); |
||||
|
setFieldsValue(data); |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
function handleSubmit() { |
||||
|
validate().then((input) => { |
||||
|
changeOkLoading(true); |
||||
|
share(input).then(() => { |
||||
|
createMessage.success(L('Successful')); |
||||
|
closeModal(); |
||||
|
}).finally(() => { |
||||
|
changeOkLoading(false); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,42 @@ |
|||||
|
<template> |
||||
|
<BasicModal |
||||
|
v-bind="$attrs" |
||||
|
@register="registerModal" |
||||
|
@ok="handleSubmit" |
||||
|
:title="L('Secret:New')" |
||||
|
> |
||||
|
<BasicForm @register="registerForm" /> |
||||
|
</BasicModal> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { nextTick } from 'vue'; |
||||
|
import { useMessage } from '/@/hooks/web/useMessage'; |
||||
|
import { useLocalization } from '/@/hooks/abp/useLocalization'; |
||||
|
import { BasicForm, useForm } from '/@/components/Form'; |
||||
|
import { BasicModal, useModalInner } from '/@/components/Modal'; |
||||
|
import { getSecretFormSchemas } from '../datas/ModalData'; |
||||
|
|
||||
|
const emits = defineEmits(['register', 'change']); |
||||
|
|
||||
|
const { createMessage } = useMessage(); |
||||
|
const { L } = useLocalization('AbpIdentityServer'); |
||||
|
const [registerForm, { validate, resetFields }] = useForm({ |
||||
|
labelWidth: 120, |
||||
|
showActionButtonGroup: false, |
||||
|
schemas: getSecretFormSchemas(), |
||||
|
}); |
||||
|
const [registerModal, { closeModal }] = useModalInner(() => { |
||||
|
nextTick(() => { |
||||
|
resetFields(); |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
function handleSubmit() { |
||||
|
validate().then((input) => { |
||||
|
createMessage.success(L('Successful')); |
||||
|
emits('change', input); |
||||
|
closeModal(); |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,52 @@ |
|||||
|
<template> |
||||
|
<BasicModal |
||||
|
@register="registerModal" |
||||
|
:title="L('Containers')" |
||||
|
:width="466" |
||||
|
:min-height="66" |
||||
|
@ok="handleSubmit" |
||||
|
> |
||||
|
<BasicForm @register="registerForm" /> |
||||
|
</BasicModal> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { nextTick } from 'vue'; |
||||
|
import { useMessage } from '/@/hooks/web/useMessage'; |
||||
|
import { useLocalization } from '/@/hooks/abp/useLocalization'; |
||||
|
import { BasicModal, useModalInner } from '/@/components/Modal'; |
||||
|
import { BasicForm, useForm } from '/@/components/Form'; |
||||
|
import { createContainer } from '/@/api/oss-management/oss'; |
||||
|
import { getModalFormSchemas } from './ModalData'; |
||||
|
|
||||
|
const emits = defineEmits(['change', 'register']); |
||||
|
|
||||
|
const { createMessage } = useMessage(); |
||||
|
const { L } = useLocalization(['AbpOssManagement', 'AbpUi']); |
||||
|
const [registerForm, { validate, resetFields }] = useForm({ |
||||
|
labelWidth: 120, |
||||
|
schemas: getModalFormSchemas(), |
||||
|
showActionButtonGroup: false, |
||||
|
actionColOptions: { |
||||
|
span: 24, |
||||
|
}, |
||||
|
}); |
||||
|
const [registerModal, { changeOkLoading, closeModal }] = useModalInner(() => { |
||||
|
nextTick(() => { |
||||
|
resetFields(); |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
function handleSubmit() { |
||||
|
validate().then((input) => { |
||||
|
changeOkLoading(true); |
||||
|
createContainer(input.name).then((res) => { |
||||
|
createMessage.success(L('Successful')); |
||||
|
emits('change', res); |
||||
|
closeModal(); |
||||
|
}).finally(() => { |
||||
|
changeOkLoading(false); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
Loading…
Reference in new issue