@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.
Files changed (105) hide show
  1. package/@vant-D4fmGxs6.js +1 -3891
  2. package/index.html +28 -0
  3. package/index.js +1 -8419
  4. package/lib/tinymce/zh_CN.js +1 -0
  5. package/package.json +1 -1
  6. package/packages/assets/devtools-detector.js +1 -2
  7. package/packages/components/xarray/index.js +1 -64
  8. package/packages/components/xautorows/index.js +1 -35
  9. package/packages/components/xbutton/mobile.js +1 -3
  10. package/packages/components/xbutton/pc.js +1 -3
  11. package/packages/components/xbuttons/mobile.js +1 -51
  12. package/packages/components/xbuttons/pc.js +1 -51
  13. package/packages/components/xchart/constants.js +1 -58
  14. package/packages/components/xchart/index.js +1 -263
  15. package/packages/components/xchart/utils.js +1 -121
  16. package/packages/components/xcheckboxs/mobile.js +1 -58
  17. package/packages/components/xcheckboxs/pc.js +1 -49
  18. package/packages/components/xcol/mobile.js +1 -10
  19. package/packages/components/xcol/pc.js +1 -10
  20. package/packages/components/xdatepicker/mobile.js +1 -71
  21. package/packages/components/xdatepicker/pc.js +1 -9
  22. package/packages/components/xdialog/mobile.js +1 -60
  23. package/packages/components/xdialog/pc.js +1 -64
  24. package/packages/components/xdict/index.js +1 -47
  25. package/packages/components/xdistrictselect/mobile.js +1 -79
  26. package/packages/components/xdistrictselect/pc.js +1 -127
  27. package/packages/components/xform/mobile.js +1 -29
  28. package/packages/components/xform/pc.js +1 -42
  29. package/packages/components/xform/utils.js +1 -95
  30. package/packages/components/xformitem/mobile.js +1 -56
  31. package/packages/components/xformitem/pc.js +1 -72
  32. package/packages/components/xicon/mobile.js +1 -35
  33. package/packages/components/xicon/pc.js +1 -35
  34. package/packages/components/xinfo/index.js +1 -100
  35. package/packages/components/xlooper/index.js +1 -7
  36. package/packages/components/xpagination/mobile.js +1 -21
  37. package/packages/components/xpagination/pc.js +1 -21
  38. package/packages/components/xpicker/index.js +1 -38
  39. package/packages/components/xradios/mobile.js +1 -40
  40. package/packages/components/xradios/pc.js +1 -53
  41. package/packages/components/xrow/mobile.js +1 -9
  42. package/packages/components/xrow/pc.js +1 -9
  43. package/packages/components/xscan/mobile.js +1 -24
  44. package/packages/components/xscan/pc.js +1 -20
  45. package/packages/components/xsearcher/index.js +1 -198
  46. package/packages/components/xselect/mobile.js +1 -86
  47. package/packages/components/xselect/pc.js +1 -114
  48. package/packages/components/xselect/util.js +1 -66
  49. package/packages/components/xselectv2/index.js +1 -91
  50. package/packages/components/xtable/mobile.js +1 -108
  51. package/packages/components/xtable/pc.js +1 -143
  52. package/packages/components/xtable/searcher.js +1 -477
  53. package/packages/components/xtable/settings.js +1 -80
  54. package/packages/components/xtable/utils.js +1 -692
  55. package/packages/components/xtabletools/mobile.js +1 -25
  56. package/packages/components/xtabletools/pc.js +1 -18
  57. package/packages/components/xtablev2/index.js +1 -53
  58. package/packages/components/xtags/mobile.js +1 -17
  59. package/packages/components/xtags/pc.js +1 -17
  60. package/packages/components/xtinymce/index.js +1 -71
  61. package/packages/components/xuploader/xfileuploader.js +1 -48
  62. package/packages/components/xuploader/ximageuploader.js +1 -53
  63. package/packages/comps.js +1 -108
  64. package/packages/controllers/BaseController.js +1 -125
  65. package/packages/controllers/CrudController.js +1 -907
  66. package/packages/controllers/TempCrudController.js +1 -32
  67. package/packages/controllers/index.js +1 -15
  68. package/packages/directives/el-table-infinite-scroll.js +1 -55
  69. package/packages/directives/index.js +1 -5
  70. package/packages/index.js +1 -81
  71. package/packages/layout/breadcrumb/index.js +1 -41
  72. package/packages/layout/header/inner.js +1 -11
  73. package/packages/layout/screenlock/index.js +1 -129
  74. package/packages/layout/sidebar/item.js +1 -16
  75. package/packages/layout/sidebar/menu.js +1 -72
  76. package/packages/layout/tagsview/ScrollPane.js +1 -65
  77. package/packages/layout/tagsview/index.js +1 -169
  78. package/packages/plop/actions/make-fill-admin-partials-action.js +1 -95
  79. package/packages/plop/generators/make-admin-page.js +1 -39
  80. package/packages/plop/generators/make-database-admin-pages.js +1 -84
  81. package/packages/plop/generators/make-page-generator.js +1 -52
  82. package/packages/plop/generators/make-simple-page.js +1 -20
  83. package/packages/plop/plopfile.js +1 -24
  84. package/packages/plop/utils/index.js +1 -168
  85. package/packages/plop/utils/plop-utils.js +1 -86
  86. package/packages/utils/crypt.js +1 -24
  87. package/packages/utils/decorators.js +1 -67
  88. package/packages/utils/disallowDevtools.js +1 -53
  89. package/packages/utils/effects.js +1 -173
  90. package/packages/utils/funcs.js +1 -78
  91. package/packages/utils/index.js +1 -95
  92. package/packages/utils/message.js +1 -110
  93. package/packages/utils/middlewares.js +1 -86
  94. package/packages/utils/model.js +1 -71
  95. package/packages/utils/modelUtils.js +1 -203
  96. package/packages/utils/request.js +1 -57
  97. package/packages/utils/site.js +1 -33
  98. package/packages/vite-plugins.js +1 -141
  99. package/src/App.vue +134 -0
  100. package/src/main.js +1 -0
  101. package/src/request.js +1 -0
  102. package/style.css +1 -0
  103. package/vite.config.js +1 -0
  104. package/vite.lib.config.js +1 -0
  105. 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_0x4f6df1=a19_0x47d8;function a19_0x3085(){var _0x1f47ff=['462489xsrZhc','10FWnljG','5ipEwMk','8tauvdJ','2188901YjvgRu','$nextTick','3fGrmMO','onCancel','submit','update:modelValue','$parent','2405270SZmfET','visible','120534TXYsHA','131226pgjLzK','MobileXDialog','$attrs','modelValue','onSubmit','cancel','1163992KejkMH','997947xHTIAG'];a19_0x3085=function(){return _0x1f47ff;};return a19_0x3085();}(function(_0x1cbe7a,_0x5e6a33){var _0x52c1c6=a19_0x47d8,_0x532050=_0x1cbe7a();while(!![]){try{var _0xc56df5=-parseInt(_0x52c1c6(0xbb))/0x1*(-parseInt(_0x52c1c6(0xac))/0x2)+-parseInt(_0x52c1c6(0xb5))/0x3+-parseInt(_0x52c1c6(0xb3))/0x4+parseInt(_0x52c1c6(0xb7))/0x5*(parseInt(_0x52c1c6(0xad))/0x6)+-parseInt(_0x52c1c6(0xc0))/0x7*(-parseInt(_0x52c1c6(0xb8))/0x8)+parseInt(_0x52c1c6(0xb4))/0x9*(-parseInt(_0x52c1c6(0xb6))/0xa)+parseInt(_0x52c1c6(0xb9))/0xb;if(_0xc56df5===_0x5e6a33)break;else _0x532050['push'](_0x532050['shift']());}catch(_0x39812b){_0x532050['push'](_0x532050['shift']());}}}(a19_0x3085,0x2e32d));function a19_0x47d8(_0x48f6d4,_0x32703a){var _0x3085e3=a19_0x3085();return a19_0x47d8=function(_0x47d8c8,_0x4eeef5){_0x47d8c8=_0x47d8c8-0xac;var _0x4794d3=_0x3085e3[_0x47d8c8];return _0x4794d3;},a19_0x47d8(_0x48f6d4,_0x32703a);}export default{'name':a19_0x4f6df1(0xae),'props':{'actionsheet':{'type':Boolean,'default':!![]},'modelValue':{'type':Boolean,'default':![]},'title':{'type':String,'default':'详情'},'submitText':{'type':String,'default':'提交'},'cancelText':{'type':String,'default':'取消'}},'emits':[a19_0x4f6df1(0xbe),'submit',a19_0x4f6df1(0xb2)],'computed':{'visible':{'get'(){var _0x560f2b=a19_0x4f6df1;return this[_0x560f2b(0xb0)];},'set'(_0x484dc0){var _0x330ed3=a19_0x4f6df1;this['$emit'](_0x330ed3(0xbe),_0x484dc0);}},'canCancel'(){var _0x3d6094=a19_0x4f6df1;return!!this[_0x3d6094(0xaf)][_0x3d6094(0xbc)]||!!this['$parent']['$attrs'][_0x3d6094(0xbc)];},'canConfirm'(){var _0x3b07e0=a19_0x4f6df1;return!!this[_0x3b07e0(0xaf)]['onSubmit']||!!this[_0x3b07e0(0xbf)][_0x3b07e0(0xaf)][_0x3b07e0(0xb1)];}},'methods':{async 'handleCancel'(){var _0x1d9224=a19_0x4f6df1;await this[_0x1d9224(0xba)](),this[_0x1d9224(0xc1)]=!![],await this['$nextTick'](),this['$emit'](_0x1d9224(0xb2));},async 'handleConfirm'(){var _0x26238d=a19_0x4f6df1;await this[_0x26238d(0xba)](),this['visible']=!![],await this[_0x26238d(0xba)](),this['$emit'](_0x26238d(0xbd));}}};
