j-dogui
v0.0.15
Published
```ts import JDogUI from 'j-dogui' import 'j-dogui/dist/style.css'
Downloads
8
Maintainers
Readme
全局引入
import JDogUI from 'j-dogui'
import 'j-dogui/dist/style.css'
app.use(JDogUI)
引入 mian.ts 出现 找不到模块“j-dogui”或其相应的类型声明。
- 在
src
目录下新建XXXX.d.ts
文件
declare module 'j-dogui'
按需引入
import { jPagination } from 'j-dogui'
import 'j-dogui/dist/style.css'
使用说明
- 详细参数见Ant Design Vue
- 分页器
<template>
<jPagination
v-model:currentPage="currentPage"
v-model:currentPageSize="pageSize"
:total="533"
@handlerPage="getPageChange"/>
</template>
<script setup lang="ts">
import { jPagination } from 'j-dogui'
import {ref} from "vue"
const currentPage = ref<number>(1)
const pageSize = ref<number>(10)
const getPageChange=()=>{
console.log(currentPage,pageSize)
}
</script>
- 日历多选组件
<template>
<jCalendar
v-model:jCalendarValue="jCalendarValue"
@handlerGetDate="handlerGetDate"/>
</template>
<script setup lang="ts">
import { Dayjs } from 'dayjs'
import {ref} from "vue";
const jCalendarValue=ref<Dayjs>()
const handlerGetDate=(val:Array<string>)=>{
console.log('get选择日期数组',val)
}
</script>