Skip to content

Commit

Permalink
types: add type Trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Nov 6, 2023
1 parent 9e31c4d commit c8d76ef
Show file tree
Hide file tree
Showing 16 changed files with 307 additions and 95 deletions.
File renamed without changes.
11 changes: 6 additions & 5 deletions demo/useAdmateAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { cloneDeep, merge, mergeWith } from 'lodash-es'
import qs from 'qs'

// import Vue from 'vue'

// import VueCompositionAPI from '@vue/composition-api' // [email protected] or earlier only
import useAdmate from '../src'

// TODO
import request from './request' // TODO
import http from './http'

// [email protected] or earlier only
/* import VueCompositionAPI from '@vue/composition-api'
Vue.use(VueCompositionAPI) */
// Vue.use(VueCompositionAPI) // [email protected] or earlier only

export default (admateConfig, {
// 表单标题
Expand Down Expand Up @@ -109,7 +110,7 @@ export default (admateConfig, {
disable,
updateStatus,
} = useAdmate(merge({
axios: request,
axios: http,
axiosConfig: {
c: {
url: 'create',
Expand Down
1 change: 1 addition & 0 deletions demo/vue2.6/UseUIFramework/AntDesignVue.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup>
import { cloneDeep } from 'lodash-es'
import { API_PREFIX as urlPrefix } from '../../../mock/crud'
import useAdmateAdapter from '../../useAdmateAdapter'
const {
list,
Expand Down
1 change: 1 addition & 0 deletions demo/vue2.6/UseUIFramework/Element.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import { API_PREFIX as urlPrefix } from '../../../mock/crud'
import useAdmateAdapter from '../../useAdmateAdapter'
let hasSetup = false
Expand Down
1 change: 1 addition & 0 deletions demo/vue2.6/UseUIFramework/PrimeVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Column from 'primevue/column'
import Dialog from 'primevue/dialog'
import ProgressSpinner from 'primevue/progressspinner'
import { API_PREFIX as urlPrefix } from '../../../mock/crud'
import useAdmateAdapter from '../../useAdmateAdapter'
export default {
components: {
Expand Down
1 change: 1 addition & 0 deletions demo/vue2.6/UseUIFramework/Vuetify.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup>
import { API_PREFIX as urlPrefix } from '../../../mock/crud'
import useAdmateAdapter from '../../useAdmateAdapter'
const {
list,
Expand Down
10 changes: 5 additions & 5 deletions demo/vue2.6/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import router from './router'
import Vue from 'vue'

import 'uno.css'

import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'

import 'kikimore/dist/style.css'
import { FormDialog, Select } from 'kikimore'
import { FaFormDialog, FaSelect } from 'faim'

import 'ant-design-vue/dist/antd.css'
import AntD from 'ant-design-vue'
Expand All @@ -15,10 +14,11 @@ import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/dist/vuetify.min.css'
import Vuetify from 'vuetify'
import App from './index.vue'
import router from './router'

Vue.use(ElementUI)
Vue.use(FormDialog)
Vue.use(Select)
Vue.use(FaFormDialog)
Vue.use(FaSelect)
Vue.use(AntD)
Vue.use(Vuetify)

Expand Down
37 changes: 20 additions & 17 deletions demo/vue2.6/index.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
<script>
import routes from './router/routes'
export default {
data() {
return {
routes: routes.filter(v => !v.hidden),
}
},
}
</script>

<template>
<div>
<span v-for="({path},i) of routes">
<span
v-for="({ path }, i) of routes"
:key="i"
>
<router-link :to="path">
{{ path.substr(1) }}
</router-link>
<span v-if="i!==routes.length-1"> | </span>
<span v-if="i !== routes.length - 1"> | </span>
</span>

<router-view></router-view>
<router-view />

<!--<router-view v-slot="{ Component }">
<!-- <router-view v-slot="{ Component }">
<transition>
<keep-alive>
<component :is="Component"/>
</keep-alive>
</transition>
</router-view>-->
</router-view> -->
</div>
</template>

<script>
import routes from './router/routes'
export default {
data () {
return {
routes: routes.filter(v => !v.hidden),
}
}
}
</script>
3 changes: 2 additions & 1 deletion demo/vue2.6/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'

Vue.use(VueRouter)

export default new VueRouter({
routes
routes,
})
8 changes: 4 additions & 4 deletions demo/vue2.7/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import 'uno.css'
import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'

import 'kikimore/dist/style.css'
import { FormDialog, Select } from 'kikimore'
import { FaFormDialog, FaSelect } from 'faim'

import 'ant-design-vue/dist/antd.css'
import AntD from 'ant-design-vue'
Expand All @@ -16,9 +15,10 @@ import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/dist/vuetify.min.css'
import Vuetify from 'vuetify'
import App from './index.vue'

Vue.use(ElementUI)
Vue.use(FormDialog)
Vue.use(Select)
Vue.use(FaFormDialog)
Vue.use(FaSelect)
Vue.use(AntD)
Vue.use(Vuetify)

Expand Down
29 changes: 16 additions & 13 deletions demo/vue2.7/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<script>
import routes from './router/routes'
export default {
data() {
return {
routes: routes.filter(v => !v.hidden),
}
},
}
</script>

<template>
<div>
Vue 2 UI Framework demo:
<span v-for="({ path }, i) of routes">
<span
v-for="({ path }, i) of routes"
:key="i"
>
<router-link :to="path">
{{ path.substr(1) }}
</router-link>
Expand All @@ -19,15 +34,3 @@
</router-view> -->
</div>
</template>

<script>
import routes from './router/routes'
export default {
data() {
return {
routes: routes.filter(v => !v.hidden),
}
},
}
</script>
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"PascalCasedName": "Admate",
"version": "0.9.7",
"private": false,
"description": "Mate/Helper/Assistant of admin interfaces for Vue 2.6/2.7/3, extremely concise without losing flexibility.",
"description": "Assistant/Helper of admin interfaces for Vue 2.6/2.7/3, extremely concise without losing flexibility.",
"author": {
"name": "Cloyd Lau",
"url": "https://github.com/cloydlau"
Expand All @@ -13,24 +13,23 @@
"keywords": [
"admin",
"admin-interfaces",
"manage",
"management",
"vue-pure-admin",
"vue-vben-admin",
"vue-element-admin",
"crud",
"vue-demi",
"axios",
"antd",
"ant-design",
"ant-design-vue",
"axios",
"back-office",
"crud",
"element",
"element-ui",
"element-plus",
"manage",
"management",
"prime-vue",
"quasar",
"vuetify",
"vue-demi",
"vue-element-admin",
"vue-vben-admin",
"vue-pure-admin"
"vuetify"
],
"exports": {
".": {
Expand Down Expand Up @@ -92,6 +91,7 @@
"del": "latest",
"element-plus": "latest",
"esno": "latest",
"faim": "0.4.0-alpha.7",
"kolorist": "latest",
"lint-staged": "latest",
"lodash-es": "latest",
Expand Down Expand Up @@ -132,4 +132,4 @@
],
"{scripts,src}": "eslint --cache --fix"
}
}
}
Loading

0 comments on commit c8d76ef

Please sign in to comment.