@yoooloo42/joker 1.0.143 → 1.0.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -16873,7 +16873,7 @@ var lookup = [];
16873
16873
  var revLookup = [];
16874
16874
  var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
16875
16875
  var inited = false;
16876
- function init () {
16876
+ function init$1 () {
16877
16877
  inited = true;
16878
16878
  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
16879
16879
  for (var i = 0, len = code.length; i < len; ++i) {
@@ -16887,7 +16887,7 @@ function init () {
16887
16887
 
16888
16888
  function toByteArray (b64) {
16889
16889
  if (!inited) {
16890
- init();
16890
+ init$1();
16891
16891
  }
16892
16892
  var i, j, l, tmp, placeHolders, arr;
16893
16893
  var len = b64.length;
@@ -16946,7 +16946,7 @@ function encodeChunk (uint8, start, end) {
16946
16946
 
16947
16947
  function fromByteArray (uint8) {
16948
16948
  if (!inited) {
16949
- init();
16949
+ init$1();
16950
16950
  }
16951
16951
  var tmp;
16952
16952
  var len = uint8.length;
@@ -22140,1496 +22140,58 @@ var request = {
22140
22140
  ly0: ly0request$1
22141
22141
  };
22142
22142
 
22143
- // 默认值
22144
-
22145
- var ly0default$3 = {
22146
- myProps: {
22147
- popup: {
22148
- visible: false,
22149
- title: '',
22150
- width: '800px',
22151
- top: '15vh'
22152
- },
22153
- menu: {
22154
- mode: 'horizontal',
22155
- menu: []
22156
- },
22157
- cols: [],
22158
- submit: {
22159
- switch: false,
22160
- // true - 提交模式, false - 组件模式
22161
- watch: false,
22162
- // 提交监听
22163
- async handle(_ref) {
22164
- let {
22165
- formData,
22166
- scopeThis
22167
- } = _ref;
22168
- },
22169
- // 异步用户句柄
22170
- url: '',
22171
- // 后台提交 - URL地址
22172
- storpro: '' // 后台提交 - 存储过程
22173
- },
22174
- para: {
22175
- inputWidth: '200px',
22176
- placeholder: {
22177
- input: '请输入',
22178
- select: '请选择',
22179
- datetime: '请选择时间',
22180
- date: '请选择日期'
22181
- },
22182
- image: {
22183
- width: '400px',
22184
- height: '300px'
22185
- },
22186
- thumb: {
22187
- width: '40px',
22188
- height: '30px'
22189
- },
22190
- video: {
22191
- width: '300px',
22192
- height: '200px'
22193
- },
22194
- upload: {
22195
- uploadUrl: ly0request$1.domain + ly0request$1.upload,
22196
- uploadUrl_image: ly0request$1.domain + ly0request$1.upload_image,
22197
- uploadUrl_carplate: ly0request$1.domain + ly0request$1.upload_carplate
22198
- },
22199
- richtext: {
22200
- editorWidth: '500px',
22201
- // 富文本编辑器宽度
22202
- size: 200 // 可上传的图片大小,单位为KB, 1M = 1024KB
22203
- },
22204
- download: {
22205
- // 行内下载
22206
- fileName: 'new-file',
22207
- // 下载文件名
22208
- downloadLabel: '点击这里下载',
22209
- // 下载标签
22210
- downloadLabelNoSrc: '没有可供下载的资源' // 下载标签
22211
- },
22212
- ly0d7thumb: {
22213
- thumb: {
22214
- fieldName: 'thumb',
22215
- width: '100px',
22216
- height: '100px'
22217
- },
22218
- name: {
22219
- fieldName: 'name'
22220
- },
22221
- number: {
22222
- fieldName: 'number'
22223
- }
22224
- }
22225
- }
22226
- }
22227
- };
22228
-
22229
- function box$1(item) {
22230
- let result = {
22231
- 'text-align': 'right',
22232
- 'padding-right': '10px'
22233
- };
22234
-
22235
- // 纵向居中
22236
- if (item.inputType === "input" || item.inputType === "select" || item.inputType === "date-picker" || item.inputType === "switch" || item.inputType === "radio-group" || item.inputType === "button-group") {
22237
- result.margin = "auto 0";
22238
- }
22239
- if (item.labelBox && item.labelBox.style) {
22240
- if (item.labelBox.new) {
22241
- // 外部样式覆盖
22242
- result = item.labelBox.style;
22243
- } else {
22244
- // 叠加
22245
- result = Object.assign(result, item.labelBox.style);
22246
- }
22247
- }
22248
- return result;
22249
- }
22250
- function label(item) {
22251
- return item.labelStyle ? item.labelStyle : {};
22252
- }
22253
- var label$1 = {
22254
- box: box$1,
22255
- label
22256
- };
22257
-
22258
- function box(item) {
22259
- let result = {
22260
- 'text-align': 'left'
22261
- };
22262
- if (item.inputBox && item.inputBox.style) {
22263
- if (!!item.inputBox.new) {
22264
- // 外部样式覆盖
22265
- result = item.inputBox.style;
22266
- } else {
22267
- // 叠加
22268
- result = Object.assign(result, item.inputBox.style);
22269
- }
22270
- }
22271
- return result;
22272
- }
22273
-
22274
- // inputType: "text"
22275
- function text(item, formProps) {
22276
- return {
22277
- 'white-space': 'pre-line',
22278
- // 保留换行符
22279
- 'border-left': '#ababab solid 1px',
22280
- 'border-top': '#ababab solid 1px',
22281
- 'padding-left': '10px',
22282
- width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth
22283
- };
22284
- }
22285
-
22286
- // inputType: "text0"
22287
- function text0(item) {
22288
- return {
22289
- 'white-space': 'pre-line',
22290
- // 保留换行符
22291
- color: 'blue'
22292
- };
22293
- }
22294
-
22295
- // inputType: "input", "select", "date-picker"
22296
- function input(item, formProps) {
22297
- return {
22298
- width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth,
22299
- height: '40px'
22300
- };
22301
- }
22302
-
22303
- // inputType: "input-number"
22304
- function input_number(item) {
22305
- return {
22306
- facade: {
22307
- size: item.size ? item.size : ""
22308
- }
22309
- };
22310
- }
22311
-
22312
- // inputType: "switch"
22313
- function el_switch(item) {
22314
- return {
22315
- facade: {
22316
- active_color: item.activeColor ? item.activeColor : "#ee7405"
22317
- }
22318
- };
22319
- }
22320
-
22321
- // inputType: "button-group"
22322
- function button_group(item, groupItem, buttonItem) {
22323
- let result = {
22324
- group: {
22325
- style: {
22326
- 'margin-right': '10px'
22327
- }
22328
- },
22329
- button: {
22330
- style: {},
22331
- icon: "",
22332
- facade: {
22333
- type: "",
22334
- size: "",
22335
- plain: false,
22336
- round: false,
22337
- circle: false
22338
- }
22339
- }
22340
- };
22341
- if (buttonItem && buttonItem.style) {
22342
- result.button.style = Object.assign(result.button.style, buttonItem.style);
22343
- }
22344
- if (buttonItem && buttonItem.icon) {
22345
- result.button.icon = buttonItem.icon;
22346
- }
22347
- if (buttonItem && buttonItem.type) {
22348
- result.button.facade.type = buttonItem.type;
22349
- }
22350
- if (buttonItem && buttonItem.size) {
22351
- result.button.facade.size = buttonItem.size;
22352
- }
22353
- if (buttonItem && buttonItem.plain) {
22354
- result.button.facade.plain = buttonItem.plain;
22355
- }
22356
- if (buttonItem && buttonItem.round) {
22357
- result.button.facade.round = buttonItem.round;
22358
- }
22359
- if (buttonItem && buttonItem.circle) {
22360
- result.button.facade.circle = buttonItem.circle;
22361
- }
22362
- return result;
22363
- }
22364
-
22365
- // inputType: "image"
22366
- function image(item, formProps) {
22367
- return {
22368
- width: item.imageWidth ? item.imageWidth : formProps.para.image.width,
22369
- height: item.imageHeight ? item.imageHeight : formProps.para.image.height
22370
- };
22371
- }
22372
-
22373
- // inputType: "images"
22374
- function images(item, formProps) {
22375
- return {
22376
- itemBox: {
22377
- display: 'inline-block',
22378
- margin: '10px'
22379
- },
22380
- itemThumb: {
22381
- width: item.imageWidth ? item.imageWidth : formProps.para.thumb.width,
22382
- height: item.imageHeight ? item.imageHeight : formProps.para.thumb.height
22383
- }
22384
- };
22385
- }
22386
-
22387
- // inputType: "richtext"
22388
- function richtext(item, formProps) {
22389
- return {
22390
- // 富文本编辑器宽度
22391
- width: item.editorWidth ? item.editorWidth : formProps.para.richtext.editorWidth
22392
- };
22393
- }
22143
+ // 引用标准:GB/T 2260
22394
22144
 
22395
- // inputType: "video"
22396
- function video(item, formProps) {
22397
- return {
22398
- width: item.videoWidth ? item.videoWidth : formProps.para.video.width,
22399
- height: item.videoHeight ? item.videoHeight : formProps.para.video.height
22400
- };
22401
- }
22402
-
22403
- // inputType: "download"
22404
- function download() {
22405
- return {
22406
- style: {
22407
- 'text-decoration': 'underline',
22408
- color: '#0000ff'
22409
- },
22410
- none: {
22411
- color: '#6a6a6a'
22412
- } // 没有链接
22413
- };
22414
- }
22415
- var input$1 = {
22416
- box,
22417
- text,
22418
- text0,
22419
- input,
22420
- input_number,
22421
- el_switch,
22422
- button_group,
22423
- image,
22424
- images,
22425
- richtext,
22426
- video,
22427
- download
22428
- };
22429
-
22430
- // 样式函数
22431
-
22432
-
22433
- // 折叠面板
22434
- const collapse = {
22435
- style: {
22436
- 'margin-bottom': '10px'
22437
- },
22438
- table: {
22439
- 'text-align': 'center',
22440
- width: '100%'
22441
- }
22442
- };
22443
-
22444
- // 字段盒子
22445
- const field_box = {
22446
- left: {
22447
- padding: "10px"
22448
- },
22449
- right: {
22450
- padding: "10px"
22451
- }
22452
- };
22453
-
22454
- // 行际分割线
22455
- const line = {
22456
- height: '1px',
22457
- 'background-color': '#bdbdbd'
22458
- };
22459
-
22460
- // 没有field-label, field-value独占一行(field-box)
22461
- function no_field_label(item) {
22462
- let result = 1;
22463
- if (!item.label) {
22464
- result = 2;
22465
- }
22466
- return result;
22467
- }
22468
-
22469
- // 表单区域可以分为多个列
22470
- const root_box = {
22471
- display: 'flex',
22472
- 'justify-content': 'space-around'
22473
- };
22474
-
22475
- // 提交区域
22476
- const submit_box = {
22477
- style: {
22478
- 'text-align': 'left'
22479
- },
22480
- button: {
22481
- style: {
22482
- 'margin-top': '10px'
22483
- },
22484
- facade: {
22485
- type: 'danger',
22486
- plain: true
22487
- }
22488
- }
22489
- };
22490
- var styleModule = {
22491
- collapse,
22492
- field_box,
22493
- line,
22494
- no_field_label,
22495
- root_box,
22496
- submit_box,
22497
- label: label$1,
22498
- input: input$1
22499
- };
22500
-
22501
- var script$k = {
22502
- __name: 'LabelBox',
22503
- props: {
22504
- modelValue: {
22505
- type: Object,
22506
- default: () => ({})
22507
- },
22508
- myProps: {
22509
- type: Object,
22510
- default: () => ({})
22511
- },
22512
- scopeThis: {
22513
- type: Object,
22514
- default: () => ({})
22515
- },
22516
- item: {
22517
- type: Object,
22518
- default: () => ({})
22145
+ /**
22146
+ * 深度拷贝函数
22147
+ *
22148
+ * @param {any} obj 需要拷贝的对象、数组或基本类型值
22149
+ * @param {WeakMap} [cache=new WeakMap()] 用于处理循环引用的缓存
22150
+ * @returns {any} 深度拷贝后的新对象/新值
22151
+ */
22152
+ function deepClone$1(obj, cache = new WeakMap()) {
22153
+ // 1. 基本类型值(包括 null)和函数,直接返回
22154
+ if (obj === null || typeof obj !== 'object') {
22155
+ return obj;
22156
+ }
22157
+ // 处理函数(尽管技术上函数是对象,但我们通常不克隆它,而是直接引用)
22158
+ if (typeof obj === 'function') {
22159
+ return obj;
22519
22160
  }
22520
- },
22521
- setup(__props) {
22522
22161
 
22523
- const props = __props;
22162
+ // 2. 检查循环引用
22163
+ // 如果缓存中已存在该对象,说明遇到了循环引用,直接返回缓存中的克隆对象
22164
+ if (cache.has(obj)) {
22165
+ return cache.get(obj);
22166
+ }
22524
22167
 
22525
- // props属性包装,使得页面和js使用相同的命名
22526
- let formData_box = props.modelValue;
22527
- const scopeThis_box = props.scopeThis;
22528
- const propsItem_box = props.item;
22168
+ // 3. 处理特定内置对象(Date 和 RegExp)
22169
+ if (obj instanceof Date) {
22170
+ return new Date(obj.getTime());
22171
+ }
22172
+ if (obj instanceof RegExp) {
22173
+ // g: global, i: ignoreCase, m: multiline, u: unicode, y: sticky
22174
+ const flags = obj.global ? 'g' : ''
22175
+ + obj.ignoreCase ? 'i' : ''
22176
+ + obj.multiline ? 'm' : ''
22177
+ + obj.unicode ? 'u' : ''
22178
+ + obj.sticky ? 'y' : '';
22179
+ return new RegExp(obj.source, flags);
22180
+ }
22529
22181
 
22530
- const style = vue.ref({
22531
- box: styleModule.label.box(propsItem_box),
22532
- label: styleModule.label.label(propsItem_box),
22533
- });
22182
+ // 4. 初始化克隆对象
22183
+ // 如果是数组,则初始化为空数组;否则初始化为空对象
22184
+ const clone = Array.isArray(obj) ? [] : {};
22534
22185
 
22535
- const hdlClick = () => {
22536
- if(propsItem_box.hdlLabelClick){
22537
- propsItem_box.hdlLabelClick({formData: formData_box, scopeThis: scopeThis_box});
22538
- }
22539
- };
22540
-
22541
- return (_ctx, _cache) => {
22542
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
22543
- vue.createCommentVNode(" label-box "),
22544
- vue.createElementVNode("div", {
22545
- style: vue.normalizeStyle(style.value.box),
22546
- onClick: hdlClick
22547
- }, [
22548
- vue.createElementVNode("span", {
22549
- style: vue.normalizeStyle(style.value.label)
22550
- }, vue.toDisplayString(vue.unref(propsItem_box).label), 5 /* TEXT, STYLE */)
22551
- ], 4 /* STYLE */)
22552
- ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
22553
- }
22554
- }
22555
-
22556
- };
22557
-
22558
- script$k.__file = "src/form/LabelBox.vue";
22559
-
22560
- const _hoisted_1$f = { key: 12 };
22561
- const _hoisted_2$e = { key: 0 };
22562
- const _hoisted_3$7 = { key: 13 };
22563
- const _hoisted_4$5 = { key: 0 };
22564
- const _hoisted_5$2 = { key: 14 };
22565
- const _hoisted_6 = { key: 0 };
22566
- const _hoisted_7 = { key: 16 };
22567
- const _hoisted_8 = ["innerHTML"];
22568
- const _hoisted_9 = { key: 17 };
22569
- const _hoisted_10 = ["width", "height", "poster"];
22570
- const _hoisted_11 = ["src"];
22571
- const _hoisted_12 = ["src"];
22572
- const _hoisted_13 = ["src"];
22573
- const _hoisted_14 = { key: 0 };
22574
- const _hoisted_15 = { key: 18 };
22575
- const _hoisted_16 = ["href", "download"];
22576
- const _hoisted_17 = { key: 19 };
22577
- const _hoisted_18 = { key: 20 };
22578
- const _hoisted_19 = { key: 21 };
22579
- const _hoisted_20 = { key: 22 };
22580
- const _hoisted_21 = { key: 23 };
22581
- const _hoisted_22 = { key: 24 };
22582
- const _hoisted_23 = { key: 25 };
22583
- const _hoisted_24 = { key: 26 };
22584
- const _hoisted_25 = { key: 27 };
22585
- const _hoisted_26 = { key: 28 };
22586
- const _hoisted_27 = { key: 29 };
22587
- const _hoisted_28 = { key: 30 };
22588
-
22589
-
22590
- var script$j = {
22591
- __name: 'InputBox',
22592
- props: {
22593
- modelValue: {
22594
- type: Object,
22595
- default: () => ({})
22596
- },
22597
- myProps: {
22598
- type: Object,
22599
- default: () => ({})
22600
- },
22601
- scopeThis: {
22602
- type: Object,
22603
- default: () => ({})
22604
- },
22605
- item: {
22606
- type: Object,
22607
- default: () => ({})
22608
- }
22609
- },
22610
- setup(__props) {
22611
-
22612
- const props = __props;
22613
-
22614
- // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
22615
- let formData_box = props.modelValue;
22616
- const formProps_box = props.myProps;
22617
- const scopeThis_box = props.scopeThis;
22618
- const propsItem_box = props.item;
22619
-
22620
- const input = vue.reactive({
22621
- placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.input,
22622
- showPassword: !!propsItem_box.showPassword,
22623
- hdlCannotInput: value => { // 解决偶发不能输入的问题
22624
- formData_box[propsItem_box.fieldName] = value;
22625
- }
22626
- });
22627
-
22628
- const select = vue.reactive({
22629
- placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.select,
22630
- items: vue.computed(()=>{
22631
- if (propsItem_box.items) {
22632
- return propsItem_box.items
22633
- } else if (propsItem_box.hdlGetItems) {
22634
- return propsItem_box.hdlGetItems({formData: formData_box, scopeThis: scopeThis_box})
22635
- }
22636
- }),
22637
- hdlChange: value => {
22638
- if (propsItem_box.hdlChange) {
22639
- propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22640
- }
22641
- }
22642
- });
22643
-
22644
- const datePicker = vue.reactive({
22645
- placeholder: vue.computed(()=> {
22646
- if (propsItem_box.placeholder) {
22647
- return propsItem_box.placeholder
22648
- }
22649
- if (propsItem_box.type === 'datetime') {
22650
- return formProps_box.para.placeholder.datetime
22651
- }
22652
- if (propsItem_box.type === 'date') {
22653
- return formProps_box.para.placeholder.date
22654
- }
22655
- return formProps_box.para.placeholder.datetime
22656
- }),
22657
- format: vue.computed(() => {
22658
- if (propsItem_box.format) {
22659
- return propsItem_box.format
22660
- }
22661
- if (propsItem_box.type === 'datetime') {
22662
- return 'YYYY/MM/DD HH:mm'
22663
- }
22664
- if (propsItem_box.type === 'date') {
22665
- return 'YYYY/MM/DD'
22666
- }
22667
- return 'YYYY/MM/DD HH:mm'
22668
- }),
22669
- hdlChange: value => {
22670
- if (propsItem_box.hdlChange) {
22671
- propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22672
- }
22673
- }
22674
- });
22675
-
22676
- const ly0switch = vue.reactive({
22677
- hdlChange: value => {
22678
- if (propsItem_box.hdlChange) {
22679
- propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22680
- }
22681
- }
22682
- });
22683
-
22684
- const radioGroup = vue.reactive({
22685
- hdlChange: value => {
22686
- if (propsItem_box.hdlChange) {
22687
- propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22688
- }
22689
- }
22690
- });
22691
-
22692
- const image = vue.reactive({
22693
- getSrc: vue.computed(() => {
22694
- if (
22695
- propsItem_box.imageDelete &&
22696
- formData_box[propsItem_box.imageDelete] &&
22697
- (formData_box[propsItem_box.imageDelete] === true ||
22698
- formData_box[propsItem_box.imageDelete] === 'true') // 图片已删除
22699
- ) {
22700
- return ['']
22701
- }
22702
- if (formData_box[propsItem_box.fieldName]) {
22703
- return formData_box[propsItem_box.fieldName]
22704
- }
22705
- return ['']
22706
- }),
22707
- delete: ()=>{
22708
- formData_box[propsItem_box.imageDelete] =
22709
- !formData_box[propsItem_box.imageDelete];
22710
- }
22711
- });
22712
-
22713
- const images = vue.reactive({
22714
- getSrc: (itemImages, indexImages) => {
22715
- if (
22716
- !propsItem_box.imageDelete ||
22717
- !formData_box[propsItem_box.imageDelete].includes(itemImages)
22718
- ) {
22719
- return itemImages
22720
- }
22721
- return ''
22722
- },
22723
- delete: (itemImages, indexImages) => {
22724
- if (!formData_box[propsItem_box.imageDelete].includes(itemImages)) {
22725
- formData_box[propsItem_box.imageDelete].push(itemImages);
22726
- return
22727
- }
22728
-
22729
- formData_box[propsItem_box.imageDelete] = formData_box[propsItem_box.imageDelete].filter(i => {
22730
- return i !== itemImages
22731
- });
22732
- },
22733
- show: vue.computed(()=>{
22734
- let result = [];
22735
- if (!propsItem_box.imageDelete) {
22736
- formData_box[propsItem_box.fieldName].forEach(i => {
22737
- result.push(i);
22738
- });
22739
- } else {
22740
- formData_box[propsItem_box.fieldName]
22741
- .filter(i => {
22742
- return !formData_box[propsItem_box.imageDelete].includes(i)
22743
- })
22744
- .forEach(i => {
22745
- result.push(i);
22746
- });
22747
- }
22748
- return result
22749
- })
22750
- });
22751
-
22752
- const richtextProps = vue.ref({
22753
- uploadUrl: formProps_box.para.upload.uploadUrl_image
22754
- });
22755
-
22756
- const video = vue.reactive({
22757
- src: vue.computed(()=>{
22758
- if (
22759
- propsItem_box.videoDelete &&
22760
- formData_box[propsItem_box.videoDelete] &&
22761
- (formData_box[propsItem_box.videoDelete] === true ||
22762
- formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
22763
- ) {
22764
- return ''
22765
- }
22766
- if (formData_box[propsItem_box.fieldName]) {
22767
- return formData_box[propsItem_box.fieldName]
22768
- }
22769
- return ''
22770
- }),
22771
- poster: vue.computed(()=>{
22772
- if (
22773
- propsItem_box.videoDelete &&
22774
- formData_box[propsItem_box.videoDelete] &&
22775
- (formData_box[propsItem_box.videoDelete] === true ||
22776
- formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
22777
- ) {
22778
- return ''
22779
- }
22780
- if (formData_box[propsItem_box.poster]) {
22781
- return formData_box[propsItem_box.poster]
22782
- }
22783
- return ''
22784
- }),
22785
- delete: ()=>{
22786
- formData_box[propsItem_box.videoDelete] =
22787
- !formData_box[propsItem_box.videoDelete];
22788
- },
22789
- });
22790
-
22791
- const download = vue.reactive({
22792
- fileName: propsItem_box.downloadFileName || formProps_box.para.download.fileName,
22793
- downloadLabel: vue.computed(() => {
22794
- if (!formData_box[propsItem_box.fieldName]) {
22795
- return formProps_box.para.download.downloadLabelNoSrc
22796
- }
22797
- if (propsItem_box.hdlGetDownloadLabel) {
22798
- return propsItem_box.hdlGetDownloadLabel({formData: formData_box, scopeThis: scopeThis_box})
22799
- }
22800
- return formProps_box.para.download.downloadLabel
22801
- }),
22802
- downloadSrc: formData_box[propsItem_box.fieldName] || ''
22803
- });
22804
-
22805
- const upload = vue.reactive({
22806
- uploadUrl: formProps_box.para.upload.uploadUrl,
22807
- uploadUrl_image: formProps_box.para.upload.uploadUrl_image,
22808
- uploadUrl_carplate: formProps_box.para.upload.uploadUrl_carplate
22809
- });
22810
-
22811
- const style = vue.reactive({
22812
- box: styleModule.input.box,
22813
- text: styleModule.input.text,
22814
- text0: styleModule.input.text0,
22815
- line: styleModule.line,
22816
- input: styleModule.input.input,
22817
- input_number: styleModule.input.input_number,
22818
- el_switch: styleModule.input.el_switch,
22819
- button_group: styleModule.input.button_group,
22820
- image: styleModule.input.image,
22821
- images: styleModule.input.images,
22822
- richtext: styleModule.input.richtext,
22823
- video: styleModule.input.video,
22824
- download: vue.computed(()=>styleModule.input.download()),
22825
- });
22826
-
22827
- return (_ctx, _cache) => {
22828
- const _component_el_input = vue.resolveComponent("el-input");
22829
- const _component_el_option = vue.resolveComponent("el-option");
22830
- const _component_el_select = vue.resolveComponent("el-select");
22831
- const _component_el_date_picker = vue.resolveComponent("el-date-picker");
22832
- const _component_el_input_number = vue.resolveComponent("el-input-number");
22833
- const _component_el_switch = vue.resolveComponent("el-switch");
22834
- const _component_el_radio = vue.resolveComponent("el-radio");
22835
- const _component_el_radio_group = vue.resolveComponent("el-radio-group");
22836
- const _component_el_button = vue.resolveComponent("el-button");
22837
- const _component_el_tooltip = vue.resolveComponent("el-tooltip");
22838
- const _component_el_button_group = vue.resolveComponent("el-button-group");
22839
- const _component_el_image = vue.resolveComponent("el-image");
22840
- const _component_ly0Richtext = vue.resolveComponent("ly0Richtext");
22841
- const _component_ly0Upload = vue.resolveComponent("ly0Upload");
22842
- const _component_ly0Upload_drag = vue.resolveComponent("ly0Upload_drag");
22843
- const _component_ly0Upload_picture = vue.resolveComponent("ly0Upload_picture");
22844
- const _component_ly0Upload_pictureCard = vue.resolveComponent("ly0Upload_pictureCard");
22845
- const _component_ly0Upload_avatar = vue.resolveComponent("ly0Upload_avatar");
22846
- const _component_ly0Upload_carplate = vue.resolveComponent("ly0Upload_carplate");
22847
- const _component_ly0gbt2260 = vue.resolveComponent("ly0gbt2260");
22848
- const _component_ly0d7group = vue.resolveComponent("ly0d7group");
22849
- const _component_ly0d7postal = vue.resolveComponent("ly0d7postal");
22850
- const _component_ly0d7price = vue.resolveComponent("ly0d7price");
22851
- const _component_ly0d7size = vue.resolveComponent("ly0d7size");
22852
- const _component_ly0d7thumb = vue.resolveComponent("ly0d7thumb");
22853
-
22854
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
22855
- vue.createCommentVNode(" input-box "),
22856
- vue.createElementVNode("div", {
22857
- style: vue.normalizeStyle(style.box(vue.unref(propsItem_box)))
22858
- }, [
22859
- vue.createCommentVNode(" 只读 "),
22860
- (vue.unref(propsItem_box).inputType === 'text')
22861
- ? (vue.openBlock(), vue.createElementBlock("div", {
22862
- key: 0,
22863
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
22864
- }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
22865
- : vue.createCommentVNode("v-if", true),
22866
- (vue.unref(propsItem_box).inputType === 'text0')
22867
- ? (vue.openBlock(), vue.createElementBlock("div", {
22868
- key: 1,
22869
- style: vue.normalizeStyle(style.text0(vue.unref(propsItem_box)))
22870
- }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
22871
- : vue.createCommentVNode("v-if", true),
22872
- (!vue.unref(propsItem_box).inputType)
22873
- ? (vue.openBlock(), vue.createElementBlock("div", {
22874
- key: 2,
22875
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
22876
- }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
22877
- : vue.createCommentVNode("v-if", true),
22878
- (vue.unref(propsItem_box).inputType === 'expression')
22879
- ? (vue.openBlock(), vue.createElementBlock("div", {
22880
- key: 3,
22881
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
22882
- }, vue.toDisplayString(vue.unref(propsItem_box).hdlExpression && vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: __props.scopeThis})
22883
- ? vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
22884
- : ' '), 5 /* TEXT, STYLE */))
22885
- : vue.createCommentVNode("v-if", true),
22886
- (vue.unref(propsItem_box).inputType === 'expression0')
22887
- ? (vue.openBlock(), vue.createElementBlock("div", {
22888
- key: 4,
22889
- style: vue.normalizeStyle(style.text0(vue.unref(propsItem_box)))
22890
- }, vue.toDisplayString(vue.unref(propsItem_box).hdlExpression && vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
22891
- ? vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
22892
- : ' '), 5 /* TEXT, STYLE */))
22893
- : vue.createCommentVNode("v-if", true),
22894
- (vue.unref(propsItem_box).inputType === 'line')
22895
- ? (vue.openBlock(), vue.createElementBlock("div", {
22896
- key: 5,
22897
- style: vue.normalizeStyle(style.line)
22898
- }, null, 4 /* STYLE */))
22899
- : vue.createCommentVNode("v-if", true),
22900
- vue.createCommentVNode(" 修改数据 "),
22901
- (vue.unref(propsItem_box).inputType === 'input')
22902
- ? (vue.openBlock(), vue.createBlock(_component_el_input, {
22903
- key: 6,
22904
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22905
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22906
- placeholder: input.placeholder,
22907
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
22908
- onInput: input.hdlCannotInput,
22909
- "show-password": input.showPassword
22910
- }, null, 8 /* PROPS */, ["modelValue", "placeholder", "style", "onInput", "show-password"]))
22911
- : vue.createCommentVNode("v-if", true),
22912
- (vue.unref(propsItem_box).inputType === 'select')
22913
- ? (vue.openBlock(), vue.createBlock(_component_el_select, {
22914
- key: 7,
22915
- class: "deep-input",
22916
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22917
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22918
- placeholder: select.placeholder,
22919
- filterable: "",
22920
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
22921
- onChange: select.hdlChange
22922
- }, {
22923
- default: vue.withCtx(() => [
22924
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(select.items, (item0, index0) => {
22925
- return (vue.openBlock(), vue.createBlock(_component_el_option, {
22926
- label: item0[vue.unref(propsItem_box).item_fieldLabel],
22927
- value: item0[vue.unref(propsItem_box).item_fieldValue],
22928
- key: index0
22929
- }, null, 8 /* PROPS */, ["label", "value"]))
22930
- }), 128 /* KEYED_FRAGMENT */))
22931
- ]),
22932
- _: 1 /* STABLE */
22933
- }, 8 /* PROPS */, ["modelValue", "placeholder", "style", "onChange"]))
22934
- : vue.createCommentVNode("v-if", true),
22935
- (vue.unref(propsItem_box).inputType === 'date-picker')
22936
- ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, {
22937
- key: 8,
22938
- class: "deep-input",
22939
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22940
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22941
- type: vue.unref(propsItem_box).type ? vue.unref(propsItem_box).type : 'datetime',
22942
- placeholder: datePicker.placeholder,
22943
- format: datePicker.format,
22944
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
22945
- onChange: datePicker.hdlChange
22946
- }, null, 8 /* PROPS */, ["modelValue", "type", "placeholder", "format", "style", "onChange"]))
22947
- : vue.createCommentVNode("v-if", true),
22948
- (vue.unref(propsItem_box).inputType === 'input-number')
22949
- ? (vue.openBlock(), vue.createBlock(_component_el_input_number, {
22950
- key: 9,
22951
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22952
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22953
- size: style.input_number(vue.unref(propsItem_box)).facade.size,
22954
- min: 'min' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).min : 1,
22955
- max: 'max' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).max : 100,
22956
- step: 'step' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).step : 1,
22957
- "step-strictly": 'step_strictly' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).step_strictly : true
22958
- }, null, 8 /* PROPS */, ["modelValue", "size", "min", "max", "step", "step-strictly"]))
22959
- : vue.createCommentVNode("v-if", true),
22960
- (vue.unref(propsItem_box).inputType === 'switch')
22961
- ? (vue.openBlock(), vue.createBlock(_component_el_switch, {
22962
- key: 10,
22963
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22964
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22965
- "active-text": vue.unref(propsItem_box).activeText,
22966
- "inactive-text": vue.unref(propsItem_box).inactiveText,
22967
- "active-value": vue.unref(propsItem_box).activeValue,
22968
- "inactive-value": vue.unref(propsItem_box).inactiveValue,
22969
- "active-color": style.el_switch(vue.unref(propsItem_box)).facade.active_color,
22970
- disabled: !!('disabled' in vue.unref(propsItem_box) && (vue.unref(propsItem_box).disabled === true || vue.unref(propsItem_box).disabled === 'true')),
22971
- onChange: ly0switch.hdlChange
22972
- }, null, 8 /* PROPS */, ["modelValue", "active-text", "inactive-text", "active-value", "inactive-value", "active-color", "disabled", "onChange"]))
22973
- : vue.createCommentVNode("v-if", true),
22974
- (vue.unref(propsItem_box).inputType === 'radio-group')
22975
- ? (vue.openBlock(), vue.createBlock(_component_el_radio_group, {
22976
- key: 11,
22977
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
22978
- "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
22979
- disabled: !!vue.unref(propsItem_box).disabled,
22980
- onChange: radioGroup.hdlChange
22981
- }, {
22982
- default: vue.withCtx(() => [
22983
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(propsItem_box).items, (item0, index0) => {
22984
- return (vue.openBlock(), vue.createBlock(_component_el_radio, {
22985
- key: index0,
22986
- label: item0[vue.unref(propsItem_box).item_fieldValue]
22987
- }, {
22988
- default: vue.withCtx(() => [
22989
- vue.createTextVNode(vue.toDisplayString(item0[vue.unref(propsItem_box).item_fieldLabel]), 1 /* TEXT */)
22990
- ]),
22991
- _: 2 /* DYNAMIC */
22992
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
22993
- }), 128 /* KEYED_FRAGMENT */))
22994
- ]),
22995
- _: 1 /* STABLE */
22996
- }, 8 /* PROPS */, ["modelValue", "disabled", "onChange"]))
22997
- : vue.createCommentVNode("v-if", true),
22998
- (vue.unref(propsItem_box).inputType === 'button-group' && vue.unref(propsItem_box).box && vue.unref(propsItem_box).box.length > 0)
22999
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
23000
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(propsItem_box).box, (item0, index0) => {
23001
- return (vue.openBlock(), vue.createBlock(_component_el_button_group, {
23002
- key: index0,
23003
- style: vue.normalizeStyle(style.button_group().group.style)
23004
- }, {
23005
- default: vue.withCtx(() => [
23006
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.box, (item1, index1) => {
23007
- return (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
23008
- key: index1,
23009
- disabled: !item1.tip,
23010
- content: item1.tip && item1.tip.content ? item1.tip.content : '',
23011
- placement: item1.tip && item1.tip.placement ? item1.tip.placement : 'bottom',
23012
- effect: "light"
23013
- }, {
23014
- default: vue.withCtx(() => [
23015
- (vue.openBlock(), vue.createBlock(_component_el_button, {
23016
- style: vue.normalizeStyle(style.button_group(vue.unref(propsItem_box), item0, item1).button.style),
23017
- icon: style.button_group(vue.unref(propsItem_box), item0, item1).button.icon,
23018
- type: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.type,
23019
- size: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.size,
23020
- plain: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.plain,
23021
- round: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.round,
23022
- circle: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.circle,
23023
- onClick: $event => (item1.hdlClick ? item1.hdlClick({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : null),
23024
- key: index1
23025
- }, {
23026
- default: vue.withCtx(() => [
23027
- (item1.text)
23028
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$e, vue.toDisplayString(item1.text), 1 /* TEXT */))
23029
- : vue.createCommentVNode("v-if", true)
23030
- ]),
23031
- _: 2 /* DYNAMIC */
23032
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style", "icon", "type", "size", "plain", "round", "circle", "onClick"]))
23033
- ]),
23034
- _: 2 /* DYNAMIC */
23035
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "content", "placement"]))
23036
- }), 128 /* KEYED_FRAGMENT */))
23037
- ]),
23038
- _: 2 /* DYNAMIC */
23039
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style"]))
23040
- }), 128 /* KEYED_FRAGMENT */))
23041
- ]))
23042
- : vue.createCommentVNode("v-if", true),
23043
- vue.createCommentVNode(" 图片&富文本&视频 "),
23044
- vue.createCommentVNode(" 图片 "),
23045
- (vue.unref(propsItem_box).inputType === 'image')
23046
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
23047
- vue.createElementVNode("div", null, [
23048
- vue.createVNode(_component_el_image, {
23049
- style: vue.normalizeStyle(style.image(vue.unref(propsItem_box), vue.unref(formProps_box))),
23050
- src: image.getSrc[0],
23051
- "preview-src-list": image.getSrc,
23052
- "preview-teleported": true,
23053
- "hide-on-click-modal": true
23054
- }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
23055
- ]),
23056
- vue.createCommentVNode(" 设置了图片删除功能,同时图片不为空 "),
23057
- (!!vue.unref(propsItem_box).imageDelete && !!vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23058
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [
23059
- vue.createVNode(_component_el_button, {
23060
- size: "small",
23061
- icon: !vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23062
- onClick: image.delete
23063
- }, {
23064
- default: vue.withCtx(() => [
23065
- vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete] ? '图片已删除,恢复' : '删除'), 1 /* TEXT */)
23066
- ]),
23067
- _: 1 /* STABLE */
23068
- }, 8 /* PROPS */, ["icon", "onClick"])
23069
- ]))
23070
- : vue.createCommentVNode("v-if", true)
23071
- ]))
23072
- : vue.createCommentVNode("v-if", true),
23073
- vue.createCommentVNode(" 多个图片 "),
23074
- (vue.unref(propsItem_box).inputType === 'images')
23075
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
23076
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName], (itemImages, indexImages) => {
23077
- return (vue.openBlock(), vue.createElementBlock("div", {
23078
- key: indexImages,
23079
- style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemBox)
23080
- }, [
23081
- vue.createElementVNode("div", null, [
23082
- vue.createVNode(_component_el_image, {
23083
- style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemThumb),
23084
- src: images.getSrc(itemImages, indexImages),
23085
- "preview-src-list": images.show
23086
- }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
23087
- ]),
23088
- (!!vue.unref(propsItem_box).imageDelete)
23089
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
23090
- vue.createVNode(_component_el_button, {
23091
- size: "small",
23092
- icon: "el-icon-delete",
23093
- onClick: $event => (images.delete(itemImages, indexImages))
23094
- }, {
23095
- default: vue.withCtx(() => [
23096
- vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete].includes(itemImages) ? '恢复' : '删除'), 1 /* TEXT */)
23097
- ]),
23098
- _: 2 /* DYNAMIC */
23099
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])
23100
- ]))
23101
- : vue.createCommentVNode("v-if", true)
23102
- ], 4 /* STYLE */))
23103
- }), 128 /* KEYED_FRAGMENT */))
23104
- ]))
23105
- : vue.createCommentVNode("v-if", true),
23106
- vue.createCommentVNode(" 富文本 "),
23107
- (vue.unref(propsItem_box).inputType === 'richtext')
23108
- ? (vue.openBlock(), vue.createElementBlock("div", {
23109
- key: 15,
23110
- style: vue.normalizeStyle(style.richtext(vue.unref(propsItem_box), vue.unref(formProps_box)))
23111
- }, [
23112
- vue.createVNode(_component_ly0Richtext, {
23113
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23114
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23115
- myProps: richtextProps.value
23116
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23117
- ], 4 /* STYLE */))
23118
- : vue.createCommentVNode("v-if", true),
23119
- vue.createCommentVNode(" 富文本show "),
23120
- (vue.unref(propsItem_box).inputType === 'richtextShow')
23121
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
23122
- vue.createElementVNode("div", {
23123
- innerHTML: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]
23124
- }, null, 8 /* PROPS */, _hoisted_8)
23125
- ]))
23126
- : vue.createCommentVNode("v-if", true),
23127
- vue.createCommentVNode(" 视频 "),
23128
- (vue.unref(propsItem_box).inputType === 'video')
23129
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
23130
- vue.createElementVNode("div", null, [
23131
- vue.createElementVNode("video", {
23132
- width: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).width,
23133
- height: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).height,
23134
- controls: "",
23135
- poster: video.poster
23136
- }, [
23137
- vue.createElementVNode("source", {
23138
- src: video.src,
23139
- type: "video/mp4"
23140
- }, null, 8 /* PROPS */, _hoisted_11),
23141
- vue.createCommentVNode(" MP4/H.264/AAC - 最广泛支持 "),
23142
- vue.createElementVNode("source", {
23143
- src: video.src,
23144
- type: "video/webm"
23145
- }, null, 8 /* PROPS */, _hoisted_12),
23146
- vue.createCommentVNode(" WebM/VP9/Opus - 开源格式,支持良好 "),
23147
- vue.createElementVNode("source", {
23148
- src: video.src,
23149
- type: "video/ogg"
23150
- }, null, 8 /* PROPS */, _hoisted_13),
23151
- vue.createCommentVNode(" Ogg/Theora/Vorbis - 较旧的开源格式 ")
23152
- ], 8 /* PROPS */, _hoisted_10)
23153
- ]),
23154
- vue.createCommentVNode(" 设置了视频删除功能,同时视频不为空 "),
23155
- (!!vue.unref(propsItem_box).videoDelete && !!vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23156
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
23157
- vue.createVNode(_component_el_button, {
23158
- size: "small",
23159
- icon: !vue.unref(formData_box)[vue.unref(propsItem_box).videoDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23160
- onClick: video.delete
23161
- }, {
23162
- default: vue.withCtx(() => [
23163
- vue.createTextVNode(vue.toDisplayString(!!vue.unref(formData_box)[vue.unref(propsItem_box).videoDelete] ? '视频已删除,恢复' : '删除'), 1 /* TEXT */)
23164
- ]),
23165
- _: 1 /* STABLE */
23166
- }, 8 /* PROPS */, ["icon", "onClick"])
23167
- ]))
23168
- : vue.createCommentVNode("v-if", true)
23169
- ]))
23170
- : vue.createCommentVNode("v-if", true),
23171
- vue.createCommentVNode(" 上传及下载 "),
23172
- vue.createCommentVNode(" 下载 "),
23173
- (vue.unref(propsItem_box).inputType === 'download')
23174
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
23175
- (vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23176
- ? (vue.openBlock(), vue.createElementBlock("a", {
23177
- key: 0,
23178
- style: vue.normalizeStyle(style.download.style),
23179
- href: download.downloadSrc,
23180
- download: download.fileName
23181
- }, [
23182
- vue.createElementVNode("span", null, vue.toDisplayString(download.downloadLabel), 1 /* TEXT */)
23183
- ], 12 /* STYLE, PROPS */, _hoisted_16))
23184
- : (vue.openBlock(), vue.createElementBlock("span", {
23185
- key: 1,
23186
- style: vue.normalizeStyle(style.download.none)
23187
- }, vue.toDisplayString(download.downloadLabel), 5 /* TEXT, STYLE */))
23188
- ]))
23189
- : vue.createCommentVNode("v-if", true),
23190
- vue.createCommentVNode(" 上传多个文件 "),
23191
- (vue.unref(propsItem_box).inputType === 'upload')
23192
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
23193
- vue.createVNode(_component_ly0Upload, {
23194
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23195
- "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23196
- myProps: {uploadUrl: upload.uploadUrl}
23197
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23198
- ]))
23199
- : vue.createCommentVNode("v-if", true),
23200
- vue.createCommentVNode(" 拖拽上传 "),
23201
- (vue.unref(propsItem_box).inputType === 'upload-drag')
23202
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
23203
- vue.createVNode(_component_ly0Upload_drag, {
23204
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23205
- "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23206
- myProps: {uploadUrl: upload.uploadUrl}
23207
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23208
- ]))
23209
- : vue.createCommentVNode("v-if", true),
23210
- vue.createCommentVNode(" 图片列表 "),
23211
- (vue.unref(propsItem_box).inputType === 'upload-picture')
23212
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
23213
- vue.createVNode(_component_ly0Upload_picture, {
23214
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23215
- "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23216
- myProps: {uploadUrl: upload.uploadUrl_image}
23217
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23218
- ]))
23219
- : vue.createCommentVNode("v-if", true),
23220
- vue.createCommentVNode(" 图片墙 "),
23221
- (vue.unref(propsItem_box).inputType === 'upload-picture-card')
23222
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
23223
- vue.createVNode(_component_ly0Upload_pictureCard, {
23224
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23225
- "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23226
- myProps: {uploadUrl: upload.uploadUrl_image}
23227
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23228
- ]))
23229
- : vue.createCommentVNode("v-if", true),
23230
- vue.createCommentVNode(" 头像 "),
23231
- (vue.unref(propsItem_box).inputType === 'upload-avatar')
23232
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
23233
- vue.createVNode(_component_ly0Upload_avatar, {
23234
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23235
- "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23236
- myProps: {uploadUrl: upload.uploadUrl_image}
23237
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23238
- ]))
23239
- : vue.createCommentVNode("v-if", true),
23240
- vue.createCommentVNode(" 车牌识别 "),
23241
- (vue.unref(propsItem_box).inputType === 'upload-carplate')
23242
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
23243
- vue.createVNode(_component_ly0Upload_carplate, {
23244
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23245
- "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23246
- myProps: {uploadUrl: upload.uploadUrl_carplate}
23247
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23248
- ]))
23249
- : vue.createCommentVNode("v-if", true),
23250
- vue.createCommentVNode(" 行政区划 "),
23251
- (vue.unref(propsItem_box).inputType === 'ly0gbt2260')
23252
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
23253
- vue.createVNode(_component_ly0gbt2260, {
23254
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23255
- "onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23256
- myProps: {readOnly: vue.unref(propsItem_box).readOnly}
23257
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23258
- ]))
23259
- : vue.createCommentVNode("v-if", true),
23260
- vue.createCommentVNode(" 商品分类 "),
23261
- (vue.unref(propsItem_box).inputType === 'ly0d7group')
23262
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, [
23263
- vue.createVNode(_component_ly0d7group, {
23264
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23265
- "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23266
- myProps: {readOnly: vue.unref(propsItem_box).readOnly}
23267
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23268
- ]))
23269
- : vue.createCommentVNode("v-if", true),
23270
- vue.createCommentVNode(" 邮寄地址 "),
23271
- (vue.unref(propsItem_box).inputType === 'ly0d7postal')
23272
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25, [
23273
- vue.createVNode(_component_ly0d7postal, {
23274
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23275
- "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23276
- myProps: {readOnly: vue.unref(propsItem_box).readOnly}
23277
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23278
- ]))
23279
- : vue.createCommentVNode("v-if", true),
23280
- vue.createCommentVNode(" 商品标价 "),
23281
- (vue.unref(propsItem_box).inputType === 'ly0d7price')
23282
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
23283
- vue.createVNode(_component_ly0d7price, {
23284
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23285
- "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23286
- myProps: {readOnly: vue.unref(propsItem_box).readOnly}
23287
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23288
- ]))
23289
- : vue.createCommentVNode("v-if", true),
23290
- vue.createCommentVNode(" 商品规格 "),
23291
- (vue.unref(propsItem_box).inputType === 'ly0d7size')
23292
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
23293
- vue.createVNode(_component_ly0d7size, {
23294
- modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23295
- "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23296
- myProps: {readOnly: vue.unref(propsItem_box).readOnly}
23297
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23298
- ]))
23299
- : vue.createCommentVNode("v-if", true),
23300
- vue.createCommentVNode(" 商品缩略图 "),
23301
- (vue.unref(propsItem_box).inputType === 'ly0d7thumb')
23302
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
23303
- vue.createVNode(_component_ly0d7thumb, {
23304
- modelValue: vue.unref(formData_box),
23305
- "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23306
- myProps: {
23307
- thumb: {
23308
- fieldName: vue.unref(propsItem_box).thumb.fieldName || vue.unref(formProps_box).para.ly0d7thumb.thumb.fieldName,
23309
- width: vue.unref(propsItem_box).thumb.width || vue.unref(formProps_box).para.ly0d7thumb.thumb.width,
23310
- height: vue.unref(propsItem_box).thumb.height || vue.unref(formProps_box).para.ly0d7thumb.thumb.height
23311
- },
23312
- name: {
23313
- fieldName: vue.unref(propsItem_box).name.fieldName || vue.unref(formProps_box).para.ly0d7thumb.name.fieldName,
23314
- },
23315
- number: {
23316
- fieldName: vue.unref(propsItem_box).number.fieldName || vue.unref(formProps_box).para.ly0d7thumb.number.fieldName,
23317
- },
23318
- readOnly: vue.unref(propsItem_box).readOnly
23319
- }
23320
- }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23321
- ]))
23322
- : vue.createCommentVNode("v-if", true)
23323
- ], 4 /* STYLE */)
23324
- ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
23325
- }
23326
- }
23327
-
23328
- };
23329
-
23330
- script$j.__scopeId = "data-v-a94fa4ba";
23331
- script$j.__file = "src/form/InputBox.vue";
23332
-
23333
- const _hoisted_1$e = { key: 0 };
23334
- const _hoisted_2$d = ["colspan"];
23335
- const _hoisted_3$6 = { key: 0 };
23336
- const _hoisted_4$4 = ["colspan"];
23337
-
23338
-
23339
- var script$i = {
23340
- __name: 'Form',
23341
- props: {
23342
- modelValue: {
23343
- type: Object,
23344
- default: () => ({})
23345
- },
23346
- myProps: {
23347
- type: Object,
23348
- default: () => ({})
23349
- },
23350
- scopeThis: {
23351
- type: Object,
23352
- default: () => ({})
23353
- }
23354
- },
23355
- setup(__props) {
23356
-
23357
- const props = __props;
23358
-
23359
- // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
23360
- let formData_box = props.modelValue;
23361
- const formProps_box = props.myProps;
23362
- const scopeThis_box = props.scopeThis;
23363
-
23364
- const style = vue.reactive({
23365
- collapse: styleModule.collapse,
23366
- field_box: styleModule.field_box,
23367
- line: styleModule.line,
23368
- no_field_label: styleModule.no_field_label,
23369
- root_box: styleModule.root_box,
23370
- submit_box: styleModule.submit_box
23371
- });
23372
-
23373
- const hdl = {
23374
- async submit(){
23375
- if(formProps_box.submit.handle){
23376
- // 执行用户句柄
23377
- const result = await formProps_box.submit.handle({
23378
- formData: formData_box,
23379
- scopeThis: scopeThis_box
23380
- });
23381
- if(result.code !== 0){
23382
- return
23383
- }
23384
- }
23385
-
23386
- // 后台提交 - URL地址
23387
- if(formProps_box.submit.url){
23388
- const result = await request.ly0.ly0request({
23389
- url: formProps_box.submit.url,
23390
- data: formData_box
23391
- });
23392
- if(result.code !== 0){
23393
- return
23394
- }
23395
- }
23396
-
23397
- // 后台提交 - 存储过程
23398
- if(formProps_box.submit.storpro){
23399
- const result = await request.ly0.storpro({
23400
- storproName: formProps_box.submit.storpro,
23401
- data: formData_box
23402
- });
23403
- if(result.code !== 0){
23404
- return
23405
- }
23406
- }
23407
-
23408
- if(formProps_box.popup){
23409
- // 关闭表单窗口
23410
- formProps_box.popup.visible = false;
23411
- }
23412
- }
23413
- };
23414
-
23415
- return (_ctx, _cache) => {
23416
- const _component_ly0Menu = vue.resolveComponent("ly0Menu");
23417
- const _component_el_collapse_item = vue.resolveComponent("el-collapse-item");
23418
- const _component_el_collapse = vue.resolveComponent("el-collapse");
23419
- const _component_el_button = vue.resolveComponent("el-button");
23420
-
23421
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23422
- vue.createCommentVNode(" 置顶菜单 "),
23423
- (vue.unref(formProps_box).menu && vue.unref(formProps_box).menu.menu && vue.unref(formProps_box).menu.menu.length > 0)
23424
- ? (vue.openBlock(), vue.createBlock(_component_ly0Menu, {
23425
- key: 0,
23426
- myProps: vue.unref(formProps_box).menu,
23427
- scopeThis: __props.scopeThis
23428
- }, null, 8 /* PROPS */, ["myProps", "scopeThis"]))
23429
- : vue.createCommentVNode("v-if", true),
23430
- vue.createCommentVNode(" 表单区域可以分为多个列 "),
23431
- vue.createElementVNode("div", {
23432
- style: vue.normalizeStyle(style.root_box)
23433
- }, [
23434
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formProps_box).cols, (item, index) => {
23435
- return (vue.openBlock(), vue.createElementBlock("div", { key: index }, [
23436
- vue.createElementVNode("table", null, [
23437
- vue.createElementVNode("tbody", null, [
23438
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (item0, index0) => {
23439
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index0 }, [
23440
- (item0.hdlVisible ? item0.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : true)
23441
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$e, [
23442
- (!!item0.label)
23443
- ? (vue.openBlock(), vue.createElementBlock("td", {
23444
- key: 0,
23445
- style: vue.normalizeStyle(style.field_box.left)
23446
- }, [
23447
- vue.createVNode(script$k, {
23448
- modelValue: vue.unref(formData_box),
23449
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23450
- myProps: vue.unref(formProps_box),
23451
- scopeThis: vue.unref(scopeThis_box),
23452
- item: item0
23453
- }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23454
- ], 4 /* STYLE */))
23455
- : vue.createCommentVNode("v-if", true),
23456
- vue.createElementVNode("td", {
23457
- style: vue.normalizeStyle(style.field_box.right),
23458
- colspan: style.no_field_label(item0)
23459
- }, [
23460
- (item0.inputType === 'collapse')
23461
- ? (vue.openBlock(), vue.createBlock(_component_el_collapse, {
23462
- key: 0,
23463
- accordion:
23464
- 'accordion' in item0 &&
23465
- (item0.accordion === true || item0.accordion === 'true')
23466
- ,
23467
- modelValue: item0.activeNames,
23468
- "onUpdate:modelValue": $event => ((item0.activeNames) = $event),
23469
- style: vue.normalizeStyle(style.collapse.style)
23470
- }, {
23471
- default: vue.withCtx(() => [
23472
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.items, (item1, index1) => {
23473
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index1 }, [
23474
- (item1.hdlVisible ? item1.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : true)
23475
- ? (vue.openBlock(), vue.createBlock(_component_el_collapse_item, {
23476
- key: 0,
23477
- title: item1.title,
23478
- name: item1.name ? item1.name : index1
23479
- }, {
23480
- default: vue.withCtx(() => [
23481
- vue.createElementVNode("table", {
23482
- style: vue.normalizeStyle(style.collapse.table)
23483
- }, [
23484
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item1.items, (item2, index2) => {
23485
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
23486
- (
23487
- item2.hdlVisible
23488
- ? item2.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23489
- : true
23490
- )
23491
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$6, [
23492
- (item2.label)
23493
- ? (vue.openBlock(), vue.createElementBlock("td", {
23494
- key: 0,
23495
- style: vue.normalizeStyle(style.field_box.left)
23496
- }, [
23497
- vue.createVNode(script$k, {
23498
- modelValue: vue.unref(formData_box),
23499
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23500
- myProps: vue.unref(formProps_box),
23501
- scopeThis: vue.unref(scopeThis_box),
23502
- item: item2
23503
- }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23504
- ], 4 /* STYLE */))
23505
- : vue.createCommentVNode("v-if", true),
23506
- vue.createElementVNode("td", {
23507
- style: vue.normalizeStyle(style.field_box.right),
23508
- colspan: style.no_field_label(item2)
23509
- }, [
23510
- vue.createVNode(script$j, {
23511
- modelValue: vue.unref(formData_box),
23512
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23513
- myProps: vue.unref(formProps_box),
23514
- scopeThis: vue.unref(scopeThis_box),
23515
- item: item2
23516
- }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23517
- ], 12 /* STYLE, PROPS */, _hoisted_4$4)
23518
- ]))
23519
- : vue.createCommentVNode("v-if", true)
23520
- ], 64 /* STABLE_FRAGMENT */))
23521
- }), 128 /* KEYED_FRAGMENT */))
23522
- ], 4 /* STYLE */)
23523
- ]),
23524
- _: 2 /* DYNAMIC */
23525
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "name"]))
23526
- : vue.createCommentVNode("v-if", true)
23527
- ], 64 /* STABLE_FRAGMENT */))
23528
- }), 128 /* KEYED_FRAGMENT */))
23529
- ]),
23530
- _: 2 /* DYNAMIC */
23531
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
23532
- : vue.createCommentVNode("v-if", true),
23533
- vue.createVNode(script$j, {
23534
- modelValue: vue.unref(formData_box),
23535
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23536
- myProps: vue.unref(formProps_box),
23537
- scopeThis: vue.unref(scopeThis_box),
23538
- item: item0
23539
- }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23540
- ], 12 /* STYLE, PROPS */, _hoisted_2$d)
23541
- ]))
23542
- : vue.createCommentVNode("v-if", true)
23543
- ], 64 /* STABLE_FRAGMENT */))
23544
- }), 128 /* KEYED_FRAGMENT */))
23545
- ])
23546
- ])
23547
- ]))
23548
- }), 128 /* KEYED_FRAGMENT */))
23549
- ], 4 /* STYLE */),
23550
- vue.createCommentVNode(" 提交 "),
23551
- (vue.unref(formProps_box).submit.switch)
23552
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
23553
- vue.createElementVNode("div", {
23554
- style: vue.normalizeStyle(style.line)
23555
- }, null, 4 /* STYLE */),
23556
- vue.createElementVNode("div", {
23557
- style: vue.normalizeStyle(style.submit_box.style)
23558
- }, [
23559
- vue.createVNode(_component_el_button, {
23560
- type: style.submit_box.button.facade.type,
23561
- plain: style.submit_box.button.facade.plain,
23562
- style: vue.normalizeStyle(style.submit_box.button.style),
23563
- onClick: hdl.submit
23564
- }, {
23565
- default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [
23566
- vue.createTextVNode("提交", -1 /* CACHED */)
23567
- ]))]),
23568
- _: 1 /* STABLE */
23569
- }, 8 /* PROPS */, ["type", "plain", "style", "onClick"])
23570
- ], 4 /* STYLE */)
23571
- ], 64 /* STABLE_FRAGMENT */))
23572
- : vue.createCommentVNode("v-if", true)
23573
- ], 64 /* STABLE_FRAGMENT */))
23574
- }
23575
- }
23576
-
23577
- };
23578
-
23579
- script$i.__file = "src/form/Form.vue";
23580
-
23581
- // 引用标准:GB/T 2260
23582
-
23583
- /**
23584
- * 深度拷贝函数
23585
- *
23586
- * @param {any} obj 需要拷贝的对象、数组或基本类型值
23587
- * @param {WeakMap} [cache=new WeakMap()] 用于处理循环引用的缓存
23588
- * @returns {any} 深度拷贝后的新对象/新值
23589
- */
23590
- function deepClone$1(obj, cache = new WeakMap()) {
23591
- // 1. 基本类型值(包括 null)和函数,直接返回
23592
- if (obj === null || typeof obj !== 'object') {
23593
- return obj;
23594
- }
23595
- // 处理函数(尽管技术上函数是对象,但我们通常不克隆它,而是直接引用)
23596
- if (typeof obj === 'function') {
23597
- return obj;
23598
- }
23599
-
23600
- // 2. 检查循环引用
23601
- // 如果缓存中已存在该对象,说明遇到了循环引用,直接返回缓存中的克隆对象
23602
- if (cache.has(obj)) {
23603
- return cache.get(obj);
23604
- }
23605
-
23606
- // 3. 处理特定内置对象(Date 和 RegExp)
23607
- if (obj instanceof Date) {
23608
- return new Date(obj.getTime());
23609
- }
23610
- if (obj instanceof RegExp) {
23611
- // g: global, i: ignoreCase, m: multiline, u: unicode, y: sticky
23612
- const flags = obj.global ? 'g' : ''
23613
- + obj.ignoreCase ? 'i' : ''
23614
- + obj.multiline ? 'm' : ''
23615
- + obj.unicode ? 'u' : ''
23616
- + obj.sticky ? 'y' : '';
23617
- return new RegExp(obj.source, flags);
23618
- }
23619
-
23620
- // 4. 初始化克隆对象
23621
- // 如果是数组,则初始化为空数组;否则初始化为空对象
23622
- const clone = Array.isArray(obj) ? [] : {};
23623
-
23624
- // 将克隆对象放入缓存,以处理接下来的递归调用中可能遇到的循环引用
23625
- cache.set(obj, clone);
23626
-
23627
- // 5. 递归拷贝属性
23628
- for (const key in obj) {
23629
- // 确保只处理对象自身的属性,排除原型链上的属性
23630
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
23631
- clone[key] = deepClone$1(obj[key], cache);
23632
- }
22186
+ // 将克隆对象放入缓存,以处理接下来的递归调用中可能遇到的循环引用
22187
+ cache.set(obj, clone);
22188
+
22189
+ // 5. 递归拷贝属性
22190
+ for (const key in obj) {
22191
+ // 确保只处理对象自身的属性,排除原型链上的属性
22192
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
22193
+ clone[key] = deepClone$1(obj[key], cache);
22194
+ }
23633
22195
  }
