vome-core 0.0.43 → 0.0.45

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.
@@ -1 +1,54 @@
1
- const _0x1ebaea=_0x156b;(function(_0x2ac708,_0x10caf3){const _0x46c250=_0x156b,_0x16a4db=_0x2ac708();while(!![]){try{const _0x2864d5=parseInt(_0x46c250(0x156))/0x1*(-parseInt(_0x46c250(0x14e))/0x2)+parseInt(_0x46c250(0x143))/0x3*(-parseInt(_0x46c250(0x151))/0x4)+-parseInt(_0x46c250(0x147))/0x5*(-parseInt(_0x46c250(0x144))/0x6)+parseInt(_0x46c250(0x13e))/0x7+-parseInt(_0x46c250(0x141))/0x8*(-parseInt(_0x46c250(0x14f))/0x9)+-parseInt(_0x46c250(0x152))/0xa*(-parseInt(_0x46c250(0x155))/0xb)+-parseInt(_0x46c250(0x149))/0xc;if(_0x2864d5===_0x10caf3)break;else _0x16a4db['push'](_0x16a4db['shift']());}catch(_0x1c80fb){_0x16a4db['push'](_0x16a4db['shift']());}}}(_0x38d8,0xe034c));const ORG='vomekj';function giteeArchive(_0x7171bb){const _0x3d0a4d=_0x156b;return _0x3d0a4d(0x146)+ORG+'/'+_0x7171bb+'/repository/archive/master.zip';}function _0x38d8(){const _0x1718bb=['Ahr0Chm6lY92B21LA2OUy29T','mtfYwejSA0W','mwPNBKX3Bq','zNvSBa','mteWodeYmJr0tMngqvK','DM9Tzs1WBhvNAw4TC2vYDMLJzq','yMfJA2vUza','mZq0rhr1u1DA','Ahr0Chm6lY9NAxrODwiUy29TlW','odi0otDJqw5OzuC','oteXnti5nNvSyK1jBW','Ahr0Chm6lY92B21LA2OUy29Tl3bSDwDPBNmVDxbSB2fK','Ahr0Chm6lY9NAxrLzs5JB20V','nvj2vefsBG','l2fYy2HPDMuVCMvMCY9OzwfKCY9Tyxn0zxiUEMLW','mZe0mZyYnJHZyKfnthK','6zkP5A2qic8G5PYn5yQH56UV5O+s5lU26isA5OMl5P6277YilNzVBwxVVjRKU4uGC2vYDMvY77Yj77Ym6ycc5zci5lIk5lYG44cb55+T5l+H44cb5PsV5lUy562j6io95yQB5OMP5Bgv44cc','DM9Tzs1WBhvNAw4TzNvSBa','5A6m5Pw05lIA5yQH5QIH5z2x6isA5OMl5P6277YilNzVBwxVVjRLKkSGC2vYDMvYios4JIb3zwlVViNVViZMNkZLNldLVidLJ5hMIzpLJixLKi7LJ5hLUipJGii','DM9Tzs1WBhvNAw4TzNjVBNq','mZuXmdaZngTzsuHPrG','mJm1mZC3B09AruXy','5yMn56UVicSG5zco56UV','mta0B25ZwhzK','mtC4mtiWmtbqzejqBNa','z2L0zwu'];_0x38d8=function(){return _0x1718bb;};return _0x38d8();}function githubArchive(_0x3ff5c6){const _0x3a63de=_0x156b;return _0x3a63de(0x142)+ORG+'/'+_0x3ff5c6+_0x3a63de(0x148);}function giteeRepo(_0xdef74a){const _0x4b88a3=_0x156b;return _0x4b88a3(0x146)+ORG+'/'+_0xdef74a;}function githubRepo(_0x4207b5){const _0x10caf4=_0x156b;return _0x10caf4(0x142)+ORG+'/'+_0x4207b5;}function _0x156b(_0x4a640e,_0x4ad842){_0x4a640e=_0x4a640e-0x13d;const _0x38d8e4=_0x38d8();let _0x156bb0=_0x38d8e4[_0x4a640e];if(_0x156b['lQiEHn']===undefined){var _0x14bb52=function(_0x46ea42){const _0x283c05='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7171bb='',_0x3ff5c6='';for(let _0xdef74a=0x0,_0x4207b5,_0x56b752,_0x2213e4=0x0;_0x56b752=_0x46ea42['charAt'](_0x2213e4++);~_0x56b752&&(_0x4207b5=_0xdef74a%0x4?_0x4207b5*0x40+_0x56b752:_0x56b752,_0xdef74a++%0x4)?_0x7171bb+=String['fromCharCode'](0xff&_0x4207b5>>(-0x2*_0xdef74a&0x6)):0x0){_0x56b752=_0x283c05['indexOf'](_0x56b752);}for(let _0x1d20e0=0x0,_0x57203c=_0x7171bb['length'];_0x1d20e0<_0x57203c;_0x1d20e0++){_0x3ff5c6+='%'+('00'+_0x7171bb['charCodeAt'](_0x1d20e0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ff5c6);};_0x156b['DXjJme']=_0x14bb52,_0x156b['ThsAYB']={},_0x156b['lQiEHn']=!![];}const _0x1c70ad=_0x38d8e4[0x0],_0x24d8c5=_0x4a640e+_0x1c70ad,_0x4008dc=_0x156b['ThsAYB'][_0x24d8c5];return!_0x4008dc?(_0x156bb0=_0x156b['DXjJme'](_0x156bb0),_0x156b['ThsAYB'][_0x24d8c5]=_0x156bb0):_0x156bb0=_0x4008dc,_0x156bb0;}export const pluginDev={'docsUrl':_0x1ebaea(0x154),'uploadUrl':_0x1ebaea(0x145),'mirrors':{'prefer':_0x1ebaea(0x153),'giteeOrg':_0x1ebaea(0x146)+ORG,'githubOrg':_0x1ebaea(0x142)+ORG},'scaffolds':{'full':{'key':_0x1ebaea(0x13d),'title':_0x1ebaea(0x150),'desc':_0x1ebaea(0x14c),'repo':_0x1ebaea(0x14b),'repoUrl':giteeRepo('vome-plugin-full'),'githubRepoUrl':githubRepo(_0x1ebaea(0x14b)),'downloadUrl':giteeArchive(_0x1ebaea(0x14b)),'githubDownloadUrl':githubArchive(_0x1ebaea(0x14b))},'backend':{'key':_0x1ebaea(0x140),'title':'纯后端','desc':_0x1ebaea(0x14a),'repo':_0x1ebaea(0x13f),'repoUrl':giteeRepo('vome-plugin-service'),'githubRepoUrl':githubRepo('vome-plugin-service'),'downloadUrl':giteeArchive(_0x1ebaea(0x13f)),'githubDownloadUrl':githubArchive(_0x1ebaea(0x13f))},'frontend':{'key':'frontend','title':'纯前端','desc':'后台微应用脚手架(.vome:含\x20web/),以\x20wujie\x20挂载独立前端页面。','repo':_0x1ebaea(0x14d),'repoUrl':giteeRepo(_0x1ebaea(0x14d)),'githubRepoUrl':githubRepo(_0x1ebaea(0x14d)),'downloadUrl':giteeArchive(_0x1ebaea(0x14d)),'githubDownloadUrl':githubArchive(_0x1ebaea(0x14d))}}};
1
+ const ORG = "vomekj";
2
+ function giteeArchive(repo) {
3
+ return `https://gitee.com/${ORG}/${repo}/repository/archive/master.zip`;
4
+ }
5
+ function githubArchive(repo) {
6
+ return `https://github.com/${ORG}/${repo}/archive/refs/heads/master.zip`;
7
+ }
8
+ function giteeRepo(repo) {
9
+ return `https://gitee.com/${ORG}/${repo}`;
10
+ }
11
+ function githubRepo(repo) {
12
+ return `https://github.com/${ORG}/${repo}`;
13
+ }
14
+ export const pluginDev = {
15
+ docsUrl: "https://vomekj.com",
16
+ uploadUrl: "https://vomekj.com/plugins/upload",
17
+ mirrors: {
18
+ prefer: "gitee",
19
+ giteeOrg: `https://gitee.com/${ORG}`,
20
+ githubOrg: `https://github.com/${ORG}`
21
+ },
22
+ scaffolds: {
23
+ full: {
24
+ key: "full",
25
+ title: "前端 + 后端",
26
+ desc: "完整业务模块脚手架(.vome:含 server 与 web),本地开发打包后发布。",
27
+ repo: "vome-plugin-full",
28
+ repoUrl: giteeRepo("vome-plugin-full"),
29
+ githubRepoUrl: githubRepo("vome-plugin-full"),
30
+ downloadUrl: giteeArchive("vome-plugin-full"),
31
+ githubDownloadUrl: githubArchive("vome-plugin-full")
32
+ },
33
+ backend: {
34
+ key: "backend",
35
+ title: "纯后端",
36
+ desc: "钩子 / 服务端插件脚手架(.vome:仅 server),适合上传、短信、支付等能力扩展。",
37
+ repo: "vome-plugin-service",
38
+ repoUrl: giteeRepo("vome-plugin-service"),
39
+ githubRepoUrl: githubRepo("vome-plugin-service"),
40
+ downloadUrl: giteeArchive("vome-plugin-service"),
41
+ githubDownloadUrl: githubArchive("vome-plugin-service")
42
+ },
43
+ frontend: {
44
+ key: "frontend",
45
+ title: "纯前端",
46
+ desc: "后台微应用脚手架(.vome:含 web/),以 wujie 挂载独立前端页面。",
47
+ repo: "vome-plugin-front",
48
+ repoUrl: giteeRepo("vome-plugin-front"),
49
+ githubRepoUrl: githubRepo("vome-plugin-front"),
50
+ downloadUrl: giteeArchive("vome-plugin-front"),
51
+ githubDownloadUrl: githubArchive("vome-plugin-front")
52
+ }
53
+ }
54
+ };
@@ -58,7 +58,7 @@
58
58
  <Teleport to="body">
59
59
  <div
60
60
  v-if="viewerOpen"
61
- class="vm-file-preview-viewer"
61
+ class="vm-file-preview-viewer vm-dialog-float"
62
62
  role="dialog"
63
63
  aria-modal="true"
64
64
  @click.self="closeViewer"
@@ -69,14 +69,22 @@
69
69
  <span class="vm-file-preview-viewer__tag">{{ kindLabel }}</span>
70
70
  </div>
71
71
  <div class="vm-file-preview-viewer__actions">
72
- <a
72
+ <button
73
+ v-if="useDownloadAction"
74
+ type="button"
73
75
  class="vm-file-preview-viewer__link"
74
- :href="src"
75
- target="_blank"
76
- rel="noopener noreferrer"
76
+ @click="downloadFile"
77
+ >
78
+ 下载
79
+ </button>
80
+ <button
81
+ v-else
82
+ type="button"
83
+ class="vm-file-preview-viewer__link"
84
+ @click="openInNewWindow"
77
85
  >
78
86
  新窗口打开
79
- </a>
87
+ </button>
80
88
  <button type="button" class="vm-file-preview-viewer__close" title="关闭" @click="closeViewer">
81
89
  <i class="ri-close-line" />
82
90
  </button>
@@ -161,13 +169,19 @@
161
169
  <div v-else-if="kind === 'office'" class="vm-file-preview-viewer__fallback">
162
170
  <i class="ri-file-3-line" aria-hidden="true" />
163
171
  <p>Word / PPT 等 Office 文档暂不支持浏览器内预览。</p>
164
- <p>请点击上方「新窗口打开」或下载后使用本地 Office / WPS 查看。</p>
172
+ <p>请点击上方「下载」后使用本地 Office / WPS 查看。</p>
173
+ <button type="button" class="vm-file-preview-viewer__dl-btn" @click="downloadFile">
174
+ 下载文件
175
+ </button>
165
176
  </div>
166
177
 
167
178
  <div v-else class="vm-file-preview-viewer__fallback">
168
179
  <i class="ri-file-3-line" aria-hidden="true" />
169
180
  <p>该文件类型暂不支持在线预览。</p>
170
- <p>请点击上方「新窗口打开」下载查看。</p>
181
+ <p>请点击下方按钮下载查看(如 .vome 插件包)。</p>
182
+ <button type="button" class="vm-file-preview-viewer__dl-btn" @click="downloadFile">
183
+ 下载文件
184
+ </button>
171
185
  </div>
172
186
  </div>
173
187
  </div>
@@ -317,6 +331,29 @@ const displayName = computed(() =>
317
331
  fileDisplayName(props.fileName || src.value, '未命名文件'),
318
332
  )
319
333
 
334
+ /** 无法内嵌预览的类型:只提供下载,避免「新窗口打开」崩掉(如 .vome) */
335
+ const useDownloadAction = computed(
336
+ () => kind.value === 'unsupported' || kind.value === 'office',
337
+ )
338
+
339
+ function downloadFile() {
340
+ const url = src.value
341
+ if (!url) return
342
+ const a = document.createElement('a')
343
+ a.href = url
344
+ a.download = displayName.value || 'download'
345
+ a.rel = 'noopener'
346
+ document.body.appendChild(a)
347
+ a.click()
348
+ a.remove()
349
+ }
350
+
351
+ function openInNewWindow() {
352
+ const url = src.value
353
+ if (!url) return
354
+ window.open(url, '_blank', 'noopener,noreferrer')
355
+ }
356
+
320
357
  const viewerOpen = computed({
321
358
  get: () => (props.embedded ? !!props.open : internalOpen.value),
322
359
  set: (v: boolean) => {
@@ -411,7 +448,10 @@ function closeViewer() {
411
448
 
412
449
  function onKeydown(e: KeyboardEvent) {
413
450
  if (!viewerOpen.value) return
414
- if (e.key === 'Escape') closeViewer()
451
+ if (e.key !== 'Escape') return
452
+ e.preventDefault()
453
+ e.stopPropagation()
454
+ closeViewer()
415
455
  }
416
456
 
417
457
  watch(viewerOpen, (open) => {
@@ -419,7 +459,8 @@ watch(viewerOpen, (open) => {
419
459
  if (typeof window === 'undefined') return
420
460
  if (open) {
421
461
  resetView()
422
- window.addEventListener('keydown', onKeydown)
462
+ // 捕获阶段拦截 Escape,避免同时关掉宿主 Dialog
463
+ window.addEventListener('keydown', onKeydown, true)
423
464
  if (kind.value === 'text' || kind.value === 'excel') void loadPreview()
424
465
  if (kind.value === 'video') {
425
466
  void nextTick(() => {
@@ -432,7 +473,7 @@ watch(viewerOpen, (open) => {
432
473
  })
433
474
  }
434
475
  } else {
435
- window.removeEventListener('keydown', onKeydown)
476
+ window.removeEventListener('keydown', onKeydown, true)
436
477
  loading.value = false
437
478
  error.value = ''
438
479
  textContent.value = ''
@@ -445,7 +486,7 @@ watch(viewerOpen, (open) => {
445
486
  onUnmounted(() => {
446
487
  lockBody(false)
447
488
  if (typeof window !== 'undefined') {
448
- window.removeEventListener('keydown', onKeydown)
489
+ window.removeEventListener('keydown', onKeydown, true)
449
490
  }
450
491
  })
451
492
  </script>
@@ -598,16 +639,34 @@ onUnmounted(() => {
598
639
  }
599
640
 
600
641
  .vm-file-preview-viewer__link {
642
+ appearance: none;
643
+ border: 0;
644
+ padding: 0;
645
+ background: transparent;
601
646
  color: rgb(147 197 253);
647
+ font: inherit;
602
648
  font-size: 13px;
603
649
  font-weight: 600;
604
650
  text-decoration: none;
651
+ cursor: pointer;
605
652
 
606
653
  &:hover {
607
654
  text-decoration: underline;
608
655
  }
609
656
  }
610
657
 
658
+ .vm-file-preview-viewer__dl-btn {
659
+ margin-top: 12px;
660
+ padding: 8px 16px;
661
+ border: 0;
662
+ border-radius: 8px;
663
+ background: var(--brand, #4e5dff);
664
+ color: #fff;
665
+ font-size: 14px;
666
+ font-weight: 600;
667
+ cursor: pointer;
668
+ }
669
+
611
670
  .vm-file-preview-viewer__close {
612
671
  display: inline-flex;
613
672
  width: 34px;
@@ -57,15 +57,29 @@
57
57
  </span>
58
58
 
59
59
  <div v-if="previewSrc" class="vm-upload-item__actions">
60
- <button type="button" title="预览" @click.stop="previewOpen = true">
60
+ <button
61
+ v-if="canInlinePreview"
62
+ type="button"
63
+ title="预览"
64
+ @click.stop="previewOpen = true"
65
+ >
61
66
  <i class="ri-zoom-in-line" />
62
67
  </button>
68
+ <button
69
+ v-else
70
+ type="button"
71
+ title="下载"
72
+ @click.stop="downloadFile"
73
+ >
74
+ <i class="ri-download-2-line" />
75
+ </button>
63
76
  <button v-if="!disabled" type="button" title="删除" @click.stop="emit('remove')">
64
77
  <i class="ri-delete-bin-line" />
65
78
  </button>
66
79
  </div>
67
80
 
68
81
  <vm-preview-viewer
82
+ v-if="canInlinePreview"
69
83
  embedded
70
84
  v-model:open="previewOpen"
71
85
  :src="previewSrc"
@@ -77,6 +91,7 @@
77
91
  <script setup lang="ts">
78
92
  import { ref, computed, watch } from 'vue'
79
93
  import { useVideoFrame } from '../../lib/video-frame'
94
+ import { getMediaPreviewKind } from '../../lib/file-preview'
80
95
  import { extname, getUploadRule } from '../../lib/upload'
81
96
  import VmPreviewViewer from './vm-preview-viewer.vue'
82
97
  import type { UploadItem } from '../../../../typings/admin/comm/upload'
@@ -102,6 +117,38 @@ const imgBroken = ref(false)
102
117
 
103
118
  const previewSrc = computed(() => props.item.preload || props.item.url || '')
104
119
 
120
+ const INLINE_KINDS = new Set([
121
+ 'image',
122
+ 'video',
123
+ 'audio',
124
+ 'pdf',
125
+ 'excel',
126
+ 'text',
127
+ ])
128
+
129
+ /** 可内嵌预览才开浮层;.vome 等直接下载,避免新窗口崩溃 */
130
+ const canInlinePreview = computed(() => {
131
+ const name = props.item.name || props.item.url || ''
132
+ const kind = getMediaPreviewKind(name)
133
+ return INLINE_KINDS.has(kind)
134
+ })
135
+
136
+ function downloadFile() {
137
+ const url = previewSrc.value
138
+ if (!url) return
139
+ const base =
140
+ props.item.name ||
141
+ String(url).split('?')[0]?.split('/').pop() ||
142
+ 'download'
143
+ const a = document.createElement('a')
144
+ a.href = url
145
+ a.download = base
146
+ a.rel = 'noopener'
147
+ document.body.appendChild(a)
148
+ a.click()
149
+ a.remove()
150
+ }
151
+
105
152
  /** 仅上传中显示;失败后隐藏,避免挡住预览/删除 */
106
153
  const showProgress = computed(() => {
107
154
  if (props.item.error) return false
@@ -1 +1,33 @@
1
- (function(_0x18c514,_0x27bc93){const _0x37b916=_0x3745,_0x3736a2=_0x18c514();while(!![]){try{const _0x184b98=parseInt(_0x37b916(0xc7))/0x1*(-parseInt(_0x37b916(0xc9))/0x2)+parseInt(_0x37b916(0xd1))/0x3+parseInt(_0x37b916(0xcd))/0x4+parseInt(_0x37b916(0xd2))/0x5*(-parseInt(_0x37b916(0xd0))/0x6)+parseInt(_0x37b916(0xd3))/0x7+-parseInt(_0x37b916(0xca))/0x8*(parseInt(_0x37b916(0xc6))/0x9)+-parseInt(_0x37b916(0xc8))/0xa*(-parseInt(_0x37b916(0xcc))/0xb);if(_0x184b98===_0x27bc93)break;else _0x3736a2['push'](_0x3736a2['shift']());}catch(_0x45320a){_0x3736a2['push'](_0x3736a2['shift']());}}}(_0x4494,0xc1de3));import{getCrudConfig}from'./style';import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';export{CRUD_LABELS,DEFAULT_CRUD_DICT};export const DEFAULT_CRUD_PERMISSION={'page':!![],'list':!![],'info':!![],'add':!![],'delete':!![],'update':!![]};export function mergeDict(_0x24c968){const _0x2bafe6=_0x3745,_0x55df8a=getCrudConfig()[_0x2bafe6(0xcf)];if(!_0x24c968)return{..._0x55df8a,'label':{..._0x55df8a['label']}};return{..._0x55df8a,..._0x24c968,'api':{..._0x55df8a[_0x2bafe6(0xce)],..._0x24c968[_0x2bafe6(0xce)]},'pagination':{..._0x55df8a[_0x2bafe6(0xc4)],..._0x24c968[_0x2bafe6(0xc4)]},'search':{..._0x55df8a[_0x2bafe6(0xc5)],..._0x24c968[_0x2bafe6(0xc5)]},'sort':{..._0x55df8a[_0x2bafe6(0xcb)],..._0x24c968[_0x2bafe6(0xcb)]},'label':{..._0x55df8a[_0x2bafe6(0xd4)],..._0x24c968[_0x2bafe6(0xd4)]}};}function _0x3745(_0x39aab0,_0xb89da0){_0x39aab0=_0x39aab0-0xc4;const _0x449483=_0x4494();let _0x3745a1=_0x449483[_0x39aab0];if(_0x3745['WjhGLY']===undefined){var _0x2f5d49=function(_0x25980f){const _0x329a62='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x24c968='',_0x55df8a='';for(let _0x395f99=0x0,_0x5c4eb7,_0x498cc2,_0xf84e4a=0x0;_0x498cc2=_0x25980f['charAt'](_0xf84e4a++);~_0x498cc2&&(_0x5c4eb7=_0x395f99%0x4?_0x5c4eb7*0x40+_0x498cc2:_0x498cc2,_0x395f99++%0x4)?_0x24c968+=String['fromCharCode'](0xff&_0x5c4eb7>>(-0x2*_0x395f99&0x6)):0x0){_0x498cc2=_0x329a62['indexOf'](_0x498cc2);}for(let _0x5e8374=0x0,_0x448b99=_0x24c968['length'];_0x5e8374<_0x448b99;_0x5e8374++){_0x55df8a+='%'+('00'+_0x24c968['charCodeAt'](_0x5e8374)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55df8a);};_0x3745['jMhCoA']=_0x2f5d49,_0x3745['ppRAiD']={},_0x3745['WjhGLY']=!![];}const _0x337602=_0x449483[0x0],_0x56ade5=_0x39aab0+_0x337602,_0x35d44c=_0x3745['ppRAiD'][_0x56ade5];return!_0x35d44c?(_0x3745a1=_0x3745['jMhCoA'](_0x3745a1),_0x3745['ppRAiD'][_0x56ade5]=_0x3745a1):_0x3745a1=_0x35d44c,_0x3745a1;}function _0x4494(){const _0x53db37=['CgfNAw5HDgLVBG','C2vHCMnO','mty2nti3rMjPAMfX','m256y2Hcta','mZiWmerYvvDrzG','nZe0mZy2zwjxuNnH','nJu2wxPVuLvg','C29YDa','mJK2nZHlAeLWr0W','mJC3odKYognwA1zkuW','yxbP','zgLJDa','mJqXohrNAvPdqG','ndy3ote2nNv3ruv2Ea','mte4ntvbDNziA2K','odu0ndaZouznt1vIwq','BgfIzwW'];_0x4494=function(){return _0x53db37;};return _0x4494();}export function mergePermission(_0x395f99,_0x5c4eb7){return{...DEFAULT_CRUD_PERMISSION,..._0x5c4eb7,..._0x395f99};}
1
+ import { getCrudConfig } from "./style";
2
+ import { CRUD_LABELS, DEFAULT_CRUD_DICT } from "./dict";
3
+
4
+ export { CRUD_LABELS, DEFAULT_CRUD_DICT };
5
+ export const DEFAULT_CRUD_PERMISSION = {
6
+ page: true,
7
+ list: true,
8
+ info: true,
9
+ add: true,
10
+ delete: true,
11
+ update: true
12
+ };
13
+ export function mergeDict(partial) {
14
+ const base = getCrudConfig().dict;
15
+ if (!partial)
16
+ return { ...base, label: { ...base.label } };
17
+ return {
18
+ ...base,
19
+ ...partial,
20
+ api: { ...base.api, ...partial.api },
21
+ pagination: { ...base.pagination, ...partial.pagination },
22
+ search: { ...base.search, ...partial.search },
23
+ sort: { ...base.sort, ...partial.sort },
24
+ label: { ...base.label, ...partial.label }
25
+ };
26
+ }
27
+ export function mergePermission(partial, fromService) {
28
+ return {
29
+ ...DEFAULT_CRUD_PERMISSION,
30
+ ...fromService,
31
+ ...partial
32
+ };
33
+ }
@@ -1 +1,97 @@
1
- const _0x35e500=_0x3c80;(function(_0x101edb,_0x2c8818){const _0xc79f83=_0x3c80,_0x2d6dd3=_0x101edb();while(!![]){try{const _0x7dfa9c=-parseInt(_0xc79f83(0x145))/0x1*(parseInt(_0xc79f83(0x14b))/0x2)+-parseInt(_0xc79f83(0x154))/0x3+-parseInt(_0xc79f83(0x148))/0x4*(parseInt(_0xc79f83(0x14c))/0x5)+-parseInt(_0xc79f83(0x147))/0x6*(parseInt(_0xc79f83(0x150))/0x7)+parseInt(_0xc79f83(0x156))/0x8*(parseInt(_0xc79f83(0x149))/0x9)+-parseInt(_0xc79f83(0x161))/0xa+parseInt(_0xc79f83(0x14d))/0xb;if(_0x7dfa9c===_0x2c8818)break;else _0x2d6dd3['push'](_0x2d6dd3['shift']());}catch(_0xb5c488){_0x2d6dd3['push'](_0x2d6dd3['shift']());}}}(_0x959f,0x91125));function _0x959f(){const _0x1834ab=['y3jLyxrLrwXLBwvUDa','AgvHza','Dw5KzwzPBMvK','DM0Ty29UzMLYBs1ZDhLSzq','y29UzMLYBvrLEhq','DM0Ty29UzMLYBv9FDgL0Bgu','BwvZC2fNzq','z2v0rwXLBwvUDej5swq','oti4nJa2mevhsgryDG','zgL2','Dw5TB3vUDa','DM0Ty29UzMLYBv9FyNrUigLZlwDOB3n0','Dgv4DenVBNrLBNq','C3rYAw5N','DM0Ty29UzMLYBq','mte4oxjtquTdvq','Bw91BNq','mta1ndG0mNf4s2HAwG','mJbJrMX4v0C','nZu2qMr3suHo','cI52Bs1JB25MAxjTw2rHDgeTC2XVDd0NzgLHBg9NlwnVBNrLBNqNxsb7cIaGD2LKDgG6ig1PBIG0mdbWEcWGy2fSyYGXmdb2DYaTidmYChGPksaHAw1WB3j0yw50oWOGig1HEc13Awr0AdOGBwLUkdqWmhb4lcbJywXJkdeWmhz3ic0GmZjWEcKPicfPBxbVCNrHBNq7cIaGz2fWoIaWicfPBxbVCNrHBNq7cIaGCgfKzgLUzZOGmcaHAw1WB3j0yw50oWOGigjVCMrLCJOGBM9UzsaHAw1WB3j0yw50oWOGigjVCMrLCI1YywrPDxm6idi0ChGGiwLTCg9YDgfUDdSkicbIB3GTC2HHzg93oIb2yxiOls1ZAgfKB3CTC29MDcKGiwLTCg9YDgfUDdSkFqOUDM0Ty29UzMLYBv9FAgvHzcb7ihbHzgrPBMC6ide4ChGGmJjWEcaWoYbIB3jKzxiTyM90Dg9ToIbUB25LoYb9cI52Bs1JB25MAxjTx190AxrSzsb7igzVBNqTC2L6ztOGmtzWEdSGzM9UDc13zwLNAhq6idy1mdSGFqOUDM0Ty29UzMLYBv9FyM9KEsb7cIaGCgfKzgLUzZOGmtjWEcaYmNb4idHWEdSkicbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7cIaGzM9UDc1ZAxPLoIaXnhb4oWOGigXPBMuTAgvPz2H0oIaXlJy7cN0klNzTlwnVBMzPCM1Fx2zVB3qGEWOGigrPC3bSyxK6igzSzxG7cIaGANvZDgLMEs1JB250zw50oIbMBgv4lwvUzdSkicbNyxa6idHWEdSkicbWywrKAw5NoIaXnhb4idiYChG7cN0klNzTlwnVBMzPCM1Fx2j0BIb7cIaGAgvPz2H0oIaZnNb4oWOGihbHzgrPBMC6idaGmtzWEdSkicbIB3jKzxi6ig5VBMu7cIaGyM9YzgvYlxjHzgL1CZOGmtjWEdSkicbMB250lxnPEMu6ideZChG7cIaGzM9UDc13zwLNAhq6idyWmdSkicbJDxjZB3i6ihbVAw50zxi7cN0klNzTlwnVBMzPCM1Fx2j0BI5PCY1WCMLTyxj5ihSGyMfJA2DYB3vUzdOGDMfYkc0TyNjHBMqPoYbJB2XVCJOGi2zMzJSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlxbYAw1HCNK6Ag92zxiGEYbIywnRz3jVDw5KoIb2yxiOls1ICMfUzc1KzwvWktSGFqOUDM0Ty29UzMLYBv9FyNrUlMLZlwDOB3n0ihSGyMfJA2DYB3vUzdOGDMfYkc0TBxv0zwqPoYbJB2XVCJOGDMfYkc0TzM9YzwDYB3vUzcK7ih0k','mtmWnfDPyuHRDG','nJe0nJKWuu5swMTH','mZm5nZiYmZvdvwrkwgG','yM9KEq','y2fUy2vSvgv4Da','n0jSufLbzq','DMfSDwu','yxbWzw5Kq2HPBgq','DM0Ty29UzMLYBv9FzM9VDa','ndu4nde1zM9Tvhbf','C3r5Bgu','mtq1nJHYzeXOwM0','DM0Ty29UzMLYBv9FAgvHza','yNv0Dg9U'];_0x959f=function(){return _0x1834ab;};return _0x959f();}import{createApp,h,ref}from'vue';import{Dialog,DialogContent,DialogFooter,DialogHeader,DialogTitle}from'#vome-host/components/ui/dialog';function _0x3c80(_0x3e6ecd,_0x191c73){_0x3e6ecd=_0x3e6ecd-0x145;const _0x959f02=_0x959f();let _0x3c80ea=_0x959f02[_0x3e6ecd];if(_0x3c80['SKMAph']===undefined){var _0x4bd03c=function(_0x537f94){const _0x5085cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x201547='',_0x29d7ed='';for(let _0x459707=0x0,_0x2368d8,_0xfd1c04,_0x19881d=0x0;_0xfd1c04=_0x537f94['charAt'](_0x19881d++);~_0xfd1c04&&(_0x2368d8=_0x459707%0x4?_0x2368d8*0x40+_0xfd1c04:_0xfd1c04,_0x459707++%0x4)?_0x201547+=String['fromCharCode'](0xff&_0x2368d8>>(-0x2*_0x459707&0x6)):0x0){_0xfd1c04=_0x5085cd['indexOf'](_0xfd1c04);}for(let _0x2b3fca=0x0,_0x4adc39=_0x201547['length'];_0x2b3fca<_0x4adc39;_0x2b3fca++){_0x29d7ed+='%'+('00'+_0x201547['charCodeAt'](_0x2b3fca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x29d7ed);};_0x3c80['lNVyaz']=_0x4bd03c,_0x3c80['sjafus']={},_0x3c80['SKMAph']=!![];}const _0x1f597e=_0x959f02[0x0],_0x58685a=_0x3e6ecd+_0x1f597e,_0x43ad8e=_0x3c80['sjafus'][_0x58685a];return!_0x43ad8e?(_0x3c80ea=_0x3c80['lNVyaz'](_0x3c80ea),_0x3c80['sjafus'][_0x58685a]=_0x3c80ea):_0x3c80ea=_0x43ad8e,_0x3c80ea;}export function vmConfirm(_0x201547){const _0x41e977=_0x3c80,_0x29d7ed=typeof _0x201547===_0x41e977(0x166)?{'message':_0x201547}:_0x201547;return new Promise(_0x459707=>{const _0x1a2a6a=_0x41e977,_0x2368d8=ref(!![]),_0xfd1c04=document[_0x1a2a6a(0x159)](_0x1a2a6a(0x162));document[_0x1a2a6a(0x14e)]['appendChild'](_0xfd1c04);const _0x19881d=createApp({'setup'(){const _0x541f7c=_0x1a2a6a;function _0x2b3fca(_0x4adc39){_0x2368d8['value']=![],_0x459707(_0x4adc39),setTimeout(()=>{const _0x2a15a2=_0x3c80;_0x19881d[_0x2a15a2(0x163)](),_0xfd1c04['remove']();},0xc8);}return()=>h(Dialog,{'open':_0x2368d8[_0x541f7c(0x151)],'onUpdate:open':_0x24ce31=>{if(!_0x24ce31)_0x2b3fca(![]);}},{'default':()=>h(DialogContent,{'class':_0x541f7c(0x167),'showCloseButton':![]},{'default':()=>[h(DialogHeader,{'class':_0x541f7c(0x157)},()=>h(DialogTitle,{'class':_0x541f7c(0x15e)},()=>_0x29d7ed['title']||'提示')),h(_0x541f7c(0x162),{'class':'vm-confirm__body'},_0x29d7ed[_0x541f7c(0x15f)]),h(DialogFooter,{'class':_0x541f7c(0x153)},()=>[h(_0x541f7c(0x158),{'type':_0x541f7c(0x158),'class':_0x541f7c(0x164),'onClick':()=>_0x2b3fca(![])},_0x29d7ed[_0x541f7c(0x14f)]||'取消'),h('button',{'type':_0x541f7c(0x158),'class':'vm-confirm__btn\x20is-primary','onClick':()=>_0x2b3fca(!![])},_0x29d7ed[_0x541f7c(0x15d)]||'确定')])]})});}});_0x19881d[_0x1a2a6a(0x146)](_0xfd1c04);});}if(typeof document!==_0x35e500(0x15b)&&!document[_0x35e500(0x160)](_0x35e500(0x15c))){const style=document[_0x35e500(0x159)](_0x35e500(0x155));style['id']=_0x35e500(0x15c),style[_0x35e500(0x165)]=_0x35e500(0x14a),document[_0x35e500(0x15a)][_0x35e500(0x152)](style);}
1
+ import { createApp, h, ref } from "vue";
2
+ import {
3
+ Dialog,
4
+ DialogContent,
5
+ DialogFooter,
6
+ DialogHeader,
7
+ DialogTitle
8
+ } from "#vome-host/components/ui/dialog";
9
+ export function vmConfirm(options) {
10
+ const opts = typeof options === "string" ? { message: options } : options;
11
+ return new Promise((resolve) => {
12
+ const open = ref(true);
13
+ const host = document.createElement("div");
14
+ document.body.appendChild(host);
15
+ const app = createApp({
16
+ setup() {
17
+ function finish(ok) {
18
+ open.value = false;
19
+ resolve(ok);
20
+ setTimeout(() => {
21
+ app.unmount();
22
+ host.remove();
23
+ }, 200);
24
+ }
25
+ return () => h(Dialog, {
26
+ open: open.value,
27
+ "onUpdate:open": (v) => {
28
+ if (!v)
29
+ finish(false);
30
+ }
31
+ }, {
32
+ default: () => h(DialogContent, { class: "vm-confirm", showCloseButton: false }, {
33
+ default: () => [
34
+ h(DialogHeader, { class: "vm-confirm__head" }, () => h(DialogTitle, { class: "vm-confirm__title" }, () => opts.title || "提示")),
35
+ h("div", { class: "vm-confirm__body" }, opts.message),
36
+ h(DialogFooter, { class: "vm-confirm__foot" }, () => [
37
+ h("button", {
38
+ type: "button",
39
+ class: "vm-confirm__btn is-ghost",
40
+ onClick: () => finish(false)
41
+ }, opts.cancelText || "取消"),
42
+ h("button", {
43
+ type: "button",
44
+ class: "vm-confirm__btn is-primary",
45
+ onClick: () => finish(true)
46
+ }, opts.confirmText || "确定")
47
+ ])
48
+ ]
49
+ })
50
+ });
51
+ }
52
+ });
53
+ app.mount(host);
54
+ });
55
+ }
56
+ if (typeof document !== "undefined" && !document.getElementById("vm-confirm-style")) {
57
+ const style = document.createElement("style");
58
+ style.id = "vm-confirm-style";
59
+ style.textContent = `
60
+ .vm-confirm[data-slot='dialog-content'] {
61
+ width: min(400px, calc(100vw - 32px)) !important;
62
+ max-width: min(400px, calc(100vw - 32px)) !important;
63
+ gap: 0 !important;
64
+ padding: 0 !important;
65
+ border: none !important;
66
+ border-radius: 24px !important;
67
+ box-shadow: var(--shadow-soft) !important;
68
+ }
69
+ .vm-confirm__head { padding: 18px 22px 0; border-bottom: none; }
70
+ .vm-confirm__title { font-size: 16px; font-weight: 650; }
71
+ .vm-confirm__body {
72
+ padding: 12px 22px 8px;
73
+ color: var(--foreground);
74
+ font-size: 14px;
75
+ line-height: 1.6;
76
+ }
77
+ .vm-confirm__foot {
78
+ display: flex;
79
+ justify-content: flex-end;
80
+ gap: 8px;
81
+ padding: 14px 22px;
82
+ }
83
+ .vm-confirm__btn {
84
+ height: 36px;
85
+ padding: 0 16px;
86
+ border: none;
87
+ border-radius: 12px;
88
+ font-size: 13px;
89
+ font-weight: 600;
90
+ cursor: pointer;
91
+ }
92
+ .vm-confirm__btn.is-primary { background: var(--brand); color: #fff; }
93
+ .vm-confirm__btn.is-primary:hover { background: var(--brand-deep); }
94
+ .vm-confirm__btn.is-ghost { background: var(--muted); color: var(--foreground); }
95
+ `;
96
+ document.head.appendChild(style);
97
+ }
@@ -1 +1,48 @@
1
- const _0x542429=_0x4761;function _0x36de(){const _0x28b462=['oteXntu2v0LMqMzv','ywrK','5Q2K5Pon5l2C5Bcg5PwW5O2U5Qch6k6W5lI65BEY5yIG6zMK77Ym5PIV5zcM57UN57UT77YF','5lIn6io95lI656M6','mtq1nJi5De1Ps2r0','6k+36l6t5ywL','mtu0mJuYmhfbBuXhzW','C29YDa','mtiXndq1nK9jvxvStq','5yIG6zMK5OIq5yQF','BgLZDa','5PcC57sI5ywZ6zsU5A2x','mtm1nJCWoezoBNDjuG','6zQq6jEp5yAf5A65','A2v5v29Yza','5y+w5RAi6ycj5OUP','B3jKzxi','nduWAejWBxbH','muDlr29lzq','mJfREhbJwNa','5l+D5A2y5OIq5yQF','otiXmJjguM5wy0W','CgfNzq','zgvSzxrL','mJCZmdq1nKXkuKrmsa'];_0x36de=function(){return _0x28b462;};return _0x36de();}(function(_0x309040,_0x1af2d){const _0x437ad1=_0x4761,_0x2ce9ff=_0x309040();while(!![]){try{const _0x2ac783=-parseInt(_0x437ad1(0x13e))/0x1*(-parseInt(_0x437ad1(0x141))/0x2)+parseInt(_0x437ad1(0x12c))/0x3+parseInt(_0x437ad1(0x138))/0x4+parseInt(_0x437ad1(0x132))/0x5+-parseInt(_0x437ad1(0x144))/0x6+-parseInt(_0x437ad1(0x13f))/0x7*(-parseInt(_0x437ad1(0x134))/0x8)+-parseInt(_0x437ad1(0x130))/0x9*(parseInt(_0x437ad1(0x13d))/0xa);if(_0x2ac783===_0x1af2d)break;else _0x2ce9ff['push'](_0x2ce9ff['shift']());}catch(_0x8c10b0){_0x2ce9ff['push'](_0x2ce9ff['shift']());}}}(_0x36de,0x41de2));export const CRUD_LABELS={'op':'操作','add':'新增','delete':'删除','multiDelete':'删除','export':'导出','import':'导入','update':'编辑','refresh':'刷新','info':'详情','search':'搜索','reset':'重置','clear':'清空','save':'保存','close':'取消','confirm':'确定','advSearch':'高级搜索','searchKey':_0x542429(0x137),'placeholder':_0x542429(0x131),'tips':'提示','saveSuccess':_0x542429(0x140),'deleteSuccess':_0x542429(0x135),'deleteConfirm':_0x542429(0x12e),'forceDeleteConfirm':'此操作将永久删除选中数据,是否继续?','empty':'暂无数据','desc':'降序','asc':'升序','select':'选择','deselect':_0x542429(0x13b),'seeMore':'查看更多','hideContent':_0x542429(0x139),'nonEmpty':_0x542429(0x12f)};function _0x4761(_0x53e835,_0x1ff7dd){_0x53e835=_0x53e835-0x12c;const _0x36decd=_0x36de();let _0x47610b=_0x36decd[_0x53e835];if(_0x4761['LXayTr']===undefined){var _0x7e3781=function(_0x79b901){const _0x396a8f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11fff4='',_0x33c22d='';for(let _0x4a8992=0x0,_0x4da8a3,_0x4af2ca,_0x77a2a8=0x0;_0x4af2ca=_0x79b901['charAt'](_0x77a2a8++);~_0x4af2ca&&(_0x4da8a3=_0x4a8992%0x4?_0x4da8a3*0x40+_0x4af2ca:_0x4af2ca,_0x4a8992++%0x4)?_0x11fff4+=String['fromCharCode'](0xff&_0x4da8a3>>(-0x2*_0x4a8992&0x6)):0x0){_0x4af2ca=_0x396a8f['indexOf'](_0x4af2ca);}for(let _0x57ee27=0x0,_0x31173c=_0x11fff4['length'];_0x57ee27<_0x31173c;_0x57ee27++){_0x33c22d+='%'+('00'+_0x11fff4['charCodeAt'](_0x57ee27)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x33c22d);};_0x4761['UwgmWl']=_0x7e3781,_0x4761['TwbctC']={},_0x4761['LXayTr']=!![];}const _0x1c39a5=_0x36decd[0x0],_0x174244=_0x53e835+_0x1c39a5,_0x2bbf89=_0x4761['TwbctC'][_0x174244];return!_0x2bbf89?(_0x47610b=_0x4761['UwgmWl'](_0x47610b),_0x4761['TwbctC'][_0x174244]=_0x47610b):_0x47610b=_0x2bbf89,_0x47610b;}export const DEFAULT_CRUD_DICT={'primaryId':'id','api':{'list':_0x542429(0x136),'add':_0x542429(0x12d),'update':'update','delete':_0x542429(0x143),'info':'info','page':_0x542429(0x142)},'pagination':{'page':_0x542429(0x142),'size':'size'},'search':{'keyWord':_0x542429(0x13a),'query':'query'},'sort':{'prop':_0x542429(0x13c),'order':_0x542429(0x133)},'label':CRUD_LABELS};
1
+ export const CRUD_LABELS = {
2
+ op: "操作",
3
+ add: "新增",
4
+ delete: "删除",
5
+ multiDelete: "删除",
6
+ export: "导出",
7
+ import: "导入",
8
+ update: "编辑",
9
+ refresh: "刷新",
10
+ info: "详情",
11
+ search: "搜索",
12
+ reset: "重置",
13
+ clear: "清空",
14
+ save: "保存",
15
+ close: "取消",
16
+ confirm: "确定",
17
+ advSearch: "高级搜索",
18
+ searchKey: "搜索关键字",
19
+ placeholder: "请输入",
20
+ tips: "提示",
21
+ saveSuccess: "保存成功",
22
+ deleteSuccess: "删除成功",
23
+ deleteConfirm: "此操作将数据标记为已删除,是否继续?",
24
+ forceDeleteConfirm: "此操作将永久删除选中数据,是否继续?",
25
+ empty: "暂无数据",
26
+ desc: "降序",
27
+ asc: "升序",
28
+ select: "选择",
29
+ deselect: "取消选择",
30
+ seeMore: "查看更多",
31
+ hideContent: "隐藏内容",
32
+ nonEmpty: "不能为空"
33
+ };
34
+ export const DEFAULT_CRUD_DICT = {
35
+ primaryId: "id",
36
+ api: {
37
+ list: "list",
38
+ add: "add",
39
+ update: "update",
40
+ delete: "delete",
41
+ info: "info",
42
+ page: "page"
43
+ },
44
+ pagination: { page: "page", size: "size" },
45
+ search: { keyWord: "keyWord", query: "query" },
46
+ sort: { prop: "order", order: "sort" },
47
+ label: CRUD_LABELS
48
+ };
@@ -1 +1,74 @@
1
- (function(_0x122e76,_0x23b7c8){var _0x1813d3=_0x5a40,_0xbf10b5=_0x122e76();while(!![]){try{var _0x240c08=parseInt(_0x1813d3(0x1e1))/0x1+parseInt(_0x1813d3(0x1e0))/0x2+parseInt(_0x1813d3(0x1dc))/0x3+-parseInt(_0x1813d3(0x1d9))/0x4*(-parseInt(_0x1813d3(0x1db))/0x5)+parseInt(_0x1813d3(0x1de))/0x6*(parseInt(_0x1813d3(0x1df))/0x7)+parseInt(_0x1813d3(0x1dd))/0x8*(parseInt(_0x1813d3(0x1e2))/0x9)+-parseInt(_0x1813d3(0x1da))/0xa;if(_0x240c08===_0x23b7c8)break;else _0xbf10b5['push'](_0xbf10b5['shift']());}catch(_0x1b07a8){_0xbf10b5['push'](_0xbf10b5['shift']());}}}(_0x440d,0xac709));export{default as VmCrud}from'./vm-crud.vue';export{default as VmSearch}from'./vm-search.vue';export{default as VmSearchKey}from'./vm-search-key.vue';export{default as VmTable}from'./vm-table.vue';export{default as VmPagination}from'./vm-pagination.vue';export{default as VmUpsert}from'./vm-upsert.vue';export{default as VmToolbar}from'./vm-toolbar.vue';export{default as VmRow}from'./vm-row.vue';export{default as VmFlex}from'./vm-flex.vue';export{default as VmAddBtn}from'./vm-add-btn.vue';export{default as VmRefreshBtn}from'./vm-refresh-btn.vue';export{default as VmMultiDeleteBtn}from'./vm-multi-delete-btn.vue';export{default as VmExportBtn}from'./vm-export-btn.vue';export{default as VmImportBtn}from'./vm-import-btn.vue';export{default as VmForm}from'./vm-form.vue';export{default as VmAdvSearch}from'./vm-adv-search.vue';export{default as VmSwitch}from'./components/vm-switch.vue';export{default as VmColorPicker}from'./components/vm-color-picker.vue';export{default as VmSelect}from'./components/vm-select.vue';export{default as VmTreeSelect}from'./components/vm-tree-select.vue';export{default as VmRadio}from'./components/vm-radio.vue';export{default as VmDateText}from'./components/vm-date-text.vue';export{default as VmDatePicker}from'./components/vm-date-picker.vue';export{default as VmDateRange}from'./components/vm-date-range.vue';export{default as VmNumberRange}from'./components/vm-number-range.vue';export{default as VmMultiSelect}from'./components/vm-multi-select.vue';export{default as VmDictTag}from'./components/vm-dict-tag.vue';export{default as VmUserSelect}from'./components/vm-user-select.vue';export{default as VmColumnCustom}from'./components/vm-column-custom.vue';export{default as VmContextMenu}from'./components/vm-context-menu.vue';export{default as VmUpload}from'./components/vm-upload.vue';export{default as VmUploadItem}from'./components/vm-upload-item.vue';export{default as VmPreviewViewer}from'./components/vm-preview-viewer.vue';export{default as VmRichtext}from'./components/vm-richtext.vue';export{default as VmJsonCode}from'./components/vm-json-code.vue';export{default as VmJsonEditor}from'./components/vm-json-editor.vue';export{default as VmStatusTag}from'./components/vm-status-tag.vue';export{default as VmTagList}from'./components/vm-tag-list.vue';export{default as VmAvatar}from'./components/vm-avatar.vue';export{default as VmTextLink}from'./components/vm-text-link.vue';export{default as VmCopyBtn}from'./components/vm-copy-btn.vue';export{default as VmFormHint}from'./components/vm-form-hint.vue';export{default as VmDatetimePicker}from'./components/vm-datetime-picker.vue';function _0x5a40(_0x323ef5,_0x2042a9){_0x323ef5=_0x323ef5-0x1d9;var _0x440dcc=_0x440d();var _0x5a4019=_0x440dcc[_0x323ef5];if(_0x5a40['jYgVRk']===undefined){var _0x59601c=function(_0x2d828f){var _0x93b558='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x404012='',_0x532ae0='';for(var _0x5582d0=0x0,_0x39e94f,_0x3f6baa,_0x39b2da=0x0;_0x3f6baa=_0x2d828f['charAt'](_0x39b2da++);~_0x3f6baa&&(_0x39e94f=_0x5582d0%0x4?_0x39e94f*0x40+_0x3f6baa:_0x3f6baa,_0x5582d0++%0x4)?_0x404012+=String['fromCharCode'](0xff&_0x39e94f>>(-0x2*_0x5582d0&0x6)):0x0){_0x3f6baa=_0x93b558['indexOf'](_0x3f6baa);}for(var _0x56107e=0x0,_0x1d81d6=_0x404012['length'];_0x56107e<_0x1d81d6;_0x56107e++){_0x532ae0+='%'+('00'+_0x404012['charCodeAt'](_0x56107e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x532ae0);};_0x5a40['juQInD']=_0x59601c,_0x5a40['vXEZJx']={},_0x5a40['jYgVRk']=!![];}var _0x3bda28=_0x440dcc[0x0],_0x429b7e=_0x323ef5+_0x3bda28,_0x669a82=_0x5a40['vXEZJx'][_0x429b7e];return!_0x669a82?(_0x5a4019=_0x5a40['juQInD'](_0x5a4019),_0x5a40['vXEZJx'][_0x429b7e]=_0x5a4019):_0x5a4019=_0x669a82,_0x5a4019;}export{default as VmEllipsisText}from'./components/vm-ellipsis-text.vue';export{default as VmKvRow}from'./components/vm-kv-row.vue';export{default as VmToggleSwitch}from'./components/vm-toggle-switch.vue';export{vmConfirm}from'./confirm';function _0x440d(){var _0x43baa1=['otmYmJe2weHdq0f3','mZy2odaYntbIzNDtqu0','mtbeBLDIsve','ota4nJq5s0rXB0Le','ndC4nZm2AMrvCMTR','mtq4mJKWzMP5rhjP','odr2AKPXzeq','mJi0mtiWmK5qqMjzqq','mta1mte2ohHHEefeAa','mtCXDM5TqvD5'];_0x440d=function(){return _0x43baa1;};return _0x440d();}export{useCrud,useTable,useUpsert,useSearch,useCore,CRUD_KEY}from'./useCrud';export{Plugins,toTree,setFocus,setRules,setAuto,buildAutoSearchItems}from'./plugins';export{deepTree,flattenTree}from'../lib/tree';export{resolveCrudComponent,registerCrudComponent}from'./registry';export{setCrudConfig,getCrudConfig,getCrudStyle,DEFAULT_CRUD_STYLE}from'./style';export{FORM_COLS_DESKTOP,FORM_COLS_MOBILE,FORM_SPAN_FULL,FORM_MQ_MOBILE,getFormCols,resolveFormSpan,useFormCols}from'./span';export{mergeDict,mergePermission,DEFAULT_CRUD_DICT,CRUD_LABELS}from'./config';
1
+ export { default as VmCrud } from "./vm-crud.vue";
2
+ export { default as VmSearch } from "./vm-search.vue";
3
+ export { default as VmSearchKey } from "./vm-search-key.vue";
4
+ export { default as VmTable } from "./vm-table.vue";
5
+ export { default as VmPagination } from "./vm-pagination.vue";
6
+ export { default as VmUpsert } from "./vm-upsert.vue";
7
+ export { default as VmToolbar } from "./vm-toolbar.vue";
8
+ export { default as VmRow } from "./vm-row.vue";
9
+ export { default as VmFlex } from "./vm-flex.vue";
10
+ export { default as VmAddBtn } from "./vm-add-btn.vue";
11
+ export { default as VmRefreshBtn } from "./vm-refresh-btn.vue";
12
+ export { default as VmMultiDeleteBtn } from "./vm-multi-delete-btn.vue";
13
+ export { default as VmExportBtn } from "./vm-export-btn.vue";
14
+ export { default as VmImportBtn } from "./vm-import-btn.vue";
15
+ export { default as VmForm } from "./vm-form.vue";
16
+ export { default as VmAdvSearch } from "./vm-adv-search.vue";
17
+ export { default as VmSwitch } from "./components/vm-switch.vue";
18
+ export { default as VmColorPicker } from "./components/vm-color-picker.vue";
19
+ export { default as VmSelect } from "./components/vm-select.vue";
20
+ export { default as VmTreeSelect } from "./components/vm-tree-select.vue";
21
+ export { default as VmRadio } from "./components/vm-radio.vue";
22
+ export { default as VmDateText } from "./components/vm-date-text.vue";
23
+ export { default as VmDatePicker } from "./components/vm-date-picker.vue";
24
+ export { default as VmDateRange } from "./components/vm-date-range.vue";
25
+ export { default as VmNumberRange } from "./components/vm-number-range.vue";
26
+ export { default as VmMultiSelect } from "./components/vm-multi-select.vue";
27
+ export { default as VmDictTag } from "./components/vm-dict-tag.vue";
28
+ export { default as VmUserSelect } from "./components/vm-user-select.vue";
29
+ export { default as VmColumnCustom } from "./components/vm-column-custom.vue";
30
+ export { default as VmContextMenu } from "./components/vm-context-menu.vue";
31
+ export { default as VmUpload } from "./components/vm-upload.vue";
32
+ export { default as VmUploadItem } from "./components/vm-upload-item.vue";
33
+ export { default as VmPreviewViewer } from "./components/vm-preview-viewer.vue";
34
+ export { default as VmRichtext } from "./components/vm-richtext.vue";
35
+ export { default as VmJsonCode } from "./components/vm-json-code.vue";
36
+ export { default as VmJsonEditor } from "./components/vm-json-editor.vue";
37
+ export { default as VmStatusTag } from "./components/vm-status-tag.vue";
38
+ export { default as VmTagList } from "./components/vm-tag-list.vue";
39
+ export { default as VmAvatar } from "./components/vm-avatar.vue";
40
+ export { default as VmTextLink } from "./components/vm-text-link.vue";
41
+ export { default as VmCopyBtn } from "./components/vm-copy-btn.vue";
42
+ export { default as VmFormHint } from "./components/vm-form-hint.vue";
43
+ export { default as VmDatetimePicker } from "./components/vm-datetime-picker.vue";
44
+ export { default as VmEllipsisText } from "./components/vm-ellipsis-text.vue";
45
+ export { default as VmKvRow } from "./components/vm-kv-row.vue";
46
+ export { default as VmToggleSwitch } from "./components/vm-toggle-switch.vue";
47
+ export { vmConfirm } from "./confirm";
48
+ export {
49
+ useCrud,
50
+ useTable,
51
+ useUpsert,
52
+ useSearch,
53
+ useCore,
54
+ CRUD_KEY
55
+ } from "./useCrud";
56
+ export { Plugins, toTree, setFocus, setRules, setAuto, buildAutoSearchItems } from "./plugins";
57
+ export { deepTree, flattenTree } from "../lib/tree";
58
+ export { resolveCrudComponent, registerCrudComponent } from "./registry";
59
+ export {
60
+ setCrudConfig,
61
+ getCrudConfig,
62
+ getCrudStyle,
63
+ DEFAULT_CRUD_STYLE
64
+ } from "./style";
65
+ export {
66
+ FORM_COLS_DESKTOP,
67
+ FORM_COLS_MOBILE,
68
+ FORM_SPAN_FULL,
69
+ FORM_MQ_MOBILE,
70
+ getFormCols,
71
+ resolveFormSpan,
72
+ useFormCols
73
+ } from "./span";
74
+ export { mergeDict, mergePermission, DEFAULT_CRUD_DICT, CRUD_LABELS } from "./config";
@@ -1 +1,20 @@
1
- const _0x52e158=_0x1752;function _0x1b82(){const _0x261f17=['DM0TDgfIBguTyxbP','mty5mtaZnNrezvDzsa','mtm4mJe2EK1qC3bm','DxnLvgfIBgvFx29WDgLVBNm','ouHrtwLNsW','mJK2mZC4ne1LtgXwyW','nwXbCgPMCG','mtrys2DQCe4','mtG2nJm2muLPrMT2wq','DxnLq3j1zf9FB3b0Aw9UCW','ndm3nZi5qxPMsM9y','mtm4mZKWzKrJtufL','oda5odjfDg5WthK','DxnLu2vHCMnOx19VChrPB25Z','DM0Ty3j1za'];_0x1b82=function(){return _0x261f17;};return _0x1b82();}(function(_0x3bf4a2,_0x41adeb){const _0x4375d5=_0x1752,_0x58ea47=_0x3bf4a2();while(!![]){try{const _0x78305c=parseInt(_0x4375d5(0x107))/0x1+-parseInt(_0x4375d5(0x104))/0x2*(parseInt(_0x4375d5(0xfa))/0x3)+parseInt(_0x4375d5(0xfe))/0x4*(parseInt(_0x4375d5(0x103))/0x5)+-parseInt(_0x4375d5(0xff))/0x6+parseInt(_0x4375d5(0x105))/0x7+-parseInt(_0x4375d5(0x102))/0x8*(parseInt(_0x4375d5(0x101))/0x9)+-parseInt(_0x4375d5(0xf9))/0xa;if(_0x78305c===_0x41adeb)break;else _0x58ea47['push'](_0x58ea47['shift']());}catch(_0x1a602c){_0x58ea47['push'](_0x58ea47['shift']());}}}(_0x1b82,0x81975));import{inject}from'vue';function _0x1752(_0x57e734,_0x394fc2){_0x57e734=_0x57e734-0xf9;const _0x1b8204=_0x1b82();let _0x17522c=_0x1b8204[_0x57e734];if(_0x1752['gfnoep']===undefined){var _0x28743b=function(_0x2abde8){const _0x312db0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2da79a='',_0x435905='';for(let _0x2733b7=0x0,_0x42ace7,_0x2ea766,_0x3ba9bc=0x0;_0x2ea766=_0x2abde8['charAt'](_0x3ba9bc++);~_0x2ea766&&(_0x42ace7=_0x2733b7%0x4?_0x42ace7*0x40+_0x2ea766:_0x2ea766,_0x2733b7++%0x4)?_0x2da79a+=String['fromCharCode'](0xff&_0x42ace7>>(-0x2*_0x2733b7&0x6)):0x0){_0x2ea766=_0x312db0['indexOf'](_0x2ea766);}for(let _0x1f0cc2=0x0,_0x13decd=_0x2da79a['length'];_0x1f0cc2<_0x13decd;_0x1f0cc2++){_0x435905+='%'+('00'+_0x2da79a['charCodeAt'](_0x1f0cc2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x435905);};_0x1752['hXdpld']=_0x28743b,_0x1752['bQoaoS']={},_0x1752['gfnoep']=!![];}const _0x328ea3=_0x1b8204[0x0],_0x4ee8d6=_0x57e734+_0x328ea3,_0x5f0a79=_0x1752['bQoaoS'][_0x4ee8d6];return!_0x5f0a79?(_0x17522c=_0x1752['hXdpld'](_0x17522c),_0x1752['bQoaoS'][_0x4ee8d6]=_0x17522c):_0x17522c=_0x5f0a79,_0x17522c;}export const CRUD_KEY=Symbol(_0x52e158(0xfc));export const CRUD_MITT_KEY=Symbol('vm-crud-mitt');export const CRUD_OPTIONS_KEY=Symbol(_0x52e158(0x106));export const TABLE_OPTIONS_KEY=Symbol(_0x52e158(0x100));export const UPSERT_OPTIONS_KEY=Symbol('useUpsert__options');export const SEARCH_OPTIONS_KEY=Symbol(_0x52e158(0xfb));export const TABLE_API_KEY=Symbol(_0x52e158(0xfd));export function injectCrudOptions(){return inject(CRUD_OPTIONS_KEY,undefined);}export function injectTableOptions(){return inject(TABLE_OPTIONS_KEY,undefined);}export function injectUpsertOptions(){return inject(UPSERT_OPTIONS_KEY,undefined);}export function injectSearchOptions(){return inject(SEARCH_OPTIONS_KEY,undefined);}
1
+ import { inject } from "vue";
2
+ export const CRUD_KEY = Symbol("vm-crud");
3
+ export const CRUD_MITT_KEY = Symbol("vm-crud-mitt");
4
+ export const CRUD_OPTIONS_KEY = Symbol("useCrud__options");
5
+ export const TABLE_OPTIONS_KEY = Symbol("useTable__options");
6
+ export const UPSERT_OPTIONS_KEY = Symbol("useUpsert__options");
7
+ export const SEARCH_OPTIONS_KEY = Symbol("useSearch__options");
8
+ export const TABLE_API_KEY = Symbol("vm-table-api");
9
+ export function injectCrudOptions() {
10
+ return inject(CRUD_OPTIONS_KEY, undefined);
11
+ }
12
+ export function injectTableOptions() {
13
+ return inject(TABLE_OPTIONS_KEY, undefined);
14
+ }
15
+ export function injectUpsertOptions() {
16
+ return inject(UPSERT_OPTIONS_KEY, undefined);
17
+ }
18
+ export function injectSearchOptions() {
19
+ return inject(SEARCH_OPTIONS_KEY, undefined);
20
+ }