@@ -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
+ var a20_0x390112=a20_0xf29d;function a20_0xf29d(_0xe65975,_0x5dc46b){var _0x3e9842=a20_0x3e98();return a20_0xf29d=function(_0xf29d1c,_0xe114d9){_0xf29d1c=_0xf29d1c-0x1dd;var _0x1ee60f=_0x3e9842[_0xf29d1c];return _0x1ee60f;},a20_0xf29d(_0xe65975,_0x5dc46b);}(function(_0x4465ca,_0x15f824){var _0x4cc67c=a20_0xf29d,_0x1f059a=_0x4465ca();while(!![]){try{var _0x256ab7=-parseInt(_0x4cc67c(0x1f3))/0x1+-parseInt(_0x4cc67c(0x1ed))/0x2+parseInt(_0x4cc67c(0x1ea))/0x3+parseInt(_0x4cc67c(0x1df))/0x4*(parseInt(_0x4cc67c(0x1e0))/0x5)+-parseInt(_0x4cc67c(0x1ef))/0x6*(parseInt(_0x4cc67c(0x1e5))/0x7)+parseInt(_0x4cc67c(0x1de))/0x8*(-parseInt(_0x4cc67c(0x1e2))/0x9)+parseInt(_0x4cc67c(0x1f0))/0xa*(parseInt(_0x4cc67c(0x1f2))/0xb);if(_0x256ab7===_0x15f824)break;else _0x1f059a['push'](_0x1f059a['shift']());}catch(_0xaa7d31){_0x1f059a['push'](_0x1f059a['shift']());}}}(a20_0x3e98,0x72e19));function a20_0x3e98(){var _0x26f4ee=['639ewofIE','$attrs','$emit','49YwRvyi','submit','update:modelValue','modelValue','onSubmit','898095kELTtB','fullscreen','$slots','41492zDJXrP','onCancel','7266fuhZME','820nnQPth','fullscreenchange','119163ZtaYut','822411OspOcA','footer','cancel','49328wOBvrG','37528ijpjIE','305QpbOGO','$parent'];a20_0x3e98=function(){return _0x26f4ee;};return a20_0x3e98();}export default{'name':'PcXDialog','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_0x390112(0x1e7),a20_0x390112(0x1e6),a20_0x390112(0x1dd),a20_0x390112(0x1f1)],'data'(){return{'fullscreen':this['$attrs']['fullscreen']||![]};},'computed':{'visible':{'get'(){var _0x39759b=a20_0x390112;return this[_0x39759b(0x1e8)];},'set'(_0x21db1a){var _0x2e8683=a20_0x390112;this[_0x2e8683(0x1e4)](_0x2e8683(0x1e7),_0x21db1a);}},'hasFooter'(){var _0x3b68e0=a20_0x390112;return this[_0x3b68e0(0x1e9)]||this['$parent'][_0x3b68e0(0x1e3)]['onSubmit']||this[_0x3b68e0(0x1ee)]||this[_0x3b68e0(0x1e1)][_0x3b68e0(0x1e3)]['onCancel']||this[_0x3b68e0(0x1ec)][_0x3b68e0(0x1f4)];}},'methods':{'handleToggleFullscreen'(){var _0x1be8a6=a20_0x390112;this['fullscreen']=!this[_0x1be8a6(0x1eb)],this[_0x1be8a6(0x1e4)](_0x1be8a6(0x1f1),this[_0x1be8a6(0x1eb)]);}}};
@@ -1,47 +1 @@
1
- import { injectVanFieldProvide } from '../../utils/funcs.js'
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_0xdadd7f=a21_0x4a22;function a21_0x4a22(_0x373276,_0x40179e){const _0x4dae86=a21_0x4dae();return a21_0x4a22=function(_0x4a226a,_0x493dcf){_0x4a226a=_0x4a226a-0x1b1;let _0x4f892f=_0x4dae86[_0x4a226a];return _0x4f892f;},a21_0x4a22(_0x373276,_0x40179e);}function a21_0x4dae(){const _0x5f22b=['items','form','map','isMobile','1880079eWtKvk','24104yNuFSe','640BlPfmc','span','1837MqivJk','154TCEzRQ','694tGaVxk','XDict','update:modelValue','1521FbWFOg','618SaSGay','24EChXeS','17708LsWGGl','$emit','30890wDHlzW','15156817gDuiVx','makeForm','158148WZmWtq'];a21_0x4dae=function(){return _0x5f22b;};return a21_0x4dae();}(function(_0xe54de9,_0xdfacc6){const _0x168db3=a21_0x4a22,_0x203c95=_0xe54de9();while(!![]){try{const _0x4a403f=parseInt(_0x168db3(0x1c3))/0x1*(-parseInt(_0x168db3(0x1b1))/0x2)+-parseInt(_0x168db3(0x1bd))/0x3+-parseInt(_0x168db3(0x1b3))/0x4*(parseInt(_0x168db3(0x1bf))/0x5)+-parseInt(_0x168db3(0x1b8))/0x6*(parseInt(_0x168db3(0x1c2))/0x7)+parseInt(_0x168db3(0x1be))/0x8*(parseInt(_0x168db3(0x1c6))/0x9)+parseInt(_0x168db3(0x1b5))/0xa*(-parseInt(_0x168db3(0x1c1))/0xb)+parseInt(_0x168db3(0x1b2))/0xc*(parseInt(_0x168db3(0x1b6))/0xd);if(_0x4a403f===_0xdfacc6)break;else _0x203c95['push'](_0x203c95['shift']());}catch(_0x1e1087){_0x203c95['push'](_0x203c95['shift']());}}}(a21_0x4dae,0x52649));import{injectVanFieldProvide}from'../../utils/funcs.js';import{baseForm}from'../../utils/model.js';import{initForm}from'../../utils/modelUtils.js';export default{'name':a21_0xdadd7f(0x1c4),'props':{'modelValue':Object|String|undefined,'items':Array},'emits':[a21_0xdadd7f(0x1c5)],'data'(){return{'form':baseForm()};},'watch':{'items':{'immediate':!![],'deep':!![],'handler'(){const _0x21b046=a21_0xdadd7f;this[_0x21b046(0x1ba)]=this[_0x21b046(0x1b7)]();}},'form.form':{'deep':!![],'handler'(){const _0x4dad06=a21_0xdadd7f;this[_0x4dad06(0x1b4)](_0x4dad06(0x1c5),this[_0x4dad06(0x1ba)]['form']),this['provide']?.['resetValidation']();}}},'created'(){const _0x296bb9=a21_0xdadd7f;window[_0x296bb9(0x1bc)]&&injectVanFieldProvide(this);},'methods':{'makeForm'(){const _0x2b3a41=a21_0xdadd7f,_0x3269fb=baseForm(),_0x484f2d=Math['floor'](0x18/this['items']['length']),_0x35713c=this[_0x2b3a41(0x1b9)][_0x2b3a41(0x1bb)](_0x3cb8d5=>({'span':_0x3cb8d5[_0x2b3a41(0x1c0)]||_0x484f2d,..._0x3cb8d5}));return initForm(_0x3269fb,_0x35713c),_0x3269fb;}}};
@@ -1,79 +1 @@
1
- import { areaList } from '@vant/area-data'
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_0x9e240b=a22_0x57fc;function a22_0x4e7e(){const _0x41922b=['level','1826995JQzTPD','length','update:modelValue','请选择地区','city_list','value','startsWith','county_list','3027339PgpxRn','4eUosYF','modelValue','$emit','area','county','join','2otVeTv','seperator','MobileXDistrictSelect','counties','isArray','11GNddXJ','init','325929TkcZzG','provinces','cities','text','map','placeholder','find','1553142XUEwcT','split','6243230aGtXoF','21xKuAqS','1526504QpIAPl','visible','slice','change','172412ImmiwM','entries'];a22_0x4e7e=function(){return _0x41922b;};return a22_0x4e7e();}(function(_0xeb9ef6,_0x44a598){const _0x16e6b9=a22_0x57fc,_0x4d0430=_0xeb9ef6();while(!![]){try{const _0x1d0d04=parseInt(_0x16e6b9(0xad))/0x1+parseInt(_0x16e6b9(0x97))/0x2*(-parseInt(_0x16e6b9(0x9e))/0x3)+parseInt(_0x16e6b9(0xb9))/0x4*(-parseInt(_0x16e6b9(0xb0))/0x5)+-parseInt(_0x16e6b9(0xa5))/0x6+parseInt(_0x16e6b9(0xa8))/0x7*(parseInt(_0x16e6b9(0xa9))/0x8)+-parseInt(_0x16e6b9(0xb8))/0x9+-parseInt(_0x16e6b9(0xa7))/0xa*(-parseInt(_0x16e6b9(0x9c))/0xb);if(_0x1d0d04===_0x44a598)break;else _0x4d0430['push'](_0x4d0430['shift']());}catch(_0x5caa35){_0x4d0430['push'](_0x4d0430['shift']());}}}(a22_0x4e7e,0x49380));import{areaList}from'@vant/area-data';const areas={'provinces':[],'cities':[],'counties':[]};areas[a22_0x9e240b(0x9f)]=Object[a22_0x9e240b(0xae)](areaList['province_list'])[a22_0x9e240b(0xa2)](_0x3ae556=>({'value':_0x3ae556[0x0],'text':_0x3ae556[0x1]})),areas[a22_0x9e240b(0xa0)]=Object[a22_0x9e240b(0xae)](areaList[a22_0x9e240b(0xb4)])[a22_0x9e240b(0xa2)](_0xaecff1=>({'value':_0xaecff1[0x0],'text':_0xaecff1[0x1]})),areas['counties']=Object[a22_0x9e240b(0xae)](areaList[a22_0x9e240b(0xb7)])[a22_0x9e240b(0xa2)](_0x23eab1=>({'value':_0x23eab1[0x0],'text':_0x23eab1[0x1]}));function a22_0x57fc(_0x3a5f53,_0x30de9c){const _0x4e7eb8=a22_0x4e7e();return a22_0x57fc=function(_0x57fc37,_0x435a7a){_0x57fc37=_0x57fc37-0x95;let _0x364f35=_0x4e7eb8[_0x57fc37];return _0x364f35;},a22_0x57fc(_0x3a5f53,_0x30de9c);}export default{'name':a22_0x9e240b(0x99),'props':{'modelValue':String|Array,'seperator':{'type':String,'default':'/'},'level':{'type':String,'default':a22_0x9e240b(0x95)},'placeholder':{'type':String,'default':a22_0x9e240b(0xb3)}},'emits':[a22_0x9e240b(0xb2),a22_0x9e240b(0xac)],'data'(){return{'areaList':areaList,'visible':![],'value':'','area':''};},'computed':{'number'(){const _0x3f9644=a22_0x9e240b;return{'province':0x1,'city':0x2,'county':0x3}[this[_0x3f9644(0xaf)]];},'text'(){const _0x44fb3f=a22_0x9e240b;return this[_0x44fb3f(0xba)]||this[_0x44fb3f(0xa3)];}},'watch':{'modelValue':{'handler':a22_0x9e240b(0x9d),'immediate':!![]}},'methods':{async 'init'(){const _0x116570=a22_0x9e240b;if(this[_0x116570(0xba)]===this[_0x116570(0xb5)])return;const _0x128d5a=Array[_0x116570(0x9b)](this[_0x116570(0xba)])?this['modelValue']:(this[_0x116570(0xba)]||'')[_0x116570(0xa6)](this[_0x116570(0x98)]),[_0x55bb79,_0x57ba1d,_0x12af04]=_0x128d5a,_0x442530=areas[_0x116570(0x9f)][_0x116570(0xa4)](_0x1ef109=>_0x1ef109[_0x116570(0xa1)]===_0x55bb79)?.['value'],_0x10fef0=_0x442530?.[_0x116570(0xab)](0x0,0x2),_0x22cec9=areas[_0x116570(0xa0)]['find'](_0x475dfe=>_0x475dfe[_0x116570(0xb5)][_0x116570(0xb6)](_0x10fef0)&&_0x475dfe[_0x116570(0xa1)]===_0x57ba1d)?.[_0x116570(0xb5)],_0x4ca5e4=_0x22cec9?.['slice'](0x0,0x4),_0x5422f6=areas[_0x116570(0x9a)][_0x116570(0xa4)](_0x4f6519=>_0x4f6519[_0x116570(0xb5)][_0x116570(0xb6)](_0x4ca5e4)&&_0x4f6519['text']===_0x12af04)?.['value'];this[_0x116570(0xbc)]=_0x5422f6,Array[_0x116570(0x9b)](this[_0x116570(0xba)])&&(this[_0x116570(0xb5)]=this[_0x116570(0xba)][_0x116570(0x96)](this[_0x116570(0x98)]),this[_0x116570(0xbb)](_0x116570(0xb2),this[_0x116570(0xb5)]),this[_0x116570(0xbb)](_0x116570(0xac),this['value']));},'onConfirm'({selectedOptions:_0x345434}){const _0x4e0eab=a22_0x9e240b;this[_0x4e0eab(0xaa)]=![];const _0x7161d3=_0x345434['map'](_0x3881df=>_0x3881df[_0x4e0eab(0xa1)])[_0x4e0eab(0x96)](this[_0x4e0eab(0x98)]);this['area']=_0x345434[_0x345434[_0x4e0eab(0xb1)]-0x1][_0x4e0eab(0xb5)],this[_0x4e0eab(0xb5)]=_0x7161d3,this[_0x4e0eab(0xbb)](_0x4e0eab(0xb2),_0x7161d3),this['$emit'](_0x4e0eab(0xac),_0x7161d3);}}};
@@ -1,127 +1 @@
1
- import { areaList } from '@vant/area-data'
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_0x2c1f8e=a23_0x46db;(function(_0x5b6e93,_0x1c8d9f){const _0x2d0569=a23_0x46db,_0x5e96d9=_0x5b6e93();while(!![]){try{const _0x2a10d5=-parseInt(_0x2d0569(0x120))/0x1*(-parseInt(_0x2d0569(0x117))/0x2)+parseInt(_0x2d0569(0x119))/0x3+parseInt(_0x2d0569(0x115))/0x4*(parseInt(_0x2d0569(0x134))/0x5)+parseInt(_0x2d0569(0x131))/0x6+parseInt(_0x2d0569(0x116))/0x7+-parseInt(_0x2d0569(0x111))/0x8+-parseInt(_0x2d0569(0x126))/0x9*(parseInt(_0x2d0569(0x129))/0xa);if(_0x2a10d5===_0x1c8d9f)break;else _0x5e96d9['push'](_0x5e96d9['shift']());}catch(_0x44fd49){_0x5e96d9['push'](_0x5e96d9['shift']());}}}(a23_0x483c,0x525d2));import{areaList}from'@vant/area-data';const areas={'provinces':[],'cities':[],'counties':[]};areas[a23_0x2c1f8e(0x11f)]=Object[a23_0x2c1f8e(0x110)](areaList[a23_0x2c1f8e(0x112)])[a23_0x2c1f8e(0x128)](_0x133735=>({'value':_0x133735[0x0],'text':_0x133735[0x1]})),areas[a23_0x2c1f8e(0x133)]=Object['entries'](areaList['city_list'])[a23_0x2c1f8e(0x128)](_0x29b7fc=>({'value':_0x29b7fc[0x0],'text':_0x29b7fc[0x1]})),areas[a23_0x2c1f8e(0x12f)]=Object['entries'](areaList['county_list'])['map'](_0x579452=>({'value':_0x579452[0x0],'text':_0x579452[0x1]}));export default{'name':a23_0x2c1f8e(0x12b),'props':{'modelValue':String|Array,'seperator':{'type':String,'default':'/'},'level':{'type':String,'default':a23_0x2c1f8e(0x11c)}},'emits':[a23_0x2c1f8e(0x12e),a23_0x2c1f8e(0x12a)],'data'(){const _0x5952ae=a23_0x2c1f8e;return{'inited':!![],'province':'','city':'','county':'','provinces':Object[_0x5952ae(0x132)](areas['provinces']),'cities':[],'counties':[]};},'computed':{'number'(){return{'province':0x1,'city':0x2,'county':0x3}[this['level']];},'span'(){return 0x18/this['number'];}},'watch':{'province'(_0x434062){const _0x529529=a23_0x2c1f8e;!this[_0x529529(0x11c)]&&this['update']();this[_0x529529(0x11d)]=this[_0x529529(0x11c)]='';if(!_0x434062){this['cities']=[],this['counties']=[];return;}const _0x344d1f=_0x434062['slice'](0x0,0x2);this[_0x529529(0x133)]=Object['freeze'](areas[_0x529529(0x133)][_0x529529(0x11e)](_0x3fee50=>_0x3fee50[_0x529529(0x12c)][_0x529529(0x118)](0x0,0x2)===_0x344d1f));},'city'(_0x190f76){const _0x20acf8=a23_0x2c1f8e;!this[_0x20acf8(0x11c)]&&this[_0x20acf8(0x130)]();this[_0x20acf8(0x11c)]='';if(!_0x190f76){this['counties']=[];return;}const _0x114a52=_0x190f76[_0x20acf8(0x118)](0x0,0x4);this['counties']=Object['freeze'](areas[_0x20acf8(0x12f)][_0x20acf8(0x11e)](_0x3b97a0=>_0x3b97a0[_0x20acf8(0x12c)][_0x20acf8(0x118)](0x0,0x4)===_0x114a52));},'county'(){this['update']();},'modelValue':{'handler':a23_0x2c1f8e(0x114),'immediate':!![]}},'methods':{async 'init'(){const _0x3ceb6a=a23_0x2c1f8e;this['inited']=![];const _0x28a03f=Array[_0x3ceb6a(0x121)](this[_0x3ceb6a(0x136)])?this[_0x3ceb6a(0x136)]:(this[_0x3ceb6a(0x136)]||'')[_0x3ceb6a(0x124)](this['seperator']),[_0x275d04,_0x40baeb,_0x50c302]=_0x28a03f;if(_0x275d04){const _0x2ad62c=Object[_0x3ceb6a(0x110)](areaList[_0x3ceb6a(0x112)])[_0x3ceb6a(0x11a)](_0x37631b=>_0x37631b[0x1]===_0x275d04);this['province']=_0x2ad62c?.[0x0];}else{this[_0x3ceb6a(0x123)]='',this[_0x3ceb6a(0x12d)]=!![];return;}await this['$nextTick']();if(_0x40baeb){const _0x297a53=this[_0x3ceb6a(0x123)]?.[_0x3ceb6a(0x118)](0x0,0x2),_0x5e91b0=Object['entries'](areaList[_0x3ceb6a(0x113)])[_0x3ceb6a(0x11a)](_0x13ca30=>_0x13ca30[0x0]['startsWith'](_0x297a53)&&_0x13ca30[0x1]===_0x40baeb);this[_0x3ceb6a(0x11d)]=_0x5e91b0?.[0x0];}else{this[_0x3ceb6a(0x11d)]='',this[_0x3ceb6a(0x12d)]=!![];return;}await this[_0x3ceb6a(0x122)]();if(_0x50c302){const _0x114a2c=this[_0x3ceb6a(0x11d)]?.['slice'](0x0,0x4),_0x596cea=Object[_0x3ceb6a(0x110)](areaList[_0x3ceb6a(0x127)])[_0x3ceb6a(0x11a)](_0x5d5660=>_0x5d5660[0x0]['startsWith'](_0x114a2c)&&_0x5d5660[0x1]===_0x50c302);this[_0x3ceb6a(0x11c)]=_0x596cea?.[0x0];}else this[_0x3ceb6a(0x11c)]='';this[_0x3ceb6a(0x12d)]=!![],this[_0x3ceb6a(0x130)]();},'update'(){const _0x1a3083=a23_0x2c1f8e;if(!this[_0x1a3083(0x12d)])return;let _0x522b80=[this[_0x1a3083(0x123)]&&areaList[_0x1a3083(0x112)][this[_0x1a3083(0x123)]]||'',this[_0x1a3083(0x11b)]>0x1&&this[_0x1a3083(0x11d)]&&areaList[_0x1a3083(0x113)][this[_0x1a3083(0x11d)]]||'',this[_0x1a3083(0x11b)]>0x2&&this[_0x1a3083(0x11c)]&&areaList['county_list'][this[_0x1a3083(0x11c)]]||''][_0x1a3083(0x118)](0x0,this['number'])[_0x1a3083(0x135)](this['seperator']);this[_0x1a3083(0x125)](_0x1a3083(0x12e),_0x522b80),this['$emit']('change',_0x522b80);}}};function a23_0x46db(_0x5b6af3,_0x476cd8){const _0x483cc9=a23_0x483c();return a23_0x46db=function(_0x46db72,_0x559918){_0x46db72=_0x46db72-0x110;let _0x480b46=_0x483cc9[_0x46db72];return _0x480b46;},a23_0x46db(_0x5b6af3,_0x476cd8);}function a23_0x483c(){const _0x5456ba=['filter','provinces','4uSsnou','isArray','$nextTick','province','split','$emit','36gnxHWE','county_list','map','2424320DPazry','change','PcXDistrictSelect','value','inited','update:modelValue','counties','update','3664884bAAlPV','freeze','cities','5HskXzY','join','modelValue','entries','224200FSlSeC','province_list','city_list','init','1090488amViDV','687722lAhyWO','97294qdeCuF','slice','476535GTleWW','find','number','county','city'];a23_0x483c=function(){return _0x5456ba;};return a23_0x483c();}
@@ -1,29 +1 @@
1
- import utils from './utils.js'
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_0x3961b5=a24_0x14ab;(function(_0x3cfaaf,_0x426311){const _0x1e2512=a24_0x14ab,_0x1622d6=_0x3cfaaf();while(!![]){try{const _0x458a42=parseInt(_0x1e2512(0x174))/0x1+-parseInt(_0x1e2512(0x170))/0x2+-parseInt(_0x1e2512(0x165))/0x3+parseInt(_0x1e2512(0x169))/0x4*(parseInt(_0x1e2512(0x172))/0x5)+-parseInt(_0x1e2512(0x16f))/0x6*(parseInt(_0x1e2512(0x16a))/0x7)+parseInt(_0x1e2512(0x166))/0x8+-parseInt(_0x1e2512(0x16e))/0x9;if(_0x458a42===_0x426311)break;else _0x1622d6['push'](_0x1622d6['shift']());}catch(_0x1f655b){_0x1622d6['push'](_0x1622d6['shift']());}}}(a24_0x21bd,0x95731));import a24_0x19258c from'./utils.js';export default{'name':a24_0x3961b5(0x16d),'inheritAttrs':![],'props':{...a24_0x19258c[a24_0x3961b5(0x167)](),'labelWidth':{'type':String,'default':_0x3b824b=>_0x3b824b[a24_0x3961b5(0x164)]||a24_0x3961b5(0x177)},'useWhen':{'type':Boolean,'default':![]}},'emits':[a24_0x3961b5(0x168)],'computed':{...a24_0x19258c[a24_0x3961b5(0x16c)]},'mounted'(){const _0x362dee=a24_0x3961b5,_0x31305c=this[_0x362dee(0x16b)]??this[_0x362dee(0x175)];_0x31305c&&(_0x31305c[_0x362dee(0x176)]=this[_0x362dee(0x173)][_0x362dee(0x176)]),this[_0x362dee(0x163)]('update:fref',this[_0x362dee(0x173)][_0x362dee(0x176)]);},'methods':{...a24_0x19258c[a24_0x3961b5(0x171)]}};function a24_0x14ab(_0x55458d,_0x49287f){const _0x21bdaf=a24_0x21bd();return a24_0x14ab=function(_0x14ab89,_0x5d1671){_0x14ab89=_0x14ab89-0x163;let _0x676d8c=_0x21bdaf[_0x14ab89];return _0x676d8c;},a24_0x14ab(_0x55458d,_0x49287f);}function a24_0x21bd(){const _0xa9a2f0=['555835PcHHPC','dialog','computed','MobileXForm','12226761xgTLNb','24viugtq','687206XhVKtI','methods','12265qTHYiW','$refs','1214904QLVNSQ','form','formRef','80px','$emit','labelWidth','1322676VkhUFX','5934160DNPmaM','props','update:fref','1820yxRYMv'];a24_0x21bd=function(){return _0xa9a2f0;};return a24_0x21bd();}
@@ -1,42 +1 @@
1
- import utils from './utils.js'
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_0x23a6e7=a25_0x35f4;(function(_0x3e8822,_0x43c172){const _0x36ebc4=a25_0x35f4,_0x53ccb5=_0x3e8822();while(!![]){try{const _0x47ab2a=-parseInt(_0x36ebc4(0x122))/0x1+parseInt(_0x36ebc4(0x127))/0x2+parseInt(_0x36ebc4(0x134))/0x3+parseInt(_0x36ebc4(0x128))/0x4+-parseInt(_0x36ebc4(0x12d))/0x5*(-parseInt(_0x36ebc4(0x130))/0x6)+parseInt(_0x36ebc4(0x133))/0x7*(-parseInt(_0x36ebc4(0x124))/0x8)+parseInt(_0x36ebc4(0x131))/0x9;if(_0x47ab2a===_0x43c172)break;else _0x53ccb5['push'](_0x53ccb5['shift']());}catch(_0x463a7a){_0x53ccb5['push'](_0x53ccb5['shift']());}}}(a25_0x3fdf,0x64fb0));function a25_0x3fdf(){const _0xd4cf38=['dialog','5YHnyPt','0px','100px','706956khAchQ','2945961gEZEVO','update:fref','473074LuoyHG','898152tsHyGP','methods','form','props','formRef','824472Sdwvea','computed','88FVnSCv','$emit','PcXForm','991988SiXzFA','2963828QfyJyi','labelWidth','name','$refs'];a25_0x3fdf=function(){return _0xd4cf38;};return a25_0x3fdf();}import a25_0x4b0675 from'./utils.js';function a25_0x35f4(_0x1ba6fa,_0x3af781){const _0x3fdf51=a25_0x3fdf();return a25_0x35f4=function(_0x35f4d4,_0x3fcd7f){_0x35f4d4=_0x35f4d4-0x11e;let _0x2c4768=_0x3fdf51[_0x35f4d4];return _0x2c4768;},a25_0x35f4(_0x1ba6fa,_0x3af781);}export default{'name':a25_0x23a6e7(0x126),'inheritAttrs':![],'props':{...a25_0x4b0675[a25_0x23a6e7(0x120)](),'title':{'type':String,'default':'表单'},'labelWidth':{'type':String,'default':_0x1ea550=>_0x1ea550[a25_0x23a6e7(0x129)]||(_0x1ea550['dialog']?a25_0x23a6e7(0x12f):a25_0x23a6e7(0x12e))},'useCollapse':{'type':Boolean,'default':![]},'useWhen':{'type':Boolean,'default':![]}},'emits':[a25_0x23a6e7(0x132)],'data'(){const _0x1aac4b=a25_0x23a6e7;return{'activeNames':[_0x1aac4b(0x12a)]};},'computed':{...a25_0x4b0675[a25_0x23a6e7(0x123)]},'mounted'(){const _0x44cf4c=a25_0x23a6e7,_0x4c5ccb=this[_0x44cf4c(0x12c)]??this[_0x44cf4c(0x11f)];_0x4c5ccb&&(_0x4c5ccb[_0x44cf4c(0x121)]=this[_0x44cf4c(0x12b)][_0x44cf4c(0x121)]),this[_0x44cf4c(0x125)](_0x44cf4c(0x132),this[_0x44cf4c(0x12b)][_0x44cf4c(0x121)]);},'methods':{...a25_0x4b0675[a25_0x23a6e7(0x11e)]}};
@@ -1,95 +1 @@
1
- import { isWhenMatched } from '../../utils/index.js'
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(_0x2331af,_0x506153){const _0x1a0889=a26_0x167c,_0x33e0d4=_0x2331af();while(!![]){try{const _0xa0d267=-parseInt(_0x1a0889(0x160))/0x1+-parseInt(_0x1a0889(0x15d))/0x2*(parseInt(_0x1a0889(0x167))/0x3)+-parseInt(_0x1a0889(0x140))/0x4*(parseInt(_0x1a0889(0x157))/0x5)+-parseInt(_0x1a0889(0x150))/0x6+parseInt(_0x1a0889(0x166))/0x7+-parseInt(_0x1a0889(0x164))/0x8*(parseInt(_0x1a0889(0x15b))/0x9)+parseInt(_0x1a0889(0x147))/0xa;if(_0xa0d267===_0x506153)break;else _0x33e0d4['push'](_0x33e0d4['shift']());}catch(_0x251600){_0x33e0d4['push'](_0x33e0d4['shift']());}}}(a26_0x4ad1,0xac317));import{isWhenMatched}from'../../utils/index.js';function a26_0x167c(_0x2f40ec,_0x4611b8){const _0x4ad174=a26_0x4ad1();return a26_0x167c=function(_0x167caf,_0x21f035){_0x167caf=_0x167caf-0x140;let _0x2fbb5a=_0x4ad174[_0x167caf];return _0x2fbb5a;},a26_0x167c(_0x2f40ec,_0x4611b8);}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 _0x2536a=a26_0x167c,{dialog:_0x4b07d3,form:_0x4ffe7,model:_0x3115bb}=this[_0x2536a(0x145)];return _0x3115bb||(_0x4b07d3||_0x4ffe7)[_0x2536a(0x153)];}function a26_0x4ad1(){const _0x42ac48=['$attrs','_label','38876GvumPC','test','isEditing','_items','_model','$props','请输入','27387030hAVXGv','dialog','viewonly','请选择','when','doms','domid','_doms','prop','3217998hWjuPd','useWhen','_viewonly','form','formItems','$store','items','545ssmyfk','model','map','trim','747KlDZqY','formAttrs','524cgJSIW','routeDoms','visible','109712RAkORj','acl','text','options','96656SYxuYv','label','8765890kqjCnU','6612BXKwBt','filter'];a26_0x4ad1=function(){return _0x42ac48;};return a26_0x4ad1();}export function _items(){const _0x1fe429=a26_0x167c,{hideLabels:_0x1e0429,dialog:_0x2aab68,form:_0x53b8c1}=this[_0x1fe429(0x145)],_0x16846d=this[_0x1fe429(0x156)]||(_0x2aab68||_0x53b8c1)[_0x1fe429(0x154)];return _0x16846d['map']((_0x28324a,_0x521f47)=>{const _0x4ff407=_0x1fe429;delete _0x28324a[_0x4ff407(0x15f)];if(!_0x1e0429)return _0x28324a;return{..._0x28324a,'label':'\x20','_label':_0x28324a['label'],'prop':_0x28324a[_0x4ff407(0x14f)]||'_'+_0x521f47};})[_0x1fe429(0x168)](_0x372f3a=>{const _0x365c5a=_0x1fe429;if(!this[_0x365c5a(0x148)])return!![];return this['dialog'][_0x365c5a(0x142)]?_0x372f3a['canEdit']!==![]:_0x372f3a['canAdd']!==![];})[_0x1fe429(0x159)](_0x2fe55c=>{const _0x43b468=_0x1fe429;return Object['assign']({},_0x2fe55c,_0x2fe55c[_0x43b468(0x15c)]);});}export function _visibleItems(){const _0x30faf0=a26_0x167c,_0x2bcde2=this[_0x30faf0(0x143)][_0x30faf0(0x168)](_0xf63e01=>!_0xf63e01['formAttrs']?.['domid']||this[_0x30faf0(0x14e)]['includes'](_0xf63e01[_0x30faf0(0x15c)][_0x30faf0(0x14d)]));if(!this[_0x30faf0(0x151)])return _0x2bcde2;return _0x2bcde2[_0x30faf0(0x168)](_0x53ff1f=>isWhenMatched(_0x53ff1f[_0x30faf0(0x14b)]||_0x53ff1f[_0x30faf0(0x15c)]?.[_0x30faf0(0x14b)],this[_0x30faf0(0x144)]));}export function _doms(){const _0x583b45=a26_0x167c;return this[_0x583b45(0x14c)]||this[_0x583b45(0x155)]?.[_0x583b45(0x161)]?.[_0x583b45(0x15e)]||[];}export function _rules(){const _0x28b53d=a26_0x167c,{dialog:_0x4d0c54,form:_0x14a606,rules:_0xd59207}=this[_0x28b53d(0x145)];return _0xd59207||(_0x4d0c54||_0x14a606)['formRules'];}export function _viewonly(){const _0x21da21=a26_0x167c,{dialog:_0x195dfc,form:_0x2cce19}=this['$props'];return this[_0x21da21(0x169)][_0x21da21(0x149)]??(_0x195dfc||_0x2cce19)[_0x21da21(0x149)];}export function calcPlaceholder(_0xbe7616){const _0xe4b10=a26_0x167c;if(this[_0xe4b10(0x152)])return'';let {placeholder:_0x5ccb07,comp:_0x14f715}=_0xbe7616;return!_0x5ccb07&&(_0x5ccb07=_0xe4b10(0x163)in _0xbe7616||/(date|time)/i[_0xe4b10(0x141)](_0x14f715)?_0xe4b10(0x14a):_0xe4b10(0x146),_0x5ccb07+=_0xbe7616[_0xe4b10(0x165)]?.[_0xe4b10(0x15a)]()||_0xbe7616[_0xe4b10(0x16a)]||_0xbe7616[_0xe4b10(0x162)]||_0xbe7616[_0xe4b10(0x158)]||''),_0x5ccb07;}export default{'props':props,'computed':{'_model':_model,'_items':_items,'_visibleItems':_visibleItems,'_doms':_doms,'_rules':_rules,'_viewonly':_viewonly},'methods':{'calcPlaceholder':calcPlaceholder}};
@@ -1,56 +1 @@
1
- import { MobileItem } from './utils.jsx'
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_0x2d18(){const _0x33d991=['6803864CIxttc','MobileXFormItem','37918AqyvgW','9zcAvav','83jzzLoO','8388226UuTRQC','6659748iIWnVh','change','19869656VkRnsX','$attrs','3258715puaFzu','2933220HrLbOQ','$props'];a27_0x2d18=function(){return _0x33d991;};return a27_0x2d18();}const a27_0x7ecb0c=a27_0x4ad8;function a27_0x4ad8(_0x1e2e87,_0x40a29e){const _0x2d1889=a27_0x2d18();return a27_0x4ad8=function(_0x4ad8e3,_0x39d28a){_0x4ad8e3=_0x4ad8e3-0x1c7;let _0x19ef6b=_0x2d1889[_0x4ad8e3];return _0x19ef6b;},a27_0x4ad8(_0x1e2e87,_0x40a29e);}(function(_0x547e79,_0x343c99){const _0x5080df=a27_0x4ad8,_0x1a267d=_0x547e79();while(!![]){try{const _0x15602c=-parseInt(_0x5080df(0x1cb))/0x1*(parseInt(_0x5080df(0x1c9))/0x2)+-parseInt(_0x5080df(0x1d2))/0x3+parseInt(_0x5080df(0x1c7))/0x4+-parseInt(_0x5080df(0x1d1))/0x5+parseInt(_0x5080df(0x1cd))/0x6+-parseInt(_0x5080df(0x1cc))/0x7+parseInt(_0x5080df(0x1cf))/0x8*(parseInt(_0x5080df(0x1ca))/0x9);if(_0x15602c===_0x343c99)break;else _0x1a267d['push'](_0x1a267d['shift']());}catch(_0x4f5d1a){_0x1a267d['push'](_0x1a267d['shift']());}}}(a27_0x2d18,0xda131));import{MobileItem}from'./utils.jsx';export default{'name':a27_0x7ecb0c(0x1c8),'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',a27_0x7ecb0c(0x1ce)],'computed':{'attrs'(){const _0x27fa2e=a27_0x7ecb0c,{prop:_0xd34778,label:_0x1ed3f5,platform:_0x359c0e,comp:_0x292319,compType:_0x55c47b,iconSize:_0x48616e,slot:_0x1ee823,html:_0x4297a4,..._0x45622f}={...this[_0x27fa2e(0x1d3)],...this[_0x27fa2e(0x1d0)]};return _0x45622f;}},'render'(){return MobileItem(this);}};