23634
22196
 
23635
22197
  // 6. 拷贝 Symbol 属性 (ES6/ES2015+)
@@ -23982,91 +22544,1803 @@ function getNodeValue(tree, nodeName) {
23982
22544
  return undefined;
23983
22545
  }
23984
22546
 
23985
- // 1. 优先检查当前层级是否存在该 key (广度优先视角的微调,可选)
23986
- // 如果你希望优先匹配当前层级,而不是先钻入第一个子对象里找,可以取消下面这行的注释:
23987
- // if (tree.hasOwnProperty(nodeName)) return tree[nodeName];
22547
+ // 1. 优先检查当前层级是否存在该 key (广度优先视角的微调,可选)
22548
+ // 如果你希望优先匹配当前层级,而不是先钻入第一个子对象里找,可以取消下面这行的注释:
22549
+ // if (tree.hasOwnProperty(nodeName)) return tree[nodeName];
22550
+
22551
+ // 遍历当前对象
22552
+ for (const key in tree) {
22553
+ const value = tree[key];
22554
+
22555
+ // 1. 只要 Key 匹配,立刻返回 Value
22556
+ // 无论 value 是字符串、数字、还是另一个对象,都视为找到了
22557
+ if (key === nodeName) {
22558
+ return value;
22559
+ }
22560
+
22561
+ // 2. 如果不匹配,且 value 是对象(具备子结构),则递归查找
22562
+ // 注意:这里通常建议排除数组,除非你确定数组里也包含带 key 的对象
22563
+ if (typeof value === 'object' && value !== null) {
22564
+ const result = getNodeValue(value, nodeName);
22565
+ if (result !== undefined) {
22566
+ return result;
22567
+ }
22568
+ }
22569
+ }
22570
+
22571
+ return undefined;
22572
+ }
22573
+
22574
+ /**
22575
+ * 深度非侵入式合并函数 (Deep Non-Destructive Merge)
22576
+ * * 特点:
22577
+ * 1. 深度递归地合并对象属性。
22578
+ * 2. 源对象中缺失的属性不会删除或覆盖目标对象中已存在的对应属性。
22579
+ * 3. 数组会被源对象中的数组完全覆盖。
22580
+ * * @param {Object} target 目标对象(将被修改)
22581
+ * @param {Object} source 源对象
22582
+ * @returns {Object} 修改后的目标对象
22583
+ */
22584
+ function deepMerge(target, source) {
22585
+ // 确保源对象是一个有效的对象,如果不是则直接返回目标对象
22586
+ if (typeof source !== 'object' || source === null) {
22587
+ return target;
22588
+ }
22589
+
22590
+ for (const key in source) {
22591
+ // 确保只处理源对象自身的属性
22592
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
22593
+ const sourceValue = source[key];
22594
+ const targetValue = target[key];
22595
+
22596
+ // 1. 如果源属性的值是对象且目标属性的值也是对象,则递归合并
22597
+ if (
22598
+ typeof sourceValue === 'object' && sourceValue !== null &&
22599
+ !Array.isArray(sourceValue) &&
22600
+ typeof targetValue === 'object' && targetValue !== null &&
22601
+ !Array.isArray(targetValue)
22602
+ ) {
22603
+ // 递归调用自身进行深度合并
22604
+ target[key] = deepMerge(targetValue, sourceValue);
22605
+ }
22606
+ // 2. 对于其他类型(基本类型、数组、null),直接覆盖
22607
+ else {
22608
+ // 这里的关键是:只有源对象中存在的属性,才会覆盖目标对象的属性。
22609
+ // 如果源对象中不存在某个键(key),则不会进入此循环,
22610
+ // 从而目标对象中已有的该属性得以保留。
22611
+ target[key] = sourceValue;
22612
+ }
22613
+ }
22614
+ }
22615
+
22616
+ return target;
22617
+ }
22618
+ var deepClone = {
22619
+ deepClone: deepClone$1,
22620
+ deepCloneAndMap,
22621
+ typeOfValue,
22622
+ isJsonString,
22623
+ flattenTreeValues,
22624
+ arrayToTree,
22625
+ getLeafValue,
22626
+ getNodeValue,
22627
+ deepMerge
22628
+ };
22629
+
22630
+ var unclassified = {
22631
+ deepClone};
22632
+
22633
+ // with-table数据模板
22634
+
22635
+ const {
22636
+ proxy
22637
+ } = vue.getCurrentInstance();
22638
+ const ly0default$4 = {
22639
+ pageSize: 10
22640
+ };
22641
+
22642
+ // 数据刷新
22643
+ const refresh = async _ref => {
22644
+ let {
22645
+ scopeThis
22646
+ } = _ref;
22647
+ const result = await ly0request$1.ly0.storpro({
22648
+ storproName: scopeThis.storpro.refresh,
22649
+ data: {
22650
+ query: scopeThis.query && scopeThis.query.formData ? scopeThis.query.formData : null,
22651
+ sort: scopeThis.query && scopeThis.query.sort ? scopeThis.query.sort : null,
22652
+ limit: scopeThis.query && scopeThis.query.pageSize ? scopeThis.query.pageSize : ly0default$4.pageSize,
22653
+ page: scopeThis.query && scopeThis.query.currentPage ? scopeThis.query.currentPage : 1
22654
+ }
22655
+ });
22656
+ if (result.code === 0) {
22657
+ scopeThis.tableData = {
22658
+ data: result.data,
22659
+ total: result.total
22660
+ };
22661
+ }
22662
+ return {
22663
+ code: result.code,
22664
+ message: result.message
22665
+ };
22666
+ };
22667
+
22668
+ // 数据重载
22669
+ const reload = async _ref2 => {
22670
+ let {
22671
+ scopeThis
22672
+ } = _ref2;
22673
+ scopeThis.query = scopeThis.queryInit ? unclassified.deepClone.deepClone(scopeThis.queryInit) : null;
22674
+ const result = await refresh({
22675
+ scopeThis
22676
+ });
22677
+ proxy.$message(result.code === 0 ? '数据已重载' : '数据重载错误');
22678
+ };
22679
+
22680
+ // 获取页面数据附加
22681
+ const getPgData = async _ref3 => {
22682
+ let {
22683
+ scopeThis
22684
+ } = _ref3;
22685
+ const result = await ly0request$1.ly0.storpro({
22686
+ storproName: scopeThis.storpro.getPgData,
22687
+ data: scopeThis.pgData && scopeThis.pgData.query ? scopeThis.pgData.query : null
22688
+ });
22689
+ if (result.code === 0) {
22690
+ scopeThis.pgData = unclassified.deepClone.deepMerge(scopeThis.pgData, {
22691
+ data: result.data
22692
+ });
22693
+ proxy.$message('已获取页面数据');
22694
+ return;
22695
+ }
22696
+ proxy.$message('获取页面数据错误');
22697
+ };
22698
+
22699
+ // 初始化
22700
+ const init = async _ref4 => {
22701
+ let {
22702
+ scopeThis
22703
+ } = _ref4;
22704
+ if (scopeThis.pgData) {
22705
+ await getPgData({
22706
+ scopeThis
22707
+ });
22708
+ }
22709
+ await reload({
22710
+ scopeThis
22711
+ });
22712
+ };
22713
+
22714
+ // 弹出 - 查询
22715
+ const popupFind = async _ref5 => {
22716
+ let {
22717
+ scopeThis
22718
+ } = _ref5;
22719
+ scopeThis.formData = scopeThis.query && scopeThis.query.formData ? unclassified.deepClone.deepClone(scopeThis.query.formData) : null;
22720
+ scopeThis.TableProps.query.sort = scopeThis.query && scopeThis.query.sort ? JSON.parse(JSON.stringify(scopeThis.query.sort)) : null;
22721
+ scopeThis.TableProps.query.pageSize = scopeThis.query && scopeThis.query.pageSize ? scopeThis.query.pageSize : ly0default$4.pageSize;
22722
+ scopeThis.TableProps.query.currentPage = scopeThis.query && scopeThis.query.currentPage ? scopeThis.query.currentPage : 1;
22723
+ scopeThis.formProps = unclassified.deepClone.deepClone(scopeThis.find.formProps);
22724
+ // 弹出窗口
22725
+ scopeThis.formProps.popup = unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
22726
+ visible: true
22727
+ });
22728
+ };
22729
+
22730
+ // 弹出 - 新增一条记录
22731
+ const popupInsertOne = async _ref6 => {
22732
+ let {
22733
+ scopeThis
22734
+ } = _ref6;
22735
+ scopeThis.formData = unclassified.deepClone.deepClone(scopeThis.insertOne.formData);
22736
+ scopeThis.formProps = unclassified.deepClone.deepClone(scopeThis.insertOne.formProps);
22737
+ // 弹出窗口
22738
+ scopeThis.formProps.popup = unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
22739
+ visible: true
22740
+ });
22741
+ };
22742
+
22743
+ // 弹出 - 修改一条记录
22744
+ const popupUpdateOne = async _ref7 => {
22745
+ let {
22746
+ scopeThis,
22747
+ formData
22748
+ } = _ref7;
22749
+ scopeThis.formData = unclassified.deepClone.deepClone(formData); // 继承行记录的值
22750
+ scopeThis.formProps = unclassified.deepClone.deepClone(scopeThis.UpdateOne.formProps);
22751
+ // 弹出窗口
22752
+ scopeThis.formProps.popup = unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
22753
+ visible: true
22754
+ });
22755
+ };
22756
+
22757
+ // 弹出 - 详细信息
22758
+ const popupDoc = async _ref8 => {
22759
+ let {
22760
+ scopeThis,
22761
+ formData
22762
+ } = _ref8;
22763
+ scopeThis.formData = unclassified.deepClone.deepClone(formData); // 继承行记录的值
22764
+ scopeThis.formProps = unclassified.deepClone.deepClone(scopeThis.doc.formProps);
22765
+ // 弹出窗口
22766
+ scopeThis.formProps.popup = unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
22767
+ visible: true
22768
+ });
22769
+ };
22770
+
22771
+ // 提交 - 查询
22772
+ const submitFind = async _ref9 => {
22773
+ let {
22774
+ scopeThis
22775
+ } = _ref9;
22776
+ scopeThis.query.formData = scopeThis.formData ? unclassified.deepClone.deepClone(scopeThis.formData) : null;
22777
+ scopeThis.query.sort = scopeThis.tableProps.query && scopeThis.tableProps.query.sort ? JSON.parse(JSON.stringify(scopeThis.tableProps.query.sort)) : null;
22778
+ scopeThis.query.pageSize = scopeThis.tableProps.query && scopeThis.tableProps.query.pageSize ? scopeThis.tableProps.query.pageSize : ly0default$4.pageSize;
22779
+ scopeThis.query.currentPage = scopeThis.tableProps.query && scopeThis.tableProps.query.currentPage ? scopeThis.tableProps.query.currentPage : 1;
22780
+ const result = await refresh({
22781
+ scopeThis
22782
+ });
22783
+ if (result.code === 0) {
22784
+ // 关闭表单窗口
22785
+ scopeThis.formProps.popup.visible = false;
22786
+ proxy.$message('查询已提交并刷新数据');
22787
+ } else {
22788
+ proxy.$message('查询错误');
22789
+ }
22790
+ };
22791
+
22792
+ // 提交 - 新增一条记录
22793
+ const submitInsertOne = async _ref0 => {
22794
+ let {
22795
+ scopeThis
22796
+ } = _ref0;
22797
+ try {
22798
+ await proxy.$confirm('新增一条记录, 提交?', '提示', {
22799
+ confirmButtonText: '确认',
22800
+ cancelButtonText: '取消',
22801
+ type: 'warning' // 警告图标
22802
+ });
22803
+ const result = await ly0request$1.ly0.storpro({
22804
+ storproName: scopeThis.storpro.insertOne,
22805
+ data: scopeThis.formData
22806
+ });
22807
+ if (result.code === 0) {
22808
+ // 关闭表单窗口
22809
+ scopeThis.formProps.popup.visible = false;
22810
+ proxy.$message('新增一条记录成功');
22811
+ scopeThis.query.currentPage = 1;
22812
+ scopeThis.tableData = {
22813
+ data: result.dataNew,
22814
+ total: 1
22815
+ };
22816
+ } else {
22817
+ proxy.$message('新增一条记录失败');
22818
+ }
22819
+ } catch (error) {
22820
+ proxy.$message('已取消');
22821
+ }
22822
+ };
22823
+
22824
+ // 提交 - 修改一条记录
22825
+ const submitUpdateOne = async _ref1 => {
22826
+ let {
22827
+ scopeThis
22828
+ } = _ref1;
22829
+ try {
22830
+ await proxy.$confirm('修改一条记录, 提交?', '提示', {
22831
+ confirmButtonText: '确认',
22832
+ cancelButtonText: '取消',
22833
+ type: 'warning' // 警告图标
22834
+ });
22835
+ const result = await ly0request$1.ly0.storpro({
22836
+ storproName: scopeThis.storpro.updateOne,
22837
+ data: scopeThis.formData
22838
+ });
22839
+ if (result.code === 0) {
22840
+ // 关闭表单窗口
22841
+ scopeThis.formProps.popup.visible = false;
22842
+ proxy.$message('修改一条记录成功');
22843
+ const resultRefresh = await refresh({
22844
+ scopeThis
22845
+ });
22846
+ if (resultRefresh.code === 0) {
22847
+ proxy.$message('已刷新数据');
22848
+ } else {
22849
+ proxy.$message('刷新错误');
22850
+ }
22851
+ } else {
22852
+ proxy.$message('修改一条记录失败');
22853
+ }
22854
+ } catch (error) {
22855
+ proxy.$message('已取消');
22856
+ }
22857
+ };
22858
+
22859
+ // 提交 - 删除一条记录
22860
+ const submitDeleteOne = async _ref10 => {
22861
+ let {
22862
+ scopeThis,
22863
+ formData
22864
+ } = _ref10;
22865
+ try {
22866
+ await proxy.$confirm('删除一条记录, 提交?', '警告', {
22867
+ confirmButtonText: '确认',
22868
+ cancelButtonText: '取消',
22869
+ type: 'warning' // 警告图标
22870
+ });
22871
+ const result = await ly0request$1.ly0.storpro({
22872
+ storproName: scopeThis.storpro.deleteOne,
22873
+ data: formData // 继承行记录的值
22874
+ });
22875
+ if (result.code === 0) {
22876
+ proxy.$message('删除一条记录成功');
22877
+ const resultRefresh = await refresh({
22878
+ scopeThis
22879
+ });
22880
+ if (resultRefresh.code === 0) {
22881
+ proxy.$message('已刷新数据');
22882
+ } else {
22883
+ proxy.$message('刷新错误');
22884
+ }
22885
+ } else {
22886
+ proxy.$message('删除一条记录失败');
22887
+ }
22888
+ } catch (error) {
22889
+ proxy.$message('已取消');
22890
+ }
22891
+ };
22892
+ var withTable = {
22893
+ refresh,
22894
+ reload,
22895
+ getPgData,
22896
+ init,
22897
+ popupFind,
22898
+ popupInsertOne,
22899
+ popupUpdateOne,
22900
+ popupDoc,
22901
+ submitFind,
22902
+ submitInsertOne,
22903
+ submitUpdateOne,
22904
+ submitDeleteOne
22905
+ };
22906
+
22907
+ // 默认值
22908
+
22909
+ var ly0default$3 = {
22910
+ myProps: {
22911
+ popup: {
22912
+ visible: false,
22913
+ title: '',
22914
+ width: '800px',
22915
+ top: '15vh'
22916
+ },
22917
+ menu: {
22918
+ mode: 'horizontal',
22919
+ menu: []
22920
+ },
22921
+ cols: [],
22922
+ submit: {
22923
+ switch: false,
22924
+ // true - 提交模式, false - 组件模式
22925
+ watch: false,
22926
+ // 提交监听
22927
+ async handle(_ref) {
22928
+ let {
22929
+ formData,
22930
+ scopeThis
22931
+ } = _ref;
22932
+ },
22933
+ // 异步用户句柄
22934
+ url: '',
22935
+ // 后台提交 - URL地址
22936
+ storpro: '' // 后台提交 - 存储过程
22937
+ },
22938
+ para: {
22939
+ inputWidth: '200px',
22940
+ placeholder: {
22941
+ input: '请输入',
22942
+ select: '请选择',
22943
+ datetime: '请选择时间',
22944
+ date: '请选择日期'
22945
+ },
22946
+ image: {
22947
+ width: '400px',
22948
+ height: '300px'
22949
+ },
22950
+ thumb: {
22951
+ width: '40px',
22952
+ height: '30px'
22953
+ },
22954
+ video: {
22955
+ width: '300px',
22956
+ height: '200px'
22957
+ },
22958
+ upload: {
22959
+ uploadUrl: ly0request$1.domain + ly0request$1.upload,
22960
+ uploadUrl_image: ly0request$1.domain + ly0request$1.upload_image,
22961
+ uploadUrl_carplate: ly0request$1.domain + ly0request$1.upload_carplate
22962
+ },
22963
+ richtext: {
22964
+ editorWidth: '500px',
22965
+ // 富文本编辑器宽度
22966
+ size: 200 // 可上传的图片大小,单位为KB, 1M = 1024KB
22967
+ },
22968
+ download: {
22969
+ // 行内下载
22970
+ fileName: 'new-file',
22971
+ // 下载文件名
22972
+ downloadLabel: '点击这里下载',
22973
+ // 下载标签
22974
+ downloadLabelNoSrc: '没有可供下载的资源' // 下载标签
22975
+ },
22976
+ ly0d7thumb: {
22977
+ thumb: {
22978
+ fieldName: 'thumb',
22979
+ width: '100px',
22980
+ height: '100px'
22981
+ },
22982
+ name: {
22983
+ fieldName: 'name'
22984
+ },
22985
+ number: {
22986
+ fieldName: 'number'
22987
+ }
22988
+ }
22989
+ }
22990
+ }
22991
+ };
22992
+
22993
+ function box$1(item) {
22994
+ let result = {
22995
+ 'text-align': 'right',
22996
+ 'padding-right': '10px'
22997
+ };
22998
+
22999
+ // 纵向居中
23000
+ if (item.inputType === "input" || item.inputType === "select" || item.inputType === "date-picker" || item.inputType === "switch" || item.inputType === "radio-group" || item.inputType === "button-group") {
23001
+ result.margin = "auto 0";
23002
+ }
23003
+ if (item.labelBox && item.labelBox.style) {
23004
+ if (item.labelBox.new) {
23005
+ // 外部样式覆盖
23006
+ result = item.labelBox.style;
23007
+ } else {
23008
+ // 叠加
23009
+ result = Object.assign(result, item.labelBox.style);
23010
+ }
23011
+ }
23012
+ return result;
23013
+ }
23014
+ function label(item) {
23015
+ return item.labelStyle ? item.labelStyle : {};
23016
+ }
23017
+ var label$1 = {
23018
+ box: box$1,
23019
+ label
23020
+ };
23021
+
23022
+ function box(item) {
23023
+ let result = {
23024
+ 'text-align': 'left'
23025
+ };
23026
+ if (item.inputBox && item.inputBox.style) {
23027
+ if (!!item.inputBox.new) {
23028
+ // 外部样式覆盖
23029
+ result = item.inputBox.style;
23030
+ } else {
23031
+ // 叠加
23032
+ result = Object.assign(result, item.inputBox.style);
23033
+ }
23034
+ }
23035
+ return result;
23036
+ }
23037
+
23038
+ // inputType: "text"
23039
+ function text(item, formProps) {
23040
+ return {
23041
+ 'white-space': 'pre-line',
23042
+ // 保留换行符
23043
+ 'border-left': '#ababab solid 1px',
23044
+ 'border-top': '#ababab solid 1px',
23045
+ 'padding-left': '10px',
23046
+ width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth
23047
+ };
23048
+ }
23049
+
23050
+ // inputType: "text0"
23051
+ function text0(item) {
23052
+ return {
23053
+ 'white-space': 'pre-line',
23054
+ // 保留换行符
23055
+ color: 'blue'
23056
+ };
23057
+ }
23058
+
23059
+ // inputType: "input", "select", "date-picker"
23060
+ function input(item, formProps) {
23061
+ return {
23062
+ width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth,
23063
+ height: '40px'
23064
+ };
23065
+ }
23066
+
23067
+ // inputType: "input-number"
23068
+ function input_number(item) {
23069
+ return {
23070
+ facade: {
23071
+ size: item.size ? item.size : ""
23072
+ }
23073
+ };
23074
+ }
23075
+
23076
+ // inputType: "switch"
23077
+ function el_switch(item) {
23078
+ return {
23079
+ facade: {
23080
+ active_color: item.activeColor ? item.activeColor : "#ee7405"
23081
+ }
23082
+ };
23083
+ }
23084
+
23085
+ // inputType: "button-group"
23086
+ function button_group(item, groupItem, buttonItem) {
23087
+ let result = {
23088
+ group: {
23089
+ style: {
23090
+ 'margin-right': '10px'
23091
+ }
23092
+ },
23093
+ button: {
23094
+ style: {},
23095
+ icon: "",
23096
+ facade: {
23097
+ type: "",
23098
+ size: "",
23099
+ plain: false,
23100
+ round: false,
23101
+ circle: false
23102
+ }
23103
+ }
23104
+ };
23105
+ if (buttonItem && buttonItem.style) {
23106
+ result.button.style = Object.assign(result.button.style, buttonItem.style);
23107
+ }
23108
+ if (buttonItem && buttonItem.icon) {
23109
+ result.button.icon = buttonItem.icon;
23110
+ }
23111
+ if (buttonItem && buttonItem.type) {
23112
+ result.button.facade.type = buttonItem.type;
23113
+ }
23114
+ if (buttonItem && buttonItem.size) {
23115
+ result.button.facade.size = buttonItem.size;
23116
+ }
23117
+ if (buttonItem && buttonItem.plain) {
23118
+ result.button.facade.plain = buttonItem.plain;
23119
+ }
23120
+ if (buttonItem && buttonItem.round) {
23121
+ result.button.facade.round = buttonItem.round;
23122
+ }
23123
+ if (buttonItem && buttonItem.circle) {
23124
+ result.button.facade.circle = buttonItem.circle;
23125
+ }
23126
+ return result;
23127
+ }
23128
+
23129
+ // inputType: "image"
23130
+ function image(item, formProps) {
23131
+ return {
23132
+ width: item.imageWidth ? item.imageWidth : formProps.para.image.width,
23133
+ height: item.imageHeight ? item.imageHeight : formProps.para.image.height
23134
+ };
23135
+ }
23136
+
23137
+ // inputType: "images"
23138
+ function images(item, formProps) {
23139
+ return {
23140
+ itemBox: {
23141
+ display: 'inline-block',
23142
+ margin: '10px'
23143
+ },
23144
+ itemThumb: {
23145
+ width: item.imageWidth ? item.imageWidth : formProps.para.thumb.width,
23146
+ height: item.imageHeight ? item.imageHeight : formProps.para.thumb.height
23147
+ }
23148
+ };
23149
+ }
23150
+
23151
+ // inputType: "richtext"
23152
+ function richtext(item, formProps) {
23153
+ return {
23154
+ // 富文本编辑器宽度
23155
+ width: item.editorWidth ? item.editorWidth : formProps.para.richtext.editorWidth
23156
+ };
23157
+ }
23158
+
23159
+ // inputType: "video"
23160
+ function video(item, formProps) {
23161
+ return {
23162
+ width: item.videoWidth ? item.videoWidth : formProps.para.video.width,
23163
+ height: item.videoHeight ? item.videoHeight : formProps.para.video.height
23164
+ };
23165
+ }
23166
+
23167
+ // inputType: "download"
23168
+ function download() {
23169
+ return {
23170
+ style: {
23171
+ 'text-decoration': 'underline',
23172
+ color: '#0000ff'
23173
+ },
23174
+ none: {
23175
+ color: '#6a6a6a'
23176
+ } // 没有链接
23177
+ };
23178
+ }
23179
+ var input$1 = {
23180
+ box,
23181
+ text,
23182
+ text0,
23183
+ input,
23184
+ input_number,
23185
+ el_switch,
23186
+ button_group,
23187
+ image,
23188
+ images,
23189
+ richtext,
23190
+ video,
23191
+ download
23192
+ };
23193
+
23194
+ // 样式函数
23195
+
23196
+
23197
+ // 折叠面板
23198
+ const collapse = {
23199
+ style: {
23200
+ 'margin-bottom': '10px'
23201
+ },
23202
+ table: {
23203
+ 'text-align': 'center',
23204
+ width: '100%'
23205
+ }
23206
+ };
23207
+
23208
+ // 字段盒子
23209
+ const field_box = {
23210
+ left: {
23211
+ padding: "10px"
23212
+ },
23213
+ right: {
23214
+ padding: "10px"
23215
+ }
23216
+ };
23217
+
23218
+ // 行际分割线
23219
+ const line = {
23220
+ height: '1px',
23221
+ 'background-color': '#bdbdbd'
23222
+ };
23223
+
23224
+ // 没有field-label, field-value独占一行(field-box)
23225
+ function no_field_label(item) {
23226
+ let result = 1;
23227
+ if (!item.label) {
23228
+ result = 2;
23229
+ }
23230
+ return result;
23231
+ }
23232
+
23233
+ // 表单区域可以分为多个列
23234
+ const root_box = {
23235
+ display: 'flex',
23236
+ 'justify-content': 'space-around'
23237
+ };
23238
+
23239
+ // 提交区域
23240
+ const submit_box = {
23241
+ style: {
23242
+ 'text-align': 'left'
23243
+ },
23244
+ button: {
23245
+ style: {
23246
+ 'margin-top': '10px'
23247
+ },
23248
+ facade: {
23249
+ type: 'danger',
23250
+ plain: true
23251
+ }
23252
+ }
23253
+ };
23254
+ var styleModule = {
23255
+ collapse,
23256
+ field_box,
23257
+ line,
23258
+ no_field_label,
23259
+ root_box,
23260
+ submit_box,
23261
+ label: label$1,
23262
+ input: input$1
23263
+ };
23264
+
23265
+ var script$k = {
23266
+ __name: 'LabelBox',
23267
+ props: {
23268
+ modelValue: {
23269
+ type: Object,
23270
+ default: () => ({})
23271
+ },
23272
+ myProps: {
23273
+ type: Object,
23274
+ default: () => ({})
23275
+ },
23276
+ scopeThis: {
23277
+ type: Object,
23278
+ default: () => ({})
23279
+ },
23280
+ item: {
23281
+ type: Object,
23282
+ default: () => ({})
23283
+ }
23284
+ },
23285
+ setup(__props) {
23286
+
23287
+ const props = __props;
23988
23288
 
23989
- // 遍历当前对象
23990
- for (const key in tree) {
23991
- const value = tree[key];
23289
+ // props属性包装,使得页面和js使用相同的命名
23290
+ let formData_box = props.modelValue;
23291
+ const scopeThis_box = props.scopeThis;
23292
+ const propsItem_box = props.item;
23992
23293
 
23993
- // 1. 只要 Key 匹配,立刻返回 Value
23994
- // 无论 value 是字符串、数字、还是另一个对象,都视为找到了
23995
- if (key === nodeName) {
23996
- return value;
23997
- }
23294
+ const style = vue.ref({
23295
+ box: styleModule.label.box(propsItem_box),
23296
+ label: styleModule.label.label(propsItem_box),
23297
+ });
23998
23298
 
23999
- // 2. 如果不匹配,且 value 是对象(具备子结构),则递归查找
24000
- // 注意:这里通常建议排除数组,除非你确定数组里也包含带 key 的对象
24001
- if (typeof value === 'object' && value !== null) {
24002
- const result = getNodeValue(value, nodeName);
24003
- if (result !== undefined) {
24004
- return result;
24005
- }
24006
- }
23299
+ const hdlClick = () => {
23300
+ if(propsItem_box.hdlLabelClick){
23301
+ propsItem_box.hdlLabelClick({formData: formData_box, scopeThis: scopeThis_box});
24007
23302
  }
23303
+ };
23304
+
23305
+ return (_ctx, _cache) => {
23306
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23307
+ vue.createCommentVNode(" label-box "),
23308
+ vue.createElementVNode("div", {
23309
+ style: vue.normalizeStyle(style.value.box),
23310
+ onClick: hdlClick
23311
+ }, [
23312
+ vue.createElementVNode("span", {
23313
+ style: vue.normalizeStyle(style.value.label)
23314
+ }, vue.toDisplayString(vue.unref(propsItem_box).label), 5 /* TEXT, STYLE */)
23315
+ ], 4 /* STYLE */)
23316
+ ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
23317
+ }
23318
+ }
23319
+
23320
+ };
23321
+
23322
+ script$k.__file = "src/form/LabelBox.vue";
23323
+
23324
+ const _hoisted_1$f = { key: 12 };
23325
+ const _hoisted_2$e = { key: 0 };
23326
+ const _hoisted_3$7 = { key: 13 };
23327
+ const _hoisted_4$5 = { key: 0 };
23328
+ const _hoisted_5$2 = { key: 14 };
23329
+ const _hoisted_6 = { key: 0 };
23330
+ const _hoisted_7 = { key: 16 };
23331
+ const _hoisted_8 = ["innerHTML"];
23332
+ const _hoisted_9 = { key: 17 };
23333
+ const _hoisted_10 = ["width", "height", "poster"];
23334
+ const _hoisted_11 = ["src"];
23335
+ const _hoisted_12 = ["src"];
23336
+ const _hoisted_13 = ["src"];
23337
+ const _hoisted_14 = { key: 0 };
23338
+ const _hoisted_15 = { key: 18 };
23339
+ const _hoisted_16 = ["href", "download"];
23340
+ const _hoisted_17 = { key: 19 };
23341
+ const _hoisted_18 = { key: 20 };
23342
+ const _hoisted_19 = { key: 21 };
23343
+ const _hoisted_20 = { key: 22 };
23344
+ const _hoisted_21 = { key: 23 };
23345
+ const _hoisted_22 = { key: 24 };
23346
+ const _hoisted_23 = { key: 25 };
23347
+ const _hoisted_24 = { key: 26 };
23348
+ const _hoisted_25 = { key: 27 };
23349
+ const _hoisted_26 = { key: 28 };
23350
+ const _hoisted_27 = { key: 29 };
23351
+ const _hoisted_28 = { key: 30 };
23352
+
23353
+
23354
+ var script$j = {
23355
+ __name: 'InputBox',
23356
+ props: {
23357
+ modelValue: {
23358
+ type: Object,
23359
+ default: () => ({})
23360
+ },
23361
+ myProps: {
23362
+ type: Object,
23363
+ default: () => ({})
23364
+ },
23365
+ scopeThis: {
23366
+ type: Object,
23367
+ default: () => ({})
23368
+ },
23369
+ item: {
23370
+ type: Object,
23371
+ default: () => ({})
23372
+ }
23373
+ },
23374
+ setup(__props) {
23375
+
23376
+ const props = __props;
23377
+
23378
+ // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
23379
+ let formData_box = props.modelValue;
23380
+ const formProps_box = props.myProps;
23381
+ const scopeThis_box = props.scopeThis;
23382
+ const propsItem_box = props.item;
23383
+
23384
+ const input = vue.reactive({
23385
+ placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.input,
23386
+ showPassword: !!propsItem_box.showPassword,
23387
+ hdlCannotInput: value => { // 解决偶发不能输入的问题
23388
+ formData_box[propsItem_box.fieldName] = value;
23389
+ }
23390
+ });
23391
+
23392
+ const select = vue.reactive({
23393
+ placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.select,
23394
+ items: vue.computed(()=>{
23395
+ if (propsItem_box.items) {
23396
+ return propsItem_box.items
23397
+ } else if (propsItem_box.hdlGetItems) {
23398
+ return propsItem_box.hdlGetItems({formData: formData_box, scopeThis: scopeThis_box})
23399
+ }
23400
+ }),
23401
+ hdlChange: value => {
23402
+ if (propsItem_box.hdlChange) {
23403
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
23404
+ }
23405
+ }
23406
+ });
23407
+
23408
+ const datePicker = vue.reactive({
23409
+ placeholder: vue.computed(()=> {
23410
+ if (propsItem_box.placeholder) {
23411
+ return propsItem_box.placeholder
23412
+ }
23413
+ if (propsItem_box.type === 'datetime') {
23414
+ return formProps_box.para.placeholder.datetime
23415
+ }
23416
+ if (propsItem_box.type === 'date') {
23417
+ return formProps_box.para.placeholder.date
23418
+ }
23419
+ return formProps_box.para.placeholder.datetime
23420
+ }),
23421
+ format: vue.computed(() => {
23422
+ if (propsItem_box.format) {
23423
+ return propsItem_box.format
23424
+ }
23425
+ if (propsItem_box.type === 'datetime') {
23426
+ return 'YYYY/MM/DD HH:mm'
23427
+ }
23428
+ if (propsItem_box.type === 'date') {
23429
+ return 'YYYY/MM/DD'
23430
+ }
23431
+ return 'YYYY/MM/DD HH:mm'
23432
+ }),
23433
+ hdlChange: value => {
23434
+ if (propsItem_box.hdlChange) {
23435
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
23436
+ }
23437
+ }
23438
+ });
23439
+
23440
+ const ly0switch = vue.reactive({
23441
+ hdlChange: value => {
23442
+ if (propsItem_box.hdlChange) {
23443
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
23444
+ }
23445
+ }
23446
+ });
23447
+
23448
+ const radioGroup = vue.reactive({
23449
+ hdlChange: value => {
23450
+ if (propsItem_box.hdlChange) {
23451
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
23452
+ }
23453
+ }
23454
+ });
23455
+
23456
+ const image = vue.reactive({
23457
+ getSrc: vue.computed(() => {
23458
+ if (
23459
+ propsItem_box.imageDelete &&
23460
+ formData_box[propsItem_box.imageDelete] &&
23461
+ (formData_box[propsItem_box.imageDelete] === true ||
23462
+ formData_box[propsItem_box.imageDelete] === 'true') // 图片已删除
23463
+ ) {
23464
+ return ['']
23465
+ }
23466
+ if (formData_box[propsItem_box.fieldName]) {
23467
+ return formData_box[propsItem_box.fieldName]
23468
+ }
23469
+ return ['']
23470
+ }),
23471
+ delete: ()=>{
23472
+ formData_box[propsItem_box.imageDelete] =
23473
+ !formData_box[propsItem_box.imageDelete];
23474
+ }
23475
+ });
23476
+
23477
+ const images = vue.reactive({
23478
+ getSrc: (itemImages, indexImages) => {
23479
+ if (
23480
+ !propsItem_box.imageDelete ||
23481
+ !formData_box[propsItem_box.imageDelete].includes(itemImages)
23482
+ ) {
23483
+ return itemImages
23484
+ }
23485
+ return ''
23486
+ },
23487
+ delete: (itemImages, indexImages) => {
23488
+ if (!formData_box[propsItem_box.imageDelete].includes(itemImages)) {
23489
+ formData_box[propsItem_box.imageDelete].push(itemImages);
23490
+ return
23491
+ }
23492
+
23493
+ formData_box[propsItem_box.imageDelete] = formData_box[propsItem_box.imageDelete].filter(i => {
23494
+ return i !== itemImages
23495
+ });
23496
+ },
23497
+ show: vue.computed(()=>{
23498
+ let result = [];
23499
+ if (!propsItem_box.imageDelete) {
23500
+ formData_box[propsItem_box.fieldName].forEach(i => {
23501
+ result.push(i);
23502
+ });
23503
+ } else {
23504
+ formData_box[propsItem_box.fieldName]
23505
+ .filter(i => {
23506
+ return !formData_box[propsItem_box.imageDelete].includes(i)
23507
+ })
23508
+ .forEach(i => {
23509
+ result.push(i);
23510
+ });
23511
+ }
23512
+ return result
23513
+ })
23514
+ });
23515
+
23516
+ const richtextProps = vue.ref({
23517
+ uploadUrl: formProps_box.para.upload.uploadUrl_image
23518
+ });
23519
+
23520
+ const video = vue.reactive({
23521
+ src: vue.computed(()=>{
23522
+ if (
23523
+ propsItem_box.videoDelete &&
23524
+ formData_box[propsItem_box.videoDelete] &&
23525
+ (formData_box[propsItem_box.videoDelete] === true ||
23526
+ formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
23527
+ ) {
23528
+ return ''
23529
+ }
23530
+ if (formData_box[propsItem_box.fieldName]) {
23531
+ return formData_box[propsItem_box.fieldName]
23532
+ }
23533
+ return ''
23534
+ }),
23535
+ poster: vue.computed(()=>{
23536
+ if (
23537
+ propsItem_box.videoDelete &&
23538
+ formData_box[propsItem_box.videoDelete] &&
23539
+ (formData_box[propsItem_box.videoDelete] === true ||
23540
+ formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
23541
+ ) {
23542
+ return ''
23543
+ }
23544
+ if (formData_box[propsItem_box.poster]) {
23545
+ return formData_box[propsItem_box.poster]
23546
+ }
23547
+ return ''
23548
+ }),
23549
+ delete: ()=>{
23550
+ formData_box[propsItem_box.videoDelete] =
23551
+ !formData_box[propsItem_box.videoDelete];
23552
+ },
23553
+ });
23554
+
23555
+ const download = vue.reactive({
23556
+ fileName: propsItem_box.downloadFileName || formProps_box.para.download.fileName,
23557
+ downloadLabel: vue.computed(() => {
23558
+ if (!formData_box[propsItem_box.fieldName]) {
23559
+ return formProps_box.para.download.downloadLabelNoSrc
23560
+ }
23561
+ if (propsItem_box.hdlGetDownloadLabel) {
23562
+ return propsItem_box.hdlGetDownloadLabel({formData: formData_box, scopeThis: scopeThis_box})
23563
+ }
23564
+ return formProps_box.para.download.downloadLabel
23565
+ }),
23566
+ downloadSrc: formData_box[propsItem_box.fieldName] || ''
23567
+ });
23568
+
23569
+ const upload = vue.reactive({
23570
+ uploadUrl: formProps_box.para.upload.uploadUrl,
23571
+ uploadUrl_image: formProps_box.para.upload.uploadUrl_image,
23572
+ uploadUrl_carplate: formProps_box.para.upload.uploadUrl_carplate
23573
+ });
23574
+
23575
+ const style = vue.reactive({
23576
+ box: styleModule.input.box,
23577
+ text: styleModule.input.text,
23578
+ text0: styleModule.input.text0,
23579
+ line: styleModule.line,
23580
+ input: styleModule.input.input,
23581
+ input_number: styleModule.input.input_number,
23582
+ el_switch: styleModule.input.el_switch,
23583
+ button_group: styleModule.input.button_group,
23584
+ image: styleModule.input.image,
23585
+ images: styleModule.input.images,
23586
+ richtext: styleModule.input.richtext,
23587
+ video: styleModule.input.video,
23588
+ download: vue.computed(()=>styleModule.input.download()),
23589
+ });
23590
+
23591
+ return (_ctx, _cache) => {
23592
+ const _component_el_input = vue.resolveComponent("el-input");
23593
+ const _component_el_option = vue.resolveComponent("el-option");
23594
+ const _component_el_select = vue.resolveComponent("el-select");
23595
+ const _component_el_date_picker = vue.resolveComponent("el-date-picker");
23596
+ const _component_el_input_number = vue.resolveComponent("el-input-number");
23597
+ const _component_el_switch = vue.resolveComponent("el-switch");
23598
+ const _component_el_radio = vue.resolveComponent("el-radio");
23599
+ const _component_el_radio_group = vue.resolveComponent("el-radio-group");
23600
+ const _component_el_button = vue.resolveComponent("el-button");
23601
+ const _component_el_tooltip = vue.resolveComponent("el-tooltip");
23602
+ const _component_el_button_group = vue.resolveComponent("el-button-group");
23603
+ const _component_el_image = vue.resolveComponent("el-image");
23604
+ const _component_ly0Richtext = vue.resolveComponent("ly0Richtext");
23605
+ const _component_ly0Upload = vue.resolveComponent("ly0Upload");
23606
+ const _component_ly0Upload_drag = vue.resolveComponent("ly0Upload_drag");
23607
+ const _component_ly0Upload_picture = vue.resolveComponent("ly0Upload_picture");
23608
+ const _component_ly0Upload_pictureCard = vue.resolveComponent("ly0Upload_pictureCard");
23609
+ const _component_ly0Upload_avatar = vue.resolveComponent("ly0Upload_avatar");
23610
+ const _component_ly0Upload_carplate = vue.resolveComponent("ly0Upload_carplate");
23611
+ const _component_ly0gbt2260 = vue.resolveComponent("ly0gbt2260");
23612
+ const _component_ly0d7group = vue.resolveComponent("ly0d7group");
23613
+ const _component_ly0d7postal = vue.resolveComponent("ly0d7postal");
23614
+ const _component_ly0d7price = vue.resolveComponent("ly0d7price");
23615
+ const _component_ly0d7size = vue.resolveComponent("ly0d7size");
23616
+ const _component_ly0d7thumb = vue.resolveComponent("ly0d7thumb");
23617
+
23618
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23619
+ vue.createCommentVNode(" input-box "),
23620
+ vue.createElementVNode("div", {
23621
+ style: vue.normalizeStyle(style.box(vue.unref(propsItem_box)))
23622
+ }, [
23623
+ vue.createCommentVNode(" 只读 "),
23624
+ (vue.unref(propsItem_box).inputType === 'text')
23625
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23626
+ key: 0,
23627
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23628
+ }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
23629
+ : vue.createCommentVNode("v-if", true),
23630
+ (vue.unref(propsItem_box).inputType === 'text0')
23631
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23632
+ key: 1,
23633
+ style: vue.normalizeStyle(style.text0(vue.unref(propsItem_box)))
23634
+ }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
23635
+ : vue.createCommentVNode("v-if", true),
23636
+ (!vue.unref(propsItem_box).inputType)
23637
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23638
+ key: 2,
23639
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23640
+ }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
23641
+ : vue.createCommentVNode("v-if", true),
23642
+ (vue.unref(propsItem_box).inputType === 'expression')
23643
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23644
+ key: 3,
23645
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23646
+ }, vue.toDisplayString(vue.unref(propsItem_box).hdlExpression && vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: __props.scopeThis})
23647
+ ? vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23648
+ : ' '), 5 /* TEXT, STYLE */))
23649
+ : vue.createCommentVNode("v-if", true),
23650
+ (vue.unref(propsItem_box).inputType === 'expression0')
23651
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23652
+ key: 4,
23653
+ style: vue.normalizeStyle(style.text0(vue.unref(propsItem_box)))
23654
+ }, vue.toDisplayString(vue.unref(propsItem_box).hdlExpression && vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23655
+ ? vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23656
+ : ' '), 5 /* TEXT, STYLE */))
23657
+ : vue.createCommentVNode("v-if", true),
23658
+ (vue.unref(propsItem_box).inputType === 'line')
23659
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23660
+ key: 5,
23661
+ style: vue.normalizeStyle(style.line)
23662
+ }, null, 4 /* STYLE */))
23663
+ : vue.createCommentVNode("v-if", true),
23664
+ vue.createCommentVNode(" 修改数据 "),
23665
+ (vue.unref(propsItem_box).inputType === 'input')
23666
+ ? (vue.openBlock(), vue.createBlock(_component_el_input, {
23667
+ key: 6,
23668
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23669
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23670
+ placeholder: input.placeholder,
23671
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23672
+ onInput: input.hdlCannotInput,
23673
+ "show-password": input.showPassword
23674
+ }, null, 8 /* PROPS */, ["modelValue", "placeholder", "style", "onInput", "show-password"]))
23675
+ : vue.createCommentVNode("v-if", true),
23676
+ (vue.unref(propsItem_box).inputType === 'select')
23677
+ ? (vue.openBlock(), vue.createBlock(_component_el_select, {
23678
+ key: 7,
23679
+ class: "deep-input",
23680
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23681
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23682
+ placeholder: select.placeholder,
23683
+ filterable: "",
23684
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23685
+ onChange: select.hdlChange
23686
+ }, {
23687
+ default: vue.withCtx(() => [
23688
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(select.items, (item0, index0) => {
23689
+ return (vue.openBlock(), vue.createBlock(_component_el_option, {
23690
+ label: item0[vue.unref(propsItem_box).item_fieldLabel],
23691
+ value: item0[vue.unref(propsItem_box).item_fieldValue],
23692
+ key: index0
23693
+ }, null, 8 /* PROPS */, ["label", "value"]))
23694
+ }), 128 /* KEYED_FRAGMENT */))
23695
+ ]),
23696
+ _: 1 /* STABLE */
23697
+ }, 8 /* PROPS */, ["modelValue", "placeholder", "style", "onChange"]))
23698
+ : vue.createCommentVNode("v-if", true),
23699
+ (vue.unref(propsItem_box).inputType === 'date-picker')
23700
+ ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, {
23701
+ key: 8,
23702
+ class: "deep-input",
23703
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23704
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23705
+ type: vue.unref(propsItem_box).type ? vue.unref(propsItem_box).type : 'datetime',
23706
+ placeholder: datePicker.placeholder,
23707
+ format: datePicker.format,
23708
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23709
+ onChange: datePicker.hdlChange
23710
+ }, null, 8 /* PROPS */, ["modelValue", "type", "placeholder", "format", "style", "onChange"]))
23711
+ : vue.createCommentVNode("v-if", true),
23712
+ (vue.unref(propsItem_box).inputType === 'input-number')
23713
+ ? (vue.openBlock(), vue.createBlock(_component_el_input_number, {
23714
+ key: 9,
23715
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23716
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23717
+ size: style.input_number(vue.unref(propsItem_box)).facade.size,
23718
+ min: 'min' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).min : 1,
23719
+ max: 'max' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).max : 100,
23720
+ step: 'step' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).step : 1,
23721
+ "step-strictly": 'step_strictly' in vue.unref(propsItem_box) ? vue.unref(propsItem_box).step_strictly : true
23722
+ }, null, 8 /* PROPS */, ["modelValue", "size", "min", "max", "step", "step-strictly"]))
23723
+ : vue.createCommentVNode("v-if", true),
23724
+ (vue.unref(propsItem_box).inputType === 'switch')
23725
+ ? (vue.openBlock(), vue.createBlock(_component_el_switch, {
23726
+ key: 10,
23727
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23728
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23729
+ "active-text": vue.unref(propsItem_box).activeText,
23730
+ "inactive-text": vue.unref(propsItem_box).inactiveText,
23731
+ "active-value": vue.unref(propsItem_box).activeValue,
23732
+ "inactive-value": vue.unref(propsItem_box).inactiveValue,
23733
+ "active-color": style.el_switch(vue.unref(propsItem_box)).facade.active_color,
23734
+ disabled: !!('disabled' in vue.unref(propsItem_box) && (vue.unref(propsItem_box).disabled === true || vue.unref(propsItem_box).disabled === 'true')),
23735
+ onChange: ly0switch.hdlChange
23736
+ }, null, 8 /* PROPS */, ["modelValue", "active-text", "inactive-text", "active-value", "inactive-value", "active-color", "disabled", "onChange"]))
23737
+ : vue.createCommentVNode("v-if", true),
23738
+ (vue.unref(propsItem_box).inputType === 'radio-group')
23739
+ ? (vue.openBlock(), vue.createBlock(_component_el_radio_group, {
23740
+ key: 11,
23741
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23742
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23743
+ disabled: !!vue.unref(propsItem_box).disabled,
23744
+ onChange: radioGroup.hdlChange
23745
+ }, {
23746
+ default: vue.withCtx(() => [
23747
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(propsItem_box).items, (item0, index0) => {
23748
+ return (vue.openBlock(), vue.createBlock(_component_el_radio, {
23749
+ key: index0,
23750
+ label: item0[vue.unref(propsItem_box).item_fieldValue]
23751
+ }, {
23752
+ default: vue.withCtx(() => [
23753
+ vue.createTextVNode(vue.toDisplayString(item0[vue.unref(propsItem_box).item_fieldLabel]), 1 /* TEXT */)
23754
+ ]),
23755
+ _: 2 /* DYNAMIC */
23756
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
23757
+ }), 128 /* KEYED_FRAGMENT */))
23758
+ ]),
23759
+ _: 1 /* STABLE */
23760
+ }, 8 /* PROPS */, ["modelValue", "disabled", "onChange"]))
23761
+ : vue.createCommentVNode("v-if", true),
23762
+ (vue.unref(propsItem_box).inputType === 'button-group' && vue.unref(propsItem_box).box && vue.unref(propsItem_box).box.length > 0)
23763
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
23764
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(propsItem_box).box, (item0, index0) => {
23765
+ return (vue.openBlock(), vue.createBlock(_component_el_button_group, {
23766
+ key: index0,
23767
+ style: vue.normalizeStyle(style.button_group().group.style)
23768
+ }, {
23769
+ default: vue.withCtx(() => [
23770
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.box, (item1, index1) => {
23771
+ return (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
23772
+ key: index1,
23773
+ disabled: !item1.tip,
23774
+ content: item1.tip && item1.tip.content ? item1.tip.content : '',
23775
+ placement: item1.tip && item1.tip.placement ? item1.tip.placement : 'bottom',
23776
+ effect: "light"
23777
+ }, {
23778
+ default: vue.withCtx(() => [
23779
+ (vue.openBlock(), vue.createBlock(_component_el_button, {
23780
+ style: vue.normalizeStyle(style.button_group(vue.unref(propsItem_box), item0, item1).button.style),
23781
+ icon: style.button_group(vue.unref(propsItem_box), item0, item1).button.icon,
23782
+ type: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.type,
23783
+ size: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.size,
23784
+ plain: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.plain,
23785
+ round: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.round,
23786
+ circle: style.button_group(vue.unref(propsItem_box), item0, item1).button.facade.circle,
23787
+ onClick: $event => (item1.hdlClick ? item1.hdlClick({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : null),
23788
+ key: index1
23789
+ }, {
23790
+ default: vue.withCtx(() => [
23791
+ (item1.text)
23792
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$e, vue.toDisplayString(item1.text), 1 /* TEXT */))
23793
+ : vue.createCommentVNode("v-if", true)
23794
+ ]),
23795
+ _: 2 /* DYNAMIC */
23796
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style", "icon", "type", "size", "plain", "round", "circle", "onClick"]))
23797
+ ]),
23798
+ _: 2 /* DYNAMIC */
23799
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "content", "placement"]))
23800
+ }), 128 /* KEYED_FRAGMENT */))
23801
+ ]),
23802
+ _: 2 /* DYNAMIC */
23803
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style"]))
23804
+ }), 128 /* KEYED_FRAGMENT */))
23805
+ ]))
23806
+ : vue.createCommentVNode("v-if", true),
23807
+ vue.createCommentVNode(" 图片&富文本&视频 "),
23808
+ vue.createCommentVNode(" 图片 "),
23809
+ (vue.unref(propsItem_box).inputType === 'image')
23810
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
23811
+ vue.createElementVNode("div", null, [
23812
+ vue.createVNode(_component_el_image, {
23813
+ style: vue.normalizeStyle(style.image(vue.unref(propsItem_box), vue.unref(formProps_box))),
23814
+ src: image.getSrc[0],
23815
+ "preview-src-list": image.getSrc,
23816
+ "preview-teleported": true,
23817
+ "hide-on-click-modal": true
23818
+ }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
23819
+ ]),
23820
+ vue.createCommentVNode(" 设置了图片删除功能,同时图片不为空 "),
23821
+ (!!vue.unref(propsItem_box).imageDelete && !!vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23822
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [
23823
+ vue.createVNode(_component_el_button, {
23824
+ size: "small",
23825
+ icon: !vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23826
+ onClick: image.delete
23827
+ }, {
23828
+ default: vue.withCtx(() => [
23829
+ vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete] ? '图片已删除,恢复' : '删除'), 1 /* TEXT */)
23830
+ ]),
23831
+ _: 1 /* STABLE */
23832
+ }, 8 /* PROPS */, ["icon", "onClick"])
23833
+ ]))
23834
+ : vue.createCommentVNode("v-if", true)
23835
+ ]))
23836
+ : vue.createCommentVNode("v-if", true),
23837
+ vue.createCommentVNode(" 多个图片 "),
23838
+ (vue.unref(propsItem_box).inputType === 'images')
23839
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
23840
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName], (itemImages, indexImages) => {
23841
+ return (vue.openBlock(), vue.createElementBlock("div", {
23842
+ key: indexImages,
23843
+ style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemBox)
23844
+ }, [
23845
+ vue.createElementVNode("div", null, [
23846
+ vue.createVNode(_component_el_image, {
23847
+ style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemThumb),
23848
+ src: images.getSrc(itemImages, indexImages),
23849
+ "preview-src-list": images.show
23850
+ }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
23851
+ ]),
23852
+ (!!vue.unref(propsItem_box).imageDelete)
23853
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
23854
+ vue.createVNode(_component_el_button, {
23855
+ size: "small",
23856
+ icon: "el-icon-delete",
23857
+ onClick: $event => (images.delete(itemImages, indexImages))
23858
+ }, {
23859
+ default: vue.withCtx(() => [
23860
+ vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete].includes(itemImages) ? '恢复' : '删除'), 1 /* TEXT */)
23861
+ ]),
23862
+ _: 2 /* DYNAMIC */
23863
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])
23864
+ ]))
23865
+ : vue.createCommentVNode("v-if", true)
23866
+ ], 4 /* STYLE */))
23867
+ }), 128 /* KEYED_FRAGMENT */))
23868
+ ]))
23869
+ : vue.createCommentVNode("v-if", true),
23870
+ vue.createCommentVNode(" 富文本 "),
23871
+ (vue.unref(propsItem_box).inputType === 'richtext')
23872
+ ? (vue.openBlock(), vue.createElementBlock("div", {
23873
+ key: 15,
23874
+ style: vue.normalizeStyle(style.richtext(vue.unref(propsItem_box), vue.unref(formProps_box)))
23875
+ }, [
23876
+ vue.createVNode(_component_ly0Richtext, {
23877
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23878
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23879
+ myProps: richtextProps.value
23880
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23881
+ ], 4 /* STYLE */))
23882
+ : vue.createCommentVNode("v-if", true),
23883
+ vue.createCommentVNode(" 富文本show "),
23884
+ (vue.unref(propsItem_box).inputType === 'richtextShow')
23885
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
23886
+ vue.createElementVNode("div", {
23887
+ innerHTML: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]
23888
+ }, null, 8 /* PROPS */, _hoisted_8)
23889
+ ]))
23890
+ : vue.createCommentVNode("v-if", true),
23891
+ vue.createCommentVNode(" 视频 "),
23892
+ (vue.unref(propsItem_box).inputType === 'video')
23893
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
23894
+ vue.createElementVNode("div", null, [
23895
+ vue.createElementVNode("video", {
23896
+ width: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).width,
23897
+ height: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).height,
23898
+ controls: "",
23899
+ poster: video.poster
23900
+ }, [
23901
+ vue.createElementVNode("source", {
23902
+ src: video.src,
23903
+ type: "video/mp4"
23904
+ }, null, 8 /* PROPS */, _hoisted_11),
23905
+ vue.createCommentVNode(" MP4/H.264/AAC - 最广泛支持 "),
23906
+ vue.createElementVNode("source", {
23907
+ src: video.src,
23908
+ type: "video/webm"
23909
+ }, null, 8 /* PROPS */, _hoisted_12),
23910
+ vue.createCommentVNode(" WebM/VP9/Opus - 开源格式,支持良好 "),
23911
+ vue.createElementVNode("source", {
23912
+ src: video.src,
23913
+ type: "video/ogg"
23914
+ }, null, 8 /* PROPS */, _hoisted_13),
23915
+ vue.createCommentVNode(" Ogg/Theora/Vorbis - 较旧的开源格式 ")
23916
+ ], 8 /* PROPS */, _hoisted_10)
23917
+ ]),
23918
+ vue.createCommentVNode(" 设置了视频删除功能,同时视频不为空 "),
23919
+ (!!vue.unref(propsItem_box).videoDelete && !!vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23920
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
23921
+ vue.createVNode(_component_el_button, {
23922
+ size: "small",
23923
+ icon: !vue.unref(formData_box)[vue.unref(propsItem_box).videoDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23924
+ onClick: video.delete
23925
+ }, {
23926
+ default: vue.withCtx(() => [
23927
+ vue.createTextVNode(vue.toDisplayString(!!vue.unref(formData_box)[vue.unref(propsItem_box).videoDelete] ? '视频已删除,恢复' : '删除'), 1 /* TEXT */)
23928
+ ]),
23929
+ _: 1 /* STABLE */
23930
+ }, 8 /* PROPS */, ["icon", "onClick"])
23931
+ ]))
23932
+ : vue.createCommentVNode("v-if", true)
23933
+ ]))
23934
+ : vue.createCommentVNode("v-if", true),
23935
+ vue.createCommentVNode(" 上传及下载 "),
23936
+ vue.createCommentVNode(" 下载 "),
23937
+ (vue.unref(propsItem_box).inputType === 'download')
23938
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
23939
+ (vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23940
+ ? (vue.openBlock(), vue.createElementBlock("a", {
23941
+ key: 0,
23942
+ style: vue.normalizeStyle(style.download.style),
23943
+ href: download.downloadSrc,
23944
+ download: download.fileName
23945
+ }, [
23946
+ vue.createElementVNode("span", null, vue.toDisplayString(download.downloadLabel), 1 /* TEXT */)
23947
+ ], 12 /* STYLE, PROPS */, _hoisted_16))
23948
+ : (vue.openBlock(), vue.createElementBlock("span", {
23949
+ key: 1,
23950
+ style: vue.normalizeStyle(style.download.none)
23951
+ }, vue.toDisplayString(download.downloadLabel), 5 /* TEXT, STYLE */))
23952
+ ]))
23953
+ : vue.createCommentVNode("v-if", true),
23954
+ vue.createCommentVNode(" 上传多个文件 "),
23955
+ (vue.unref(propsItem_box).inputType === 'upload')
23956
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
23957
+ vue.createVNode(_component_ly0Upload, {
23958
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23959
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23960
+ myProps: {uploadUrl: upload.uploadUrl}
23961
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23962
+ ]))
23963
+ : vue.createCommentVNode("v-if", true),
23964
+ vue.createCommentVNode(" 拖拽上传 "),
23965
+ (vue.unref(propsItem_box).inputType === 'upload-drag')
23966
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
23967
+ vue.createVNode(_component_ly0Upload_drag, {
23968
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23969
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23970
+ myProps: {uploadUrl: upload.uploadUrl}
23971
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23972
+ ]))
23973
+ : vue.createCommentVNode("v-if", true),
23974
+ vue.createCommentVNode(" 图片列表 "),
23975
+ (vue.unref(propsItem_box).inputType === 'upload-picture')
23976
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
23977
+ vue.createVNode(_component_ly0Upload_picture, {
23978
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23979
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23980
+ myProps: {uploadUrl: upload.uploadUrl_image}
23981
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23982
+ ]))
23983
+ : vue.createCommentVNode("v-if", true),
23984
+ vue.createCommentVNode(" 图片墙 "),
23985
+ (vue.unref(propsItem_box).inputType === 'upload-picture-card')
23986
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
23987
+ vue.createVNode(_component_ly0Upload_pictureCard, {
23988
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23989
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23990
+ myProps: {uploadUrl: upload.uploadUrl_image}
23991
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23992
+ ]))
23993
+ : vue.createCommentVNode("v-if", true),
23994
+ vue.createCommentVNode(" 头像 "),
23995
+ (vue.unref(propsItem_box).inputType === 'upload-avatar')
23996
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
23997
+ vue.createVNode(_component_ly0Upload_avatar, {
23998
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23999
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24000
+ myProps: {uploadUrl: upload.uploadUrl_image}
24001
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24002
+ ]))
24003
+ : vue.createCommentVNode("v-if", true),
24004
+ vue.createCommentVNode(" 车牌识别 "),
24005
+ (vue.unref(propsItem_box).inputType === 'upload-carplate')
24006
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
24007
+ vue.createVNode(_component_ly0Upload_carplate, {
24008
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24009
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24010
+ myProps: {uploadUrl: upload.uploadUrl_carplate}
24011
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24012
+ ]))
24013
+ : vue.createCommentVNode("v-if", true),
24014
+ vue.createCommentVNode(" 行政区划 "),
24015
+ (vue.unref(propsItem_box).inputType === 'ly0gbt2260')
24016
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
24017
+ vue.createVNode(_component_ly0gbt2260, {
24018
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24019
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24020
+ myProps: {readOnly: vue.unref(propsItem_box).readOnly}
24021
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24022
+ ]))
24023
+ : vue.createCommentVNode("v-if", true),
24024
+ vue.createCommentVNode(" 商品分类 "),
24025
+ (vue.unref(propsItem_box).inputType === 'ly0d7group')
24026
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, [
24027
+ vue.createVNode(_component_ly0d7group, {
24028
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24029
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24030
+ myProps: {readOnly: vue.unref(propsItem_box).readOnly}
24031
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24032
+ ]))
24033
+ : vue.createCommentVNode("v-if", true),
24034
+ vue.createCommentVNode(" 邮寄地址 "),
24035
+ (vue.unref(propsItem_box).inputType === 'ly0d7postal')
24036
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25, [
24037
+ vue.createVNode(_component_ly0d7postal, {
24038
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24039
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24040
+ myProps: {readOnly: vue.unref(propsItem_box).readOnly}
24041
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24042
+ ]))
24043
+ : vue.createCommentVNode("v-if", true),
24044
+ vue.createCommentVNode(" 商品标价 "),
24045
+ (vue.unref(propsItem_box).inputType === 'ly0d7price')
24046
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
24047
+ vue.createVNode(_component_ly0d7price, {
24048
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24049
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24050
+ myProps: {readOnly: vue.unref(propsItem_box).readOnly}
24051
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24052
+ ]))
24053
+ : vue.createCommentVNode("v-if", true),
24054
+ vue.createCommentVNode(" 商品规格 "),
24055
+ (vue.unref(propsItem_box).inputType === 'ly0d7size')
24056
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
24057
+ vue.createVNode(_component_ly0d7size, {
24058
+ modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
24059
+ "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
24060
+ myProps: {readOnly: vue.unref(propsItem_box).readOnly}
24061
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24062
+ ]))
24063
+ : vue.createCommentVNode("v-if", true),
24064
+ vue.createCommentVNode(" 商品缩略图 "),
24065
+ (vue.unref(propsItem_box).inputType === 'ly0d7thumb')
24066
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
24067
+ vue.createVNode(_component_ly0d7thumb, {
24068
+ modelValue: vue.unref(formData_box),
24069
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24070
+ myProps: {
24071
+ thumb: {
24072
+ fieldName: vue.unref(propsItem_box).thumb.fieldName || vue.unref(formProps_box).para.ly0d7thumb.thumb.fieldName,
24073
+ width: vue.unref(propsItem_box).thumb.width || vue.unref(formProps_box).para.ly0d7thumb.thumb.width,
24074
+ height: vue.unref(propsItem_box).thumb.height || vue.unref(formProps_box).para.ly0d7thumb.thumb.height
24075
+ },
24076
+ name: {
24077
+ fieldName: vue.unref(propsItem_box).name.fieldName || vue.unref(formProps_box).para.ly0d7thumb.name.fieldName,
24078
+ },
24079
+ number: {
24080
+ fieldName: vue.unref(propsItem_box).number.fieldName || vue.unref(formProps_box).para.ly0d7thumb.number.fieldName,
24081
+ },
24082
+ readOnly: vue.unref(propsItem_box).readOnly
24083
+ }
24084
+ }, null, 8 /* PROPS */, ["modelValue", "myProps"])
24085
+ ]))
24086
+ : vue.createCommentVNode("v-if", true)
24087
+ ], 4 /* STYLE */)
24088
+ ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
24089
+ }
24090
+ }
24091
+
24092
+ };
24093
+
24094
+ script$j.__scopeId = "data-v-a94fa4ba";
24095
+ script$j.__file = "src/form/InputBox.vue";
24096
+
24097
+ const _hoisted_1$e = { key: 0 };
24098
+ const _hoisted_2$d = ["colspan"];
24099
+ const _hoisted_3$6 = { key: 0 };
24100
+ const _hoisted_4$4 = ["colspan"];
24008
24101
 
