@piying/view-vue2-legacy 2.4.2 → 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 +18 -15
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/token.d.ts +1 -1
- package/util/signal-convert.d.ts +2 -1
package/index.js
CHANGED
|
@@ -6796,7 +6796,7 @@ function signalToRef(value) {
|
|
|
6796
6796
|
dataRef.value = currentValue;
|
|
6797
6797
|
}
|
|
6798
6798
|
},
|
|
6799
|
-
{ injector }
|
|
6799
|
+
{ injector: injector.value }
|
|
6800
6800
|
);
|
|
6801
6801
|
onWatcherCleanup(() => {
|
|
6802
6802
|
ref2.destroy();
|
|
@@ -6918,11 +6918,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6918
6918
|
const isControl = isFieldControl(field.value.form.control);
|
|
6919
6919
|
let dispose;
|
|
6920
6920
|
watch(
|
|
6921
|
-
[childRef, field],
|
|
6922
|
-
([childRef2, field2]) => {
|
|
6921
|
+
[childRef, field, injector],
|
|
6922
|
+
([childRef2, field2, injector2]) => {
|
|
6923
6923
|
dispose?.();
|
|
6924
6924
|
if (isControl && childRef2) {
|
|
6925
|
-
dispose = createViewControlLink((() => field2.form.control), childRef2["cva"],
|
|
6925
|
+
dispose = createViewControlLink((() => field2.form.control), childRef2["cva"], injector2);
|
|
6926
6926
|
}
|
|
6927
6927
|
},
|
|
6928
6928
|
{ immediate: true }
|
|
@@ -6945,7 +6945,7 @@ var __component__$2 = /* @__PURE__ */ normalizeComponent(
|
|
|
6945
6945
|
_sfc_staticRenderFns$2,
|
|
6946
6946
|
false,
|
|
6947
6947
|
null,
|
|
6948
|
-
"
|
|
6948
|
+
"97958aee"
|
|
6949
6949
|
);
|
|
6950
6950
|
const FieldTemplate = __component__$2.exports;
|
|
6951
6951
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -6958,13 +6958,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6958
6958
|
emits: ["update:modelValue"],
|
|
6959
6959
|
setup(__props, { emit }) {
|
|
6960
6960
|
const inputs = __props;
|
|
6961
|
-
const
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6961
|
+
const maybeParentField = inject(PI_VIEW_FIELD_TOKEN, void 0);
|
|
6962
|
+
const rootInjector = computed(() => {
|
|
6963
|
+
return inputs.options.injector ?? maybeParentField?.value.injector ?? createRootInjector({
|
|
6964
|
+
providers: [
|
|
6965
|
+
{
|
|
6966
|
+
provide: ChangeDetectionScheduler,
|
|
6967
|
+
useClass: ChangeDetectionSchedulerImpl
|
|
6968
|
+
}
|
|
6969
|
+
]
|
|
6970
|
+
});
|
|
6968
6971
|
});
|
|
6969
6972
|
provide(InjectorToken, rootInjector);
|
|
6970
6973
|
provide(
|
|
@@ -6982,7 +6985,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6982
6985
|
let injectorDispose;
|
|
6983
6986
|
const initResult = computed(() => {
|
|
6984
6987
|
injectorDispose?.();
|
|
6985
|
-
const subInjector = createInjector({ providers: [], parent: rootInjector });
|
|
6988
|
+
const subInjector = createInjector({ providers: [], parent: rootInjector.value });
|
|
6986
6989
|
injectorDispose = () => {
|
|
6987
6990
|
subInjector.destroy();
|
|
6988
6991
|
injectorDispose = void 0;
|
|
@@ -7019,7 +7022,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7019
7022
|
},
|
|
7020
7023
|
{ immediate: true }
|
|
7021
7024
|
);
|
|
7022
|
-
return { __sfc: true, inputs, emit, rootInjector, injectorDispose, initResult, field, FieldTemplate };
|
|
7025
|
+
return { __sfc: true, inputs, emit, maybeParentField, rootInjector, injectorDispose, initResult, field, FieldTemplate };
|
|
7023
7026
|
}
|
|
7024
7027
|
});
|
|
7025
7028
|
var _sfc_render$1 = function render3() {
|
|
@@ -7033,7 +7036,7 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
|
7033
7036
|
_sfc_staticRenderFns$1,
|
|
7034
7037
|
false,
|
|
7035
7038
|
null,
|
|
7036
|
-
"
|
|
7039
|
+
"026c7115"
|
|
7037
7040
|
);
|
|
7038
7041
|
const piyingView = __component__$1.exports;
|
|
7039
7042
|
function useControlValueAccessor(autoChange = true) {
|