bm-admin-ui 1.0.72-alpha → 1.0.74-alpha

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.
@@ -20593,6 +20593,7 @@ var table = {
20593
20593
  change(inject, value) {
20594
20594
  const rule = inject.self;
20595
20595
  inject.api.form[rule.field] = value;
20596
+ inject.api.emit('update:modelValue', inject.api.form);
20596
20597
  },
20597
20598
  },
20598
20599
  validate: [
@@ -20619,6 +20620,7 @@ var table = {
20619
20620
  change(inject, value) {
20620
20621
  const rule = inject.self;
20621
20622
  inject.api.form[rule.field] = value;
20623
+ inject.api.emit('update:modelValue', inject.api.form);
20622
20624
  },
20623
20625
  },
20624
20626
  validate: [
@@ -4237,6 +4237,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4237
4237
  function resetActiveRule() {
4238
4238
  activeRule.value = {};
4239
4239
  activeParentRule.value = {};
4240
+ for (const key in cacheProps) {
4241
+ cacheProps[key] = void 0;
4242
+ }
4240
4243
  }
4241
4244
  function getPopupContainer() {
4242
4245
  return document.body;
@@ -4296,7 +4299,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4296
4299
  function getShopIndex(formRules, initIndex) {
4297
4300
  function shopIndex(rule, initIndex2) {
4298
4301
  if (rule.name === "shop") {
4299
- initIndex2 = Math.max(initIndex2, rule.title.title.replace("\u5E97\u94FA", ""));
4302
+ initIndex2 = Math.max(
4303
+ initIndex2,
4304
+ rule.title ? rule.title.title.replace("\u5E97\u94FA", "") : 1
4305
+ );
4300
4306
  }
4301
4307
  if (rule.config?.childRules?.length) {
4302
4308
  rule.config.childRules.forEach((cRule) => {
@@ -4310,15 +4316,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4310
4316
  });
4311
4317
  return initIndex;
4312
4318
  }
4319
+ function initPage(formRules) {
4320
+ if (formRules?.length) {
4321
+ setShopIndex(0);
4322
+ edit(formRules);
4323
+ setShopLinkProductCount();
4324
+ setShopIndex(getShopIndex(formRules, 0));
4325
+ }
4326
+ }
4313
4327
  watch(
4314
4328
  () => props.formRules,
4315
4329
  (formRules) => {
4316
- if (formRules?.length) {
4317
- setShopIndex(0);
4318
- edit(formRules);
4319
- setShopLinkProductCount();
4320
- setShopIndex(getShopIndex(formRules, 0));
4321
- }
4330
+ initPage(formRules);
4322
4331
  },
4323
4332
  {
4324
4333
  immediate: true
@@ -20604,6 +20604,7 @@ var table = {
20604
20604
  change(inject, value) {
20605
20605
  const rule = inject.self;
20606
20606
  inject.api.form[rule.field] = value;
20607
+ inject.api.emit('update:modelValue', inject.api.form);
20607
20608
  },
20608
20609
  },
20609
20610
  validate: [
@@ -20630,6 +20631,7 @@ var table = {
20630
20631
  change(inject, value) {
20631
20632
  const rule = inject.self;
20632
20633
  inject.api.form[rule.field] = value;
20634
+ inject.api.emit('update:modelValue', inject.api.form);
20633
20635
  },
20634
20636
  },
20635
20637
  validate: [
@@ -4247,6 +4247,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4247
4247
  function resetActiveRule() {
4248
4248
  activeRule.value = {};
4249
4249
  activeParentRule.value = {};
4250
+ for (const key in cacheProps) {
4251
+ cacheProps[key] = void 0;
4252
+ }
4250
4253
  }
4251
4254
  function getPopupContainer() {
4252
4255
  return document.body;
@@ -4306,7 +4309,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4306
4309
  function getShopIndex(formRules, initIndex) {
4307
4310
  function shopIndex(rule, initIndex2) {
4308
4311
  if (rule.name === "shop") {
4309
- initIndex2 = Math.max(initIndex2, rule.title.title.replace("\u5E97\u94FA", ""));
4312
+ initIndex2 = Math.max(
4313
+ initIndex2,
4314
+ rule.title ? rule.title.title.replace("\u5E97\u94FA", "") : 1
4315
+ );
4310
4316
  }
4311
4317
  if (rule.config?.childRules?.length) {
4312
4318
  rule.config.childRules.forEach((cRule) => {
@@ -4320,15 +4326,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4320
4326
  });
4321
4327
  return initIndex;
4322
4328
  }
4329
+ function initPage(formRules) {
4330
+ if (formRules?.length) {
4331
+ setShopIndex(0);
4332
+ edit(formRules);
4333
+ setShopLinkProductCount();
4334
+ setShopIndex(getShopIndex(formRules, 0));
4335
+ }
4336
+ }
4323
4337
  vue.watch(
4324
4338
  () => props.formRules,
4325
4339
  (formRules) => {
4326
- if (formRules?.length) {
4327
- setShopIndex(0);
4328
- edit(formRules);
4329
- setShopLinkProductCount();
4330
- setShopIndex(getShopIndex(formRules, 0));
4331
- }
4340
+ initPage(formRules);
4332
4341
  },
4333
4342
  {
4334
4343
  immediate: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.0.72-alpha",
3
+ "version": "1.0.74-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",