@yoooloo42/joker 1.0.174 → 1.0.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,3 @@
1
- .deep-input :deep(.el-input__wrapper) {
2
- height: 40px;
3
- line-height: 40px;
4
- }
5
- .deep-input :deep(.el-select__wrapper) {
6
- height: 40px;
7
- line-height: 40px;
8
- }
9
1
  .avatar[data-v-0b647a60] {
10
2
  border: 1px dashed #d9d9d9;
11
3
  }
package/dist/index.cjs.js CHANGED
@@ -22674,9 +22674,6 @@ var unclassified = {
22674
22674
 
22675
22675
  // with-table数据模板
22676
22676
 
22677
- const ly0default$4 = {
22678
- pageSize: 10
22679
- };
22680
22677
 
22681
22678
  // 数据刷新
22682
22679
  const refresh = async _ref => {
@@ -22688,17 +22685,20 @@ const refresh = async _ref => {
22688
22685
  const result = await ly0request$1.storpro({
22689
22686
  storproName: scopeThis.storpro.refresh,
22690
22687
  data: {
22691
- query: scopeThis.query && scopeThis.query.formData ? scopeThis.query.formData : null,
22692
- sort: scopeThis.query && scopeThis.query.sort ? scopeThis.query.sort : null,
22693
- limit: scopeThis.query && scopeThis.query.pageSize ? scopeThis.query.pageSize : ly0default$4.pageSize,
22694
- page: scopeThis.query && scopeThis.query.currentPage ? scopeThis.query.currentPage : 1
22688
+ query: scopeThis.query.formData,
22689
+ sort: scopeThis.query.sort,
22690
+ limit: scopeThis.query.pageSize,
22691
+ page: scopeThis.query.currentPage
22695
22692
  }
22696
22693
  });
22697
22694
  scopeThis.tableProps.table.loading.visible = false;
22698
22695
  if (result.code === 0) {
22699
22696
  unclassified.deepClone.deepMerge(scopeThis.tableData, {
22700
22697
  data: result.data,
22701
- total: result.total
22698
+ total: result.total,
22699
+ sort: scopeThis.query.sort,
22700
+ pageSize: scopeThis.query.pageSize,
22701
+ currentPage: scopeThis.query.currentPage
22702
22702
  });
22703
22703
  if (!!message) {
22704
22704
  elementPlus.ElMessage('数据已刷新');
@@ -22857,11 +22857,13 @@ const submitInsertOne = async _ref0 => {
22857
22857
  // 关闭表单窗口
22858
22858
  scopeThis.formProps.popup.visible = false;
22859
22859
  elementPlus.ElMessage('新增一条记录成功');
22860
- scopeThis.query.currentPage = 1;
22861
- scopeThis.tableData = {
22862
- data: result.dataNew,
22863
- total: 1
22860
+ scopeThis.tableData.data = result.dataNew;
22861
+ scopeThis.tableData.total = 1;
22862
+ scopeThis.tableData.currentPage = 1;
22863
+ scopeThis.query.formData = {
22864
+ _id: result.dataNew._id
22864
22865
  };
22866
+ scopeThis.query.currentPage = 1;
22865
22867
  } else {
22866
22868
  elementPlus.ElMessage('新增一条记录失败');
22867
22869
  }
@@ -22953,79 +22955,6 @@ var withTable = {
22953
22955
  submitDeleteOne
22954
22956
  };
22955
22957
 
22956
- // 默认值
22957
-
22958
- var ly0default$3 = {
22959
- myProps: {
22960
- popup: {
22961
- visible: false,
22962
- title: '',
22963
- width: '800px',
22964
- top: '15vh'
22965
- },
22966
- menu: {
22967
- mode: 'horizontal',
22968
- menu: []
22969
- },
22970
- cols: [],
22971
- submit: {
22972
- switch: true // true - 提交模式, false - 组件模式
22973
- },
22974
- para: {
22975
- inputWidth: '200px',
22976
- placeholder: {
22977
- input: '请输入',
22978
- select: '请选择',
22979
- datetime: '请选择时间',
22980
- date: '请选择日期'
22981
- },
22982
- image: {
22983
- width: '400px',
22984
- height: '300px'
22985
- },
22986
- thumb: {
22987
- width: '40px',
22988
- height: '30px'
22989
- },
22990
- video: {
22991
- width: '300px',
22992
- height: '200px'
22993
- },
22994
- upload: {
22995
- uploadUrl: ly0request$1.domain + ly0request$1.upload,
22996
- uploadUrl_image: ly0request$1.domain + ly0request$1.upload_image,
22997
- uploadUrl_carplate: ly0request$1.domain + ly0request$1.upload_carplate
22998
- },
22999
- richtext: {
23000
- editorWidth: '500px',
23001
- // 富文本编辑器宽度
23002
- size: 200 // 可上传的图片大小,单位为KB, 1M = 1024KB
23003
- },
23004
- download: {
23005
- // 行内下载
23006
- fileName: 'new-file',
23007
- // 下载文件名
23008
- downloadLabel: '点击这里下载',
23009
- // 下载标签
23010
- downloadLabelNoSrc: '没有可供下载的资源' // 下载标签
23011
- },
23012
- ly0d7thumb: {
23013
- thumb: {
23014
- fieldName: 'thumb',
23015
- width: '100px',
23016
- height: '100px'
23017
- },
23018
- name: {
23019
- fieldName: 'name'
23020
- },
23021
- number: {
23022
- fieldName: 'number'
23023
- }
23024
- }
23025
- }
23026
- }
23027
- };
23028
-
23029
22958
  function box$1(item) {
23030
22959
  let result = {
23031
22960
  'text-align': 'right',
@@ -23072,14 +23001,14 @@ function box(item) {
23072
23001
  }
23073
23002
 
23074
23003
  // inputType: "text"
23075
- function text(item, formProps) {
23004
+ function text(item) {
23076
23005
  return {
23077
23006
  'white-space': 'pre-line',
23078
23007
  // 保留换行符
23079
23008
  'border-left': '#ababab solid 1px',
23080
23009
  'border-top': '#ababab solid 1px',
23081
23010
  'padding-left': '10px',
23082
- width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth
23011
+ height: '40px'
23083
23012
  };
23084
23013
  }
23085
23014
 
@@ -23093,11 +23022,8 @@ function text0(item) {
23093
23022
  }
23094
23023
 
23095
23024
  // inputType: "input", "select", "date-picker"
23096
- function input(item, formProps) {
23097
- return {
23098
- width: item.inputWidth ? item.inputWidth : formProps.para.inputWidth,
23099
- height: '40px'
23100
- };
23025
+ function input(item) {
23026
+ return item.style || '';
23101
23027
  }
23102
23028
 
23103
23029
  // inputType: "input-number"
@@ -23164,39 +23090,30 @@ function button_group(item, groupItem, buttonItem) {
23164
23090
 
23165
23091
  // inputType: "image"
23166
23092
  function image(item, formProps) {
23167
- return {
23168
- width: item.imageWidth ? item.imageWidth : formProps.para.image.width,
23169
- height: item.imageHeight ? item.imageHeight : formProps.para.image.height
23170
- };
23093
+ return item.style || '';
23171
23094
  }
23172
23095
 
23173
23096
  // inputType: "images"
23174
- function images(item, formProps) {
23097
+ function images(item) {
23175
23098
  return {
23176
23099
  itemBox: {
23177
23100
  display: 'inline-block',
23178
23101
  margin: '10px'
23179
23102
  },
23180
- itemThumb: {
23181
- width: item.imageWidth ? item.imageWidth : formProps.para.thumb.width,
23182
- height: item.imageHeight ? item.imageHeight : formProps.para.thumb.height
23183
- }
23103
+ itemThumb: item.style || ''
23184
23104
  };
23185
23105
  }
23186
23106
 
23187
23107
  // inputType: "richtext"
23188
- function richtext(item, formProps) {
23189
- return {
23190
- // 富文本编辑器宽度
23191
- width: item.editorWidth ? item.editorWidth : formProps.para.richtext.editorWidth
23192
- };
23108
+ function richtext(item) {
23109
+ return item.style || '';
23193
23110
  }
23194
23111
 
23195
23112
  // inputType: "video"
23196
- function video(item, formProps) {
23113
+ function video(item) {
23197
23114
  return {
23198
- width: item.videoWidth ? item.videoWidth : formProps.para.video.width,
23199
- height: item.videoHeight ? item.videoHeight : formProps.para.video.height
23115
+ width: item.width || '',
23116
+ height: item.height || ''
23200
23117
  };
23201
23118
  }
23202
23119
 
@@ -23660,7 +23577,7 @@ return (_ctx, _cache) => {
23660
23577
  (vue.unref(propsItem_box).inputType === 'text')
23661
23578
  ? (vue.openBlock(), vue.createElementBlock("div", {
23662
23579
  key: 0,
23663
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23580
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box)))
23664
23581
  }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
23665
23582
  : vue.createCommentVNode("v-if", true),
23666
23583
  (vue.unref(propsItem_box).inputType === 'text0')
@@ -23672,13 +23589,13 @@ return (_ctx, _cache) => {
23672
23589
  (!vue.unref(propsItem_box).inputType)
23673
23590
  ? (vue.openBlock(), vue.createElementBlock("div", {
23674
23591
  key: 2,
23675
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23592
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box)))
23676
23593
  }, vue.toDisplayString(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] ? vue.unref(formData_box)[vue.unref(propsItem_box).fieldName] : ' '), 5 /* TEXT, STYLE */))
23677
23594
  : vue.createCommentVNode("v-if", true),
23678
23595
  (vue.unref(propsItem_box).inputType === 'expression')
23679
23596
  ? (vue.openBlock(), vue.createElementBlock("div", {
23680
23597
  key: 3,
23681
- style: vue.normalizeStyle(style.text(vue.unref(propsItem_box), vue.unref(formProps_box)))
23598
+ style: vue.normalizeStyle(style.text(vue.unref(propsItem_box)))
23682
23599
  }, vue.toDisplayString(vue.unref(propsItem_box).hdlExpression && vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: __props.scopeThis})
23683
23600
  ? vue.unref(propsItem_box).hdlExpression({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23684
23601
  : ' '), 5 /* TEXT, STYLE */))
@@ -23704,7 +23621,7 @@ return (_ctx, _cache) => {
23704
23621
  modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23705
23622
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23706
23623
  placeholder: input.placeholder,
23707
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23624
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box))),
23708
23625
  onInput: input.hdlCannotInput,
23709
23626
  "show-password": input.showPassword
23710
23627
  }, null, 8 /* PROPS */, ["modelValue", "placeholder", "style", "onInput", "show-password"]))
@@ -23712,12 +23629,11 @@ return (_ctx, _cache) => {
23712
23629
  (vue.unref(propsItem_box).inputType === 'select')
23713
23630
  ? (vue.openBlock(), vue.createBlock(_component_el_select, {
23714
23631
  key: 7,
23715
- class: "deep-input",
23716
23632
  modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23717
23633
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23718
23634
  placeholder: select.placeholder,
23719
23635
  filterable: "",
23720
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23636
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box))),
23721
23637
  onChange: select.hdlChange
23722
23638
  }, {
23723
23639
  default: vue.withCtx(() => [
@@ -23735,13 +23651,12 @@ return (_ctx, _cache) => {
23735
23651
  (vue.unref(propsItem_box).inputType === 'date-picker')
23736
23652
  ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, {
23737
23653
  key: 8,
23738
- class: "deep-input",
23739
23654
  modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
23740
23655
  "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((vue.unref(formData_box)[vue.unref(propsItem_box).fieldName]) = $event)),
23741
23656
  type: vue.unref(propsItem_box).type ? vue.unref(propsItem_box).type : 'datetime',
23742
23657
  placeholder: datePicker.placeholder,
23743
23658
  format: datePicker.format,
23744
- style: vue.normalizeStyle(style.input(vue.unref(propsItem_box), vue.unref(formProps_box))),
23659
+ style: vue.normalizeStyle(style.input(vue.unref(propsItem_box))),
23745
23660
  onChange: datePicker.hdlChange
23746
23661
  }, null, 8 /* PROPS */, ["modelValue", "type", "placeholder", "format", "style", "onChange"]))
23747
23662
  : vue.createCommentVNode("v-if", true),
@@ -23846,7 +23761,7 @@ return (_ctx, _cache) => {
23846
23761
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
23847
23762
  vue.createElementVNode("div", null, [
23848
23763
  vue.createVNode(_component_el_image, {
23849
- style: vue.normalizeStyle(style.image(vue.unref(propsItem_box), vue.unref(formProps_box))),
23764
+ style: vue.normalizeStyle(style.image(vue.unref(propsItem_box))),
23850
23765
  src: image.getSrc[0],
23851
23766
  "preview-src-list": image.getSrc,
23852
23767
  "preview-teleported": true,
@@ -23876,11 +23791,11 @@ return (_ctx, _cache) => {
23876
23791
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName], (itemImages, indexImages) => {
23877
23792
  return (vue.openBlock(), vue.createElementBlock("div", {
23878
23793
  key: indexImages,
23879
- style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemBox)
23794
+ style: vue.normalizeStyle(style.images(vue.unref(propsItem_box)).itemBox)
23880
23795
  }, [
23881
23796
  vue.createElementVNode("div", null, [
23882
23797
  vue.createVNode(_component_el_image, {
23883
- style: vue.normalizeStyle(style.images(vue.unref(propsItem_box), vue.unref(formProps_box)).itemThumb),
23798
+ style: vue.normalizeStyle(style.images(vue.unref(propsItem_box)).itemThumb),
23884
23799
  src: images.getSrc(itemImages, indexImages),
23885
23800
  "preview-src-list": images.show
23886
23801
  }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
@@ -23907,7 +23822,7 @@ return (_ctx, _cache) => {
23907
23822
  (vue.unref(propsItem_box).inputType === 'richtext')
23908
23823
  ? (vue.openBlock(), vue.createElementBlock("div", {
23909
23824
  key: 15,
23910
- style: vue.normalizeStyle(style.richtext(vue.unref(propsItem_box), vue.unref(formProps_box)))
23825
+ style: vue.normalizeStyle(style.richtext(vue.unref(propsItem_box)))
23911
23826
  }, [
23912
23827
  vue.createVNode(_component_ly0Richtext, {
23913
23828
  modelValue: vue.unref(formData_box)[vue.unref(propsItem_box).fieldName],
@@ -23929,8 +23844,8 @@ return (_ctx, _cache) => {
23929
23844
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
23930
23845
  vue.createElementVNode("div", null, [
23931
23846
  vue.createElementVNode("video", {
23932
- width: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).width,
23933
- height: style.video(vue.unref(propsItem_box), vue.unref(formProps_box)).height,
23847
+ width: style.video(vue.unref(propsItem_box)).width,
23848
+ height: style.video(vue.unref(propsItem_box)).height,
23934
23849
  controls: "",
23935
23850
  poster: video.poster
23936
23851
  }, [
@@ -24105,15 +24020,15 @@ return (_ctx, _cache) => {
24105
24020
  "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24106
24021
  myProps: {
24107
24022
  thumb: {
24108
- fieldName: vue.unref(propsItem_box).thumb.fieldName || vue.unref(formProps_box).para.ly0d7thumb.thumb.fieldName,
24109
- width: vue.unref(propsItem_box).thumb.width || vue.unref(formProps_box).para.ly0d7thumb.thumb.width,
24110
- height: vue.unref(propsItem_box).thumb.height || vue.unref(formProps_box).para.ly0d7thumb.thumb.height
24023
+ fieldName: vue.unref(propsItem_box).thumb.fieldName,
24024
+ width: vue.unref(propsItem_box).thumb.width || '',
24025
+ height: vue.unref(propsItem_box).thumb.height || ''
24111
24026
  },
24112
24027
  name: {
24113
- fieldName: vue.unref(propsItem_box).name.fieldName || vue.unref(formProps_box).para.ly0d7thumb.name.fieldName,
24028
+ fieldName: vue.unref(propsItem_box).name.fieldName,
24114
24029
  },
24115
24030
  number: {
24116
- fieldName: vue.unref(propsItem_box).number.fieldName || vue.unref(formProps_box).para.ly0d7thumb.number.fieldName,
24031
+ fieldName: vue.unref(propsItem_box).number.fieldName,
24117
24032
  },
24118
24033
  readOnly: vue.unref(propsItem_box).readOnly
24119
24034
  }
@@ -24127,7 +24042,6 @@ return (_ctx, _cache) => {
24127
24042
 
24128
24043
  };
24129
24044
 
24130
- script$j.__scopeId = "data-v-a94fa4ba";
24131
24045
  script$j.__file = "src/form/InputBox.vue";
24132
24046
 
24133
24047
  const _hoisted_1$e = { key: 0 };
@@ -24348,6 +24262,48 @@ return (_ctx, _cache) => {
24348
24262
 
24349
24263
  script$i.__file = "src/form/Form.vue";
24350
24264
 
24265
+ // 默认值
24266
+
24267
+ var ly0default$3 = {
24268
+ myProps: {
24269
+ popup: {
24270
+ visible: false,
24271
+ title: '',
24272
+ width: '800px',
24273
+ top: '15vh'
24274
+ },
24275
+ menu: {
24276
+ mode: 'horizontal',
24277
+ menu: []
24278
+ },
24279
+ cols: [],
24280
+ submit: {
24281
+ switch: true // true - 提交模式, false - 组件模式
24282
+ },
24283
+ para: {
24284
+ placeholder: {
24285
+ input: '请输入',
24286
+ select: '请选择',
24287
+ datetime: '请选择时间',
24288
+ date: '请选择日期'
24289
+ },
24290
+ upload: {
24291
+ uploadUrl: ly0request$1.domain + ly0request$1.upload,
24292
+ uploadUrl_image: ly0request$1.domain + ly0request$1.upload_image,
24293
+ uploadUrl_carplate: ly0request$1.domain + ly0request$1.upload_carplate
24294
+ },
24295
+ download: {
24296
+ // 行内下载
24297
+ fileName: 'new-file',
24298
+ // 下载文件名
24299
+ downloadLabel: '点击这里下载',
24300
+ // 下载标签
24301
+ downloadLabelNoSrc: '没有可供下载的资源' // 下载标签
24302
+ }
24303
+ }
24304
+ }
24305
+ };
24306
+
24351
24307
  var script$h = {
24352
24308
  __name: 'index',
24353
24309
  props: {