@wp1001/ui 2.9.13 → 3.0.0
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/@vant-D4fmGxs6.js +1 -3891
- package/index.html +28 -0
- package/index.js +1 -8419
- package/lib/tinymce/zh_CN.js +1 -0
- package/package.json +1 -1
- package/packages/assets/devtools-detector.js +1 -2
- package/packages/components/xarray/index.js +1 -64
- package/packages/components/xautorows/index.js +1 -35
- package/packages/components/xbutton/mobile.js +1 -3
- package/packages/components/xbutton/pc.js +1 -3
- package/packages/components/xbuttons/mobile.js +1 -51
- package/packages/components/xbuttons/pc.js +1 -51
- package/packages/components/xchart/constants.js +1 -58
- package/packages/components/xchart/index.js +1 -263
- package/packages/components/xchart/utils.js +1 -121
- package/packages/components/xcheckboxs/mobile.js +1 -58
- package/packages/components/xcheckboxs/pc.js +1 -49
- package/packages/components/xcol/mobile.js +1 -10
- package/packages/components/xcol/pc.js +1 -10
- package/packages/components/xdatepicker/mobile.js +1 -71
- package/packages/components/xdatepicker/pc.js +1 -9
- package/packages/components/xdialog/mobile.js +1 -60
- package/packages/components/xdialog/pc.js +1 -64
- package/packages/components/xdict/index.js +1 -47
- package/packages/components/xdistrictselect/mobile.js +1 -79
- package/packages/components/xdistrictselect/pc.js +1 -127
- package/packages/components/xform/mobile.js +1 -29
- package/packages/components/xform/pc.js +1 -42
- package/packages/components/xform/utils.js +1 -95
- package/packages/components/xformitem/mobile.js +1 -56
- package/packages/components/xformitem/pc.js +1 -72
- package/packages/components/xicon/mobile.js +1 -35
- package/packages/components/xicon/pc.js +1 -35
- package/packages/components/xinfo/index.js +1 -100
- package/packages/components/xlooper/index.js +1 -7
- package/packages/components/xpagination/mobile.js +1 -21
- package/packages/components/xpagination/pc.js +1 -21
- package/packages/components/xpicker/index.js +1 -38
- package/packages/components/xradios/mobile.js +1 -40
- package/packages/components/xradios/pc.js +1 -53
- package/packages/components/xrow/mobile.js +1 -9
- package/packages/components/xrow/pc.js +1 -9
- package/packages/components/xscan/mobile.js +1 -24
- package/packages/components/xscan/pc.js +1 -20
- package/packages/components/xsearcher/index.js +1 -198
- package/packages/components/xselect/mobile.js +1 -86
- package/packages/components/xselect/pc.js +1 -114
- package/packages/components/xselect/util.js +1 -66
- package/packages/components/xselectv2/index.js +1 -91
- package/packages/components/xtable/mobile.js +1 -108
- package/packages/components/xtable/pc.js +1 -143
- package/packages/components/xtable/searcher.js +1 -477
- package/packages/components/xtable/settings.js +1 -80
- package/packages/components/xtable/utils.js +1 -692
- package/packages/components/xtabletools/mobile.js +1 -25
- package/packages/components/xtabletools/pc.js +1 -18
- package/packages/components/xtablev2/index.js +1 -53
- package/packages/components/xtags/mobile.js +1 -17
- package/packages/components/xtags/pc.js +1 -17
- package/packages/components/xtinymce/index.js +1 -71
- package/packages/components/xuploader/xfileuploader.js +1 -48
- package/packages/components/xuploader/ximageuploader.js +1 -53
- package/packages/comps.js +1 -108
- package/packages/controllers/BaseController.js +1 -125
- package/packages/controllers/CrudController.js +1 -907
- package/packages/controllers/TempCrudController.js +1 -32
- package/packages/controllers/index.js +1 -15
- package/packages/directives/el-table-infinite-scroll.js +1 -55
- package/packages/directives/index.js +1 -5
- package/packages/index.js +1 -81
- package/packages/layout/breadcrumb/index.js +1 -41
- package/packages/layout/header/inner.js +1 -11
- package/packages/layout/screenlock/index.js +1 -129
- package/packages/layout/sidebar/item.js +1 -16
- package/packages/layout/sidebar/menu.js +1 -72
- package/packages/layout/tagsview/ScrollPane.js +1 -65
- package/packages/layout/tagsview/index.js +1 -169
- package/packages/plop/actions/make-fill-admin-partials-action.js +1 -95
- package/packages/plop/generators/make-admin-page.js +1 -39
- package/packages/plop/generators/make-database-admin-pages.js +1 -84
- package/packages/plop/generators/make-page-generator.js +1 -52
- package/packages/plop/generators/make-simple-page.js +1 -20
- package/packages/plop/plopfile.js +1 -24
- package/packages/plop/utils/index.js +1 -168
- package/packages/plop/utils/plop-utils.js +1 -86
- package/packages/utils/crypt.js +1 -24
- package/packages/utils/decorators.js +1 -67
- package/packages/utils/disallowDevtools.js +1 -53
- package/packages/utils/effects.js +1 -173
- package/packages/utils/funcs.js +1 -78
- package/packages/utils/index.js +1 -95
- package/packages/utils/message.js +1 -110
- package/packages/utils/middlewares.js +1 -86
- package/packages/utils/model.js +1 -71
- package/packages/utils/modelUtils.js +1 -203
- package/packages/utils/request.js +1 -57
- package/packages/utils/site.js +1 -33
- package/packages/vite-plugins.js +1 -141
- package/src/App.vue +134 -0
- package/src/main.js +1 -0
- package/src/request.js +1 -0
- package/style.css +1 -0
- package/vite.config.js +1 -0
- package/vite.lib.config.js +1 -0
- package/.env +0 -6
package/packages/utils/funcs.js
CHANGED
|
@@ -1,78 +1 @@
|
|
|
1
|
-
import { toRaw, markRaw }
|
|
2
|
-
|
|
3
|
-
export const validateForm = async (model) => {
|
|
4
|
-
const ok = await model.formRef?.validate().then(() => true).catch(() => false)
|
|
5
|
-
const oks = await Promise.all(model.formItems?.filter(it => {
|
|
6
|
-
return it.comp?.endsWith('XForm') || it.comp?.endsWith('x-form')
|
|
7
|
-
}).map(it => validateForm(it.form)))
|
|
8
|
-
return ok && oks.every(ok => ok)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const formatPrecision = (number, precision) => {
|
|
12
|
-
if (typeof number !== 'number') {
|
|
13
|
-
const parsed = parseFloat(number) || null
|
|
14
|
-
if (typeof parsed !== 'number') {
|
|
15
|
-
return number
|
|
16
|
-
}
|
|
17
|
-
number = parsed
|
|
18
|
-
}
|
|
19
|
-
return number.toFixed(precision) * 1
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const formatOptions = (options, vm) => {
|
|
23
|
-
const opts = options.__v_isRef ? options.value : toRaw(options)
|
|
24
|
-
const { text = 'text', value = 'value' } = vm
|
|
25
|
-
const items = opts.map(op => {
|
|
26
|
-
if (typeof op === 'object') {
|
|
27
|
-
return { text: op[text], value: op[value], disabled: op.disabled, raw: markRaw(op) }
|
|
28
|
-
} else {
|
|
29
|
-
return { text: op, value: op }
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
if (!vm.sort) return items
|
|
33
|
-
const field = typeof vm.sort === 'string' ? vm.sort : (vm.text || 'text')
|
|
34
|
-
return items.sort((a, b) => {
|
|
35
|
-
return a[field].localeCompare(b[field])
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const injectVanFieldProvide = (vm) => {
|
|
40
|
-
const provides = vm._.provides
|
|
41
|
-
const keys = Object.getOwnPropertySymbols(provides)
|
|
42
|
-
if (!keys.length) return
|
|
43
|
-
vm.provide = provides[keys[0]]
|
|
44
|
-
if (!vm.provide?.customValue) {
|
|
45
|
-
return vm.provide = null
|
|
46
|
-
}
|
|
47
|
-
vm.provide.customValue.value = () => vm.modelValue
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const getUrlType = url => {
|
|
51
|
-
const extname = url?.split('.').pop().toLowerCase()
|
|
52
|
-
if (['png', 'jpg', 'jpeg', 'gif', 'webp'].includes(extname)) return 'image'
|
|
53
|
-
else if (['mp4', 'webm', 'ogg', '3gpp', 'avi', 'mov'].includes(extname)) return 'video'
|
|
54
|
-
else if (extname === 'pdf') return 'pdf'
|
|
55
|
-
else if (extname === 'doc' || extname === 'docx') return 'docx'
|
|
56
|
-
else if (extname === 'xls' || extname === 'xlsx') return 'xlsx'
|
|
57
|
-
else if (extname === 'ppt' || extname === 'pptx') return 'pptx'
|
|
58
|
-
else if (['zip', 'rar', '7z', 'tar', 'gzip'].includes(extname)) return 'zip'
|
|
59
|
-
return 'others'
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const getFiletypeIcon = type => {
|
|
63
|
-
if (type === 'pdf') return 'iwwa:file-pdf'
|
|
64
|
-
if (type === 'docx') return 'file-icons:microsoft-word'
|
|
65
|
-
if (type === 'xlsx') return 'file-icons:microsoft-excel'
|
|
66
|
-
if (type === 'pptx') return 'file-icons:microsoft-powerpoint'
|
|
67
|
-
if (type === 'zip') return 'formkit:zip'
|
|
68
|
-
return 'bi:file-pdf-fill'
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export default {
|
|
72
|
-
validateForm,
|
|
73
|
-
formatPrecision,
|
|
74
|
-
formatOptions,
|
|
75
|
-
injectVanFieldProvide,
|
|
76
|
-
getUrlType,
|
|
77
|
-
getFiletypeIcon
|
|
78
|
-
}
|
|
1
|
+
(function(_0x372db0,_0x2c179a){const _0x2783ed=a87_0x8220,_0x14b232=_0x372db0();while(!![]){try{const _0x54786c=parseInt(_0x2783ed(0x139))/0x1*(-parseInt(_0x2783ed(0x125))/0x2)+-parseInt(_0x2783ed(0x135))/0x3*(parseInt(_0x2783ed(0x12f))/0x4)+parseInt(_0x2783ed(0x153))/0x5+parseInt(_0x2783ed(0x131))/0x6*(-parseInt(_0x2783ed(0x142))/0x7)+parseInt(_0x2783ed(0x121))/0x8*(parseInt(_0x2783ed(0x127))/0x9)+-parseInt(_0x2783ed(0x14c))/0xa+parseInt(_0x2783ed(0x11d))/0xb;if(_0x54786c===_0x2c179a)break;else _0x14b232['push'](_0x14b232['shift']());}catch(_0x147433){_0x14b232['push'](_0x14b232['shift']());}}}(a87_0x3148,0x9d980));import{toRaw,markRaw}from'vue';export const validateForm=async _0xda2459=>{const _0x31c6f3=a87_0x8220,_0x1de1ed=await _0xda2459[_0x31c6f3(0x146)]?.[_0x31c6f3(0x159)]()[_0x31c6f3(0x14d)](()=>!![])[_0x31c6f3(0x123)](()=>![]),_0x30725e=await Promise[_0x31c6f3(0x13d)](_0xda2459['formItems']?.['filter'](_0x35dbc3=>{const _0x11b711=_0x31c6f3;return _0x35dbc3[_0x11b711(0x15c)]?.[_0x11b711(0x136)](_0x11b711(0x145))||_0x35dbc3[_0x11b711(0x15c)]?.[_0x11b711(0x136)](_0x11b711(0x141));})[_0x31c6f3(0x13b)](_0x366e71=>validateForm(_0x366e71[_0x31c6f3(0x14e)])));return _0x1de1ed&&_0x30725e[_0x31c6f3(0x151)](_0x294aa6=>_0x294aa6);};export const formatPrecision=(_0xe5f563,_0x244e65)=>{const _0x22a6fc=a87_0x8220;if(typeof _0xe5f563!=='number'){const _0x9536b8=parseFloat(_0xe5f563)||null;if(typeof _0x9536b8!=='number')return _0xe5f563;_0xe5f563=_0x9536b8;}return _0xe5f563[_0x22a6fc(0x137)](_0x244e65)*0x1;};export const formatOptions=(_0x200b90,_0x4f6c0e)=>{const _0x17f229=a87_0x8220,_0x37ba62=_0x200b90[_0x17f229(0x13c)]?_0x200b90['value']:toRaw(_0x200b90),{text:text=_0x17f229(0x128),value:value=_0x17f229(0x129)}=_0x4f6c0e,_0x4a7bd8=_0x37ba62[_0x17f229(0x13b)](_0x5eba37=>{const _0x8e7296=_0x17f229;return typeof _0x5eba37==='object'?{'text':_0x5eba37[text],'value':_0x5eba37[value],'disabled':_0x5eba37[_0x8e7296(0x15d)],'raw':markRaw(_0x5eba37)}:{'text':_0x5eba37,'value':_0x5eba37};});if(!_0x4f6c0e[_0x17f229(0x15b)])return _0x4a7bd8;const _0x4449a8=typeof _0x4f6c0e[_0x17f229(0x15b)]===_0x17f229(0x14b)?_0x4f6c0e['sort']:_0x4f6c0e['text']||_0x17f229(0x128);return _0x4a7bd8[_0x17f229(0x15b)]((_0x37678f,_0x530c9c)=>{const _0x57f2af=_0x17f229;return _0x37678f[_0x4449a8][_0x57f2af(0x120)](_0x530c9c[_0x4449a8]);});};export const injectVanFieldProvide=_0x291749=>{const _0x287fd7=a87_0x8220,_0x16a31b=_0x291749['_'][_0x287fd7(0x12d)],_0x37a3e5=Object[_0x287fd7(0x155)](_0x16a31b);if(!_0x37a3e5[_0x287fd7(0x11e)])return;_0x291749['provide']=_0x16a31b[_0x37a3e5[0x0]];if(!_0x291749[_0x287fd7(0x156)]?.[_0x287fd7(0x14f)])return _0x291749[_0x287fd7(0x156)]=null;_0x291749['provide'][_0x287fd7(0x14f)]['value']=()=>_0x291749['modelValue'];};export const getUrlType=_0x2446c4=>{const _0x27e056=a87_0x8220,_0x1df1bb=_0x2446c4?.[_0x27e056(0x13f)]('.')[_0x27e056(0x132)]()['toLowerCase']();if([_0x27e056(0x147),_0x27e056(0x12c),_0x27e056(0x157),_0x27e056(0x154),_0x27e056(0x124)][_0x27e056(0x152)](_0x1df1bb))return _0x27e056(0x13e);else{if([_0x27e056(0x12b),_0x27e056(0x148),_0x27e056(0x14a),_0x27e056(0x15a),'avi',_0x27e056(0x130)]['includes'](_0x1df1bb))return _0x27e056(0x11f);else{if(_0x1df1bb===_0x27e056(0x149))return _0x27e056(0x149);else{if(_0x1df1bb===_0x27e056(0x134)||_0x1df1bb===_0x27e056(0x144))return _0x27e056(0x144);else{if(_0x1df1bb==='xls'||_0x1df1bb==='xlsx')return _0x27e056(0x143);else{if(_0x1df1bb===_0x27e056(0x13a)||_0x1df1bb==='pptx')return _0x27e056(0x138);else{if([_0x27e056(0x126),_0x27e056(0x122),'7z',_0x27e056(0x12a),'gzip'][_0x27e056(0x152)](_0x1df1bb))return _0x27e056(0x126);}}}}}}return _0x27e056(0x12e);};function a87_0x3148(){const _0x44c279=['pdf','ogg','string','705490jaBMzF','then','form','customValue','bi:file-pdf-fill','every','includes','3591810SGVLaI','gif','getOwnPropertySymbols','provide','jpeg','formkit:zip','validate','3gpp','sort','comp','disabled','16536784aQVOGR','length','video','localeCompare','2152eUNDwu','rar','catch','webp','14066jGqiWh','zip','13608BUMFNy','text','value','tar','mp4','jpg','provides','others','100zVTyny','mov','438MEIpLa','pop','iwwa:file-pdf','doc','78114EFoTaD','endsWith','toFixed','pptx','169quXrxJ','ppt','map','__v_isRef','all','image','split','file-icons:microsoft-word','x-form','6986RXBFhu','xlsx','docx','XForm','formRef','png','webm'];a87_0x3148=function(){return _0x44c279;};return a87_0x3148();}function a87_0x8220(_0x30e363,_0x5b294a){const _0x31487b=a87_0x3148();return a87_0x8220=function(_0x82208d,_0x138e0f){_0x82208d=_0x82208d-0x11d;let _0x414f70=_0x31487b[_0x82208d];return _0x414f70;},a87_0x8220(_0x30e363,_0x5b294a);}export const getFiletypeIcon=_0x14c2f5=>{const _0x37c068=a87_0x8220;if(_0x14c2f5===_0x37c068(0x149))return _0x37c068(0x133);if(_0x14c2f5===_0x37c068(0x144))return _0x37c068(0x140);if(_0x14c2f5===_0x37c068(0x143))return'file-icons:microsoft-excel';if(_0x14c2f5===_0x37c068(0x138))return'file-icons:microsoft-powerpoint';if(_0x14c2f5===_0x37c068(0x126))return _0x37c068(0x158);return _0x37c068(0x150);};export default{'validateForm':validateForm,'formatPrecision':formatPrecision,'formatOptions':formatOptions,'injectVanFieldProvide':injectVanFieldProvide,'getUrlType':getUrlType,'getFiletypeIcon':getFiletypeIcon};
|
package/packages/utils/index.js
CHANGED
|
@@ -1,95 +1 @@
|
|
|
1
|
-
import crypt from './
|
|
2
|
-
import decorators from './decorators.js'
|
|
3
|
-
import effects from './effects.js'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
validateForm,
|
|
7
|
-
formatPrecision,
|
|
8
|
-
formatOptions,
|
|
9
|
-
getUrlType,
|
|
10
|
-
getFiletypeIcon
|
|
11
|
-
} from './funcs.js'
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
Message,
|
|
15
|
-
Notify,
|
|
16
|
-
Confirm,
|
|
17
|
-
Prompt
|
|
18
|
-
} from './message.js'
|
|
19
|
-
|
|
20
|
-
import middlewares from './middlewares.js'
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
baseForm,
|
|
24
|
-
baseTable,
|
|
25
|
-
baseDialog,
|
|
26
|
-
baseModel
|
|
27
|
-
} from './model.js'
|
|
28
|
-
|
|
29
|
-
import {
|
|
30
|
-
initFields,
|
|
31
|
-
initModel,
|
|
32
|
-
initTable,
|
|
33
|
-
initDialog,
|
|
34
|
-
initForm,
|
|
35
|
-
initFormRules,
|
|
36
|
-
initDefaultForm,
|
|
37
|
-
isWhenMatched,
|
|
38
|
-
triggers
|
|
39
|
-
} from './modelUtils.js'
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
crypt,
|
|
43
|
-
effects,
|
|
44
|
-
validateForm,
|
|
45
|
-
formatPrecision,
|
|
46
|
-
formatOptions,
|
|
47
|
-
getUrlType,
|
|
48
|
-
getFiletypeIcon,
|
|
49
|
-
Message,
|
|
50
|
-
Notify,
|
|
51
|
-
Confirm,
|
|
52
|
-
Prompt,
|
|
53
|
-
baseForm,
|
|
54
|
-
baseTable,
|
|
55
|
-
baseDialog,
|
|
56
|
-
baseModel,
|
|
57
|
-
initFields,
|
|
58
|
-
initModel,
|
|
59
|
-
initTable,
|
|
60
|
-
initDialog,
|
|
61
|
-
initForm,
|
|
62
|
-
initFormRules,
|
|
63
|
-
initDefaultForm,
|
|
64
|
-
isWhenMatched,
|
|
65
|
-
triggers
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export default {
|
|
69
|
-
crypt,
|
|
70
|
-
decorators,
|
|
71
|
-
effects,
|
|
72
|
-
validateForm,
|
|
73
|
-
formatPrecision,
|
|
74
|
-
formatOptions,
|
|
75
|
-
getUrlType,
|
|
76
|
-
getFiletypeIcon,
|
|
77
|
-
Message,
|
|
78
|
-
Notify,
|
|
79
|
-
Confirm,
|
|
80
|
-
Prompt,
|
|
81
|
-
middlewares,
|
|
82
|
-
baseForm,
|
|
83
|
-
baseTable,
|
|
84
|
-
baseDialog,
|
|
85
|
-
baseModel,
|
|
86
|
-
initFields,
|
|
87
|
-
initModel,
|
|
88
|
-
initTable,
|
|
89
|
-
initDialog,
|
|
90
|
-
initForm,
|
|
91
|
-
initFormRules,
|
|
92
|
-
initDefaultForm,
|
|
93
|
-
isWhenMatched,
|
|
94
|
-
triggers
|
|
95
|
-
}
|
|
1
|
+
(function(_0x374edd,_0x4ef99f){var _0x36c945=a88_0x50c7,_0x224888=_0x374edd();while(!![]){try{var _0x471989=-parseInt(_0x36c945(0x126))/0x1+-parseInt(_0x36c945(0x11e))/0x2+-parseInt(_0x36c945(0x11c))/0x3*(-parseInt(_0x36c945(0x120))/0x4)+parseInt(_0x36c945(0x11f))/0x5*(-parseInt(_0x36c945(0x121))/0x6)+-parseInt(_0x36c945(0x122))/0x7*(parseInt(_0x36c945(0x123))/0x8)+-parseInt(_0x36c945(0x124))/0x9+-parseInt(_0x36c945(0x125))/0xa*(-parseInt(_0x36c945(0x11d))/0xb);if(_0x471989===_0x4ef99f)break;else _0x224888['push'](_0x224888['shift']());}catch(_0x5e09f1){_0x224888['push'](_0x224888['shift']());}}}(a88_0x1392,0x7c4b0));import a88_0x580245 from'./crypt.js';import a88_0x4a3a57 from'./decorators.js';function a88_0x50c7(_0xbc916e,_0x201d44){var _0x13929f=a88_0x1392();return a88_0x50c7=function(_0x50c706,_0x52448c){_0x50c706=_0x50c706-0x11c;var _0x2040b3=_0x13929f[_0x50c706];return _0x2040b3;},a88_0x50c7(_0xbc916e,_0x201d44);}import a88_0x48c688 from'./effects.js';import{validateForm,formatPrecision,formatOptions,getUrlType,getFiletypeIcon}from'./funcs.js';import{Message,Notify,Confirm,Prompt}from'./message.js';import a88_0x1942e8 from'./middlewares.js';import{baseForm,baseTable,baseDialog,baseModel}from'./model.js';import{initFields,initModel,initTable,initDialog,initForm,initFormRules,initDefaultForm,isWhenMatched,triggers}from'./modelUtils.js';export{a88_0x580245 as crypt,a88_0x48c688 as effects,validateForm,formatPrecision,formatOptions,getUrlType,getFiletypeIcon,Message,Notify,Confirm,Prompt,baseForm,baseTable,baseDialog,baseModel,initFields,initModel,initTable,initDialog,initForm,initFormRules,initDefaultForm,isWhenMatched,triggers};export default{'crypt':a88_0x580245,'decorators':a88_0x4a3a57,'effects':a88_0x48c688,'validateForm':validateForm,'formatPrecision':formatPrecision,'formatOptions':formatOptions,'getUrlType':getUrlType,'getFiletypeIcon':getFiletypeIcon,'Message':Message,'Notify':Notify,'Confirm':Confirm,'Prompt':Prompt,'middlewares':a88_0x1942e8,'baseForm':baseForm,'baseTable':baseTable,'baseDialog':baseDialog,'baseModel':baseModel,'initFields':initFields,'initModel':initModel,'initTable':initTable,'initDialog':initDialog,'initForm':initForm,'initFormRules':initFormRules,'initDefaultForm':initDefaultForm,'isWhenMatched':isWhenMatched,'triggers':triggers};function a88_0x1392(){var _0x28608e=['2923239niosLV','603196nYwWAP','5EitZJT','1106232AqVFvW','1191018EsGxWW','329cGZPth','12304SrvqtB','1310094YAquxy','50ngCVob','378246RbxFNs','3ayrVoB'];a88_0x1392=function(){return _0x28608e;};return a88_0x1392();}
|
|
@@ -1,110 +1 @@
|
|
|
1
|
-
let { ElMessage, ElNotification,
|
|
2
|
-
let { showToast, showNotify, showConfirmDialog } = window.vant || {}
|
|
3
|
-
|
|
4
|
-
export const initMessageUtils = ({ ElementPlus, Vant }) => {
|
|
5
|
-
if (ElementPlus) {
|
|
6
|
-
ElMessage = ElementPlus.ElMessage
|
|
7
|
-
ElNotification = ElementPlus.ElNotification
|
|
8
|
-
ElMessageBox = ElementPlus.ElMessageBox
|
|
9
|
-
}
|
|
10
|
-
if (Vant) {
|
|
11
|
-
showToast = Vant.showToast
|
|
12
|
-
showNotify = Vant.showNotify
|
|
13
|
-
showConfirmDialog = Vant.showConfirmDialog
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const Message = options => {
|
|
18
|
-
let opts = typeof options !== 'string' ? options : { message: options }
|
|
19
|
-
opts = {
|
|
20
|
-
type: 'error',
|
|
21
|
-
duration: 3000,
|
|
22
|
-
...opts
|
|
23
|
-
}
|
|
24
|
-
const { isMobile = window.isMobile, type } = opts
|
|
25
|
-
if (isMobile) {
|
|
26
|
-
if (type === 'error' || type === 'warning') opts.type = 'fail'
|
|
27
|
-
opts['z-index'] ||= 1e6
|
|
28
|
-
showToast(opts)
|
|
29
|
-
} else {
|
|
30
|
-
ElMessage({
|
|
31
|
-
showClose: true,
|
|
32
|
-
grouping: true,
|
|
33
|
-
...opts
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const Notify = options => {
|
|
39
|
-
let opts = typeof options !== 'string' ? options : { message: options }
|
|
40
|
-
opts = {
|
|
41
|
-
type: 'error',
|
|
42
|
-
duration: 3000,
|
|
43
|
-
...opts
|
|
44
|
-
}
|
|
45
|
-
const { isMobile = window.isMobile, type } = opts
|
|
46
|
-
if (isMobile) {
|
|
47
|
-
if (type === 'error') opts.type = 'danger'
|
|
48
|
-
showNotify(opts)
|
|
49
|
-
} else {
|
|
50
|
-
ElNotification({
|
|
51
|
-
showClose: true,
|
|
52
|
-
...opts
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const Confirm = options => {
|
|
58
|
-
let promise = null
|
|
59
|
-
const { isMobile = window.isMobile } = options
|
|
60
|
-
if (isMobile) {
|
|
61
|
-
promise = showConfirmDialog(options)
|
|
62
|
-
} else {
|
|
63
|
-
promise = ElMessageBox.confirm(
|
|
64
|
-
options.message || '',
|
|
65
|
-
options.title || '',
|
|
66
|
-
{
|
|
67
|
-
draggable: true,
|
|
68
|
-
...options,
|
|
69
|
-
type: options.type || 'info',
|
|
70
|
-
confirmButtonText: options.confirmButtonText || '确定',
|
|
71
|
-
cancelButtonText: options.cancelButtonText || '取消',
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
return promise.then(() => {
|
|
76
|
-
return options.distinguishCancelAndClose ? 'confirm' : true
|
|
77
|
-
}).catch(action => {
|
|
78
|
-
return options.distinguishCancelAndClose ? action : false
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export const Prompt = options => {
|
|
83
|
-
return ElMessageBox.prompt(options.message, options.title, {
|
|
84
|
-
confirmButtonText: '确定',
|
|
85
|
-
cancelButtonText: '取消',
|
|
86
|
-
inputPattern: /[^\s]+/,
|
|
87
|
-
inputErrorMessage: '请输入',
|
|
88
|
-
...options
|
|
89
|
-
}).then(({ value }) => value).catch(() => '')
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
for (let type of ['success', 'warning', 'info', 'error', 'primary', 'loading', 'fail', 'html']) {
|
|
93
|
-
Message[type] = Message[type[0]] = options => {
|
|
94
|
-
const opts = typeof options !== 'string' ? options : { message: options }
|
|
95
|
-
return Message({ type, ...opts })
|
|
96
|
-
}
|
|
97
|
-
Notify[type] = Notify[type[0]] = options => {
|
|
98
|
-
const opts = typeof options !== 'string' ? options : { message: options }
|
|
99
|
-
return Notify({ type, ...opts })
|
|
100
|
-
}
|
|
101
|
-
Confirm[type] = Confirm[type[0]] = options => Confirm({ type, ...options })
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export default {
|
|
105
|
-
initMessageUtils,
|
|
106
|
-
Message,
|
|
107
|
-
Notify,
|
|
108
|
-
Confirm,
|
|
109
|
-
Prompt
|
|
110
|
-
}
|
|
1
|
+
const a89_0x143db9=a89_0x36a4;(function(_0x3ccb00,_0x52eeba){const _0x2dc106=a89_0x36a4,_0x59da38=_0x3ccb00();while(!![]){try{const _0x315e41=-parseInt(_0x2dc106(0x1d8))/0x1*(-parseInt(_0x2dc106(0x1dd))/0x2)+-parseInt(_0x2dc106(0x1fb))/0x3*(-parseInt(_0x2dc106(0x1eb))/0x4)+parseInt(_0x2dc106(0x1f8))/0x5+-parseInt(_0x2dc106(0x1e8))/0x6+-parseInt(_0x2dc106(0x1e3))/0x7*(-parseInt(_0x2dc106(0x1e1))/0x8)+parseInt(_0x2dc106(0x1db))/0x9+-parseInt(_0x2dc106(0x1d9))/0xa;if(_0x315e41===_0x52eeba)break;else _0x59da38['push'](_0x59da38['shift']());}catch(_0x114c6c){_0x59da38['push'](_0x59da38['shift']());}}}(a89_0x53de,0x5d45e));let {ElMessage,ElNotification,ElMessageBox}=window[a89_0x143db9(0x1f5)]||{},{showToast,showNotify,showConfirmDialog}=window[a89_0x143db9(0x1e2)]||{};function a89_0x53de(){const _0x2c4a17=['ElMessage','showToast','then','ElementPlus','string','prompt','3806390sozTJj','confirmButtonText','ElMessageBox','4434KXSEDK','distinguishCancelAndClose','3928hPMBmx','9329460ijTVwu','error','789939HwWXpC','info','178HFsYyc','loading','title','success','4183880iOkUTR','vant','7JrsIVi','type','primary','catch','cancelButtonText','4133592sRWRIH','confirm','message','764GYySCF','warning','showConfirmDialog','fail','isMobile','html','请输入'];a89_0x53de=function(){return _0x2c4a17;};return a89_0x53de();}export const initMessageUtils=({ElementPlus:_0x51fc8d,Vant:_0x5044c1})=>{const _0x1aa3cd=a89_0x143db9;_0x51fc8d&&(ElMessage=_0x51fc8d[_0x1aa3cd(0x1f2)],ElNotification=_0x51fc8d['ElNotification'],ElMessageBox=_0x51fc8d[_0x1aa3cd(0x1fa)]),_0x5044c1&&(showToast=_0x5044c1[_0x1aa3cd(0x1f3)],showNotify=_0x5044c1['showNotify'],showConfirmDialog=_0x5044c1[_0x1aa3cd(0x1ed)]);};export const Message=_0x1adcef=>{const _0x11bf0c=a89_0x143db9;let _0x151414=typeof _0x1adcef!==_0x11bf0c(0x1f6)?_0x1adcef:{'message':_0x1adcef};_0x151414={'type':_0x11bf0c(0x1da),'duration':0xbb8,..._0x151414};const {isMobile:isMobile=window[_0x11bf0c(0x1ef)],type:_0xf9836f}=_0x151414;if(isMobile){if(_0xf9836f===_0x11bf0c(0x1da)||_0xf9836f===_0x11bf0c(0x1ec))_0x151414[_0x11bf0c(0x1e4)]='fail';_0x151414['z-index']||=0xf4240,showToast(_0x151414);}else ElMessage({'showClose':!![],'grouping':!![],..._0x151414});};export const Notify=_0x5de771=>{const _0x13534f=a89_0x143db9;let _0x1ba465=typeof _0x5de771!=='string'?_0x5de771:{'message':_0x5de771};_0x1ba465={'type':_0x13534f(0x1da),'duration':0xbb8,..._0x1ba465};const {isMobile:isMobile=window[_0x13534f(0x1ef)],type:_0xc48069}=_0x1ba465;if(isMobile){if(_0xc48069===_0x13534f(0x1da))_0x1ba465[_0x13534f(0x1e4)]='danger';showNotify(_0x1ba465);}else ElNotification({'showClose':!![],..._0x1ba465});};function a89_0x36a4(_0xb40ef,_0x15c879){const _0x53def9=a89_0x53de();return a89_0x36a4=function(_0x36a449,_0x5e4a20){_0x36a449=_0x36a449-0x1d7;let _0x487705=_0x53def9[_0x36a449];return _0x487705;},a89_0x36a4(_0xb40ef,_0x15c879);}export const Confirm=_0x34aae4=>{const _0x502926=a89_0x143db9;let _0x4e017b=null;const {isMobile:isMobile=window['isMobile']}=_0x34aae4;return isMobile?_0x4e017b=showConfirmDialog(_0x34aae4):_0x4e017b=ElMessageBox[_0x502926(0x1e9)](_0x34aae4[_0x502926(0x1ea)]||'',_0x34aae4[_0x502926(0x1df)]||'',{'draggable':!![],..._0x34aae4,'type':_0x34aae4[_0x502926(0x1e4)]||_0x502926(0x1dc),'confirmButtonText':_0x34aae4[_0x502926(0x1f9)]||'确定','cancelButtonText':_0x34aae4[_0x502926(0x1e7)]||'取消'}),_0x4e017b[_0x502926(0x1f4)](()=>{const _0x5f0329=_0x502926;return _0x34aae4[_0x5f0329(0x1d7)]?_0x5f0329(0x1e9):!![];})[_0x502926(0x1e6)](_0x318eb7=>{const _0xed0d78=_0x502926;return _0x34aae4[_0xed0d78(0x1d7)]?_0x318eb7:![];});};export const Prompt=_0x4f7508=>{const _0x1276b3=a89_0x143db9;return ElMessageBox[_0x1276b3(0x1f7)](_0x4f7508[_0x1276b3(0x1ea)],_0x4f7508['title'],{'confirmButtonText':'确定','cancelButtonText':'取消','inputPattern':/[^\s]+/,'inputErrorMessage':_0x1276b3(0x1f1),..._0x4f7508})[_0x1276b3(0x1f4)](({value:_0x493aba})=>_0x493aba)[_0x1276b3(0x1e6)](()=>'');};for(let type of[a89_0x143db9(0x1e0),a89_0x143db9(0x1ec),a89_0x143db9(0x1dc),a89_0x143db9(0x1da),a89_0x143db9(0x1e5),a89_0x143db9(0x1de),a89_0x143db9(0x1ee),a89_0x143db9(0x1f0)]){Message[type]=Message[type[0x0]]=_0x309c30=>{const _0x30da0d=typeof _0x309c30!=='string'?_0x309c30:{'message':_0x309c30};return Message({'type':type,..._0x30da0d});},Notify[type]=Notify[type[0x0]]=_0x13d6b3=>{const _0x2b9009=a89_0x143db9,_0x27ac90=typeof _0x13d6b3!==_0x2b9009(0x1f6)?_0x13d6b3:{'message':_0x13d6b3};return Notify({'type':type,..._0x27ac90});},Confirm[type]=Confirm[type[0x0]]=_0x5cad04=>Confirm({'type':type,..._0x5cad04});}export default{'initMessageUtils':initMessageUtils,'Message':Message,'Notify':Notify,'Confirm':Confirm,'Prompt':Prompt};
|
|
@@ -1,86 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Message } from './message.js'
|
|
3
|
-
|
|
4
|
-
const { funcs } = StardustJs
|
|
5
|
-
|
|
6
|
-
export const check404 = (router, store, routes) => {
|
|
7
|
-
router.beforeEach(async (to, from) => {
|
|
8
|
-
return !!to.matched.length || '/404'
|
|
9
|
-
})
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const setTitle = (router, store, routes) => {
|
|
13
|
-
router.afterEach((to, from) => {
|
|
14
|
-
document.title = to.matched[to.matched.length - 1].meta?.title || store.app.sitename
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const checkRolesPages = (router, store, routes) => {
|
|
19
|
-
router.beforeEach(async (to, from) => {
|
|
20
|
-
const path = to.matched[to.matched.length - 1].path.split('/:')[0]
|
|
21
|
-
if (to.meta.acl === false || to.meta?.visitable) return true
|
|
22
|
-
while (store.getters.logging) {
|
|
23
|
-
await funcs.sleep(20)
|
|
24
|
-
}
|
|
25
|
-
await nextTick()
|
|
26
|
-
if (store.acl.paths.includes(path)) return true
|
|
27
|
-
const query = { redirectTo: to.path, ...to.query }
|
|
28
|
-
if (store.getters.logined) {
|
|
29
|
-
query.error = '受限于您的账号权限,暂时无法访问 ' + to.path + ' 页面,如有需要请联系我们'
|
|
30
|
-
Message({ message: query.error, duration: 1e4 })
|
|
31
|
-
}
|
|
32
|
-
return { path: store.acl.paths[0] || '/404', query }
|
|
33
|
-
})
|
|
34
|
-
nextTick(() => {
|
|
35
|
-
let inited = false
|
|
36
|
-
watch(() => store.acl.menus, menus => {
|
|
37
|
-
if (!inited) {
|
|
38
|
-
if (!menus.length) return
|
|
39
|
-
inited = true
|
|
40
|
-
}
|
|
41
|
-
const paths = store.acl.paths
|
|
42
|
-
const update = (route, parents) => {
|
|
43
|
-
let path
|
|
44
|
-
if (route.redirect && !route.component) {
|
|
45
|
-
path = route.redirect
|
|
46
|
-
} else {
|
|
47
|
-
path = [...parents, route].reduce((path, p) => path + '/' + p.path, '').replace('//', '/')
|
|
48
|
-
}
|
|
49
|
-
route.meta ||= {}
|
|
50
|
-
if (route.meta.acl === false) {
|
|
51
|
-
route.children?.forEach(sub => {
|
|
52
|
-
sub.meta ||= {}
|
|
53
|
-
sub.meta.acl ||= false
|
|
54
|
-
update(sub, [...parents, route])
|
|
55
|
-
})
|
|
56
|
-
} else {
|
|
57
|
-
route.meta._hidden = route.meta.hidden
|
|
58
|
-
if (parent) {
|
|
59
|
-
if (route.meta.hidden == null) {
|
|
60
|
-
route.meta.hidden ??= parent.meta?.hidden
|
|
61
|
-
route.meta = { ...route.meta }
|
|
62
|
-
}
|
|
63
|
-
if (route.meta.visitable == null) {
|
|
64
|
-
route.meta.visitable ??= parent.meta?.visitable
|
|
65
|
-
route.meta = { ...route.meta }
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
route.children?.forEach(sub => update(sub, [...parents, route]))
|
|
69
|
-
if (route.meta.hidden !== false && route.meta._hidden !== true) {
|
|
70
|
-
route.meta.hidden = !paths.includes(path)
|
|
71
|
-
if (route.children?.some(sub => sub.meta.hidden === false)) {
|
|
72
|
-
route.meta.hidden = false
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
routes.forEach(route => update(route, []))
|
|
78
|
-
}, { immediate: true })
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export default {
|
|
83
|
-
check404,
|
|
84
|
-
setTitle,
|
|
85
|
-
checkRolesPages
|
|
86
|
-
}
|
|
1
|
+
(function(_0x263756,_0xbd37e6){const _0x153af2=a90_0x20c7,_0x5b704d=_0x263756();while(!![]){try{const _0x5e775a=parseInt(_0x153af2(0x1f5))/0x1+-parseInt(_0x153af2(0x1ef))/0x2+parseInt(_0x153af2(0x1e0))/0x3*(parseInt(_0x153af2(0x1e2))/0x4)+parseInt(_0x153af2(0x1e4))/0x5+-parseInt(_0x153af2(0x1f8))/0x6*(parseInt(_0x153af2(0x1d6))/0x7)+-parseInt(_0x153af2(0x1e7))/0x8*(-parseInt(_0x153af2(0x1e9))/0x9)+-parseInt(_0x153af2(0x1dc))/0xa*(-parseInt(_0x153af2(0x1db))/0xb);if(_0x5e775a===_0xbd37e6)break;else _0x5b704d['push'](_0x5b704d['shift']());}catch(_0x1504b6){_0x5b704d['push'](_0x5b704d['shift']());}}}(a90_0x453c,0x60e3b));import{watch,nextTick}from'vue';import{Message}from'./message.js';const {funcs}=StardustJs;export const check404=(_0x68182b,_0x47e337,_0x1261e4)=>{const _0x59bfb3=a90_0x20c7;_0x68182b[_0x59bfb3(0x1d5)](async(_0x18acca,_0x4e4c45)=>{const _0x3e0984=_0x59bfb3;return!!_0x18acca[_0x3e0984(0x1d4)][_0x3e0984(0x1ed)]||_0x3e0984(0x1f3);});};export const setTitle=(_0x3ee292,_0xbcf9f,_0x2a5ce6)=>{const _0x5709d2=a90_0x20c7;_0x3ee292[_0x5709d2(0x1ec)]((_0x2cd6b6,_0x2f89e)=>{const _0x209fd4=_0x5709d2;document[_0x209fd4(0x1d8)]=_0x2cd6b6[_0x209fd4(0x1d4)][_0x2cd6b6[_0x209fd4(0x1d4)]['length']-0x1][_0x209fd4(0x1dd)]?.[_0x209fd4(0x1d8)]||_0xbcf9f[_0x209fd4(0x1d2)][_0x209fd4(0x1f6)];});};function a90_0x453c(){const _0x522e29=['app','getters','matched','beforeEach','5450053kfHsLN','sleep','title','replace','forEach','11434819AVccUb','10YgUQCl','meta','includes','受限于您的账号权限,暂时无法访问\x20','830010bpAbrJ','paths','4FdIrjw','children','100685BSCrQZ','component','redirect','822600zfDeUx','acl','9qlYdeD','some','\x20页面,如有需要请联系我们','afterEach','length','visitable','1390934hdKIwI','error','path','hidden','/404','logined','431744CLBszs','sitename','_hidden','6JPghtc','query'];a90_0x453c=function(){return _0x522e29;};return a90_0x453c();}export const checkRolesPages=(_0x412ee1,_0x56d4e8,_0xb1016b)=>{const _0x46f109=a90_0x20c7;_0x412ee1[_0x46f109(0x1d5)](async(_0x20ba57,_0x3a9be6)=>{const _0x5b4d7b=_0x46f109,_0x11d9c5=_0x20ba57[_0x5b4d7b(0x1d4)][_0x20ba57[_0x5b4d7b(0x1d4)]['length']-0x1][_0x5b4d7b(0x1f1)]['split']('/:')[0x0];if(_0x20ba57[_0x5b4d7b(0x1dd)][_0x5b4d7b(0x1e8)]===![]||_0x20ba57[_0x5b4d7b(0x1dd)]?.['visitable'])return!![];while(_0x56d4e8[_0x5b4d7b(0x1d3)]['logging']){await funcs[_0x5b4d7b(0x1d7)](0x14);}await nextTick();if(_0x56d4e8[_0x5b4d7b(0x1e8)][_0x5b4d7b(0x1e1)][_0x5b4d7b(0x1de)](_0x11d9c5))return!![];const _0x47c328={'redirectTo':_0x20ba57[_0x5b4d7b(0x1f1)],..._0x20ba57[_0x5b4d7b(0x1f9)]};return _0x56d4e8[_0x5b4d7b(0x1d3)][_0x5b4d7b(0x1f4)]&&(_0x47c328['error']=_0x5b4d7b(0x1df)+_0x20ba57[_0x5b4d7b(0x1f1)]+_0x5b4d7b(0x1eb),Message({'message':_0x47c328[_0x5b4d7b(0x1f0)],'duration':0x2710})),{'path':_0x56d4e8[_0x5b4d7b(0x1e8)]['paths'][0x0]||'/404','query':_0x47c328};}),nextTick(()=>{const _0x5bb8aa=_0x46f109;let _0x272d50=![];watch(()=>_0x56d4e8[_0x5bb8aa(0x1e8)]['menus'],_0xcc77a8=>{const _0x528ca6=_0x5bb8aa;if(!_0x272d50){if(!_0xcc77a8[_0x528ca6(0x1ed)])return;_0x272d50=!![];}const _0x541087=_0x56d4e8[_0x528ca6(0x1e8)][_0x528ca6(0x1e1)],_0x3b30d8=(_0x4c63b2,_0x387bdb)=>{const _0x4548cc=_0x528ca6;let _0x1c504d;_0x4c63b2[_0x4548cc(0x1e6)]&&!_0x4c63b2[_0x4548cc(0x1e5)]?_0x1c504d=_0x4c63b2[_0x4548cc(0x1e6)]:_0x1c504d=[..._0x387bdb,_0x4c63b2]['reduce']((_0x32444d,_0x392e01)=>_0x32444d+'/'+_0x392e01[_0x4548cc(0x1f1)],'')[_0x4548cc(0x1d9)]('//','/'),_0x4c63b2['meta']||={},_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1e8)]===![]?_0x4c63b2['children']?.[_0x4548cc(0x1da)](_0x1eea52=>{const _0x51dbbd=_0x4548cc;_0x1eea52[_0x51dbbd(0x1dd)]||={},_0x1eea52[_0x51dbbd(0x1dd)][_0x51dbbd(0x1e8)]||=![],_0x3b30d8(_0x1eea52,[..._0x387bdb,_0x4c63b2]);}):(_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1f7)]=_0x4c63b2[_0x4548cc(0x1dd)]['hidden'],parent&&(_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1f2)]==null&&(_0x4c63b2[_0x4548cc(0x1dd)]['hidden']??=parent[_0x4548cc(0x1dd)]?.[_0x4548cc(0x1f2)],_0x4c63b2[_0x4548cc(0x1dd)]={..._0x4c63b2[_0x4548cc(0x1dd)]}),_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1ee)]==null&&(_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1ee)]??=parent[_0x4548cc(0x1dd)]?.[_0x4548cc(0x1ee)],_0x4c63b2[_0x4548cc(0x1dd)]={..._0x4c63b2[_0x4548cc(0x1dd)]})),_0x4c63b2[_0x4548cc(0x1e3)]?.[_0x4548cc(0x1da)](_0x3ad3ea=>_0x3b30d8(_0x3ad3ea,[..._0x387bdb,_0x4c63b2])),_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1f2)]!==![]&&_0x4c63b2['meta']['_hidden']!==!![]&&(_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1f2)]=!_0x541087[_0x4548cc(0x1de)](_0x1c504d),_0x4c63b2[_0x4548cc(0x1e3)]?.[_0x4548cc(0x1ea)](_0x4f0a9e=>_0x4f0a9e[_0x4548cc(0x1dd)][_0x4548cc(0x1f2)]===![])&&(_0x4c63b2[_0x4548cc(0x1dd)][_0x4548cc(0x1f2)]=![])));};_0xb1016b['forEach'](_0x4b2029=>_0x3b30d8(_0x4b2029,[]));},{'immediate':!![]});});};function a90_0x20c7(_0x236c20,_0x1a8067){const _0x453c5c=a90_0x453c();return a90_0x20c7=function(_0x20c71a,_0x1193f1){_0x20c71a=_0x20c71a-0x1d2;let _0x328623=_0x453c5c[_0x20c71a];return _0x328623;},a90_0x20c7(_0x236c20,_0x1a8067);}export default{'check404':check404,'setTitle':setTitle,'checkRolesPages':checkRolesPages};
|
package/packages/utils/model.js
CHANGED
|
@@ -1,71 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const baseForm = () => ({
|
|
3
|
-
loading: false,
|
|
4
|
-
form: {},
|
|
5
|
-
initialForm: {},
|
|
6
|
-
formItems: [],
|
|
7
|
-
formRef: null,
|
|
8
|
-
formRules: {},
|
|
9
|
-
initialFormRules: {},
|
|
10
|
-
_isBaseForm: true,
|
|
11
|
-
viewonly: false
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export const baseTable = (query = {}) => ({
|
|
15
|
-
loading: false,
|
|
16
|
-
query: {
|
|
17
|
-
page: 1,
|
|
18
|
-
limit: 10,
|
|
19
|
-
order: [],
|
|
20
|
-
...query
|
|
21
|
-
},
|
|
22
|
-
total: 0,
|
|
23
|
-
moreLoading: false,
|
|
24
|
-
finished: false,
|
|
25
|
-
isInfinite: false,
|
|
26
|
-
list: [],
|
|
27
|
-
columns: [],
|
|
28
|
-
tableRef: null,
|
|
29
|
-
selection: [],
|
|
30
|
-
checked: null,
|
|
31
|
-
searchFields: [],
|
|
32
|
-
_isBaseTable: true
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
export const baseDialog = () => ({
|
|
36
|
-
...baseForm(),
|
|
37
|
-
visible: false,
|
|
38
|
-
isEditing: false,
|
|
39
|
-
editingIndex: '',
|
|
40
|
-
editingRow: {},
|
|
41
|
-
_isBaseDialog: true
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
export const baseModel = ({
|
|
45
|
-
table = {},
|
|
46
|
-
dialog = {},
|
|
47
|
-
columns = [
|
|
48
|
-
{ fixed: 'left', type: 'selection' },
|
|
49
|
-
{ type: '_index' }
|
|
50
|
-
],
|
|
51
|
-
query = {},
|
|
52
|
-
form = {}
|
|
53
|
-
} = {}) => ({
|
|
54
|
-
table: {
|
|
55
|
-
...baseTable(query),
|
|
56
|
-
...table,
|
|
57
|
-
columns
|
|
58
|
-
},
|
|
59
|
-
dialog: {
|
|
60
|
-
...baseDialog(),
|
|
61
|
-
...dialog,
|
|
62
|
-
form
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
export default {
|
|
67
|
-
baseForm,
|
|
68
|
-
baseTable,
|
|
69
|
-
baseDialog,
|
|
70
|
-
baseModel
|
|
71
|
-
}
|
|
1
|
+
const a91_0x50ee04=a91_0x239d;(function(_0x4bac51,_0x2add60){const _0x2297fe=a91_0x239d,_0x1f18df=_0x4bac51();while(!![]){try{const _0x187700=parseInt(_0x2297fe(0x6f))/0x1+parseInt(_0x2297fe(0x70))/0x2*(-parseInt(_0x2297fe(0x71))/0x3)+parseInt(_0x2297fe(0x6b))/0x4+parseInt(_0x2297fe(0x6c))/0x5+parseInt(_0x2297fe(0x6d))/0x6+-parseInt(_0x2297fe(0x72))/0x7*(-parseInt(_0x2297fe(0x6e))/0x8)+parseInt(_0x2297fe(0x74))/0x9;if(_0x187700===_0x2add60)break;else _0x1f18df['push'](_0x1f18df['shift']());}catch(_0x33865b){_0x1f18df['push'](_0x1f18df['shift']());}}}(a91_0x3f54,0x30ba4));export const baseForm=()=>({'loading':![],'form':{},'initialForm':{},'formItems':[],'formRef':null,'formRules':{},'initialFormRules':{},'_isBaseForm':!![],'viewonly':![]});function a91_0x239d(_0x141723,_0x42701a){const _0x3f54eb=a91_0x3f54();return a91_0x239d=function(_0x239d4e,_0x279e9a){_0x239d4e=_0x239d4e-0x69;let _0x7e6e1=_0x3f54eb[_0x239d4e];return _0x7e6e1;},a91_0x239d(_0x141723,_0x42701a);}export const baseTable=(_0x5dae7d={})=>({'loading':![],'query':{'page':0x1,'limit':0xa,'order':[],..._0x5dae7d},'total':0x0,'moreLoading':![],'finished':![],'isInfinite':![],'list':[],'columns':[],'tableRef':null,'selection':[],'checked':null,'searchFields':[],'_isBaseTable':!![]});export const baseDialog=()=>({...baseForm(),'visible':![],'isEditing':![],'editingIndex':'','editingRow':{},'_isBaseDialog':!![]});export const baseModel=({table:table={},dialog:dialog={},columns:columns=[{'fixed':a91_0x50ee04(0x73),'type':a91_0x50ee04(0x6a)},{'type':a91_0x50ee04(0x69)}],query:query={},form:form={}}={})=>({'table':{...baseTable(query),...table,'columns':columns},'dialog':{...baseDialog(),...dialog,'form':form}});export default{'baseForm':baseForm,'baseTable':baseTable,'baseDialog':baseDialog,'baseModel':baseModel};function a91_0x3f54(){const _0x55b157=['944jkhBIV','279045lROdht','733486ZVNPWC','3ETdYTf','7427CUVfJc','left','1010745aeQjce','_index','selection','63844GcBUNX','151265rKXlrm','21414imVods'];a91_0x3f54=function(){return _0x55b157;};return a91_0x3f54();}
|