@wp1001/ui 2.9.13 → 3.0.1
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/pc.vue +1 -1
- 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
|
@@ -1,60 +1 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
name: 'MobileXDialog',
|
|
3
|
-
props: {
|
|
4
|
-
actionsheet: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: true
|
|
7
|
-
},
|
|
8
|
-
modelValue: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: false
|
|
11
|
-
},
|
|
12
|
-
title: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: '详情'
|
|
15
|
-
},
|
|
16
|
-
submitText: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: '提交'
|
|
19
|
-
},
|
|
20
|
-
cancelText: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: '取消'
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
emits: [
|
|
26
|
-
'update:modelValue',
|
|
27
|
-
'submit',
|
|
28
|
-
'cancel'
|
|
29
|
-
],
|
|
30
|
-
computed: {
|
|
31
|
-
visible: {
|
|
32
|
-
get () {
|
|
33
|
-
return this.modelValue
|
|
34
|
-
},
|
|
35
|
-
set (value) {
|
|
36
|
-
this.$emit('update:modelValue', value)
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
canCancel () {
|
|
40
|
-
return !!this.$attrs.onCancel || !!this.$parent.$attrs.onCancel
|
|
41
|
-
},
|
|
42
|
-
canConfirm () {
|
|
43
|
-
return !!this.$attrs.onSubmit || !!this.$parent.$attrs.onSubmit
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
async handleCancel () {
|
|
48
|
-
await this.$nextTick()
|
|
49
|
-
this.visible = true
|
|
50
|
-
await this.$nextTick()
|
|
51
|
-
this.$emit('cancel')
|
|
52
|
-
},
|
|
53
|
-
async handleConfirm () {
|
|
54
|
-
await this.$nextTick()
|
|
55
|
-
this.visible = true
|
|
56
|
-
await this.$nextTick()
|
|
57
|
-
this.$emit('submit')
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
var a19_0xa3e669=a19_0xdf30;function a19_0x7d81(){var _0xf5eca4=['39073463YTBqQH','7gaqhxu','1sQpyUF','modelValue','onCancel','$nextTick','3424948mxyNlC','$attrs','142740tkLwBT','visible','submit','$emit','MobileXDialog','2832633dOiYJG','128184GmgFvK','6791214diXwnx','update:modelValue','cancel','onSubmit','$parent','16609340AwpNKt','84qyCfSo','414rpejws'];a19_0x7d81=function(){return _0xf5eca4;};return a19_0x7d81();}(function(_0x4c038d,_0x169ba5){var _0x532662=a19_0xdf30,_0x18008d=_0x4c038d();while(!![]){try{var _0x480619=-parseInt(_0x532662(0x1ed))/0x1*(-parseInt(_0x532662(0x1f1))/0x2)+parseInt(_0x532662(0x1f8))/0x3+-parseInt(_0x532662(0x1e9))/0x4*(-parseInt(_0x532662(0x1f3))/0x5)+parseInt(_0x532662(0x1fa))/0x6*(-parseInt(_0x532662(0x1ec))/0x7)+parseInt(_0x532662(0x1f9))/0x8*(parseInt(_0x532662(0x1ea))/0x9)+parseInt(_0x532662(0x1e8))/0xa+-parseInt(_0x532662(0x1eb))/0xb;if(_0x480619===_0x169ba5)break;else _0x18008d['push'](_0x18008d['shift']());}catch(_0x3ff838){_0x18008d['push'](_0x18008d['shift']());}}}(a19_0x7d81,0xecdc7));function a19_0xdf30(_0x5d5d89,_0x4c9206){var _0x7d8127=a19_0x7d81();return a19_0xdf30=function(_0xdf30ec,_0x51e5e6){_0xdf30ec=_0xdf30ec-0x1e5;var _0x4261d6=_0x7d8127[_0xdf30ec];return _0x4261d6;},a19_0xdf30(_0x5d5d89,_0x4c9206);}export default{'name':a19_0xa3e669(0x1f7),'props':{'actionsheet':{'type':Boolean,'default':!![]},'modelValue':{'type':Boolean,'default':![]},'title':{'type':String,'default':'详情'},'submitText':{'type':String,'default':'提交'},'cancelText':{'type':String,'default':'取消'}},'emits':[a19_0xa3e669(0x1fb),a19_0xa3e669(0x1f5),a19_0xa3e669(0x1e5)],'computed':{'visible':{'get'(){var _0x4f40f1=a19_0xa3e669;return this[_0x4f40f1(0x1ee)];},'set'(_0x495cf1){var _0x28940c=a19_0xa3e669;this['$emit'](_0x28940c(0x1fb),_0x495cf1);}},'canCancel'(){var _0x1809ba=a19_0xa3e669;return!!this[_0x1809ba(0x1f2)][_0x1809ba(0x1ef)]||!!this[_0x1809ba(0x1e7)][_0x1809ba(0x1f2)][_0x1809ba(0x1ef)];},'canConfirm'(){var _0x33eb7d=a19_0xa3e669;return!!this[_0x33eb7d(0x1f2)][_0x33eb7d(0x1e6)]||!!this[_0x33eb7d(0x1e7)][_0x33eb7d(0x1f2)][_0x33eb7d(0x1e6)];}},'methods':{async 'handleCancel'(){var _0xf5cadb=a19_0xa3e669;await this[_0xf5cadb(0x1f0)](),this[_0xf5cadb(0x1f4)]=!![],await this[_0xf5cadb(0x1f0)](),this[_0xf5cadb(0x1f6)]('cancel');},async 'handleConfirm'(){var _0x1aff6a=a19_0xa3e669;await this[_0x1aff6a(0x1f0)](),this[_0x1aff6a(0x1f4)]=!![],await this[_0x1aff6a(0x1f0)](),this[_0x1aff6a(0x1f6)]('submit');}}};
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
name: 'PcXDialog',
|
|
3
|
-
props: {
|
|
4
|
-
platform: String,
|
|
5
|
-
drawer: {
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false
|
|
8
|
-
},
|
|
9
|
-
modelValue: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false
|
|
12
|
-
},
|
|
13
|
-
title: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: '详情'
|
|
16
|
-
},
|
|
17
|
-
submitText: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '提交'
|
|
20
|
-
},
|
|
21
|
-
cancelText: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '取消'
|
|
24
|
-
},
|
|
25
|
-
draggable: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: true
|
|
28
|
-
},
|
|
29
|
-
onSubmit: Function,
|
|
30
|
-
onCancel: Function
|
|
31
|
-
},
|
|
32
|
-
emits: [
|
|
33
|
-
'update:modelValue',
|
|
34
|
-
'submit',
|
|
35
|
-
'cancel',
|
|
36
|
-
'fullscreenchange'
|
|
37
|
-
],
|
|
38
|
-
data () {
|
|
39
|
-
return {
|
|
40
|
-
fullscreen: this.$attrs.fullscreen || false
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
visible: {
|
|
45
|
-
get () {
|
|
46
|
-
return this.modelValue
|
|
47
|
-
},
|
|
48
|
-
set (value) {
|
|
49
|
-
this.$emit('update:modelValue', value)
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
hasFooter () {
|
|
53
|
-
return this.onSubmit || this.$parent.$attrs.onSubmit
|
|
54
|
-
|| this.onCancel || this.$parent.$attrs.onCancel
|
|
55
|
-
|| this.$slots.footer
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
methods: {
|
|
59
|
-
handleToggleFullscreen () {
|
|
60
|
-
this.fullscreen = !this.fullscreen
|
|
61
|
-
this.$emit('fullscreenchange', this.fullscreen)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
function a20_0x57e3(_0x1a59f0,_0x52018d){var _0x4730e4=a20_0x4730();return a20_0x57e3=function(_0x57e38e,_0x3f9b9f){_0x57e38e=_0x57e38e-0x127;var _0x577d39=_0x4730e4[_0x57e38e];return _0x577d39;},a20_0x57e3(_0x1a59f0,_0x52018d);}var a20_0x1dc485=a20_0x57e3;(function(_0x1d47a2,_0x13907e){var _0x4e0033=a20_0x57e3,_0x41ac93=_0x1d47a2();while(!![]){try{var _0x38e4bc=parseInt(_0x4e0033(0x130))/0x1+parseInt(_0x4e0033(0x131))/0x2+-parseInt(_0x4e0033(0x12b))/0x3+parseInt(_0x4e0033(0x128))/0x4*(parseInt(_0x4e0033(0x132))/0x5)+parseInt(_0x4e0033(0x12c))/0x6*(parseInt(_0x4e0033(0x12f))/0x7)+-parseInt(_0x4e0033(0x127))/0x8+-parseInt(_0x4e0033(0x129))/0x9;if(_0x38e4bc===_0x13907e)break;else _0x41ac93['push'](_0x41ac93['shift']());}catch(_0x33a861){_0x41ac93['push'](_0x41ac93['shift']());}}}(a20_0x4730,0xb49ab));function a20_0x4730(){var _0x23b236=['update:modelValue','$attrs','modelValue','3524856blYxwn','4fkRnPG','7480809UIYeug','onCancel','3948960FWotVF','12lqDBFG','$emit','$slots','2731897jnFAHz','1259467IWqEHv','1727982UUUUGm','2119415LjeKcY','fullscreenchange','PcXDialog','onSubmit','fullscreen'];a20_0x4730=function(){return _0x23b236;};return a20_0x4730();}export default{'name':a20_0x1dc485(0x134),'props':{'platform':String,'drawer':{'type':Boolean,'default':![]},'modelValue':{'type':Boolean,'default':![]},'title':{'type':String,'default':'详情'},'submitText':{'type':String,'default':'提交'},'cancelText':{'type':String,'default':'取消'},'draggable':{'type':Boolean,'default':!![]},'onSubmit':Function,'onCancel':Function},'emits':[a20_0x1dc485(0x137),'submit','cancel','fullscreenchange'],'data'(){var _0x5bc78b=a20_0x1dc485;return{'fullscreen':this['$attrs'][_0x5bc78b(0x136)]||![]};},'computed':{'visible':{'get'(){var _0x3983cc=a20_0x1dc485;return this[_0x3983cc(0x139)];},'set'(_0x42b02b){var _0x555256=a20_0x1dc485;this[_0x555256(0x12d)]('update:modelValue',_0x42b02b);}},'hasFooter'(){var _0x522fc8=a20_0x1dc485;return this[_0x522fc8(0x135)]||this['$parent'][_0x522fc8(0x138)][_0x522fc8(0x135)]||this[_0x522fc8(0x12a)]||this['$parent'][_0x522fc8(0x138)][_0x522fc8(0x12a)]||this[_0x522fc8(0x12e)]['footer'];}},'methods':{'handleToggleFullscreen'(){var _0x2765de=a20_0x1dc485;this[_0x2765de(0x136)]=!this['fullscreen'],this[_0x2765de(0x12d)](_0x2765de(0x133),this[_0x2765de(0x136)]);}}};
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { baseForm } from '../../utils/model.js'
|
|
3
|
-
import { initForm } from '../../utils/modelUtils.js'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'XDict',
|
|
7
|
-
props: {
|
|
8
|
-
modelValue: Object | String | undefined,
|
|
9
|
-
items: Array
|
|
10
|
-
},
|
|
11
|
-
emits: ['update:modelValue'],
|
|
12
|
-
data () {
|
|
13
|
-
return {
|
|
14
|
-
form: baseForm()
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
watch: {
|
|
18
|
-
items: {
|
|
19
|
-
immediate: true,
|
|
20
|
-
deep: true,
|
|
21
|
-
handler () {
|
|
22
|
-
this.form = this.makeForm()
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
'form.form': {
|
|
26
|
-
deep: true,
|
|
27
|
-
handler () {
|
|
28
|
-
this.$emit('update:modelValue', this.form.form)
|
|
29
|
-
this.provide?.resetValidation()
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
created () {
|
|
34
|
-
if (window.isMobile) {
|
|
35
|
-
injectVanFieldProvide(this)
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
methods: {
|
|
39
|
-
makeForm () {
|
|
40
|
-
const form = baseForm()
|
|
41
|
-
const span = Math.floor(24 / this.items.length)
|
|
42
|
-
const fields = this.items.map(it => ({ span: it.span || span, ...it }))
|
|
43
|
-
initForm(form, fields)
|
|
44
|
-
return form
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
const a21_0x5be3be=a21_0xe342;(function(_0xf3dc7c,_0x578188){const _0x330d2f=a21_0xe342,_0x3aa92b=_0xf3dc7c();while(!![]){try{const _0x1b554c=-parseInt(_0x330d2f(0x172))/0x1*(parseInt(_0x330d2f(0x16e))/0x2)+parseInt(_0x330d2f(0x16a))/0x3+parseInt(_0x330d2f(0x169))/0x4*(parseInt(_0x330d2f(0x16d))/0x5)+-parseInt(_0x330d2f(0x17a))/0x6*(parseInt(_0x330d2f(0x171))/0x7)+-parseInt(_0x330d2f(0x178))/0x8*(-parseInt(_0x330d2f(0x168))/0x9)+-parseInt(_0x330d2f(0x166))/0xa*(-parseInt(_0x330d2f(0x16f))/0xb)+-parseInt(_0x330d2f(0x16c))/0xc;if(_0x1b554c===_0x578188)break;else _0x3aa92b['push'](_0x3aa92b['shift']());}catch(_0x21e75f){_0x3aa92b['push'](_0x3aa92b['shift']());}}}(a21_0x3676,0x1a921));import{injectVanFieldProvide}from'../../utils/funcs.js';import{baseForm}from'../../utils/model.js';import{initForm}from'../../utils/modelUtils.js';function a21_0xe342(_0x2a823d,_0x5121dd){const _0x3676ec=a21_0x3676();return a21_0xe342=function(_0xe34274,_0x14312b){_0xe34274=_0xe34274-0x166;let _0x555248=_0x3676ec[_0xe34274];return _0x555248;},a21_0xe342(_0x2a823d,_0x5121dd);}function a21_0x3676(){const _0x2674dc=['498012tAHwuF','span','2167668wGxzeL','2710uZqJkp','7180BXNmBV','14366TjjjYk','items','7DAsUTp','41mPbroo','update:modelValue','form','map','isMobile','XDict','760EnUjQs','makeForm','156054GhRlcj','length','760oFnweo','floor','63qURJnw','1452TUvTUb'];a21_0x3676=function(){return _0x2674dc;};return a21_0x3676();}export default{'name':a21_0x5be3be(0x177),'props':{'modelValue':Object|String|undefined,'items':Array},'emits':[a21_0x5be3be(0x173)],'data'(){return{'form':baseForm()};},'watch':{'items':{'immediate':!![],'deep':!![],'handler'(){const _0xd2d2b8=a21_0x5be3be;this['form']=this[_0xd2d2b8(0x179)]();}},'form.form':{'deep':!![],'handler'(){const _0x44d96e=a21_0x5be3be;this['$emit']('update:modelValue',this[_0x44d96e(0x174)][_0x44d96e(0x174)]),this['provide']?.['resetValidation']();}}},'created'(){const _0x348058=a21_0x5be3be;window[_0x348058(0x176)]&&injectVanFieldProvide(this);},'methods':{'makeForm'(){const _0x3edeba=a21_0x5be3be,_0x915556=baseForm(),_0x556ceb=Math[_0x3edeba(0x167)](0x18/this[_0x3edeba(0x170)][_0x3edeba(0x17b)]),_0x36574d=this[_0x3edeba(0x170)][_0x3edeba(0x175)](_0x32cc81=>({'span':_0x32cc81[_0x3edeba(0x16b)]||_0x556ceb,..._0x32cc81}));return initForm(_0x915556,_0x36574d),_0x915556;}}};
|
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const areas = {
|
|
4
|
-
provinces: [],
|
|
5
|
-
cities: [],
|
|
6
|
-
counties: []
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
areas.provinces = Object.entries(areaList.province_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
10
|
-
areas.cities = Object.entries(areaList.city_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
11
|
-
areas.counties = Object.entries(areaList.county_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'MobileXDistrictSelect',
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: String | Array,
|
|
17
|
-
seperator: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '/'
|
|
20
|
-
},
|
|
21
|
-
level: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'county'
|
|
24
|
-
},
|
|
25
|
-
placeholder: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: '请选择地区'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
emits: ['update:modelValue', 'change'],
|
|
31
|
-
data () {
|
|
32
|
-
return {
|
|
33
|
-
areaList,
|
|
34
|
-
visible: false,
|
|
35
|
-
value: '',
|
|
36
|
-
area: ''
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
computed: {
|
|
40
|
-
number () {
|
|
41
|
-
return ({ province: 1, city: 2, county: 3 })[this.level]
|
|
42
|
-
},
|
|
43
|
-
text () {
|
|
44
|
-
return this.modelValue || this.placeholder
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
watch: {
|
|
48
|
-
modelValue: {
|
|
49
|
-
handler: 'init',
|
|
50
|
-
immediate: true
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
methods: {
|
|
54
|
-
async init () {
|
|
55
|
-
if (this.modelValue === this.value) return
|
|
56
|
-
const parts = Array.isArray(this.modelValue) ? this.modelValue : (this.modelValue || '').split(this.seperator)
|
|
57
|
-
const [province, city, county] = parts
|
|
58
|
-
const pCode = areas.provinces.find(p => p.text === province)?.value
|
|
59
|
-
const pCode2 = pCode?.slice(0, 2)
|
|
60
|
-
const ciCode = areas.cities.find(c => c.value.startsWith(pCode2) && c.text === city)?.value
|
|
61
|
-
const cCode4 = ciCode?.slice(0, 4)
|
|
62
|
-
const coCode = areas.counties.find(c => c.value.startsWith(cCode4) && c.text === county)?.value
|
|
63
|
-
this.area = coCode
|
|
64
|
-
if (Array.isArray(this.modelValue)) {
|
|
65
|
-
this.value = this.modelValue.join(this.seperator)
|
|
66
|
-
this.$emit('update:modelValue', this.value)
|
|
67
|
-
this.$emit('change', this.value)
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
onConfirm ({ selectedOptions }) {
|
|
71
|
-
this.visible = false
|
|
72
|
-
const value = selectedOptions.map(ele => ele.text).join(this.seperator)
|
|
73
|
-
this.area = selectedOptions[selectedOptions.length - 1].value
|
|
74
|
-
this.value = value
|
|
75
|
-
this.$emit('update:modelValue', value)
|
|
76
|
-
this.$emit('change', value)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
1
|
+
const a22_0x3ea0af=a22_0x1890;(function(_0x50c830,_0x299975){const _0x4b2c39=a22_0x1890,_0x1123b7=_0x50c830();while(!![]){try{const _0x141b6d=-parseInt(_0x4b2c39(0xb6))/0x1+parseInt(_0x4b2c39(0xc1))/0x2+-parseInt(_0x4b2c39(0xb3))/0x3*(parseInt(_0x4b2c39(0xc4))/0x4)+parseInt(_0x4b2c39(0xa5))/0x5+parseInt(_0x4b2c39(0xba))/0x6*(parseInt(_0x4b2c39(0xab))/0x7)+-parseInt(_0x4b2c39(0xa4))/0x8*(parseInt(_0x4b2c39(0xa8))/0x9)+-parseInt(_0x4b2c39(0xc5))/0xa;if(_0x141b6d===_0x299975)break;else _0x1123b7['push'](_0x1123b7['shift']());}catch(_0x380bdd){_0x1123b7['push'](_0x1123b7['shift']());}}}(a22_0x5006,0x3bde3));import{areaList}from'@vant/area-data';function a22_0x1890(_0xddba84,_0x548722){const _0x5006b6=a22_0x5006();return a22_0x1890=function(_0x1890ef,_0x5af328){_0x1890ef=_0x1890ef-0xa4;let _0x4ac09b=_0x5006b6[_0x1890ef];return _0x4ac09b;},a22_0x1890(_0xddba84,_0x548722);}const areas={'provinces':[],'cities':[],'counties':[]};function a22_0x5006(){const _0x54ca9c=['modelValue','value','12wspVvs','2868430ipPOoj','map','text','181848dopSue','2261130YBYiUW','level','province_list','117VBEsSF','change','area','6111TfKnTq','entries','isArray','seperator','init','visible','provinces','$emit','305997VhoBwO','placeholder','city_list','72666ZDJblr','join','slice','请选择地区','2082rVAzbF','length','startsWith','county_list','find','update:modelValue','cities','902142EAXrPv'];a22_0x5006=function(){return _0x54ca9c;};return a22_0x5006();}areas[a22_0x3ea0af(0xb1)]=Object[a22_0x3ea0af(0xac)](areaList[a22_0x3ea0af(0xa7)])[a22_0x3ea0af(0xc6)](_0x154e38=>({'value':_0x154e38[0x0],'text':_0x154e38[0x1]})),areas[a22_0x3ea0af(0xc0)]=Object[a22_0x3ea0af(0xac)](areaList[a22_0x3ea0af(0xb5)])[a22_0x3ea0af(0xc6)](_0x518d2d=>({'value':_0x518d2d[0x0],'text':_0x518d2d[0x1]})),areas['counties']=Object['entries'](areaList[a22_0x3ea0af(0xbd)])[a22_0x3ea0af(0xc6)](_0x17d42e=>({'value':_0x17d42e[0x0],'text':_0x17d42e[0x1]}));export default{'name':'MobileXDistrictSelect','props':{'modelValue':String|Array,'seperator':{'type':String,'default':'/'},'level':{'type':String,'default':'county'},'placeholder':{'type':String,'default':a22_0x3ea0af(0xb9)}},'emits':['update:modelValue',a22_0x3ea0af(0xa9)],'data'(){return{'areaList':areaList,'visible':![],'value':'','area':''};},'computed':{'number'(){const _0x407b5a=a22_0x3ea0af;return{'province':0x1,'city':0x2,'county':0x3}[this[_0x407b5a(0xa6)]];},'text'(){const _0x4f2b77=a22_0x3ea0af;return this['modelValue']||this[_0x4f2b77(0xb4)];}},'watch':{'modelValue':{'handler':a22_0x3ea0af(0xaf),'immediate':!![]}},'methods':{async 'init'(){const _0x42300c=a22_0x3ea0af;if(this[_0x42300c(0xc2)]===this[_0x42300c(0xc3)])return;const _0x3473b6=Array[_0x42300c(0xad)](this[_0x42300c(0xc2)])?this['modelValue']:(this[_0x42300c(0xc2)]||'')['split'](this[_0x42300c(0xae)]),[_0x4469eb,_0x179099,_0xf16210]=_0x3473b6,_0x56f0f8=areas['provinces'][_0x42300c(0xbe)](_0x5af1d8=>_0x5af1d8[_0x42300c(0xc7)]===_0x4469eb)?.['value'],_0x57284c=_0x56f0f8?.[_0x42300c(0xb8)](0x0,0x2),_0x21d808=areas[_0x42300c(0xc0)][_0x42300c(0xbe)](_0x5250bf=>_0x5250bf[_0x42300c(0xc3)][_0x42300c(0xbc)](_0x57284c)&&_0x5250bf[_0x42300c(0xc7)]===_0x179099)?.[_0x42300c(0xc3)],_0x461628=_0x21d808?.[_0x42300c(0xb8)](0x0,0x4),_0x2a4412=areas['counties'][_0x42300c(0xbe)](_0x48af88=>_0x48af88[_0x42300c(0xc3)][_0x42300c(0xbc)](_0x461628)&&_0x48af88[_0x42300c(0xc7)]===_0xf16210)?.['value'];this[_0x42300c(0xaa)]=_0x2a4412,Array[_0x42300c(0xad)](this[_0x42300c(0xc2)])&&(this[_0x42300c(0xc3)]=this[_0x42300c(0xc2)][_0x42300c(0xb7)](this[_0x42300c(0xae)]),this[_0x42300c(0xb2)](_0x42300c(0xbf),this[_0x42300c(0xc3)]),this[_0x42300c(0xb2)](_0x42300c(0xa9),this[_0x42300c(0xc3)]));},'onConfirm'({selectedOptions:_0x1ff083}){const _0x176d01=a22_0x3ea0af;this[_0x176d01(0xb0)]=![];const _0x53c33f=_0x1ff083[_0x176d01(0xc6)](_0x5e5bf9=>_0x5e5bf9[_0x176d01(0xc7)])[_0x176d01(0xb7)](this[_0x176d01(0xae)]);this['area']=_0x1ff083[_0x1ff083[_0x176d01(0xbb)]-0x1]['value'],this[_0x176d01(0xc3)]=_0x53c33f,this['$emit'](_0x176d01(0xbf),_0x53c33f),this[_0x176d01(0xb2)](_0x176d01(0xa9),_0x53c33f);}}};
|
|
@@ -1,127 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const areas = {
|
|
4
|
-
provinces: [],
|
|
5
|
-
cities: [],
|
|
6
|
-
counties: []
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
areas.provinces = Object.entries(areaList.province_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
10
|
-
areas.cities = Object.entries(areaList.city_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
11
|
-
areas.counties = Object.entries(areaList.county_list).map(ele => ({ value: ele[0], text: ele[1] }))
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'PcXDistrictSelect',
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: String | Array,
|
|
17
|
-
seperator: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '/'
|
|
20
|
-
},
|
|
21
|
-
level: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'county'
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ['update:modelValue', 'change'],
|
|
27
|
-
data () {
|
|
28
|
-
return {
|
|
29
|
-
inited: true,
|
|
30
|
-
province: '',
|
|
31
|
-
city: '',
|
|
32
|
-
county: '',
|
|
33
|
-
provinces: Object.freeze(areas.provinces),
|
|
34
|
-
cities: [],
|
|
35
|
-
counties: []
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
computed: {
|
|
39
|
-
number () {
|
|
40
|
-
return ({ province: 1, city: 2, county: 3 })[this.level]
|
|
41
|
-
},
|
|
42
|
-
span () {
|
|
43
|
-
return 24 / this.number
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
watch: {
|
|
47
|
-
province (newVal) {
|
|
48
|
-
if (!this.county) {
|
|
49
|
-
this.update()
|
|
50
|
-
}
|
|
51
|
-
this.city = this.county = ''
|
|
52
|
-
if (!newVal) {
|
|
53
|
-
this.cities = []
|
|
54
|
-
this.counties = []
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
const prefix = newVal.slice(0, 2)
|
|
58
|
-
this.cities = Object.freeze(areas.cities.filter(ele => ele.value.slice(0, 2) === prefix))
|
|
59
|
-
},
|
|
60
|
-
city (newVal) {
|
|
61
|
-
if (!this.county) {
|
|
62
|
-
this.update()
|
|
63
|
-
}
|
|
64
|
-
this.county = ''
|
|
65
|
-
if (!newVal) {
|
|
66
|
-
this.counties = []
|
|
67
|
-
return
|
|
68
|
-
}
|
|
69
|
-
const prefix = newVal.slice(0, 4)
|
|
70
|
-
this.counties = Object.freeze(areas.counties.filter(ele => ele.value.slice(0, 4) === prefix))
|
|
71
|
-
},
|
|
72
|
-
county () {
|
|
73
|
-
this.update()
|
|
74
|
-
},
|
|
75
|
-
modelValue: {
|
|
76
|
-
handler: 'init',
|
|
77
|
-
immediate: true
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
async init () {
|
|
82
|
-
this.inited = false
|
|
83
|
-
const parts = Array.isArray(this.modelValue) ? this.modelValue : (this.modelValue || '').split(this.seperator)
|
|
84
|
-
const [province, city, county] = parts
|
|
85
|
-
if (province) {
|
|
86
|
-
const ele = Object.entries(areaList.province_list).find(ele => ele[1] === province)
|
|
87
|
-
this.province = ele?.[0]
|
|
88
|
-
} else {
|
|
89
|
-
this.province = ''
|
|
90
|
-
this.inited = true
|
|
91
|
-
return
|
|
92
|
-
}
|
|
93
|
-
await this.$nextTick()
|
|
94
|
-
if (city) {
|
|
95
|
-
const pCode = this.province?.slice(0, 2)
|
|
96
|
-
const ele = Object.entries(areaList.city_list).find(ele => ele[0].startsWith(pCode) && ele[1] === city)
|
|
97
|
-
this.city = ele?.[0]
|
|
98
|
-
} else {
|
|
99
|
-
this.city = ''
|
|
100
|
-
this.inited = true
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
await this.$nextTick()
|
|
104
|
-
if (county) {
|
|
105
|
-
const cCode = this.city?.slice(0, 4)
|
|
106
|
-
const ele = Object.entries(areaList.county_list).find(ele => ele[0].startsWith(cCode) && ele[1] === county)
|
|
107
|
-
this.county = ele?.[0]
|
|
108
|
-
} else {
|
|
109
|
-
this.county = ''
|
|
110
|
-
}
|
|
111
|
-
this.inited = true
|
|
112
|
-
this.update()
|
|
113
|
-
},
|
|
114
|
-
update () {
|
|
115
|
-
if (!this.inited) {
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
let value = [
|
|
119
|
-
this.province && areaList.province_list[this.province] || '',
|
|
120
|
-
this.number > 1 && this.city && areaList.city_list[this.city] || '',
|
|
121
|
-
this.number > 2 && this.county && areaList.county_list[this.county] || ''
|
|
122
|
-
].slice(0, this.number).join(this.seperator)
|
|
123
|
-
this.$emit('update:modelValue', value)
|
|
124
|
-
this.$emit('change', value)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
const a23_0x179d1d=a23_0x303c;(function(_0x4fe8d3,_0x17e511){const _0x4afd4d=a23_0x303c,_0x47dd80=_0x4fe8d3();while(!![]){try{const _0x50bc7c=parseInt(_0x4afd4d(0xde))/0x1*(parseInt(_0x4afd4d(0xe9))/0x2)+-parseInt(_0x4afd4d(0xea))/0x3*(-parseInt(_0x4afd4d(0xec))/0x4)+parseInt(_0x4afd4d(0xf0))/0x5*(-parseInt(_0x4afd4d(0xd7))/0x6)+-parseInt(_0x4afd4d(0xeb))/0x7*(-parseInt(_0x4afd4d(0xe8))/0x8)+-parseInt(_0x4afd4d(0xcd))/0x9+parseInt(_0x4afd4d(0xd5))/0xa+-parseInt(_0x4afd4d(0xca))/0xb;if(_0x50bc7c===_0x17e511)break;else _0x47dd80['push'](_0x47dd80['shift']());}catch(_0x4e4a64){_0x47dd80['push'](_0x47dd80['shift']());}}}(a23_0x5d16,0x91905));import{areaList}from'@vant/area-data';const areas={'provinces':[],'cities':[],'counties':[]};function a23_0x5d16(){const _0x1a1f94=['modelValue','16741769xdzqkP','cities','county','714915cIewZI','province_list','slice','map','update:modelValue','change','counties','number','9735970kBuPqV','city','2070lwRXkB','find','split','startsWith','city_list','freeze','join','133057kacnMS','provinces','entries','value','county_list','PcXDistrictSelect','inited','update','init','$nextTick','3800zEsuWO','2VbUWvg','3IqWAmA','5803DPZBIz','3902516IZRefj','seperator','province','$emit','4035SVeTRq','filter'];a23_0x5d16=function(){return _0x1a1f94;};return a23_0x5d16();}areas[a23_0x179d1d(0xdf)]=Object[a23_0x179d1d(0xe0)](areaList['province_list'])[a23_0x179d1d(0xd0)](_0x5e248b=>({'value':_0x5e248b[0x0],'text':_0x5e248b[0x1]})),areas[a23_0x179d1d(0xcb)]=Object[a23_0x179d1d(0xe0)](areaList[a23_0x179d1d(0xdb)])['map'](_0x5bda31=>({'value':_0x5bda31[0x0],'text':_0x5bda31[0x1]})),areas[a23_0x179d1d(0xd3)]=Object[a23_0x179d1d(0xe0)](areaList[a23_0x179d1d(0xe2)])[a23_0x179d1d(0xd0)](_0x3d2e84=>({'value':_0x3d2e84[0x0],'text':_0x3d2e84[0x1]}));function a23_0x303c(_0x5ab52a,_0x241230){const _0x5d163b=a23_0x5d16();return a23_0x303c=function(_0x303cd0,_0x2190e3){_0x303cd0=_0x303cd0-0xc9;let _0x20f701=_0x5d163b[_0x303cd0];return _0x20f701;},a23_0x303c(_0x5ab52a,_0x241230);}export default{'name':a23_0x179d1d(0xe3),'props':{'modelValue':String|Array,'seperator':{'type':String,'default':'/'},'level':{'type':String,'default':a23_0x179d1d(0xcc)}},'emits':[a23_0x179d1d(0xd1),a23_0x179d1d(0xd2)],'data'(){const _0x24f6c0=a23_0x179d1d;return{'inited':!![],'province':'','city':'','county':'','provinces':Object[_0x24f6c0(0xdc)](areas['provinces']),'cities':[],'counties':[]};},'computed':{'number'(){return{'province':0x1,'city':0x2,'county':0x3}[this['level']];},'span'(){return 0x18/this['number'];}},'watch':{'province'(_0x2bfcb1){const _0x7eb835=a23_0x179d1d;!this['county']&&this['update']();this[_0x7eb835(0xd6)]=this[_0x7eb835(0xcc)]='';if(!_0x2bfcb1){this[_0x7eb835(0xcb)]=[],this[_0x7eb835(0xd3)]=[];return;}const _0xbb7fea=_0x2bfcb1[_0x7eb835(0xcf)](0x0,0x2);this[_0x7eb835(0xcb)]=Object[_0x7eb835(0xdc)](areas[_0x7eb835(0xcb)][_0x7eb835(0xf1)](_0x249226=>_0x249226[_0x7eb835(0xe1)]['slice'](0x0,0x2)===_0xbb7fea));},'city'(_0x983530){const _0xa574f9=a23_0x179d1d;!this[_0xa574f9(0xcc)]&&this[_0xa574f9(0xe5)]();this[_0xa574f9(0xcc)]='';if(!_0x983530){this[_0xa574f9(0xd3)]=[];return;}const _0x1739dd=_0x983530[_0xa574f9(0xcf)](0x0,0x4);this[_0xa574f9(0xd3)]=Object[_0xa574f9(0xdc)](areas['counties'][_0xa574f9(0xf1)](_0x45efcf=>_0x45efcf[_0xa574f9(0xe1)][_0xa574f9(0xcf)](0x0,0x4)===_0x1739dd));},'county'(){const _0x453553=a23_0x179d1d;this[_0x453553(0xe5)]();},'modelValue':{'handler':a23_0x179d1d(0xe6),'immediate':!![]}},'methods':{async 'init'(){const _0x21da5=a23_0x179d1d;this['inited']=![];const _0x3f8597=Array['isArray'](this[_0x21da5(0xc9)])?this[_0x21da5(0xc9)]:(this['modelValue']||'')[_0x21da5(0xd9)](this[_0x21da5(0xed)]),[_0x55b4a6,_0x40d1af,_0x53981c]=_0x3f8597;if(_0x55b4a6){const _0x5d4146=Object[_0x21da5(0xe0)](areaList[_0x21da5(0xce)])['find'](_0x1dd412=>_0x1dd412[0x1]===_0x55b4a6);this[_0x21da5(0xee)]=_0x5d4146?.[0x0];}else{this[_0x21da5(0xee)]='',this['inited']=!![];return;}await this[_0x21da5(0xe7)]();if(_0x40d1af){const _0x565a0f=this[_0x21da5(0xee)]?.[_0x21da5(0xcf)](0x0,0x2),_0x3bc8ee=Object[_0x21da5(0xe0)](areaList[_0x21da5(0xdb)])[_0x21da5(0xd8)](_0x5ccbb6=>_0x5ccbb6[0x0][_0x21da5(0xda)](_0x565a0f)&&_0x5ccbb6[0x1]===_0x40d1af);this[_0x21da5(0xd6)]=_0x3bc8ee?.[0x0];}else{this[_0x21da5(0xd6)]='',this[_0x21da5(0xe4)]=!![];return;}await this[_0x21da5(0xe7)]();if(_0x53981c){const _0x41dc83=this[_0x21da5(0xd6)]?.[_0x21da5(0xcf)](0x0,0x4),_0x3d17f4=Object[_0x21da5(0xe0)](areaList[_0x21da5(0xe2)])[_0x21da5(0xd8)](_0xa79ae3=>_0xa79ae3[0x0][_0x21da5(0xda)](_0x41dc83)&&_0xa79ae3[0x1]===_0x53981c);this['county']=_0x3d17f4?.[0x0];}else this[_0x21da5(0xcc)]='';this[_0x21da5(0xe4)]=!![],this[_0x21da5(0xe5)]();},'update'(){const _0x1c4ff3=a23_0x179d1d;if(!this[_0x1c4ff3(0xe4)])return;let _0x111665=[this[_0x1c4ff3(0xee)]&&areaList[_0x1c4ff3(0xce)][this[_0x1c4ff3(0xee)]]||'',this[_0x1c4ff3(0xd4)]>0x1&&this[_0x1c4ff3(0xd6)]&&areaList[_0x1c4ff3(0xdb)][this['city']]||'',this['number']>0x2&&this[_0x1c4ff3(0xcc)]&&areaList[_0x1c4ff3(0xe2)][this[_0x1c4ff3(0xcc)]]||'']['slice'](0x0,this[_0x1c4ff3(0xd4)])[_0x1c4ff3(0xdd)](this[_0x1c4ff3(0xed)]);this[_0x1c4ff3(0xef)](_0x1c4ff3(0xd1),_0x111665),this['$emit'](_0x1c4ff3(0xd2),_0x111665);}}};
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
name: 'MobileXForm',
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
props: {
|
|
7
|
-
...utils.props(),
|
|
8
|
-
labelWidth: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: props => props.labelWidth || '80px'
|
|
11
|
-
},
|
|
12
|
-
useWhen: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
emits: ['update:fref'],
|
|
18
|
-
computed: {
|
|
19
|
-
...utils.computed
|
|
20
|
-
},
|
|
21
|
-
mounted () {
|
|
22
|
-
const contanier = this.dialog ?? this.form
|
|
23
|
-
contanier && (contanier.formRef = this.$refs.formRef)
|
|
24
|
-
this.$emit('update:fref', this.$refs.formRef)
|
|
25
|
-
},
|
|
26
|
-
methods: {
|
|
27
|
-
...utils.methods
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
const a24_0x123e9b=a24_0x83c7;(function(_0x4c9c87,_0x7606ae){const _0x3a7d38=a24_0x83c7,_0x2b107a=_0x4c9c87();while(!![]){try{const _0x16298d=-parseInt(_0x3a7d38(0x19a))/0x1+parseInt(_0x3a7d38(0x19c))/0x2+-parseInt(_0x3a7d38(0x194))/0x3*(parseInt(_0x3a7d38(0x1a6))/0x4)+parseInt(_0x3a7d38(0x19e))/0x5+parseInt(_0x3a7d38(0x195))/0x6+parseInt(_0x3a7d38(0x197))/0x7*(-parseInt(_0x3a7d38(0x1a4))/0x8)+parseInt(_0x3a7d38(0x199))/0x9*(parseInt(_0x3a7d38(0x19b))/0xa);if(_0x16298d===_0x7606ae)break;else _0x2b107a['push'](_0x2b107a['shift']());}catch(_0x1b1904){_0x2b107a['push'](_0x2b107a['shift']());}}}(a24_0x4ccd,0x925e7));function a24_0x83c7(_0x30c669,_0xd18e2e){const _0x4ccd6d=a24_0x4ccd();return a24_0x83c7=function(_0x83c7c5,_0x274fc9){_0x83c7c5=_0x83c7c5-0x194;let _0x3b1d70=_0x4ccd6d[_0x83c7c5];return _0x3b1d70;},a24_0x83c7(_0x30c669,_0xd18e2e);}function a24_0x4ccd(){const _0x15bcad=['dialog','MobileXForm','$refs','$emit','form','5712480bdMoZp','props','932rRQGXP','9084BSKmwa','4331394pLbxIe','methods','7KXSmuU','update:fref','9iMAQzu','776461sKZuTm','3516670GQhYqt','1744950UNUaxV','formRef','4247655wCVCrv'];a24_0x4ccd=function(){return _0x15bcad;};return a24_0x4ccd();}import a24_0x37b877 from'./utils.js';export default{'name':a24_0x123e9b(0x1a0),'inheritAttrs':![],'props':{...a24_0x37b877[a24_0x123e9b(0x1a5)](),'labelWidth':{'type':String,'default':_0x5ac50b=>_0x5ac50b['labelWidth']||'80px'},'useWhen':{'type':Boolean,'default':![]}},'emits':[a24_0x123e9b(0x198)],'computed':{...a24_0x37b877['computed']},'mounted'(){const _0x54e5d9=a24_0x123e9b,_0x4c801f=this[_0x54e5d9(0x19f)]??this[_0x54e5d9(0x1a3)];_0x4c801f&&(_0x4c801f[_0x54e5d9(0x19d)]=this[_0x54e5d9(0x1a1)][_0x54e5d9(0x19d)]),this[_0x54e5d9(0x1a2)]('update:fref',this[_0x54e5d9(0x1a1)][_0x54e5d9(0x19d)]);},'methods':{...a24_0x37b877[a24_0x123e9b(0x196)]}};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
name: 'PcXForm',
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
props: {
|
|
7
|
-
...utils.props(),
|
|
8
|
-
title: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: '表单'
|
|
11
|
-
},
|
|
12
|
-
labelWidth: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: props => props.labelWidth || (props.dialog ? '100px' : '0px')
|
|
15
|
-
},
|
|
16
|
-
useCollapse: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false
|
|
19
|
-
},
|
|
20
|
-
useWhen: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
emits: ['update:fref'],
|
|
26
|
-
data () {
|
|
27
|
-
return {
|
|
28
|
-
activeNames: ['name']
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
computed: {
|
|
32
|
-
...utils.computed
|
|
33
|
-
},
|
|
34
|
-
mounted () {
|
|
35
|
-
const contanier = this.dialog ?? this.form
|
|
36
|
-
contanier && (contanier.formRef = this.$refs.formRef)
|
|
37
|
-
this.$emit('update:fref', this.$refs.formRef)
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
...utils.methods
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
const a25_0x4fb822=a25_0x699f;function a25_0x8c09(){const _0x309d12=['formRef','0px','5790390rmEDSE','4qSTqwa','1317270iLhBQj','479694NWuEXd','props','dialog','update:fref','100px','name','computed','PcXForm','4xhMHHS','56NDGrnk','697195XgAUQH','61161oVayax','349251gchVTa','1399662cRtIIv','labelWidth','$refs','$emit','form'];a25_0x8c09=function(){return _0x309d12;};return a25_0x8c09();}(function(_0x3ea993,_0x4aa050){const _0x49503b=a25_0x699f,_0x315059=_0x3ea993();while(!![]){try{const _0x541b33=-parseInt(_0x49503b(0x115))/0x1+-parseInt(_0x49503b(0x11d))/0x2*(-parseInt(_0x49503b(0x120))/0x3)+parseInt(_0x49503b(0x113))/0x4*(parseInt(_0x49503b(0x11f))/0x5)+parseInt(_0x49503b(0x114))/0x6+parseInt(_0x49503b(0x121))/0x7*(-parseInt(_0x49503b(0x11e))/0x8)+parseInt(_0x49503b(0x122))/0x9+parseInt(_0x49503b(0x112))/0xa;if(_0x541b33===_0x4aa050)break;else _0x315059['push'](_0x315059['shift']());}catch(_0x3d2611){_0x315059['push'](_0x315059['shift']());}}}(a25_0x8c09,0x4a8da));import a25_0x155e27 from'./utils.js';function a25_0x699f(_0x4a74be,_0x5722f9){const _0x8c09d0=a25_0x8c09();return a25_0x699f=function(_0x699f91,_0x1ffd9d){_0x699f91=_0x699f91-0x10e;let _0x1b93d1=_0x8c09d0[_0x699f91];return _0x1b93d1;},a25_0x699f(_0x4a74be,_0x5722f9);}export default{'name':a25_0x4fb822(0x11c),'inheritAttrs':![],'props':{...a25_0x155e27[a25_0x4fb822(0x116)](),'title':{'type':String,'default':'表单'},'labelWidth':{'type':String,'default':_0x3badd1=>_0x3badd1[a25_0x4fb822(0x123)]||(_0x3badd1[a25_0x4fb822(0x117)]?a25_0x4fb822(0x119):a25_0x4fb822(0x111))},'useCollapse':{'type':Boolean,'default':![]},'useWhen':{'type':Boolean,'default':![]}},'emits':['update:fref'],'data'(){const _0x4ebc6e=a25_0x4fb822;return{'activeNames':[_0x4ebc6e(0x11a)]};},'computed':{...a25_0x155e27[a25_0x4fb822(0x11b)]},'mounted'(){const _0x2e52c3=a25_0x4fb822,_0x2b4718=this[_0x2e52c3(0x117)]??this[_0x2e52c3(0x10f)];_0x2b4718&&(_0x2b4718[_0x2e52c3(0x110)]=this[_0x2e52c3(0x124)]['formRef']),this[_0x2e52c3(0x10e)](_0x2e52c3(0x118),this[_0x2e52c3(0x124)]['formRef']);},'methods':{...a25_0x155e27['methods']}};
|
|
@@ -1,95 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export function props () {
|
|
4
|
-
return {
|
|
5
|
-
dialog: Object,
|
|
6
|
-
form: Object,
|
|
7
|
-
model: Object,
|
|
8
|
-
items: Array,
|
|
9
|
-
rules: Object,
|
|
10
|
-
fref: Object,
|
|
11
|
-
doms: Array,
|
|
12
|
-
gutter: {
|
|
13
|
-
type: Number,
|
|
14
|
-
default: 5
|
|
15
|
-
},
|
|
16
|
-
hideLabels: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function _model () {
|
|
24
|
-
const { dialog, form, model } = this.$props
|
|
25
|
-
return model || (dialog || form).form
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function _items () {
|
|
29
|
-
const { hideLabels, dialog, form } = this.$props
|
|
30
|
-
const its = this.items || (dialog || form).formItems
|
|
31
|
-
return its.map((it, index) => {
|
|
32
|
-
delete it.visible
|
|
33
|
-
if (!hideLabels) {
|
|
34
|
-
return it
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
...it,
|
|
38
|
-
label: ' ',
|
|
39
|
-
_label: it.label,
|
|
40
|
-
prop: it.prop || ('_' + index)
|
|
41
|
-
}
|
|
42
|
-
}).filter(it => {
|
|
43
|
-
if (!this.dialog) {
|
|
44
|
-
return true
|
|
45
|
-
}
|
|
46
|
-
return this.dialog.isEditing ? (it.canEdit !== false) : (it.canAdd !== false)
|
|
47
|
-
}).map(it => {
|
|
48
|
-
return Object.assign({}, it, it.formAttrs)
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function _visibleItems () {
|
|
53
|
-
const items = this._items.filter(it => !it.formAttrs?.domid || this._doms.includes(it.formAttrs.domid))
|
|
54
|
-
if (!this.useWhen) return items
|
|
55
|
-
return items.filter(it => isWhenMatched(it.when || it.formAttrs?.when, this._model))
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function _doms () {
|
|
59
|
-
return this.doms || this.$store?.acl?.routeDoms || []
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function _rules () {
|
|
63
|
-
const { dialog, form, rules } = this.$props
|
|
64
|
-
return rules || (dialog || form).formRules
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function _viewonly () {
|
|
68
|
-
const { dialog, form } = this.$props
|
|
69
|
-
return this.$attrs.viewonly ?? (dialog || form).viewonly
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function calcPlaceholder (item) {
|
|
73
|
-
if (this._viewonly) return ''
|
|
74
|
-
let { placeholder, comp } = item
|
|
75
|
-
if (!placeholder) {
|
|
76
|
-
placeholder = 'options' in item || /(date|time)/i.test(comp) ? '请选择' : '请输入'
|
|
77
|
-
placeholder += item.label?.trim() || item._label || item.text || item.model || ''
|
|
78
|
-
}
|
|
79
|
-
return placeholder
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export default {
|
|
83
|
-
props,
|
|
84
|
-
computed: {
|
|
85
|
-
_model,
|
|
86
|
-
_items,
|
|
87
|
-
_visibleItems,
|
|
88
|
-
_doms,
|
|
89
|
-
_rules,
|
|
90
|
-
_viewonly
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
calcPlaceholder
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
(function(_0x55edb3,_0x28fe20){const _0x5cad36=a26_0x4508,_0x4ea54d=_0x55edb3();while(!![]){try{const _0x55eac=parseInt(_0x5cad36(0x10e))/0x1+parseInt(_0x5cad36(0x111))/0x2*(parseInt(_0x5cad36(0x11a))/0x3)+parseInt(_0x5cad36(0x105))/0x4*(parseInt(_0x5cad36(0x110))/0x5)+parseInt(_0x5cad36(0x115))/0x6*(parseInt(_0x5cad36(0x10a))/0x7)+-parseInt(_0x5cad36(0x11d))/0x8*(parseInt(_0x5cad36(0x107))/0x9)+parseInt(_0x5cad36(0x124))/0xa+parseInt(_0x5cad36(0x11f))/0xb;if(_0x55eac===_0x28fe20)break;else _0x4ea54d['push'](_0x4ea54d['shift']());}catch(_0x183405){_0x4ea54d['push'](_0x4ea54d['shift']());}}}(a26_0xe594,0x43108));import{isWhenMatched}from'../../utils/index.js';export function props(){return{'dialog':Object,'form':Object,'model':Object,'items':Array,'rules':Object,'fref':Object,'doms':Array,'gutter':{'type':Number,'default':0x5},'hideLabels':{'type':Boolean,'default':![]}};}export function _model(){const _0x3472d0=a26_0x4508,{dialog:_0x15c4af,form:_0x9e8177,model:_0x29666c}=this[_0x3472d0(0x128)];return _0x29666c||(_0x15c4af||_0x9e8177)[_0x3472d0(0x11c)];}export function _items(){const _0x3d9acf=a26_0x4508,{hideLabels:_0x230eb7,dialog:_0xf587fc,form:_0x5325ba}=this[_0x3d9acf(0x128)],_0x581bb8=this[_0x3d9acf(0x122)]||(_0xf587fc||_0x5325ba)[_0x3d9acf(0x123)];return _0x581bb8[_0x3d9acf(0x12a)]((_0xc73342,_0x523ad3)=>{const _0x41cfb4=_0x3d9acf;delete _0xc73342[_0x41cfb4(0x11e)];if(!_0x230eb7)return _0xc73342;return{..._0xc73342,'label':'\x20','_label':_0xc73342[_0x41cfb4(0x113)],'prop':_0xc73342[_0x41cfb4(0x106)]||'_'+_0x523ad3};})['filter'](_0x1f273d=>{const _0x4abdef=_0x3d9acf;if(!this[_0x4abdef(0x109)])return!![];return this[_0x4abdef(0x109)][_0x4abdef(0x116)]?_0x1f273d[_0x4abdef(0x108)]!==![]:_0x1f273d[_0x4abdef(0x12b)]!==![];})[_0x3d9acf(0x12a)](_0xe48dd5=>{const _0x261b5f=_0x3d9acf;return Object['assign']({},_0xe48dd5,_0xe48dd5[_0x261b5f(0x103)]);});}export function _visibleItems(){const _0x336665=a26_0x4508,_0x48f269=this[_0x336665(0x10b)][_0x336665(0x112)](_0x37ff0e=>!_0x37ff0e[_0x336665(0x103)]?.[_0x336665(0x129)]||this[_0x336665(0x10c)]['includes'](_0x37ff0e[_0x336665(0x103)][_0x336665(0x129)]));if(!this[_0x336665(0x125)])return _0x48f269;return _0x48f269[_0x336665(0x112)](_0x1ca634=>isWhenMatched(_0x1ca634[_0x336665(0x104)]||_0x1ca634[_0x336665(0x103)]?.['when'],this['_model']));}export function _doms(){const _0x498fb6=a26_0x4508;return this[_0x498fb6(0x127)]||this['$store']?.[_0x498fb6(0x120)]?.[_0x498fb6(0x11b)]||[];}function a26_0x4508(_0x4953bb,_0x191a85){const _0xe5943b=a26_0xe594();return a26_0x4508=function(_0x450843,_0x28bc27){_0x450843=_0x450843-0x102;let _0x1e4912=_0xe5943b[_0x450843];return _0x1e4912;},a26_0x4508(_0x4953bb,_0x191a85);}export function _rules(){const _0x104156=a26_0x4508,{dialog:_0xca48c4,form:_0x176c89,rules:_0x18e1ee}=this[_0x104156(0x128)];return _0x18e1ee||(_0xca48c4||_0x176c89)[_0x104156(0x117)];}export function _viewonly(){const _0x68d787=a26_0x4508,{dialog:_0x19b03f,form:_0x5e8ce6}=this[_0x68d787(0x128)];return this[_0x68d787(0x10d)]['viewonly']??(_0x19b03f||_0x5e8ce6)[_0x68d787(0x121)];}export function calcPlaceholder(_0x1e07f7){const _0x45201e=a26_0x4508;if(this[_0x45201e(0x10f)])return'';let {placeholder:_0xdca863,comp:_0x3d9617}=_0x1e07f7;return!_0xdca863&&(_0xdca863=_0x45201e(0x118)in _0x1e07f7||/(date|time)/i[_0x45201e(0x114)](_0x3d9617)?_0x45201e(0x119):'请输入',_0xdca863+=_0x1e07f7[_0x45201e(0x113)]?.[_0x45201e(0x126)]()||_0x1e07f7[_0x45201e(0x102)]||_0x1e07f7['text']||_0x1e07f7['model']||''),_0xdca863;}export default{'props':props,'computed':{'_model':_model,'_items':_items,'_visibleItems':_visibleItems,'_doms':_doms,'_rules':_rules,'_viewonly':_viewonly},'methods':{'calcPlaceholder':calcPlaceholder}};function a26_0xe594(){const _0xb3bc64=['$props','domid','map','canAdd','_label','formAttrs','when','127784XyqKpK','prop','3224439yLNBrZ','canEdit','dialog','1974637NhEJLu','_items','_doms','$attrs','48591mrJjNX','_viewonly','5xMZHnd','96378oVoKEJ','filter','label','test','6jtKpCR','isEditing','formRules','options','请选择','6wZakaX','routeDoms','form','8TMwRnK','visible','421223Jupmsa','acl','viewonly','items','formItems','1356680VmywpE','useWhen','trim','doms'];a26_0xe594=function(){return _0xb3bc64;};return a26_0xe594();}
|
|
@@ -1,56 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
name: 'MobileXFormItem',
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: Boolean | Number | String | Array,
|
|
7
|
-
clearable: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: true
|
|
10
|
-
},
|
|
11
|
-
viewonly: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: false
|
|
14
|
-
},
|
|
15
|
-
model: Object,
|
|
16
|
-
item: Object,
|
|
17
|
-
|
|
18
|
-
// 接收下面这几个属性,为了避免这些属性被绑定到当前组件根节点上,在下面会进行过滤传给子组件
|
|
19
|
-
comp: String,
|
|
20
|
-
compType: String,
|
|
21
|
-
options: Array,
|
|
22
|
-
platform: String,
|
|
23
|
-
iconSize: String | Number,
|
|
24
|
-
min: Number,
|
|
25
|
-
max: Number,
|
|
26
|
-
maxlength: String | Number,
|
|
27
|
-
buttonSize: String | Number,
|
|
28
|
-
activeColor: String,
|
|
29
|
-
slot: String,
|
|
30
|
-
time: Number,
|
|
31
|
-
percentage: Number,
|
|
32
|
-
barHeight: String | Number,
|
|
33
|
-
text: String,
|
|
34
|
-
html: String
|
|
35
|
-
},
|
|
36
|
-
emits: ['update:modelValue', 'change'],
|
|
37
|
-
computed: {
|
|
38
|
-
attrs () {
|
|
39
|
-
const {
|
|
40
|
-
prop,
|
|
41
|
-
label,
|
|
42
|
-
platform,
|
|
43
|
-
comp,
|
|
44
|
-
compType,
|
|
45
|
-
iconSize,
|
|
46
|
-
slot,
|
|
47
|
-
html,
|
|
48
|
-
...others
|
|
49
|
-
} = { ...this.$props, ...this.$attrs }
|
|
50
|
-
return others
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
render () {
|
|
54
|
-
return MobileItem(this)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
function a27_0xd152(_0x1d48d0,_0x2d5354){const _0x4e1ab8=a27_0x4e1a();return a27_0xd152=function(_0xd1523d,_0x89d18e){_0xd1523d=_0xd1523d-0x1e8;let _0x129deb=_0x4e1ab8[_0xd1523d];return _0x129deb;},a27_0xd152(_0x1d48d0,_0x2d5354);}const a27_0xac35ac=a27_0xd152;(function(_0x2f8521,_0x317076){const _0x2137ea=a27_0xd152,_0x18bf4f=_0x2f8521();while(!![]){try{const _0x415ec4=-parseInt(_0x2137ea(0x1f1))/0x1*(-parseInt(_0x2137ea(0x1e8))/0x2)+parseInt(_0x2137ea(0x1ef))/0x3+parseInt(_0x2137ea(0x1ea))/0x4*(parseInt(_0x2137ea(0x1e9))/0x5)+parseInt(_0x2137ea(0x1eb))/0x6+parseInt(_0x2137ea(0x1f2))/0x7*(-parseInt(_0x2137ea(0x1f0))/0x8)+parseInt(_0x2137ea(0x1ed))/0x9+-parseInt(_0x2137ea(0x1ec))/0xa;if(_0x415ec4===_0x317076)break;else _0x18bf4f['push'](_0x18bf4f['shift']());}catch(_0x52183c){_0x18bf4f['push'](_0x18bf4f['shift']());}}}(a27_0x4e1a,0xdb339));import{MobileItem}from'./utils.jsx';export default{'name':a27_0xac35ac(0x1ee),'props':{'modelValue':Boolean|Number|String|Array,'clearable':{'type':Boolean,'default':!![]},'viewonly':{'type':Boolean,'default':![]},'model':Object,'item':Object,'comp':String,'compType':String,'options':Array,'platform':String,'iconSize':String|Number,'min':Number,'max':Number,'maxlength':String|Number,'buttonSize':String|Number,'activeColor':String,'slot':String,'time':Number,'percentage':Number,'barHeight':String|Number,'text':String,'html':String},'emits':['update:modelValue','change'],'computed':{'attrs'(){const {prop:_0x557d94,label:_0xae34ad,platform:_0x4dd97b,comp:_0x2f67c5,compType:_0x178249,iconSize:_0x320a55,slot:_0x42e386,html:_0x3de767,..._0x244059}={...this['$props'],...this['$attrs']};return _0x244059;}},'render'(){return MobileItem(this);}};function a27_0x4e1a(){const _0x3aba74=['102588riYJfT','690gtoGZQ','51624CNUfVe','39804FHWoED','23842540PiExtv','4277583sUxYLF','MobileXFormItem','3423411QdpSSz','44632YeRqdu','11lqHfvD','861eNwTiU'];a27_0x4e1a=function(){return _0x3aba74;};return a27_0x4e1a();}
|