@piying/view-vue2-legacy 2.4.3 → 2.4.4

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/index.js CHANGED
@@ -6958,8 +6958,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6958
6958
  emits: ["update:modelValue"],
6959
6959
  setup(__props, { emit }) {
6960
6960
  const inputs = __props;
6961
+ const maybeParentField = inject(PI_VIEW_FIELD_TOKEN, void 0);
6961
6962
  const rootInjector = computed(() => {
6962
- return inputs.options.injector ?? inject(PI_VIEW_FIELD_TOKEN, void 0)?.value.injector ?? createRootInjector({
6963
+ return inputs.options.injector ?? maybeParentField?.value.injector ?? createRootInjector({
6963
6964
  providers: [
6964
6965
  {
6965
6966
  provide: ChangeDetectionScheduler,
@@ -7021,7 +7022,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7021
7022
  },
7022
7023
  { immediate: true }
7023
7024
  );
7024
- return { __sfc: true, inputs, emit, rootInjector, injectorDispose, initResult, field, FieldTemplate };
7025
+ return { __sfc: true, inputs, emit, maybeParentField, rootInjector, injectorDispose, initResult, field, FieldTemplate };
7025
7026
  }
7026
7027
  });
7027
7028
  var _sfc_render$1 = function render3() {
@@ -7035,7 +7036,7 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
7035
7036
  _sfc_staticRenderFns$1,
7036
7037
  false,
7037
7038
  null,
7038
- "73b707a5"
7039
+ "026c7115"
7039
7040
  );
7040
7041
  const piyingView = __component__$1.exports;
7041
7042
  function useControlValueAccessor(autoChange = true) {