feat: add action i18n
parent
60d43c077c
commit
9782e6a6fd
|
|
@ -15,11 +15,12 @@
|
|||
</template>
|
||||
<Dropdown :trigger="['hover']" :dropMenuList="getDropdownList" popconfirm v-if="dropDownActions && getDropdownList.length > 0">
|
||||
<slot name="more"></slot>
|
||||
<a-button type="link" v-if="!$slots.more"> 更多<MoreOutlined class="icon-more" /> </a-button>
|
||||
<a-button type="link" v-if="!$slots.more"> <MoreOutlined class="icon-more" />{{ t('action.more') }} </a-button>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="TableAction">
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { computed, toRaw, unref } from 'vue'
|
||||
import { MoreOutlined } from '@ant-design/icons-vue'
|
||||
import { Divider, Tooltip, TooltipProps } from 'ant-design-vue'
|
||||
|
|
@ -48,6 +49,7 @@ const props = defineProps({
|
|||
stopButtonPropagation: propTypes.bool.def(false)
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
const { prefixCls } = useDesign('basic-table-action')
|
||||
let table: Partial<TableActionType> = {}
|
||||
if (!props.outside) {
|
||||
|
|
@ -166,6 +168,11 @@ function onCellClick(e: MouseEvent) {
|
|||
}
|
||||
}
|
||||
|
||||
.ant-btn-link {
|
||||
margin-left: 0;
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
.ant-divider,
|
||||
.ant-divider-vertical {
|
||||
margin: 0 2px;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
export default {
|
||||
more: 'more',
|
||||
create: 'Create',
|
||||
edit: 'Edit',
|
||||
test: 'Test',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
export default {
|
||||
more: '更多',
|
||||
create: '新增',
|
||||
edit: '修改',
|
||||
test: '测试',
|
||||
|
|
|
|||
Loading…
Reference in New Issue