vome-core 0.0.6 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +236 -1
- package/dist/server/index.js +3261 -1
- package/package.json +10 -2
- package/src/admin/components/vm-auto-perm-dialog.vue +3 -0
- package/src/admin/components/vm-check-tree.vue +1 -0
- package/src/admin/components/vm-dept-tree.vue +3 -0
- package/src/admin/components/vm-empty.vue +1 -0
- package/src/admin/components/vm-eps-perm-picker.vue +2 -0
- package/src/admin/components/vm-group-cascader.vue +1 -0
- package/src/admin/components/vm-icon-picker.vue +1 -0
- package/src/admin/components/vm-markdown.vue +1 -0
- package/src/admin/components/vm-ri-icon.vue +2 -0
- package/src/admin/components/vm-role-picker.vue +2 -0
- package/src/admin/components/vm-view-path-picker.vue +1 -0
- package/src/admin/crud/components/vm-column-custom.vue +1 -0
- package/src/admin/crud/components/vm-context-menu.vue +1 -0
- package/src/admin/crud/components/vm-date-picker.vue +1 -0
- package/src/admin/crud/components/vm-date-range.vue +1 -0
- package/src/admin/crud/components/vm-date-text.vue +1 -0
- package/src/admin/crud/components/vm-dict-tag.vue +1 -0
- package/src/admin/crud/components/vm-file-icon.vue +1 -0
- package/src/admin/crud/components/vm-multi-select.vue +1 -0
- package/src/admin/crud/components/vm-select.vue +2 -0
- package/src/admin/crud/components/vm-switch.vue +1 -0
- package/src/admin/crud/components/vm-tree-select.vue +1 -0
- package/src/admin/crud/components/vm-upload-item.vue +1 -0
- package/src/admin/crud/components/vm-upload.vue +2 -0
- package/src/admin/crud/components/vm-user-select.vue +1 -0
- package/src/admin/crud/vm-add-btn.vue +1 -0
- package/src/admin/crud/vm-adv-search.vue +1 -0
- package/src/admin/crud/vm-crud.vue +2 -0
- package/src/admin/crud/vm-dialog.vue +1 -0
- package/src/admin/crud/vm-form.vue +1 -0
- package/src/admin/crud/vm-pagination.vue +1 -0
- package/src/admin/crud/vm-search-key.vue +1 -0
- package/src/admin/crud/vm-search.vue +1 -0
- package/src/admin/crud/vm-table.vue +1 -0
- package/src/admin/crud/vm-toolbar.vue +1 -0
- package/src/admin/crud/vm-upsert.vue +2 -0
- package/src/admin/lib/eps.ts +3 -2
- package/src/admin/service/index.ts +199 -67
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vome-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Vome framework — shared + Bun/Elysia server + Vue admin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -48,7 +48,9 @@
|
|
|
48
48
|
"vue-sonner": ">=2.0.0",
|
|
49
49
|
"@vueuse/core": ">=10.0.0",
|
|
50
50
|
"clsx": ">=2.0.0",
|
|
51
|
-
"tailwind-merge": ">=2.0.0"
|
|
51
|
+
"tailwind-merge": ">=2.0.0",
|
|
52
|
+
"dompurify": ">=3.0.0",
|
|
53
|
+
"marked": ">=9.0.0"
|
|
52
54
|
},
|
|
53
55
|
"peerDependenciesMeta": {
|
|
54
56
|
"drizzle-orm": {
|
|
@@ -77,6 +79,12 @@
|
|
|
77
79
|
},
|
|
78
80
|
"tailwind-merge": {
|
|
79
81
|
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"dompurify": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"marked": {
|
|
87
|
+
"optional": true
|
|
80
88
|
}
|
|
81
89
|
},
|
|
82
90
|
"devDependencies": {
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
73
|
<script setup lang="ts">
|
|
74
|
+
import { ref, computed, watch } from 'vue'
|
|
75
|
+
import { api } from '../api/client'
|
|
76
|
+
import { toast } from 'vue-sonner'
|
|
74
77
|
import { isDialogFloatTarget } from '../lib/dialog-float'
|
|
75
78
|
|
|
76
79
|
defineOptions({ name: 'vm-auto-perm-dialog' })
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
</template>
|
|
102
102
|
|
|
103
103
|
<script setup lang="ts">
|
|
104
|
+
import { useVome } from '../hooks/useVome'
|
|
105
|
+
import { ref, computed, watch, onMounted } from 'vue'
|
|
106
|
+
import { toast } from 'vue-sonner'
|
|
104
107
|
import { deepTree } from '../crud'
|
|
105
108
|
import { vmConfirm } from '../crud/confirm'
|
|
106
109
|
|
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
</template>
|
|
74
74
|
|
|
75
75
|
<script setup lang="ts">
|
|
76
|
+
import { ref, computed, watch } from 'vue'
|
|
77
|
+
import { toast } from 'vue-sonner'
|
|
76
78
|
import { useUpload } from '../../hooks/useUpload'
|
|
77
79
|
import { getFileType, getUrls, uploadUid } from '../../lib/upload'
|
|
78
80
|
import type { UploadItem } from '../../../../typings/admin/comm/upload'
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
|
+
import { ref, computed, watch, shallowRef, provide } from 'vue'
|
|
9
|
+
import { service } from '../service/index'
|
|
8
10
|
import { toast } from 'vue-sonner'
|
|
9
11
|
import { resolveService } from '../service'
|
|
10
12
|
import { deepTree } from '../lib/tree'
|
|
@@ -224,6 +224,7 @@
|
|
|
224
224
|
</template>
|
|
225
225
|
|
|
226
226
|
<script setup lang="ts">
|
|
227
|
+
import { ref, computed, watch, onMounted, onBeforeUnmount, provide, useSlots } from 'vue'
|
|
227
228
|
import { useCrud } from './useCrud'
|
|
228
229
|
import { injectTableOptions, TABLE_API_KEY } from './key'
|
|
229
230
|
import { flattenTree } from '../lib/tree'
|
|
@@ -113,6 +113,8 @@
|
|
|
113
113
|
</template>
|
|
114
114
|
|
|
115
115
|
<script setup lang="ts">
|
|
116
|
+
import { ref, computed, watch, useSlots } from 'vue'
|
|
117
|
+
import { toast } from 'vue-sonner'
|
|
116
118
|
import { useCrud } from './useCrud'
|
|
117
119
|
import { injectUpsertOptions } from './key'
|
|
118
120
|
import { getCrudStyle } from './style'
|
package/src/admin/lib/eps.ts
CHANGED
|
@@ -12,10 +12,11 @@ const cache: Record<EpsSide, EpsModuleMap | null> = {
|
|
|
12
12
|
app: null,
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
/** 拉取 EPS(默认 admin
|
|
15
|
+
/** 拉取 EPS(默认 admin);公开接口失败不弹 toast */
|
|
16
16
|
export async function loadEps(force = false, side: EpsSide = 'admin') {
|
|
17
17
|
if (cache[side] && !force) return cache[side]
|
|
18
|
-
cache[side] =
|
|
18
|
+
cache[side] =
|
|
19
|
+
(await request<EpsModuleMap>(EPS_URL[side], { toast: false })) || {}
|
|
19
20
|
return cache[side]
|
|
20
21
|
}
|
|
21
22
|
|