Skip to content

Commit

Permalink
release: v0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Aug 1, 2024
1 parent cdfebc8 commit 8c870af
Show file tree
Hide file tree
Showing 7 changed files with 2,054 additions and 1,743 deletions.
1 change: 1 addition & 0 deletions demo/utils/useAdmateAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export default (
dataAt: 'records',
totalAt: data => Number(data.total),
pageNumberAt: 'page.pageNo',
watchFilter: false,
},
form: {
// dataAt: "data",
Expand Down
12 changes: 6 additions & 6 deletions demo/vue3/UseUIFramework/ElementPlus.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import useAdmateAdapter from '@/utils/useAdmateAdapter'
import { API_PREFIX as urlPrefix } from '../../../mock/crud'
import useAdmateAdapter from '@/utils/useAdmateAdapter'
const {
list,
Expand Down Expand Up @@ -58,7 +58,7 @@ const {
<el-button
v-if="!list.watchFilter"
type="primary"
@click="queryList"
@click="queryList()"
>
查询
</el-button>
Expand All @@ -83,11 +83,11 @@ const {
</div>

<el-pagination
v-model:current-page="list.filter.pageNo"
v-model:page-size="list.filter.pageSize"
v-model:current-page="list.filter.page.pageNo"
v-model:page-size="list.filter.page.pageSize"
:total="list.total"
@current-change="queryList"
@size-change="queryList"
@current-change="getList()"
@size-change="getList()"
/>
</div>

Expand Down
14 changes: 7 additions & 7 deletions demo/vue3/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { createApp } from 'vue'
import router from './router/vue-router'

// install()

import 'uno.css'

Expand All @@ -13,9 +10,7 @@ import AntD from 'ant-design-vue'
import 'quasar/src/css/index.sass'
import { Quasar } from 'quasar'

import 'primeicons/primeicons.css'
import 'primevue/resources/themes/lara-light-indigo/theme.css'
import 'primevue/resources/primevue.min.css'
import Aura from '@primevue/themes/aura'
import PrimeVue from 'primevue/config'
import ToastService from 'primevue/toastservice'

Expand All @@ -24,6 +19,7 @@ import { createVuetify } from 'vuetify'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import App from './index.vue'
import router from './router/vue-router'

const app = createApp(App)
.use(router)
Expand All @@ -32,7 +28,11 @@ const app = createApp(App)
.use(Quasar, {
plugins: {},
})
.use(PrimeVue)
.use(PrimeVue, {
theme: {
preset: Aura,
},
})
.use(ToastService)
.use(createVuetify({
components,
Expand Down
12 changes: 6 additions & 6 deletions mock/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function getRandomPics(count = 10): string[] {

const records = (() => {
const result: any[] = []
for (let index = 0; index < 50; index++) {
for (let index = 0; index < 41; index++) {
result.push({
'id': `${index}`,
'beginTime': '@datetime',
Expand Down Expand Up @@ -49,14 +49,14 @@ export default [
url: `${API_PREFIX}/list`,
timeout: 100,
method: 'POST',
response: ({ query }) => {
const { page = 1, pageSize = 10 } = query
response: (res) => {
const { pageNo, pageSize } = res.body.page
return {
code: 0,
data: {
page,
pageSize,
records,
page: { pageNo, pageSize },
total: records.length,
records: records.slice((pageNo - 1) * pageSize, pageNo * pageSize),
},
}
},
Expand Down
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "admate",
"type": "module",
"PascalCasedName": "Admate",
"version": "0.10.0",
"version": "0.10.1",
"private": false,
"description": "Admin CRUD frontend framework for Vue 2.6/2.7/3, extremely concise without losing flexibility.",
"author": {
Expand Down Expand Up @@ -52,8 +52,8 @@
],
"scripts": {
"dev": "esno ./scripts/dev.mts",
"doc": "vitepress dev --open /README",
"build": "vite build",
"doc": "vitepress dev --open /README",
"serve": "vite preview",
"release": "esno ./scripts/release.mts",
"lint": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html",
Expand All @@ -71,17 +71,18 @@
}
},
"dependencies": {
"vue-demi": "^0.14.8"
"vue-demi": "^0.14.10"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.1",
"@antfu/eslint-config": "^2.24.1",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@element-plus/icons-vue": "latest",
"@mdi/font": "^7.4.47",
"@primevue/themes": "^4.0.3",
"@quasar/vite-plugin": "^1.7.0",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.14.2",
"@types/node": "^22.0.2",
"@vitejs/plugin-vue": "latest",
"@vue/compiler-sfc": "latest",
"@vue/test-utils": "latest",
Expand All @@ -91,12 +92,12 @@
"case-police": "^0.6.1",
"cross-spawn": "^7.0.3",
"del": "^7.1.0",
"element-plus": "2.6.3",
"eslint-plugin-format": "^0.1.1",
"element-plus": "latest",
"eslint-plugin-format": "^0.1.2",
"esno": "^4.7.0",
"faim": "^0.8.1",
"kolorist": "^1.8.0",
"lint-staged": "^15.2.6",
"lint-staged": "^15.2.7",
"lodash-es": "^4.17.21",
"magicast": "^0.3.4",
"mockjs": "^1.1.0",
Expand All @@ -105,20 +106,20 @@
"primeicons": "^7.0.0",
"primevue": "latest",
"prompts": "^2.4.2",
"qs": "^6.12.1",
"qs": "^6.12.3",
"quasar": "latest",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.77.5",
"semver": "^7.6.2",
"sass": "^1.77.8",
"semver": "^7.6.3",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.4.5",
"unocss": "0.61.0",
"unplugin-auto-import": "^0.17.6",
"unplugin-vue-components": "^0.27.0",
"vite": "^5.2.13",
"vite-plugin-dts": "^3.9.1",
"typescript": "^5.5.4",
"unocss": "0.61.9",
"unplugin-auto-import": "^0.18.2",
"unplugin-vue-components": "^0.27.3",
"vite": "^5.3.5",
"vite-plugin-dts": "4.0.0-beta.2",
"vite-plugin-mock": "^3.0.2",
"vitepress": "^1.2.3",
"vitepress": "^1.3.1",
"vue": "latest",
"vue-global-config": "^0.6.1",
"vue-router": "latest",
Expand Down
Loading

0 comments on commit 8c870af

Please sign in to comment.