24009
- return undefined;
24010
- }
24011
-
24012
- /**
24013
- * 深度非侵入式合并函数 (Deep Non-Destructive Merge)
24014
- * * 特点:
24015
- * 1. 深度递归地合并对象属性。
24016
- * 2. 源对象中缺失的属性不会删除或覆盖目标对象中已存在的对应属性。
24017
- * 3. 数组会被源对象中的数组完全覆盖。
24018
- * * @param {Object} target 目标对象(将被修改)
24019
- * @param {Object} source 源对象
24020
- * @returns {Object} 修改后的目标对象
24021
- */
24022
- function deepMerge(target, source) {
24023
- // 确保源对象是一个有效的对象,如果不是则直接返回目标对象
24024
- if (typeof source !== 'object' || source === null) {
24025
- return target;
24102
+
24103
+ var script$i = {
24104
+ __name: 'Form',
24105
+ props: {
24106
+ modelValue: {
24107
+ type: Object,
24108
+ default: () => ({})
24109
+ },
24110
+ myProps: {
24111
+ type: Object,
24112
+ default: () => ({})
24113
+ },
24114
+ scopeThis: {
24115
+ type: Object,
24116
+ default: () => ({})
24026
24117
  }
24118
+ },
24119
+ setup(__props) {
24027
24120
 
24028
- for (const key in source) {
24029
- // 确保只处理源对象自身的属性
24030
- if (Object.prototype.hasOwnProperty.call(source, key)) {
24031
- const sourceValue = source[key];
24032
- const targetValue = target[key];
24121
+ const props = __props;
24033
24122
 
24034
- // 1. 如果源属性的值是对象且目标属性的值也是对象,则递归合并
24035
- if (
24036
- typeof sourceValue === 'object' && sourceValue !== null &&
24037
- !Array.isArray(sourceValue) &&
24038
- typeof targetValue === 'object' && targetValue !== null &&
24039
- !Array.isArray(targetValue)
24040
- ) {
24041
- // 递归调用自身进行深度合并
24042
- target[key] = deepMerge(targetValue, sourceValue);
24123
+ // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
24124
+ let formData_box = props.modelValue;
24125
+ const formProps_box = props.myProps;
24126
+ const scopeThis_box = props.scopeThis;
24127
+
24128
+ const style = vue.reactive({
24129
+ collapse: styleModule.collapse,
24130
+ field_box: styleModule.field_box,
24131
+ line: styleModule.line,
24132
+ no_field_label: styleModule.no_field_label,
24133
+ root_box: styleModule.root_box,
24134
+ submit_box: styleModule.submit_box
24135
+ });
24136
+
24137
+ const hdl = {
24138
+ async submit(){
24139
+ if(formProps_box.submit.handle){
24140
+ // 执行用户句柄
24141
+ const result = await formProps_box.submit.handle({
24142
+ formData: formData_box,
24143
+ scopeThis: scopeThis_box
24144
+ });
24145
+ if(result.code !== 0){
24146
+ return
24043
24147
  }
24044
- // 2. 对于其他类型(基本类型、数组、null),直接覆盖
24045
- else {
24046
- // 这里的关键是:只有源对象中存在的属性,才会覆盖目标对象的属性。
24047
- // 如果源对象中不存在某个键(key),则不会进入此循环,
24048
- // 从而目标对象中已有的该属性得以保留。
24049
- target[key] = sourceValue;
24148
+ }
24149
+
24150
+ // 后台提交 - URL地址
24151
+ if(formProps_box.submit.url){
24152
+ const result = await request.ly0.ly0request({
24153
+ url: formProps_box.submit.url,
24154
+ data: formData_box
24155
+ });
24156
+ if(result.code !== 0){
24157
+ return
24158
+ }
24159
+ }
24160
+
24161
+ // 后台提交 - 存储过程
24162
+ if(formProps_box.submit.storpro){
24163
+ const result = await request.ly0.storpro({
24164
+ storproName: formProps_box.submit.storpro,
24165
+ data: formData_box
24166
+ });
24167
+ if(result.code !== 0){
24168
+ return
24050
24169
  }
24051
24170
  }
24171
+
24172
+ if(formProps_box.popup){
24173
+ // 关闭表单窗口
24174
+ formProps_box.popup.visible = false;
24175
+ }
24052
24176
  }
24053
-
24054
- return target;
24055
- }
24056
- var deepClone = {
24057
- deepClone: deepClone$1,
24058
- deepCloneAndMap,
24059
- typeOfValue,
24060
- isJsonString,
24061
- flattenTreeValues,
24062
- arrayToTree,
24063
- getLeafValue,
24064
- getNodeValue,
24065
- deepMerge
24177
+ };
24178
+
24179
+ return (_ctx, _cache) => {
24180
+ const _component_ly0Menu = vue.resolveComponent("ly0Menu");
24181
+ const _component_el_collapse_item = vue.resolveComponent("el-collapse-item");
24182
+ const _component_el_collapse = vue.resolveComponent("el-collapse");
24183
+ const _component_el_button = vue.resolveComponent("el-button");
24184
+
24185
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
24186
+ vue.createCommentVNode(" 置顶菜单 "),
24187
+ (vue.unref(formProps_box).menu && vue.unref(formProps_box).menu.menu && vue.unref(formProps_box).menu.menu.length > 0)
24188
+ ? (vue.openBlock(), vue.createBlock(_component_ly0Menu, {
24189
+ key: 0,
24190
+ myProps: vue.unref(formProps_box).menu,
24191
+ scopeThis: __props.scopeThis
24192
+ }, null, 8 /* PROPS */, ["myProps", "scopeThis"]))
24193
+ : vue.createCommentVNode("v-if", true),
24194
+ vue.createCommentVNode(" 表单区域可以分为多个列 "),
24195
+ vue.createElementVNode("div", {
24196
+ style: vue.normalizeStyle(style.root_box)
24197
+ }, [
24198
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formProps_box).cols, (item, index) => {
24199
+ return (vue.openBlock(), vue.createElementBlock("div", { key: index }, [
24200
+ vue.createElementVNode("table", null, [
24201
+ vue.createElementVNode("tbody", null, [
24202
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (item0, index0) => {
24203
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index0 }, [
24204
+ (item0.hdlVisible ? item0.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : true)
24205
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$e, [
24206
+ (!!item0.label)
24207
+ ? (vue.openBlock(), vue.createElementBlock("td", {
24208
+ key: 0,
24209
+ style: vue.normalizeStyle(style.field_box.left)
24210
+ }, [
24211
+ vue.createVNode(script$k, {
24212
+ modelValue: vue.unref(formData_box),
24213
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24214
+ myProps: vue.unref(formProps_box),
24215
+ scopeThis: vue.unref(scopeThis_box),
24216
+ item: item0
24217
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
24218
+ ], 4 /* STYLE */))
24219
+ : vue.createCommentVNode("v-if", true),
24220
+ vue.createElementVNode("td", {
24221
+ style: vue.normalizeStyle(style.field_box.right),
24222
+ colspan: style.no_field_label(item0)
24223
+ }, [
24224
+ (item0.inputType === 'collapse')
24225
+ ? (vue.openBlock(), vue.createBlock(_component_el_collapse, {
24226
+ key: 0,
24227
+ accordion:
24228
+ 'accordion' in item0 &&
24229
+ (item0.accordion === true || item0.accordion === 'true')
24230
+ ,
24231
+ modelValue: item0.activeNames,
24232
+ "onUpdate:modelValue": $event => ((item0.activeNames) = $event),
24233
+ style: vue.normalizeStyle(style.collapse.style)
24234
+ }, {
24235
+ default: vue.withCtx(() => [
24236
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.items, (item1, index1) => {
24237
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index1 }, [
24238
+ (item1.hdlVisible ? item1.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : true)
24239
+ ? (vue.openBlock(), vue.createBlock(_component_el_collapse_item, {
24240
+ key: 0,
24241
+ title: item1.title,
24242
+ name: item1.name ? item1.name : index1
24243
+ }, {
24244
+ default: vue.withCtx(() => [
24245
+ vue.createElementVNode("table", {
24246
+ style: vue.normalizeStyle(style.collapse.table)
24247
+ }, [
24248
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item1.items, (item2, index2) => {
24249
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
24250
+ (
24251
+ item2.hdlVisible
24252
+ ? item2.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
24253
+ : true
24254
+ )
24255
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$6, [
24256
+ (item2.label)
24257
+ ? (vue.openBlock(), vue.createElementBlock("td", {
24258
+ key: 0,
24259
+ style: vue.normalizeStyle(style.field_box.left)
24260
+ }, [
24261
+ vue.createVNode(script$k, {
24262
+ modelValue: vue.unref(formData_box),
24263
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24264
+ myProps: vue.unref(formProps_box),
24265
+ scopeThis: vue.unref(scopeThis_box),
24266
+ item: item2
24267
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
24268
+ ], 4 /* STYLE */))
24269
+ : vue.createCommentVNode("v-if", true),
24270
+ vue.createElementVNode("td", {
24271
+ style: vue.normalizeStyle(style.field_box.right),
24272
+ colspan: style.no_field_label(item2)
24273
+ }, [
24274
+ vue.createVNode(script$j, {
24275
+ modelValue: vue.unref(formData_box),
24276
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24277
+ myProps: vue.unref(formProps_box),
24278
+ scopeThis: vue.unref(scopeThis_box),
24279
+ item: item2
24280
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
24281
+ ], 12 /* STYLE, PROPS */, _hoisted_4$4)
24282
+ ]))
24283
+ : vue.createCommentVNode("v-if", true)
24284
+ ], 64 /* STABLE_FRAGMENT */))
24285
+ }), 128 /* KEYED_FRAGMENT */))
24286
+ ], 4 /* STYLE */)
24287
+ ]),
24288
+ _: 2 /* DYNAMIC */
24289
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "name"]))
24290
+ : vue.createCommentVNode("v-if", true)
24291
+ ], 64 /* STABLE_FRAGMENT */))
24292
+ }), 128 /* KEYED_FRAGMENT */))
24293
+ ]),
24294
+ _: 2 /* DYNAMIC */
24295
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
24296
+ : vue.createCommentVNode("v-if", true),
24297
+ vue.createVNode(script$j, {
24298
+ modelValue: vue.unref(formData_box),
24299
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24300
+ myProps: vue.unref(formProps_box),
24301
+ scopeThis: vue.unref(scopeThis_box),
24302
+ item: item0
24303
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
24304
+ ], 12 /* STYLE, PROPS */, _hoisted_2$d)
24305
+ ]))
24306
+ : vue.createCommentVNode("v-if", true)
24307
+ ], 64 /* STABLE_FRAGMENT */))
24308
+ }), 128 /* KEYED_FRAGMENT */))
24309
+ ])
24310
+ ])
24311
+ ]))
24312
+ }), 128 /* KEYED_FRAGMENT */))
24313
+ ], 4 /* STYLE */),
24314
+ vue.createCommentVNode(" 提交 "),
24315
+ (vue.unref(formProps_box).submit.switch)
24316
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
24317
+ vue.createElementVNode("div", {
24318
+ style: vue.normalizeStyle(style.line)
24319
+ }, null, 4 /* STYLE */),
24320
+ vue.createElementVNode("div", {
24321
+ style: vue.normalizeStyle(style.submit_box.style)
24322
+ }, [
24323
+ vue.createVNode(_component_el_button, {
24324
+ type: style.submit_box.button.facade.type,
24325
+ plain: style.submit_box.button.facade.plain,
24326
+ style: vue.normalizeStyle(style.submit_box.button.style),
24327
+ onClick: hdl.submit
24328
+ }, {
24329
+ default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [
24330
+ vue.createTextVNode("提交", -1 /* CACHED */)
24331
+ ]))]),
24332
+ _: 1 /* STABLE */
24333
+ }, 8 /* PROPS */, ["type", "plain", "style", "onClick"])
24334
+ ], 4 /* STYLE */)
24335
+ ], 64 /* STABLE_FRAGMENT */))
24336
+ : vue.createCommentVNode("v-if", true)
24337
+ ], 64 /* STABLE_FRAGMENT */))
24338
+ }
24339
+ }
24340
+
24066
24341
  };
24067
24342
 
24068
- var unclassified = {
24069
- deepClone};
24343
+ script$i.__file = "src/form/Form.vue";
24070
24344
 
24071
24345
  var script$h = {
24072
24346
  __name: 'index',
@@ -45136,7 +45410,8 @@ var index = {
45136
45410
  app.component('ly0d7thumb', script);
45137
45411
  },
45138
45412
  FileSaver: FileSaver$1,
45139
- request
45413
+ request,
45414
+ withTable
45140
45415
  };
45141
45416
 
45142
45417
  exports.FileSaver = FileSaver$1;