Skip to content

Commit

Permalink
feat: Customizable button text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayideyia committed Oct 27, 2024
1 parent 44db3b6 commit 0f3578b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/Confirm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import Table from '@/components/Table/index.vue'
export type Options = {
type: 'text' | 'markdown'
cancelText?: string
okText?: string
}
interface Props {
Expand Down Expand Up @@ -147,9 +149,11 @@ const handleCancel = () => {
<div class="title">{{ t(title) }}</div>
<div class="message select-text" v-html="content"></div>
<div class="form-action">
<Button v-if="cancel" @click="handleCancel" size="small">{{ t('common.cancel') }}</Button>
<Button v-if="cancel" @click="handleCancel" size="small">
{{ t(options.cancelText || 'common.cancel') }}
</Button>
<Button @click="handleConfirm" size="small" type="primary">
{{ t('common.confirm') }}
{{ t(options.okText || 'common.confirm') }}
</Button>
</div>
</div>
Expand Down

0 comments on commit 0f3578b

Please sign in to comment.