vome-core 0.1.58 → 0.1.60
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/admin/components/vm-group-cascader.vue +2 -1
- package/dist/admin/components/vm-icon-picker.vue +2 -1
- package/dist/admin/components/vm-role-picker.vue +2 -1
- package/dist/admin/config/plugin-dev.js +1 -1
- package/dist/admin/crud/components/vm-color-picker.vue +11 -9
- package/dist/admin/crud/components/vm-datetime-field.vue +2 -1
- package/dist/admin/crud/components/vm-multi-select.vue +122 -33
- package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
- package/dist/admin/crud/components/vm-select.vue +2 -1
- package/dist/admin/crud/components/vm-tree-select.vue +2 -1
- package/dist/admin/crud/config.js +1 -1
- package/dist/admin/crud/confirm.js +1 -1
- package/dist/admin/crud/dict.js +1 -1
- package/dist/admin/crud/index.d.ts +1 -0
- package/dist/admin/crud/index.js +3 -0
- package/dist/admin/crud/key.js +1 -1
- package/dist/admin/crud/plugins.js +1 -1
- package/dist/admin/crud/span.js +1 -1
- package/dist/admin/crud/style.d.ts +4 -0
- package/dist/admin/crud/style.js +1 -1
- package/dist/admin/crud/validate.js +1 -1
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/lib/browser.js +1 -1
- package/dist/admin/lib/cn.js +1 -1
- package/dist/admin/lib/dialog-float.d.ts +2 -0
- package/dist/admin/lib/dialog-float.js +1 -1
- package/dist/admin/lib/export-excel.js +1 -1
- package/dist/admin/lib/import-excel.js +1 -1
- package/dist/admin/lib/json.js +1 -1
- package/dist/admin/lib/menu.js +1 -1
- package/dist/admin/lib/theme-color-options.d.ts +14 -0
- package/dist/admin/lib/theme-color-options.js +1 -0
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +1 -1
- package/dist/admin/lib/video-frame.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/datetime-picker.js +1 -1
- package/dist/shared/excel.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/locale-json.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +1 -1
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
|
|
92
92
|
<script setup lang="ts">
|
|
93
93
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
94
|
+
import { POPUP_TRIGGER_GAP } from '../lib/dialog-float'
|
|
94
95
|
import type { GroupCascaderNode } from '../../../typings/admin/comm/cascader'
|
|
95
96
|
defineOptions({ name: 'vm-group-cascader' })
|
|
96
97
|
|
|
@@ -236,7 +237,7 @@ function syncPanelPos() {
|
|
|
236
237
|
// 贴触发框左侧 + 底部
|
|
237
238
|
panelStyle.value = {
|
|
238
239
|
position: 'fixed',
|
|
239
|
-
top: `${r.bottom +
|
|
240
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
240
241
|
left: `${r.left}px`,
|
|
241
242
|
zIndex: '200',
|
|
242
243
|
maxWidth: `${maxW}px`,
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
<script setup lang="ts">
|
|
124
124
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
125
125
|
import { FocusScope } from 'reka-ui'
|
|
126
|
+
import { POPUP_TRIGGER_GAP } from '../lib/dialog-float'
|
|
126
127
|
import allIcons from '../data/remixicon-all.json'
|
|
127
128
|
|
|
128
129
|
defineOptions({ name: 'vm-icon-picker' })
|
|
@@ -262,7 +263,7 @@ function syncPanelPos() {
|
|
|
262
263
|
// 贴触发框左侧 + 底部
|
|
263
264
|
panelStyle.value = {
|
|
264
265
|
position: 'fixed',
|
|
265
|
-
top: `${r.bottom +
|
|
266
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
266
267
|
left: `${r.left}px`,
|
|
267
268
|
width: `${width}px`,
|
|
268
269
|
zIndex: '100',
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
<script setup lang="ts">
|
|
51
51
|
import { useVome } from '../hooks/useVome'
|
|
52
52
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
53
|
+
import { POPUP_TRIGGER_GAP } from '../lib/dialog-float'
|
|
53
54
|
defineOptions({ name: 'vm-role-picker' })
|
|
54
55
|
|
|
55
56
|
const props = withDefaults(
|
|
@@ -137,7 +138,7 @@ function syncPanelPos() {
|
|
|
137
138
|
// 贴触发框左侧 + 底部
|
|
138
139
|
panelStyle.value = {
|
|
139
140
|
position: 'fixed',
|
|
140
|
-
top: `${r.bottom +
|
|
141
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
141
142
|
left: `${r.left}px`,
|
|
142
143
|
width: `${width}px`,
|
|
143
144
|
zIndex: '200',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xc6420f=_0x5ee6;(function(_0x42754a,_0xd3718a){const _0x47162d=_0x5ee6,_0x145e78=_0x42754a();while(!![]){try{const _0x453c45=parseInt(_0x47162d(0xf2))/0x1+parseInt(_0x47162d(0xe4))/0x2*(parseInt(_0x47162d(0xee))/0x3)+-parseInt(_0x47162d(0xe0))/0x4+parseInt(_0x47162d(0xe2))/0x5+parseInt(_0x47162d(0xf3))/0x6*(-parseInt(_0x47162d(0xec))/0x7)+parseInt(_0x47162d(0xef))/0x8*(parseInt(_0x47162d(0xf4))/0x9)+-parseInt(_0x47162d(0xdd))/0xa;if(_0x453c45===_0xd3718a)break;else _0x145e78['push'](_0x145e78['shift']());}catch(_0x334200){_0x145e78['push'](_0x145e78['shift']());}}}(_0x5491,0xc0317));const ORG='vomekj';export function serviceUrlFromDocs(_0xafdd57){const _0x50df09=_0x5ee6,_0x332e8c=new URL(_0xafdd57),_0x315599=_0x332e8c['hostname'][_0x50df09(0xe3)](/^www\./,'')[_0x50df09(0xe3)](/^service\./,'');return _0x332e8c[_0x50df09(0xea)]+'//service.'+_0x315599;}export function seatApiBaseFromDocs(_0x588816){const _0x59a0a6=_0x5ee6;return serviceUrlFromDocs(_0x588816)+_0x59a0a6(0xde);}export function licenseIssueUrlFromDocs(_0x2c5395){const _0x38ee84=_0x5ee6;return serviceUrlFromDocs(_0x2c5395)+_0x38ee84(0xf0);}function _0x5ee6(_0x42a4c5,_0x2d288e){_0x42a4c5=_0x42a4c5-0xdc;const _0x5491ec=_0x5491();let _0x5ee6f3=_0x5491ec[_0x42a4c5];if(_0x5ee6['HrfqjL']===undefined){var _0x5e57ef=function(_0x48f19f){const _0xf9b98f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xafdd57='',_0x332e8c='';for(let _0x315599=0x0,_0x588816,_0x2c5395,_0x2bcb79=0x0;_0x2c5395=_0x48f19f['charAt'](_0x2bcb79++);~_0x2c5395&&(_0x588816=_0x315599%0x4?_0x588816*0x40+_0x2c5395:_0x2c5395,_0x315599++%0x4)?_0xafdd57+=String['fromCharCode'](0xff&_0x588816>>(-0x2*_0x315599&0x6)):0x0){_0x2c5395=_0xf9b98f['indexOf'](_0x2c5395);}for(let _0x5d8c43=0x0,_0x42927b=_0xafdd57['length'];_0x5d8c43<_0x42927b;_0x5d8c43++){_0x332e8c+='%'+('00'+_0xafdd57['charCodeAt'](_0x5d8c43)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x332e8c);};_0x5ee6['jZFDvT']=_0x5e57ef,_0x5ee6['gxjMJB']={},_0x5ee6['HrfqjL']=!![];}const _0xaf23ec=_0x5491ec[0x0],_0x1ca207=_0x42a4c5+_0xaf23ec,_0x324184=_0x5ee6['gxjMJB'][_0x1ca207];return!_0x324184?(_0x5ee6f3=_0x5ee6['jZFDvT'](_0x5ee6f3),_0x5ee6['gxjMJB'][_0x1ca207]=_0x5ee6f3):_0x5ee6f3=_0x324184,_0x5ee6f3;}function giteeArchive(_0x2bcb79){const _0x39c1c2=_0x5ee6;return _0x39c1c2(0xed)+ORG+'/'+_0x2bcb79+'/repository/archive/master.zip';}function _0x5491(){const _0x59212c=['DM9Tzs1WBhvNAw4TzNjVBNq','mtK1mte0mZbWzeXyA1y','l2fWCc9WBhvNAw5tDg9Yzs9Zzwf0','DM9Tzs1WBhvNAw4TC2vYDMLJzq','ndm5mtmZmNrMBLbXBa','6zkP5A2qic8G5PYn5yQH56UV5O+s5lU26isA5OMl5P6277YilNzVBwxVVjRKU4uGC2vYDMvY77Yj77Ym6ycc5zci5lIk5lYG44cb55+T5l+H44cb5PsV5lUy562j6io95yQB5OMP5Bgv44cc','mJu3ntu3nvzuqLDSwG','CMvWBgfJzq','nJiWAK5rueX6','5yMn56UVicSG5zco56UV','zNvSBa','5A6m5Pw05lIA5yQH5QIH5z2x6isA5OMl5P6277YilNzVBwxVVjRLKkSGC2vYDMvYios4JIb3zwlVViNVViZMNkZLNldLVidLJ5hMIzpLJixLKi7LJ5hLUipJGii','Ahr0Chm6lY9NAxrODwiUy29TlW','DM9Tzs1WBhvNAw4TzNvSBa','ChjVDg9JB2W','5zco5y+W5B6U5BQu55sO6isA5OMl5P6277YilNzVBwxVVjRLKkSGD2vIl++8IE+8Jos7Psb3DwPPzsdMJilOVB3NI6ZNQ4VLIy3NQ6/POBxPNAlJGii','mJy2qKLewhjN','Ahr0Chm6lY9NAxrLzs5JB20V','otGWn0PPueLYua','nJy4ntzTsgjpDKu','l2fWCc9WBhvNAw5tDg9Yzs93ywXSzxqVBgLJzw5Zzs9PC3n1zq','z2L0zwu','mteWotmWm1nPsMjoqG','mtC5ndzQwgD6BuS','mtqXm09MEezfBq','yMfJA2vUza'];_0x5491=function(){return _0x59212c;};return _0x5491();}function githubArchive(_0x5d8c43){const _0x2c7dab=_0x5ee6;return _0x2c7dab(0xe8)+ORG+'/'+_0x5d8c43+'/archive/refs/heads/master.zip';}function giteeRepo(_0x42927b){return'https://gitee.com/'+ORG+'/'+_0x42927b;}function githubRepo(_0x478069){return'https://github.com/'+ORG+'/'+_0x478069;}const docsUrl='https://vomekj.com';export const pluginDev={'docsUrl':docsUrl,'serviceUrl':serviceUrlFromDocs(docsUrl),'uploadUrl':docsUrl+'/plugins/upload','mirrors':{'prefer':_0xc6420f(0xf1),'giteeOrg':_0xc6420f(0xed)+ORG,'githubOrg':_0xc6420f(0xe8)+ORG},'scaffolds':{'full':{'key':_0xc6420f(0xe6),'title':_0xc6420f(0xe5),'desc':_0xc6420f(0xe7),'repo':_0xc6420f(0xe9),'repoUrl':giteeRepo(_0xc6420f(0xe9)),'githubRepoUrl':githubRepo(_0xc6420f(0xe9)),'downloadUrl':giteeArchive(_0xc6420f(0xe9)),'githubDownloadUrl':githubArchive(_0xc6420f(0xe9))},'backend':{'key':_0xc6420f(0xf5),'title':'纯后端','desc':_0xc6420f(0xe1),'repo':_0xc6420f(0xdf),'repoUrl':giteeRepo(_0xc6420f(0xdf)),'githubRepoUrl':githubRepo('vome-plugin-service'),'downloadUrl':giteeArchive(_0xc6420f(0xdf)),'githubDownloadUrl':githubArchive(_0xc6420f(0xdf))},'frontend':{'key':'frontend','title':'纯前端','desc':_0xc6420f(0xeb),'repo':_0xc6420f(0xdc),'repoUrl':giteeRepo(_0xc6420f(0xdc)),'githubRepoUrl':githubRepo(_0xc6420f(0xdc)),'downloadUrl':giteeArchive(_0xc6420f(0xdc)),'githubDownloadUrl':githubArchive('vome-plugin-front')}}};
|
|
@@ -241,16 +241,13 @@
|
|
|
241
241
|
<script setup lang="ts">
|
|
242
242
|
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
243
243
|
import { FocusScope } from 'reka-ui'
|
|
244
|
+
import { POPUP_TRIGGER_GAP } from '../../lib/dialog-float'
|
|
245
|
+
import type { VmColorThemeOption } from '../../lib/theme-color-options'
|
|
246
|
+
import { getCrudConfig } from '../style'
|
|
244
247
|
|
|
245
248
|
defineOptions({ name: 'vm-color-picker' })
|
|
246
249
|
|
|
247
|
-
|
|
248
|
-
export type VmColorThemeOption = {
|
|
249
|
-
key: string
|
|
250
|
-
label: string
|
|
251
|
-
/** 当前模式下的预览色 */
|
|
252
|
-
value: string
|
|
253
|
-
}
|
|
250
|
+
export type { VmColorThemeOption } from '../../lib/theme-color-options'
|
|
254
251
|
|
|
255
252
|
const props = withDefaults(
|
|
256
253
|
defineProps<{
|
|
@@ -326,7 +323,12 @@ const alphaPctText = ref('100%')
|
|
|
326
323
|
|
|
327
324
|
const hasEyeDropper = ref(false)
|
|
328
325
|
|
|
329
|
-
const themeOptions = computed(() =>
|
|
326
|
+
const themeOptions = computed(() => {
|
|
327
|
+
if (props.themeOptions?.length) return props.themeOptions
|
|
328
|
+
// open 变化时重读 CSS 变量(亮暗切换后预览色同步)
|
|
329
|
+
void open.value
|
|
330
|
+
return getCrudConfig().listThemeColorOptions?.() ?? []
|
|
331
|
+
})
|
|
330
332
|
const hasThemeOptions = computed(() => themeOptions.value.length > 0)
|
|
331
333
|
const themeBoundKey = computed(() => parseCssVarRef(props.modelValue ?? ''))
|
|
332
334
|
const isThemeBound = computed(() => Boolean(themeBoundKey.value))
|
|
@@ -1028,7 +1030,7 @@ function syncPanelPos() {
|
|
|
1028
1030
|
// 贴触发框左侧 + 底部
|
|
1029
1031
|
panelStyle.value = {
|
|
1030
1032
|
position: 'fixed',
|
|
1031
|
-
top: `${r.bottom +
|
|
1033
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
1032
1034
|
left: `${r.left}px`,
|
|
1033
1035
|
width: `${width}px`,
|
|
1034
1036
|
zIndex: '100',
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
46
46
|
import { FocusScope } from 'reka-ui'
|
|
47
47
|
import VmDateCalendarPanel from './vm-date-calendar-panel.vue'
|
|
48
|
+
import { POPUP_TRIGGER_GAP } from '../../lib/dialog-float'
|
|
48
49
|
import {
|
|
49
50
|
dateTimeDisplayText,
|
|
50
51
|
normalizeDateTimePrecision,
|
|
@@ -90,7 +91,7 @@ function syncPanelPos() {
|
|
|
90
91
|
panelStyle.value = {
|
|
91
92
|
position: 'fixed',
|
|
92
93
|
left: `${r.left}px`,
|
|
93
|
-
top: `${r.bottom +
|
|
94
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
94
95
|
zIndex: '10050',
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -1,36 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
ref="rootRef"
|
|
4
|
+
class="vm-multi-select"
|
|
5
|
+
:class="{ 'is-open': open, 'is-disabled': disabled }"
|
|
6
|
+
>
|
|
3
7
|
<button
|
|
8
|
+
ref="triggerRef"
|
|
4
9
|
type="button"
|
|
5
10
|
class="vm-multi-select__trigger"
|
|
6
11
|
:disabled="disabled"
|
|
7
|
-
@click="
|
|
12
|
+
@click="toggle"
|
|
8
13
|
>
|
|
9
14
|
<span class="vm-multi-select__label" :class="{ 'is-placeholder': !selected.length }">
|
|
10
15
|
{{ triggerText }}
|
|
11
16
|
</span>
|
|
12
17
|
<i class="ri-arrow-down-s-line vm-multi-select__caret" />
|
|
13
18
|
</button>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
<Teleport to="body">
|
|
21
|
+
<FocusScope
|
|
22
|
+
v-if="open"
|
|
23
|
+
as-child
|
|
24
|
+
loop
|
|
25
|
+
:trapped="true"
|
|
26
|
+
@unmount-auto-focus="onPanelUnmountAutoFocus"
|
|
19
27
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
<div
|
|
29
|
+
ref="panelRef"
|
|
30
|
+
class="vm-multi-select__panel vm-dialog-float"
|
|
31
|
+
:style="panelStyle"
|
|
32
|
+
@pointerdown.stop
|
|
33
|
+
@mousedown.stop
|
|
34
|
+
>
|
|
35
|
+
<label
|
|
36
|
+
v-for="opt in options"
|
|
37
|
+
:key="String(opt.value)"
|
|
38
|
+
class="vm-multi-select__option"
|
|
39
|
+
>
|
|
40
|
+
<input
|
|
41
|
+
type="checkbox"
|
|
42
|
+
:checked="isChecked(opt.value)"
|
|
43
|
+
@change="toggleValue(opt.value)"
|
|
44
|
+
/>
|
|
45
|
+
<span>{{ opt.label }}</span>
|
|
46
|
+
</label>
|
|
47
|
+
<div v-if="!options.length" class="vm-multi-select__empty">暂无选项</div>
|
|
48
|
+
</div>
|
|
49
|
+
</FocusScope>
|
|
50
|
+
</Teleport>
|
|
29
51
|
</div>
|
|
30
52
|
</template>
|
|
31
53
|
|
|
32
54
|
<script setup lang="ts">
|
|
33
|
-
import { ref, computed, onMounted,
|
|
55
|
+
import { ref, computed, nextTick, onMounted, onUnmounted } from 'vue'
|
|
56
|
+
import { FocusScope } from 'reka-ui'
|
|
57
|
+
import { POPUP_TRIGGER_GAP } from '../../lib/dialog-float'
|
|
58
|
+
|
|
34
59
|
defineOptions({ name: 'vm-multi-select' })
|
|
35
60
|
|
|
36
61
|
const props = withDefaults(
|
|
@@ -52,8 +77,12 @@ const emit = defineEmits<{
|
|
|
52
77
|
change: [v: Array<string | number | boolean>]
|
|
53
78
|
}>()
|
|
54
79
|
|
|
55
|
-
const
|
|
80
|
+
const rootRef = ref<HTMLElement | null>(null)
|
|
81
|
+
const triggerRef = ref<HTMLElement | null>(null)
|
|
82
|
+
const panelRef = ref<HTMLElement | null>(null)
|
|
56
83
|
const open = ref(false)
|
|
84
|
+
const panelStyle = ref<Record<string, string>>({})
|
|
85
|
+
const suppressOpen = ref(false)
|
|
57
86
|
|
|
58
87
|
const selected = computed(() => props.modelValue || [])
|
|
59
88
|
|
|
@@ -71,7 +100,7 @@ function isChecked(v: string | number | boolean) {
|
|
|
71
100
|
return selected.value.some((x) => String(x) === String(v))
|
|
72
101
|
}
|
|
73
102
|
|
|
74
|
-
function
|
|
103
|
+
function toggleValue(v: string | number | boolean) {
|
|
75
104
|
const next = [...selected.value]
|
|
76
105
|
const i = next.findIndex((x) => String(x) === String(v))
|
|
77
106
|
if (i >= 0) next.splice(i, 1)
|
|
@@ -80,12 +109,78 @@ function toggle(v: string | number | boolean) {
|
|
|
80
109
|
emit('change', next)
|
|
81
110
|
}
|
|
82
111
|
|
|
83
|
-
function
|
|
84
|
-
|
|
112
|
+
function syncPanelPos() {
|
|
113
|
+
const el = triggerRef.value
|
|
114
|
+
if (!el) return
|
|
115
|
+
const r = el.getBoundingClientRect()
|
|
116
|
+
const width = Math.max(r.width, 200)
|
|
117
|
+
panelStyle.value = {
|
|
118
|
+
position: 'fixed',
|
|
119
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
120
|
+
left: `${r.left}px`,
|
|
121
|
+
width: `${width}px`,
|
|
122
|
+
zIndex: '200',
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function onPanelUnmountAutoFocus(event: Event) {
|
|
127
|
+
event.preventDefault()
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function closePanel() {
|
|
131
|
+
if (!open.value) return
|
|
132
|
+
suppressOpen.value = true
|
|
133
|
+
open.value = false
|
|
134
|
+
nextTick(() => {
|
|
135
|
+
requestAnimationFrame(() => {
|
|
136
|
+
suppressOpen.value = false
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function openPanel() {
|
|
142
|
+
if (props.disabled || suppressOpen.value) return
|
|
143
|
+
open.value = true
|
|
144
|
+
await nextTick()
|
|
145
|
+
syncPanelPos()
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
async function toggle() {
|
|
149
|
+
if (props.disabled) return
|
|
150
|
+
if (open.value) {
|
|
151
|
+
closePanel()
|
|
152
|
+
return
|
|
153
|
+
}
|
|
154
|
+
await openPanel()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function isInside(el: Node | null) {
|
|
158
|
+
if (!el) return false
|
|
159
|
+
if (rootRef.value?.contains(el)) return true
|
|
160
|
+
if (panelRef.value?.contains(el)) return true
|
|
161
|
+
return el instanceof Element && Boolean(el.closest('.vm-multi-select__panel'))
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function onDocPointer(e: Event) {
|
|
165
|
+
if (!open.value) return
|
|
166
|
+
const t = e.target as Node | null
|
|
167
|
+
if (!isInside(t)) closePanel()
|
|
85
168
|
}
|
|
86
169
|
|
|
87
|
-
|
|
88
|
-
|
|
170
|
+
function onWinChange() {
|
|
171
|
+
if (open.value) syncPanelPos()
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
onMounted(() => {
|
|
175
|
+
document.addEventListener('pointerdown', onDocPointer, true)
|
|
176
|
+
window.addEventListener('resize', onWinChange)
|
|
177
|
+
window.addEventListener('scroll', onWinChange, true)
|
|
178
|
+
})
|
|
179
|
+
onUnmounted(() => {
|
|
180
|
+
document.removeEventListener('pointerdown', onDocPointer, true)
|
|
181
|
+
window.removeEventListener('resize', onWinChange)
|
|
182
|
+
window.removeEventListener('scroll', onWinChange, true)
|
|
183
|
+
})
|
|
89
184
|
</script>
|
|
90
185
|
|
|
91
186
|
<style lang="scss" scoped>
|
|
@@ -110,13 +205,12 @@ onBeforeUnmount(() => document.removeEventListener('mousedown', onDoc))
|
|
|
110
205
|
gap: 6px;
|
|
111
206
|
padding: 0 10px;
|
|
112
207
|
border: 1px solid transparent;
|
|
113
|
-
border-radius:
|
|
208
|
+
border-radius: var(--vm-control-radius);
|
|
114
209
|
background: var(--muted);
|
|
115
210
|
color: var(--foreground);
|
|
116
|
-
font-size:
|
|
211
|
+
font-size: var(--vm-control-font-size);
|
|
117
212
|
cursor: pointer;
|
|
118
213
|
outline: none;
|
|
119
|
-
/* 弹层触发:不展示打开/聚焦描边 */
|
|
120
214
|
}
|
|
121
215
|
|
|
122
216
|
.vm-multi-select__label {
|
|
@@ -139,16 +233,11 @@ onBeforeUnmount(() => document.removeEventListener('mousedown', onDoc))
|
|
|
139
233
|
}
|
|
140
234
|
|
|
141
235
|
.vm-multi-select__panel {
|
|
142
|
-
|
|
143
|
-
z-index: 50;
|
|
144
|
-
top: calc(100% + 2px);
|
|
145
|
-
left: 0;
|
|
146
|
-
right: 0;
|
|
147
|
-
max-height: 220px;
|
|
236
|
+
max-height: min(220px, 45vh);
|
|
148
237
|
overflow: auto;
|
|
149
238
|
padding: 6px;
|
|
150
239
|
border: 1px solid var(--border);
|
|
151
|
-
border-radius:
|
|
240
|
+
border-radius: var(--vm-control-radius);
|
|
152
241
|
background: var(--card);
|
|
153
242
|
box-shadow: var(--shadow-card);
|
|
154
243
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x41d15a=_0x27c2;(function(_0x1ae7e5,_0x3b6515){const _0x1ecf45=_0x27c2,_0x3b0d39=_0x1ae7e5();while(!![]){try{const _0x895582=-parseInt(_0x1ecf45(0xda))/0x1+-parseInt(_0x1ecf45(0xdc))/0x2*(-parseInt(_0x1ecf45(0xe4))/0x3)+parseInt(_0x1ecf45(0xe6))/0x4+parseInt(_0x1ecf45(0xdb))/0x5*(parseInt(_0x1ecf45(0xe7))/0x6)+parseInt(_0x1ecf45(0xe5))/0x7*(-parseInt(_0x1ecf45(0xdd))/0x8)+parseInt(_0x1ecf45(0xd8))/0x9*(parseInt(_0x1ecf45(0xde))/0xa)+parseInt(_0x1ecf45(0xe1))/0xb;if(_0x895582===_0x3b6515)break;else _0x3b0d39['push'](_0x3b0d39['shift']());}catch(_0x41a7f6){_0x3b0d39['push'](_0x3b0d39['shift']());}}}(_0x5d71,0xb30a5));function _0x5d71(){const _0x413fba=['nti0nwnTDenVDa','nefkB3rfta','mtyYote2meTvrKXNtq','mtyWDKfyzLnd','8j+qU+kaJEkDHo+4JW','DMLKzw9BC3jJxq','mtG1odi5mJDICgPIq3O','BMfTzq','Aw5Zzxj0q29UDgvUDa','nZC4ode4teLvD3bW','ndLJAuTqEwy','mta3mduYtKPUCMnX','mtq0AwD4DKro','DMLKzw8','ndiZmdLbBK9OAxq','y3jLyxrL','mtC2odyWAKHKDuDS'];_0x5d71=function(){return _0x413fba;};return _0x5d71();}function _0x27c2(_0x5896a6,_0x106782){_0x5896a6=_0x5896a6-0xd8;const _0x5d71bc=_0x5d71();let _0x27c2eb=_0x5d71bc[_0x5896a6];if(_0x27c2['NFYQHY']===undefined){var _0x26787c=function(_0x1fceae){const _0x2bbcba='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x244380='',_0x5b4b9b='';for(let _0x4599a6=0x0,_0x431d6b,_0x29f06e,_0x40911d=0x0;_0x29f06e=_0x1fceae['charAt'](_0x40911d++);~_0x29f06e&&(_0x431d6b=_0x4599a6%0x4?_0x431d6b*0x40+_0x29f06e:_0x29f06e,_0x4599a6++%0x4)?_0x244380+=String['fromCharCode'](0xff&_0x431d6b>>(-0x2*_0x4599a6&0x6)):0x0){_0x29f06e=_0x2bbcba['indexOf'](_0x29f06e);}for(let _0x308ef9=0x0,_0x3081c4=_0x244380['length'];_0x308ef9<_0x3081c4;_0x308ef9++){_0x5b4b9b+='%'+('00'+_0x244380['charCodeAt'](_0x308ef9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5b4b9b);};_0x27c2['HYzjPy']=_0x26787c,_0x27c2['rmDKqw']={},_0x27c2['NFYQHY']=!![];}const _0x1e4c2c=_0x5d71bc[0x0],_0x1c3f6f=_0x5896a6+_0x1e4c2c,_0x13df79=_0x27c2['rmDKqw'][_0x1c3f6f];return!_0x13df79?(_0x27c2eb=_0x27c2['HYzjPy'](_0x27c2eb),_0x27c2['rmDKqw'][_0x1c3f6f]=_0x27c2eb):_0x27c2eb=_0x13df79,_0x27c2eb;}import{Node,mergeAttributes}from'@tiptap/core';export const VmRichtextVideo=Node[_0x41d15a(0xd9)]({'name':'video','group':'block','atom':!![],'selectable':!![],'draggable':!![],'addAttributes'(){return{'src':{'default':null},'controls':{'default':!![]}};},'parseHTML'(){const _0x2f88ee=_0x41d15a;return[{'tag':_0x2f88ee(0xe0)}];},'renderHTML'({HTMLAttributes:_0x244380}){const _0x5ab04c=_0x41d15a;return[_0x5ab04c(0xe8),mergeAttributes(_0x244380,{'controls':!![],'style':'max-width:100%;border-radius:8px'})];},'addCommands'(){const _0x3a880e=_0x41d15a;return{'setVideo':_0x5b4b9b=>({commands:_0x4599a6})=>_0x4599a6[_0x3a880e(0xe3)]({'type':this[_0x3a880e(0xe2)],'attrs':_0x5b4b9b})};}});export const VM_RICHTEXT_EMOJIS=['\uD83D\uDE00','\uD83D\uDE03','\uD83D\uDE04','\uD83D\uDE01','\uD83D\uDE06','\uD83D\uDE05','\uD83E\uDD23','\uD83D\uDE02','\uD83D\uDE42','\uD83D\uDE43','\uD83D\uDE09','\uD83D\uDE0A','\uD83D\uDE07','\uD83E\uDD70','\uD83D\uDE0D','\uD83E\uDD29','\uD83D\uDE18','\uD83D\uDE17','\uD83D\uDE1A','\uD83D\uDE19','\uD83D\uDE0B','\uD83D\uDE1B','\uD83D\uDE1C','\uD83E\uDD2A','\uD83D\uDE1D','\uD83E\uDD11','\uD83E\uDD17','\uD83E\uDD2D','\uD83E\uDD2B','\uD83E\uDD14','\uD83E\uDD10','\uD83E\uDD28','\uD83D\uDE10','\uD83D\uDE11','\uD83D\uDE36','\uD83D\uDE0F','\uD83D\uDE12','\uD83D\uDE44','\uD83D\uDE2C','\uD83E\uDD25','\uD83D\uDE0C','\uD83D\uDE14','\uD83D\uDE2A','\uD83E\uDD24','\uD83D\uDE34','\uD83D\uDE37','\uD83E\uDD12','\uD83E\uDD15','\uD83E\uDD22','\uD83E\uDD2E','\uD83E\uDD75','\uD83E\uDD76','\uD83E\uDD74','\uD83D\uDE35','\uD83E\uDD2F','\uD83E\uDD20','\uD83E\uDD73','\uD83D\uDE0E','\uD83E\uDD13','\uD83E\uDDD0','\uD83D\uDE15','\uD83D\uDE1F','\uD83D\uDE41','☹️','\uD83D\uDE2E','\uD83D\uDE2F','\uD83D\uDE32','\uD83D\uDE33','\uD83E\uDD7A','\uD83D\uDE26','\uD83D\uDE27','\uD83D\uDE28','\uD83D\uDE30','\uD83D\uDE25','\uD83D\uDE22','\uD83D\uDE2D','\uD83D\uDE31','\uD83D\uDE16','\uD83D\uDE23','\uD83D\uDE1E','\uD83D\uDE13','\uD83D\uDE29','\uD83D\uDE2B','\uD83E\uDD71','\uD83D\uDE24','\uD83D\uDE21','\uD83D\uDE20','\uD83E\uDD2C','\uD83D\uDE08','\uD83D\uDC7F','\uD83D\uDC4B','\uD83E\uDD1A','\uD83D\uDD90','✋','\uD83D\uDD96','\uD83D\uDC4C','\uD83E\uDD0C','\uD83E\uDD0F','✌️','\uD83E\uDD1E','\uD83E\uDD1F','\uD83E\uDD18','\uD83E\uDD19','\uD83D\uDC48','\uD83D\uDC49','\uD83D\uDC46','\uD83D\uDD95','\uD83D\uDC47','☝️','\uD83D\uDC4D','\uD83D\uDC4E','✊','\uD83D\uDC4A','\uD83E\uDD1B','\uD83E\uDD1C','\uD83D\uDC4F','\uD83D\uDE4C','\uD83D\uDC50','\uD83E\uDD32','\uD83E\uDD1D','\uD83D\uDE4F','\uD83D\uDCAA','\uD83E\uDDBE','✍️','\uD83D\uDC85','\uD83E\uDD33','❤️','\uD83E\uDDE1','\uD83D\uDC9B','\uD83D\uDC9A','\uD83D\uDC99','\uD83D\uDC9C','\uD83D\uDDA4','\uD83E\uDD0D','\uD83E\uDD0E','\uD83D\uDC94','❣️','\uD83D\uDC95','\uD83D\uDC9E','\uD83D\uDC93','\uD83D\uDC97','\uD83D\uDC96','\uD83D\uDC98','\uD83D\uDC9D','\uD83D\uDC9F','☮️','✝️','☪️','\uD83D\uDD49','☸️','✡️','\uD83D\uDD2F','\uD83D\uDD4E','☯️','☦️','\uD83D\uDED0','⭐','\uD83C\uDF1F','✨','⚡','\uD83D\uDD25','\uD83D\uDCA5','☀️','\uD83C\uDF19','⭐️','\uD83C\uDF08','✅','❌','⭕','❗','❓','‼️','⁉️','\uD83D\uDCAF','\uD83D\uDD14','\uD83D\uDD15','\uD83D\uDCCC','\uD83D\uDCCD','\uD83D\uDCCE','\uD83D\uDD17','\uD83D\uDD12','\uD83D\uDD13','\uD83D\uDD11','\uD83D\uDDDD','\uD83D\uDCA1','\uD83D\uDD26','\uD83D\uDCDD','✏️','✒️','\uD83D\uDD8A','\uD83D\uDD8B','\uD83D\uDD8C','\uD83D\uDD8D','\uD83D\uDCBC','\uD83D\uDCC1','\uD83D\uDCC2','\uD83D\uDCC5','\uD83D\uDCC6','\uD83D\uDDD3','\uD83D\uDCC7','\uD83D\uDCC8','\uD83D\uDCC9','\uD83D\uDCCA','\uD83D\uDCCB','\uD83D\uDCE4','\uD83D\uDCE5','\uD83D\uDCE6','\uD83D\uDCEB','\uD83D\uDCEC','\uD83D\uDCED','\uD83D\uDCEE','\uD83D\uDCEF','\uD83D\uDCDC','\uD83D\uDCC3','\uD83D\uDCC4','\uD83D\uDCD1','☕','\uD83C\uDF75','\uD83E\uDDC3','\uD83E\uDD64','\uD83E\uDDCB','\uD83C\uDF7A','\uD83C\uDF7B','\uD83E\uDD42','\uD83C\uDF77','\uD83C\uDF78','\uD83C\uDF55','\uD83C\uDF54','\uD83C\uDF5F','\uD83C\uDF2D','\uD83C\uDF7F','\uD83C\uDF69','\uD83C\uDF6A','\uD83C\uDF82','\uD83C\uDF70','\uD83E\uDDC1','\uD83C\uDF4E','\uD83C\uDF4A','\uD83C\uDF4B','\uD83C\uDF4C','\uD83C\uDF49','\uD83C\uDF47','\uD83C\uDF53','\uD83E\uDED0','\uD83C\uDF52','\uD83C\uDF51','⚽','\uD83C\uDFC0','\uD83C\uDFC8','⚾','\uD83C\uDFBE','\uD83C\uDFD0','\uD83C\uDFC9','\uD83C\uDFB1','\uD83C\uDFD3','\uD83C\uDFF8','\uD83C\uDFAE','\uD83D\uDD79','\uD83C\uDFB2','\uD83E\uDDE9','\uD83C\uDFAF','\uD83C\uDFB3','\uD83C\uDFB0','\uD83C\uDFB8','\uD83C\uDFB9','\uD83E\uDD41','\uD83C\uDFA4','\uD83C\uDFA7','\uD83C\uDFAC','\uD83C\uDFA5','\uD83D\uDCF7','\uD83D\uDCF8','\uD83D\uDCF9','\uD83D\uDCFA','\uD83D\uDCFB','\uD83C\uDF99','\uD83D\uDE80','✈️','\uD83D\uDEE9','\uD83D\uDEEB','\uD83D\uDEEC','\uD83D\uDEF0','\uD83D\uDCBA','\uD83D\uDEF8','\uD83D\uDE81','\uD83D\uDEF6','\uD83D\uDE97','\uD83D\uDE95','\uD83D\uDE99','\uD83D\uDE8C','\uD83D\uDE8E','\uD83C\uDFCE','\uD83D\uDE93','\uD83D\uDE91','\uD83D\uDE92','\uD83D\uDE90','\uD83C\uDFE0','\uD83C\uDFE1','\uD83C\uDFE2','\uD83C\uDFE3','\uD83C\uDFE4','\uD83C\uDFE5','\uD83C\uDFE6','\uD83C\uDFE8','\uD83C\uDFE9','\uD83C\uDFEA','\uD83D\uDC36','\uD83D\uDC31','\uD83D\uDC2D','\uD83D\uDC39','\uD83D\uDC30','\uD83E\uDD8A','\uD83D\uDC3B','\uD83D\uDC3C',_0x41d15a(0xdf),'\uD83D\uDC28','\uD83D\uDC2F','\uD83E\uDD81','\uD83D\uDC2E','\uD83D\uDC37','\uD83D\uDC38','\uD83D\uDC35','\uD83D\uDE48','\uD83D\uDE49','\uD83D\uDE4A','\uD83D\uDC12','\uD83D\uDC14','\uD83D\uDC27','\uD83D\uDC26','\uD83D\uDC24','\uD83D\uDC23','\uD83D\uDC25','\uD83E\uDD86','\uD83E\uDD85','\uD83E\uDD89','\uD83E\uDD87','\uD83C\uDF89','\uD83C\uDF8A','\uD83C\uDF88','\uD83C\uDF81','\uD83C\uDF80','\uD83C\uDF97','\uD83C\uDFAB','\uD83C\uDF9F','\uD83C\uDFC6','\uD83C\uDFC5'];
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
104
104
|
import { FocusScope } from 'reka-ui'
|
|
105
105
|
import { useCrud } from '../useCrud'
|
|
106
|
+
import { POPUP_TRIGGER_GAP } from '../../lib/dialog-float'
|
|
106
107
|
|
|
107
108
|
defineOptions({ name: 'vm-select' })
|
|
108
109
|
|
|
@@ -250,7 +251,7 @@ function syncPanelPos() {
|
|
|
250
251
|
// 贴触发框左侧 + 底部
|
|
251
252
|
panelStyle.value = {
|
|
252
253
|
position: 'fixed',
|
|
253
|
-
top: `${r.bottom +
|
|
254
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
254
255
|
left: `${r.left}px`,
|
|
255
256
|
width: `${width}px`,
|
|
256
257
|
zIndex: '200',
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
<script setup lang="ts">
|
|
56
56
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
57
|
+
import { POPUP_TRIGGER_GAP } from '../../lib/dialog-float'
|
|
57
58
|
import type { TreeSelectOption } from '../../../../typings/admin/comm/crud'
|
|
58
59
|
type FlatRow = {
|
|
59
60
|
key: string
|
|
@@ -226,7 +227,7 @@ function syncPanelPos() {
|
|
|
226
227
|
// 贴触发框左侧 + 底部
|
|
227
228
|
panelStyle.value = {
|
|
228
229
|
position: 'fixed',
|
|
229
|
-
top: `${r.bottom +
|
|
230
|
+
top: `${r.bottom + POPUP_TRIGGER_GAP}px`,
|
|
230
231
|
left: `${r.left}px`,
|
|
231
232
|
width: `${width}px`,
|
|
232
233
|
zIndex: '200',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33f4c3,_0x273125){const _0x303c13=_0x5927,_0x14e106=_0x33f4c3();while(!![]){try{const _0x594fea=-parseInt(_0x303c13(0x92))/0x1*(parseInt(_0x303c13(0x9d))/0x2)+-parseInt(_0x303c13(0x9e))/0x3*(parseInt(_0x303c13(0xa0))/0x4)+parseInt(_0x303c13(0x9c))/0x5+parseInt(_0x303c13(0x99))/0x6+-parseInt(_0x303c13(0x9a))/0x7*(-parseInt(_0x303c13(0x93))/0x8)+-parseInt(_0x303c13(0x9b))/0x9+parseInt(_0x303c13(0xa1))/0xa;if(_0x594fea===_0x273125)break;else _0x14e106['push'](_0x14e106['shift']());}catch(_0x57c17f){_0x14e106['push'](_0x14e106['shift']());}}}(_0x2230,0x4ede6));import{getCrudConfig}from'./style';import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';export{CRUD_LABELS,DEFAULT_CRUD_DICT};function _0x5927(_0x502d36,_0x671757){_0x502d36=_0x502d36-0x92;const _0x2230fb=_0x2230();let _0x592796=_0x2230fb[_0x502d36];if(_0x5927['GLYNUA']===undefined){var _0x30f7fa=function(_0x4d37cd){const _0x20753b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x515462='',_0x27ccfc='';for(let _0x409268=0x0,_0x38e4d8,_0x17a45c,_0xc894c7=0x0;_0x17a45c=_0x4d37cd['charAt'](_0xc894c7++);~_0x17a45c&&(_0x38e4d8=_0x409268%0x4?_0x38e4d8*0x40+_0x17a45c:_0x17a45c,_0x409268++%0x4)?_0x515462+=String['fromCharCode'](0xff&_0x38e4d8>>(-0x2*_0x409268&0x6)):0x0){_0x17a45c=_0x20753b['indexOf'](_0x17a45c);}for(let _0x16caa6=0x0,_0x457808=_0x515462['length'];_0x16caa6<_0x457808;_0x16caa6++){_0x27ccfc+='%'+('00'+_0x515462['charCodeAt'](_0x16caa6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x27ccfc);};_0x5927['AMlbag']=_0x30f7fa,_0x5927['gzrbmx']={},_0x5927['GLYNUA']=!![];}const _0x5ea495=_0x2230fb[0x0],_0x2cddeb=_0x502d36+_0x5ea495,_0x26f6c2=_0x5927['gzrbmx'][_0x2cddeb];return!_0x26f6c2?(_0x592796=_0x5927['AMlbag'](_0x592796),_0x5927['gzrbmx'][_0x2cddeb]=_0x592796):_0x592796=_0x26f6c2,_0x592796;}function _0x2230(){const _0x514463=['mJaWohjcCwDeDW','C2vHCMnO','yxbP','BgfIzwW','C29YDa','CgfNAw5HDgLVBG','mta1nJKXmNvrDejWzW','mtq0mJb1AuH1v1K','ntqWnZmYnKz3v0v6Dq','mtq3ntCYmfnQCLPdBq','mti2wNPpBxHl','mJaYndi1yMflyurV','zgLJDa','mJbQsgXfCvm','nZq5mJiYmff1r1DRtq','nZu2mwLpDuj2uW'];_0x2230=function(){return _0x514463;};return _0x2230();}const DEFAULT_CRUD_PERMISSION={'page':!![],'list':!![],'info':!![],'add':![],'delete':![],'update':![],'restore':![]};export function mergeDict(_0x515462){const _0x40ec15=_0x5927,_0x27ccfc=getCrudConfig()[_0x40ec15(0x9f)];if(!_0x515462)return{..._0x27ccfc,'label':{..._0x27ccfc[_0x40ec15(0x96)]}};return{..._0x27ccfc,..._0x515462,'api':{..._0x27ccfc[_0x40ec15(0x95)],..._0x515462[_0x40ec15(0x95)]},'pagination':{..._0x27ccfc[_0x40ec15(0x98)],..._0x515462[_0x40ec15(0x98)]},'search':{..._0x27ccfc[_0x40ec15(0x94)],..._0x515462['search']},'sort':{..._0x27ccfc[_0x40ec15(0x97)],..._0x515462['sort']},'label':{..._0x27ccfc[_0x40ec15(0x96)],..._0x515462['label']}};}export function mergePermission(_0x409268,_0x38e4d8){return{...DEFAULT_CRUD_PERMISSION,..._0x38e4d8,..._0x409268};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3c36a0=_0x3420;(function(_0x2b5b25,_0x5c26ea){const _0x373be5=_0x3420,_0x48a22d=_0x2b5b25();while(!![]){try{const _0x22f324=-parseInt(_0x373be5(0x151))/0x1+parseInt(_0x373be5(0x144))/0x2*(parseInt(_0x373be5(0x13f))/0x3)+-parseInt(_0x373be5(0x13b))/0x4*(parseInt(_0x373be5(0x13c))/0x5)+parseInt(_0x373be5(0x153))/0x6*(-parseInt(_0x373be5(0x148))/0x7)+-parseInt(_0x373be5(0x15a))/0x8*(-parseInt(_0x373be5(0x15b))/0x9)+-parseInt(_0x373be5(0x157))/0xa+-parseInt(_0x373be5(0x147))/0xb*(-parseInt(_0x373be5(0x14f))/0xc);if(_0x22f324===_0x5c26ea)break;else _0x48a22d['push'](_0x48a22d['shift']());}catch(_0x10cb16){_0x48a22d['push'](_0x48a22d['shift']());}}}(_0x4e4c,0xc1dde));import{createApp,h,ref}from'vue';import{Dialog,DialogContent,DialogFooter,DialogHeader,DialogTitle}from'#vome-host/components/ui/dialog';export function vmConfirm(_0x923f16){const _0x2dc056=typeof _0x923f16==='string'?{'message':_0x923f16}:_0x923f16;return new Promise(_0xc1543=>{const _0x5461ad=_0x3420,_0x2bf38e=ref(!![]),_0x54cb47=document[_0x5461ad(0x14c)](_0x5461ad(0x13e));document[_0x5461ad(0x15c)][_0x5461ad(0x145)](_0x54cb47);const _0x5856ea=createApp({'setup'(){const _0x3379d9=_0x5461ad;function _0x22ded6(_0x4d1b78){const _0x272019=_0x3420;_0x2bf38e[_0x272019(0x149)]=![],_0xc1543(_0x4d1b78),setTimeout(()=>{const _0x3c02e5=_0x272019;_0x5856ea[_0x3c02e5(0x14b)](),_0x54cb47[_0x3c02e5(0x155)]();},0xc8);}return()=>h(Dialog,{'open':_0x2bf38e[_0x3379d9(0x149)],'onUpdate:open':_0x20c8ec=>{if(!_0x20c8ec)_0x22ded6(![]);}},{'default':()=>h(DialogContent,{'class':_0x3379d9(0x150),'showCloseButton':![]},{'default':()=>[h(DialogHeader,{'class':'vm-confirm__head'},()=>h(DialogTitle,{'class':'vm-confirm__title'},()=>_0x2dc056['title']||'提示')),h(_0x3379d9(0x13e),{'class':_0x3379d9(0x152)},_0x2dc056[_0x3379d9(0x14a)]),h(DialogFooter,{'class':_0x3379d9(0x14e)},()=>[h('button',{'type':_0x3379d9(0x146),'class':'vm-confirm__btn\x20is-ghost','onClick':()=>_0x22ded6(![])},_0x2dc056[_0x3379d9(0x13d)]||'取消'),h(_0x3379d9(0x146),{'type':_0x3379d9(0x146),'class':_0x3379d9(0x14d),'onClick':()=>_0x22ded6(!![])},_0x2dc056[_0x3379d9(0x142)]||'确定')])]})});}});_0x5856ea[_0x5461ad(0x156)](_0x54cb47);});}function _0x4e4c(){const _0x32c8c9=['mJi5mZG0mZj2DhzMsxC','DM0Ty29UzMLYBq','mtu4mdi4oe9MC2P6Ba','DM0Ty29UzMLYBv9FyM9KEq','nNLzvuTdzW','C3r5Bgu','CMvTB3zL','Bw91BNq','mtmZotm3mtbcAgXZBuK','z2v0rwXLBwvUDej5swq','DM0Ty29UzMLYBs1ZDhLSzq','nJeYmZi4EK5nt3nV','mti2qu9kq21q','yM9KEq','mta4oePWthfvsG','mJyYodb6AxPnsfa','y2fUy2vSvgv4Da','zgL2','mZK2nJmXogPuuKX0Ea','Dgv4DenVBNrLBNq','AgvHza','y29UzMLYBvrLEhq','cI52Bs1JB25MAxjTw2rHDgeTC2XVDd0NzgLHBg9NlwnVBNrLBNqNxsb7cIaGD2LKDgG6ig1PBIG0mdbWEcWGy2fSyYGXmdb2DYaTidmYChGPksaHAw1WB3j0yw50oWOGig1HEc13Awr0AdOGBwLUkdqWmhb4lcbJywXJkdeWmhz3ic0GmZjWEcKPicfPBxbVCNrHBNq7cIaGz2fWoIaWicfPBxbVCNrHBNq7cIaGCgfKzgLUzZOGmcaHAw1WB3j0yw50oWOGigjVCMrLCJOGBM9UzsaHAw1WB3j0yw50oWOGigjVCMrLCI1YywrPDxm6idi0ChGGiwLTCg9YDgfUDdSkicbIB3GTC2HHzg93oIb2yxiOls1ZAgfKB3CTC29MDcKGiwLTCg9YDgfUDdSkFqOUDM0Ty29UzMLYBv9FAgvHzcb7ihbHzgrPBMC6ide4ChGGmJjWEcaWoYbIB3jKzxiTyM90Dg9ToIbUB25LoYb9cI52Bs1JB25MAxjTx190AxrSzsb7igzVBNqTC2L6ztOGmtzWEdSGzM9UDc13zwLNAhq6idy1mdSGFqOUDM0Ty29UzMLYBv9FyM9KEsb7cIaGCgfKzgLUzZOGmtjWEcaYmNb4idHWEdSkicbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7cIaGzM9UDc1ZAxPLoIaXnhb4oWOGigXPBMuTAgvPz2H0oIaXlJy7cN0klNzTlwnVBMzPCM1Fx2zVB3qGEWOGigrPC3bSyxK6igzSzxG7cIaGANvZDgLMEs1JB250zw50oIbMBgv4lwvUzdSkicbNyxa6idHWEdSkicbWywrKAw5NoIaXnhb4idiYChG7cN0klNzTlwnVBMzPCM1Fx2j0BIb7cIaGAgvPz2H0oIaZnNb4oWOGihbHzgrPBMC6idaGmtzWEdSkicbIB3jKzxi6ig5VBMu7cIaGyM9YzgvYlxjHzgL1CZOGmtjWEdSkicbMB250lxnPEMu6ideZChG7cIaGzM9UDc13zwLNAhq6idyWmdSkicbJDxjZB3i6ihbVAw50zxi7cN0klNzTlwnVBMzPCM1Fx2j0BI5PCY1WCMLTyxj5ihSGyMfJA2DYB3vUzdOGDMfYkc0TyNjHBMqPoYbJB2XVCJOGi2zMzJSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlxbYAw1HCNK6Ag92zxiGEYbIywnRz3jVDw5KoIb2yxiOls1ICMfUzc1KzwvWktSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlwDOB3n0ihSGyMfJA2DYB3vUzdOGDMfYkc0TBxv0zwqPoYbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7ih0k','mKzKqvnAva','yxbWzw5Kq2HPBgq','yNv0Dg9U','mJj5ENDsteu','nZuXmZy4mvLivKj0sa','DMfSDwu','BwvZC2fNzq','Dw5TB3vUDa','y3jLyxrLrwXLBwvUDa','DM0Ty29UzMLYBv9FyNrUigLZlxbYAw1HCNK','DM0Ty29UzMLYBv9FzM9VDa'];_0x4e4c=function(){return _0x32c8c9;};return _0x4e4c();}function _0x3420(_0x141fd1,_0x4f9272){_0x141fd1=_0x141fd1-0x13b;const _0x4e4c06=_0x4e4c();let _0x342037=_0x4e4c06[_0x141fd1];if(_0x3420['hGaBlX']===undefined){var _0x2cb4b5=function(_0x1b8a93){const _0x5ec423='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x923f16='',_0x2dc056='';for(let _0xc1543=0x0,_0x2bf38e,_0x54cb47,_0x5856ea=0x0;_0x54cb47=_0x1b8a93['charAt'](_0x5856ea++);~_0x54cb47&&(_0x2bf38e=_0xc1543%0x4?_0x2bf38e*0x40+_0x54cb47:_0x54cb47,_0xc1543++%0x4)?_0x923f16+=String['fromCharCode'](0xff&_0x2bf38e>>(-0x2*_0xc1543&0x6)):0x0){_0x54cb47=_0x5ec423['indexOf'](_0x54cb47);}for(let _0x22ded6=0x0,_0x4d1b78=_0x923f16['length'];_0x22ded6<_0x4d1b78;_0x22ded6++){_0x2dc056+='%'+('00'+_0x923f16['charCodeAt'](_0x22ded6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2dc056);};_0x3420['iHNhNh']=_0x2cb4b5,_0x3420['aSnxfv']={},_0x3420['hGaBlX']=!![];}const _0x488d71=_0x4e4c06[0x0],_0x55d340=_0x141fd1+_0x488d71,_0x382f34=_0x3420['aSnxfv'][_0x55d340];return!_0x382f34?(_0x342037=_0x3420['iHNhNh'](_0x342037),_0x3420['aSnxfv'][_0x55d340]=_0x342037):_0x342037=_0x382f34,_0x342037;}if(typeof document!=='undefined'&&!document[_0x3c36a0(0x158)](_0x3c36a0(0x159))){const style=document['createElement'](_0x3c36a0(0x154));style['id']=_0x3c36a0(0x159),style[_0x3c36a0(0x140)]=_0x3c36a0(0x143),document[_0x3c36a0(0x141)][_0x3c36a0(0x145)](style);}
|
package/dist/admin/crud/dict.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1c7e(_0xc4716d,_0x10e78f){_0xc4716d=_0xc4716d-0x197;const _0x28ff62=_0x28ff();let _0x1c7ef0=_0x28ff62[_0xc4716d];if(_0x1c7e['aTJTii']===undefined){var _0x1cfce6=function(_0x42bbd5){const _0x3a2ca2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4366de='',_0x27e13d='';for(let _0x5b9992=0x0,_0x1f9a82,_0x237ddd,_0x400685=0x0;_0x237ddd=_0x42bbd5['charAt'](_0x400685++);~_0x237ddd&&(_0x1f9a82=_0x5b9992%0x4?_0x1f9a82*0x40+_0x237ddd:_0x237ddd,_0x5b9992++%0x4)?_0x4366de+=String['fromCharCode'](0xff&_0x1f9a82>>(-0x2*_0x5b9992&0x6)):0x0){_0x237ddd=_0x3a2ca2['indexOf'](_0x237ddd);}for(let _0x23787b=0x0,_0xafb021=_0x4366de['length'];_0x23787b<_0xafb021;_0x23787b++){_0x27e13d+='%'+('00'+_0x4366de['charCodeAt'](_0x23787b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x27e13d);};_0x1c7e['eJriPc']=_0x1cfce6,_0x1c7e['NFdnhz']={},_0x1c7e['aTJTii']=!![];}const _0x309ffe=_0x28ff62[0x0],_0x95e4a=_0xc4716d+_0x309ffe,_0x4d9755=_0x1c7e['NFdnhz'][_0x95e4a];return!_0x4d9755?(_0x1c7ef0=_0x1c7e['eJriPc'](_0x1c7ef0),_0x1c7e['NFdnhz'][_0x95e4a]=_0x1c7ef0):_0x1c7ef0=_0x4d9755,_0x1c7ef0;}const _0x2126dd=_0x1c7e;(function(_0x56f056,_0x2966de){const _0x199158=_0x1c7e,_0x491180=_0x56f056();while(!![]){try{const _0x3f2fcf=-parseInt(_0x199158(0x1ab))/0x1+parseInt(_0x199158(0x1a7))/0x2*(parseInt(_0x199158(0x1bd))/0x3)+-parseInt(_0x199158(0x1b9))/0x4*(parseInt(_0x199158(0x1a9))/0x5)+-parseInt(_0x199158(0x1ba))/0x6+-parseInt(_0x199158(0x1bb))/0x7*(-parseInt(_0x199158(0x1b6))/0x8)+parseInt(_0x199158(0x1ae))/0x9*(-parseInt(_0x199158(0x197))/0xa)+-parseInt(_0x199158(0x1b2))/0xb*(-parseInt(_0x199158(0x1a8))/0xc);if(_0x3f2fcf===_0x2966de)break;else _0x491180['push'](_0x491180['shift']());}catch(_0xe3cc72){_0x491180['push'](_0x491180['shift']());}}}(_0x28ff,0x22195));export const CRUD_LABELS={'op':'操作','add':'新增','delete':'删除','multiDelete':'删除','export':'导出','import':'导入','update':'编辑','refresh':'刷新','info':'详情','search':'搜索','reset':'重置','clear':'清空','save':'保存','close':'取消','confirm':'确定','advSearch':_0x2126dd(0x1a5),'searchKey':_0x2126dd(0x19d),'placeholder':'请输入','tips':'提示','saveSuccess':_0x2126dd(0x1ac),'deleteSuccess':'删除成功','deleteConfirm':_0x2126dd(0x19e),'forceDeleteConfirm':_0x2126dd(0x1aa),'empty':'暂无数据','desc':'降序','asc':'升序','select':'选择','deselect':_0x2126dd(0x1b1),'seeMore':_0x2126dd(0x1a4),'hideContent':'隐藏内容','nonEmpty':_0x2126dd(0x19c),'list':'列表','trash':_0x2126dd(0x1a3),'searchNamed':_0x2126dd(0x1b3),'selectNamed':_0x2126dd(0x1a1),'keyword':_0x2126dd(0x1a0),'range':'区间','min':_0x2126dd(0x198),'max':'最大值','start':'开始','end':'结束','total':_0x2126dd(0x1be),'pageSize':_0x2126dd(0x1b7),'prevPage':'上一页','nextPage':_0x2126dd(0x1b8),'jumpPage':'页码','forceDeleted':'已彻底删除','deleted':_0x2126dd(0x1b4),'restore':'恢复','forceDelete':'彻底删除','loading':_0x2126dd(0x19b)};export const DEFAULT_CRUD_DICT={'primaryId':'id','api':{'list':'list','add':_0x2126dd(0x19a),'update':_0x2126dd(0x1a6),'delete':_0x2126dd(0x1b5),'info':_0x2126dd(0x1ad),'page':_0x2126dd(0x1af)},'pagination':{'page':_0x2126dd(0x1af),'size':_0x2126dd(0x199)},'search':{'keyWord':_0x2126dd(0x1b0),'query':_0x2126dd(0x19f)},'sort':{'prop':_0x2126dd(0x1bc),'order':_0x2126dd(0x1a2)},'label':CRUD_LABELS};function _0x28ff(){const _0x4d373a=['5BEY5yIG6zMK','zgvSzxrL','mtznvwPPwfu','EZb9ic8G6Ag1','5lIl5lIa6Ag1','ntjUt2jYzwK','ndi4nZq4qMjksvjS','mZm0otK5qvrUzLjK','B3jKzxi','m3roqMjtEG','5ywXihSWFsdMNAe','mtbssKrcy1e','5PYa5Bcp5yc8','C2L6zq','ywrK','5yQG6l295lIT4OcM','5lIn6io95lI656M6','5PcC57sI5ywZ6zsU5A2x','5Q2K5Pon5l2C5Bcg5PwW5O2U5Qch6k6W5lI65BEY5yIG6zMK77Ym5PIV5zcM57UN57UT77YF','CxvLCNK','5ywZ6zsU5A2x','6ycj5OUPEZb9','C29YDa','5zUE5Ps256Uz','5P+L55Yl5PU05AsA','6AUy57QN5PcC57sI','DxbKyxrL','nte0ntmWv2jOsMrX','mtj3rNPtB3i','mZyYndvtzK9dBfi','5Q2K5Pon5l2C5Bcg5Rc45lMf5yIG6zMK6ycj5lIT5PwW5O2U77Ym5PIV5zcM57UN57UT77YF','ndu3ndLOzK5nr0q','5l+D5A2y5OIq5yQF','Aw5MBW','nJq0mJi5vhrHqwPH','CgfNzq','A2v5v29Yza','5y+w5RAi6ycj5OUP','nZy2ody1Avvvtujt','5PcC57sIEZb9'];_0x28ff=function(){return _0x4d373a;};return _0x28ff();}
|
|
@@ -52,6 +52,7 @@ export { Plugins, toTree, setFocus, setRules, setAuto, buildAutoSearchItems } fr
|
|
|
52
52
|
export { deepTree, flattenTree } from '../lib/tree';
|
|
53
53
|
export { resolveCrudComponent, registerCrudComponent } from './registry';
|
|
54
54
|
export { setCrudConfig, getCrudConfig, getCrudStyle, DEFAULT_CRUD_STYLE, crudLocaleRev, setCrudTranslator, crudT, crudLabel, crudFormat, resolveSearchPlaceholder, resolveRangePlaceholders, } from './style';
|
|
55
|
+
export { resolveCssThemeColorOptions, type VmColorThemeOption, type ThemeColorDef, } from '../lib/theme-color-options';
|
|
55
56
|
export { FORM_COLS_DESKTOP, FORM_COLS_MOBILE, FORM_SPAN_FULL, FORM_MQ_MOBILE, getFormCols, resolveFormSpan, useFormCols, } from './span';
|
|
56
57
|
export { mergeDict, mergePermission, DEFAULT_CRUD_DICT, CRUD_LABELS } from './config';
|
|
57
58
|
export type { CrudService, CrudColumn, CrudSearchItem, CrudFormItem, CrudContext, CrudTrashMode, CrudOptions, CrudTableOptions, CrudUpsertOptions, CrudSearchOptions, CrudPermission, CrudDict, } from '../../../typings/admin/comm/crud';
|
package/dist/admin/crud/index.js
CHANGED
package/dist/admin/crud/key.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1ddaf2=_0x3efc;(function(_0x2b354a,_0x3fb5c1){const _0x46b2cd=_0x3efc,_0x28ae83=_0x2b354a();while(!![]){try{const _0x2626ab=parseInt(_0x46b2cd(0xe2))/0x1*(parseInt(_0x46b2cd(0xe6))/0x2)+parseInt(_0x46b2cd(0xe3))/0x3*(parseInt(_0x46b2cd(0xdd))/0x4)+-parseInt(_0x46b2cd(0xd9))/0x5*(parseInt(_0x46b2cd(0xe0))/0x6)+parseInt(_0x46b2cd(0xda))/0x7*(-parseInt(_0x46b2cd(0xdf))/0x8)+-parseInt(_0x46b2cd(0xdc))/0x9*(-parseInt(_0x46b2cd(0xdb))/0xa)+-parseInt(_0x46b2cd(0xe5))/0xb+parseInt(_0x46b2cd(0xe4))/0xc;if(_0x2626ab===_0x3fb5c1)break;else _0x28ae83['push'](_0x28ae83['shift']());}catch(_0x59350a){_0x28ae83['push'](_0x28ae83['shift']());}}}(_0x17b9,0xbc3e4));import{inject}from'vue';function _0x3efc(_0x2ab689,_0x5cc5ce){_0x2ab689=_0x2ab689-0xd7;const _0x17b945=_0x17b9();let _0x3efc10=_0x17b945[_0x2ab689];if(_0x3efc['fOGrXc']===undefined){var _0xd0a759=function(_0xbd54a9){const _0x20c20e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x471bd8='',_0x2fc2c3='';for(let _0x4e8228=0x0,_0x1d099d,_0x2e354c,_0x37e382=0x0;_0x2e354c=_0xbd54a9['charAt'](_0x37e382++);~_0x2e354c&&(_0x1d099d=_0x4e8228%0x4?_0x1d099d*0x40+_0x2e354c:_0x2e354c,_0x4e8228++%0x4)?_0x471bd8+=String['fromCharCode'](0xff&_0x1d099d>>(-0x2*_0x4e8228&0x6)):0x0){_0x2e354c=_0x20c20e['indexOf'](_0x2e354c);}for(let _0xcce43=0x0,_0x516d8f=_0x471bd8['length'];_0xcce43<_0x516d8f;_0xcce43++){_0x2fc2c3+='%'+('00'+_0x471bd8['charCodeAt'](_0xcce43)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2fc2c3);};_0x3efc['sQsPXY']=_0xd0a759,_0x3efc['JhJbvv']={},_0x3efc['fOGrXc']=!![];}const _0x4b7c8c=_0x17b945[0x0],_0x40eec7=_0x2ab689+_0x4b7c8c,_0x3e1041=_0x3efc['JhJbvv'][_0x40eec7];return!_0x3e1041?(_0x3efc10=_0x3efc['sQsPXY'](_0x3efc10),_0x3efc['JhJbvv'][_0x40eec7]=_0x3efc10):_0x3efc10=_0x3e1041,_0x3efc10;}export const CRUD_KEY=Symbol('vm-crud');export const CRUD_OPTIONS_KEY=Symbol(_0x1ddaf2(0xd8));export const TABLE_OPTIONS_KEY=Symbol(_0x1ddaf2(0xe1));export const UPSERT_OPTIONS_KEY=Symbol('useUpsert__options');export const SEARCH_OPTIONS_KEY=Symbol(_0x1ddaf2(0xde));export const TABLE_API_KEY=Symbol(_0x1ddaf2(0xd7));export function injectCrudOptions(){return inject(CRUD_OPTIONS_KEY,undefined);}export function injectTableOptions(){return inject(TABLE_OPTIONS_KEY,undefined);}function _0x17b9(){const _0x5bcf8b=['mJy1mJiYmgLHCMrdsG','ouPkBgf5Da','mta5mJrZuKnMuNy','DxnLu2vHCMnOx19VChrPB25Z','mJrgAeDZque','nNH0r0jntW','DxnLvgfIBgvFx29WDgLVBNm','munHvKHTzW','mta5nvrWwuTMCa','mZa2ntCWnJbSwNDRu1O','mty2ode2mJfyq3beD04','ndy3ohHUq2jztq','DM0TDgfIBguTyxbP','DxnLq3j1zf9FB3b0Aw9UCW','nZqXodq5nwnkwgDmrq','mteXnZeZzgrdEMvu'];_0x17b9=function(){return _0x5bcf8b;};return _0x17b9();}export function injectUpsertOptions(){return inject(UPSERT_OPTIONS_KEY,undefined);}export function injectSearchOptions(){return inject(SEARCH_OPTIONS_KEY,undefined);}
|