@yoooloo42/joker 1.0.106 → 1.0.107

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useRouter } from 'vue-router';
2
- import { reactive, ref, watch, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, computed, resolveComponent, unref, createBlock, withCtx, renderList, createTextVNode, createVNode, isRef, defineComponent, h, onMounted, onBeforeUnmount, nextTick as nextTick$1 } from 'vue';
2
+ import { ref, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, unref, reactive, computed, resolveComponent, createBlock, withCtx, renderList, createTextVNode, createVNode, isRef, defineComponent, h, onMounted, onBeforeUnmount, watch, nextTick as nextTick$1 } from 'vue';
3
3
  import { ElMessage } from 'element-plus';
4
4
 
5
5
  function _mergeNamespaces(n, m) {
@@ -22512,15 +22512,15 @@ var script$h = {
22512
22512
  default: () => ({})
22513
22513
  }
22514
22514
  },
22515
- emits: ['update:modelValue', 'change'],
22516
- setup(__props, { emit: __emit }) {
22515
+ setup(__props) {
22517
22516
 
22518
22517
  const props = __props;
22519
- // 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
22520
- const emit = __emit;
22521
22518
 
22522
- const scopeThis_box = reactive(Object.assign({}, props.scopeThis));
22523
- const propsItem_box = reactive(Object.assign({}, props.item));
22519
+
22520
+ // props属性包装,使得页面和js使用相同的命名
22521
+ const formData_box = props.modelValue;
22522
+ const scopeThis_box = props.scopeThis;
22523
+ const propsItem_box = props.item;
22524
22524
 
22525
22525
  const style = ref({
22526
22526
  box: styleModule.label.box(propsItem_box),
@@ -22529,18 +22529,9 @@ const style = ref({
22529
22529
 
22530
22530
  const hdlClick = () => {
22531
22531
  if(propsItem_box.hdlLabelClick){
22532
- propsItem_box.hdlLabelClick({formData: props.modelValue, scopeThis: scopeThis_box});
22532
+ propsItem_box.hdlLabelClick({formData: formData_box, scopeThis: scopeThis_box});
22533
22533
  }
22534
22534
  };
22535
-
22536
- // 表单数据监听
22537
- watch(
22538
- props.modelValue, // 监听 reactive 对象时,默认是深层监听
22539
- (newVal, oldVal) => {
22540
- // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
22541
- emit("update:modelValue", newVal);
22542
- }
22543
- );
22544
22535
 
22545
22536
  return (_ctx, _cache) => {
22546
22537
  return (openBlock(), createElementBlock(Fragment, null, [
@@ -22551,7 +22542,7 @@ return (_ctx, _cache) => {
22551
22542
  }, [
22552
22543
  createElementVNode("span", {
22553
22544
  style: normalizeStyle(style.value.label)
22554
- }, toDisplayString(propsItem_box.label), 5 /* TEXT, STYLE */)
22545
+ }, toDisplayString(unref(propsItem_box).label), 5 /* TEXT, STYLE */)
22555
22546
  ], 4 /* STYLE */)
22556
22547
  ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
22557
22548
  }
@@ -22616,7 +22607,7 @@ var script$g = {
22616
22607
  const props = __props;
22617
22608
 
22618
22609
  // props属性包装,使得页面和js使用相同的命名
22619
- let formData_box = props.modelValue;
22610
+ const formData_box = props.modelValue;
22620
22611
  const formProps_box = props.myProps;
22621
22612
  const scopeThis_box = props.scopeThis;
22622
22613
  const propsItem_box = props.item;
@@ -23306,7 +23297,7 @@ return (_ctx, _cache) => {
23306
23297
  ? (openBlock(), createElementBlock("div", _hoisted_28, [
23307
23298
  createVNode(_component_ly0d7thumb, {
23308
23299
  modelValue: unref(formData_box),
23309
- "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23300
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23310
23301
  myProps: {
23311
23302
  thumb: {
23312
23303
  fieldName: unref(propsItem_box).thumb.fieldName || unref(formProps_box).para.ly0d7thumb.thumb.fieldName,
@@ -23361,7 +23352,7 @@ var script$f = {
23361
23352
  const props = __props;
23362
23353
 
23363
23354
  // props属性包装,使得页面和js使用相同的命名
23364
- let formData_box = props.modelValue;
23355
+ const formData_box = props.modelValue;
23365
23356
  const formProps_box = props.myProps;
23366
23357
  const scopeThis_box = props.scopeThis;
23367
23358
 
@@ -23450,7 +23441,7 @@ return (_ctx, _cache) => {
23450
23441
  }, [
23451
23442
  createVNode(script$h, {
23452
23443
  modelValue: unref(formData_box),
23453
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23444
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23454
23445
  myProps: unref(formProps_box),
23455
23446
  scopeThis: unref(scopeThis_box),
23456
23447
  item: item0
@@ -23500,7 +23491,7 @@ return (_ctx, _cache) => {
23500
23491
  }, [
23501
23492
  createVNode(script$h, {
23502
23493
  modelValue: unref(formData_box),
23503
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23494
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23504
23495
  myProps: unref(formProps_box),
23505
23496
  scopeThis: unref(scopeThis_box),
23506
23497
  item: item2
@@ -23513,7 +23504,7 @@ return (_ctx, _cache) => {
23513
23504
  }, [
23514
23505
  createVNode(script$g, {
23515
23506
  modelValue: unref(formData_box),
23516
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23507
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23517
23508
  myProps: unref(formProps_box),
23518
23509
  scopeThis: unref(scopeThis_box),
23519
23510
  item: item2
@@ -23536,7 +23527,7 @@ return (_ctx, _cache) => {
23536
23527
  : createCommentVNode("v-if", true),
23537
23528
  createVNode(script$g, {
23538
23529
  modelValue: unref(formData_box),
23539
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23530
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23540
23531
  myProps: unref(formProps_box),
23541
23532
  scopeThis: unref(scopeThis_box),
23542
23533
  item: item0
@@ -23602,7 +23593,8 @@ var script$e = {
23602
23593
 
23603
23594
  const props = __props;
23604
23595
 
23605
- let formData_box = props.modelValue;
23596
+ // props属性包装,使得页面和js使用相同的命名
23597
+ const formData_box = props.modelValue;
23606
23598
  const formProps_box = reactive(Object.assign({}, ly0default$2.myProps, props.myProps));
23607
23599
  const scopeThis_box = props.scopeThis;
23608
23600
 
@@ -23625,7 +23617,7 @@ return (_ctx, _cache) => {
23625
23617
  default: withCtx(() => [
23626
23618
  createVNode(script$f, {
23627
23619
  modelValue: unref(formData_box),
23628
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23620
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23629
23621
  myProps: formProps_box,
23630
23622
  scopeThis: unref(scopeThis_box)
23631
23623
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"])
@@ -23635,7 +23627,7 @@ return (_ctx, _cache) => {
23635
23627
  : (openBlock(), createBlock(script$f, {
23636
23628
  key: 1,
23637
23629
  modelValue: unref(formData_box),
23638
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23630
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : null)),
23639
23631
  myProps: formProps_box,
23640
23632
  scopeThis: unref(scopeThis_box)
23641
23633
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"]))