mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	Merge pull request #333 from dodu2014/main
feat(components): enhance the custom strength of the 'TableHeaderOper…
This commit is contained in:
		@@ -6,6 +6,7 @@ defineOptions({
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Props {
 | 
					interface Props {
 | 
				
			||||||
 | 
					  itemAlign?: NaiveUI.Align;
 | 
				
			||||||
  disabledDelete?: boolean;
 | 
					  disabledDelete?: boolean;
 | 
				
			||||||
  loading?: boolean;
 | 
					  loading?: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -38,24 +39,27 @@ function refresh() {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <NSpace wrap justify="end" class="<sm:w-200px">
 | 
					  <NSpace :align="itemAlign" wrap justify="end" class="<sm:w-200px">
 | 
				
			||||||
    <NButton size="small" ghost type="primary" @click="add">
 | 
					    <slot name="prefix"></slot>
 | 
				
			||||||
      <template #icon>
 | 
					    <slot name="default">
 | 
				
			||||||
        <icon-ic-round-plus class="text-icon" />
 | 
					      <NButton size="small" ghost type="primary" @click="add">
 | 
				
			||||||
      </template>
 | 
					        <template #icon>
 | 
				
			||||||
      {{ $t('common.add') }}
 | 
					          <icon-ic-round-plus class="text-icon" />
 | 
				
			||||||
    </NButton>
 | 
					        </template>
 | 
				
			||||||
    <NPopconfirm @positive-click="batchDelete">
 | 
					        {{ $t('common.add') }}
 | 
				
			||||||
      <template #trigger>
 | 
					      </NButton>
 | 
				
			||||||
        <NButton size="small" ghost type="error" :disabled="disabledDelete">
 | 
					      <NPopconfirm @positive-click="batchDelete">
 | 
				
			||||||
          <template #icon>
 | 
					        <template #trigger>
 | 
				
			||||||
            <icon-ic-round-delete class="text-icon" />
 | 
					          <NButton size="small" ghost type="error" :disabled="disabledDelete">
 | 
				
			||||||
          </template>
 | 
					            <template #icon>
 | 
				
			||||||
          {{ $t('common.batchDelete') }}
 | 
					              <icon-ic-round-delete class="text-icon" />
 | 
				
			||||||
        </NButton>
 | 
					            </template>
 | 
				
			||||||
      </template>
 | 
					            {{ $t('common.batchDelete') }}
 | 
				
			||||||
      {{ $t('common.confirmDelete') }}
 | 
					          </NButton>
 | 
				
			||||||
    </NPopconfirm>
 | 
					        </template>
 | 
				
			||||||
 | 
					        {{ $t('common.confirmDelete') }}
 | 
				
			||||||
 | 
					      </NPopconfirm>
 | 
				
			||||||
 | 
					    </slot>
 | 
				
			||||||
    <NButton size="small" @click="refresh">
 | 
					    <NButton size="small" @click="refresh">
 | 
				
			||||||
      <template #icon>
 | 
					      <template #icon>
 | 
				
			||||||
        <icon-mdi-refresh class="text-icon" :class="{ 'animate-spin': loading }" />
 | 
					        <icon-mdi-refresh class="text-icon" :class="{ 'animate-spin': loading }" />
 | 
				
			||||||
@@ -63,6 +67,7 @@ function refresh() {
 | 
				
			|||||||
      {{ $t('common.refresh') }}
 | 
					      {{ $t('common.refresh') }}
 | 
				
			||||||
    </NButton>
 | 
					    </NButton>
 | 
				
			||||||
    <TableColumnSetting v-model:columns="columns" />
 | 
					    <TableColumnSetting v-model:columns="columns" />
 | 
				
			||||||
 | 
					    <slot name="suffix"></slot>
 | 
				
			||||||
  </NSpace>
 | 
					  </NSpace>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								src/typings/naive-ui.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								src/typings/naive-ui.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,4 @@
 | 
				
			|||||||
declare namespace NaiveUI {
 | 
					declare namespace NaiveUI {
 | 
				
			||||||
  type ThemeColor = 'default' | 'error' | 'primary' | 'info' | 'success' | 'warning';
 | 
					  type ThemeColor = 'default' | 'error' | 'primary' | 'info' | 'success' | 'warning';
 | 
				
			||||||
 | 
					  type Align = 'stretch' | 'baseline' | 'start' | 'end' | 'center' | 'flex-end' | 'flex-start';
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user