⚡️(git): update issues template
This commit is contained in:
		
							parent
							
								
									051ba684ca
								
							
						
					
					
						commit
						b2c3327ee4
					
				@ -41,9 +41,11 @@ const props = withDefaults(defineProps<LayPageProps>(), {
 | 
			
		||||
const { t } = useI18n();
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const maxPage = ref(0);
 | 
			
		||||
const limits = ref(props.limits);
 | 
			
		||||
const pages = Math.floor(props.pages / 2);
 | 
			
		||||
 | 
			
		||||
const currentPage: Ref<number> = ref(props.modelValue);
 | 
			
		||||
const currentPageShow: Ref<number> = ref(currentPage.value);
 | 
			
		||||
const inlimit = computed({
 | 
			
		||||
  get() {
 | 
			
		||||
    return props.limit;
 | 
			
		||||
@ -53,8 +55,6 @@ const inlimit = computed({
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const maxPage = ref(0);
 | 
			
		||||
 | 
			
		||||
const totalPage = computed(() => {
 | 
			
		||||
  maxPage.value = Math.ceil(props.total / props.limit);
 | 
			
		||||
  let r: number[] = [],
 | 
			
		||||
@ -73,9 +73,6 @@ const totalPage = computed(() => {
 | 
			
		||||
  return r;
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const currentPage: Ref<number> = ref(props.modelValue);
 | 
			
		||||
const currentPageShow: Ref<number> = ref(currentPage.value);
 | 
			
		||||
 | 
			
		||||
const emit = defineEmits(["jump", "limit", "update:modelValue"]);
 | 
			
		||||
 | 
			
		||||
const prev = function () {
 | 
			
		||||
@ -115,9 +112,10 @@ watch(currentPage, function () {
 | 
			
		||||
  emit("jump", { current: currentPage.value });
 | 
			
		||||
  emit("update:modelValue", currentPage.value);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
watch(
 | 
			
		||||
  () => props.modelValue,
 | 
			
		||||
  function () {
 | 
			
		||||
  () => {
 | 
			
		||||
    currentPage.value = props.modelValue;
 | 
			
		||||
    currentPageShow.value = currentPage.value;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1265
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1265
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user