resolver-egretimp-plus 0.1.24 → 0.1.26
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/package.json
CHANGED
|
@@ -15,7 +15,19 @@
|
|
|
15
15
|
<Renderer v-else :modelValue="modelValue?.[$index]" :rowScope="{row: modelValue?.[$index], $index}" @update:modelValues="onUpdateModelValue($event, $index)" :config="pageMetaList.filter(config => config.collapseSlot)"></Renderer>
|
|
16
16
|
</template>
|
|
17
17
|
<ElRow>
|
|
18
|
-
|
|
18
|
+
a: {{ generateModel({
|
|
19
|
+
data: modelValue?.[$index],
|
|
20
|
+
index: $index,
|
|
21
|
+
}) }}
|
|
22
|
+
<Renderer
|
|
23
|
+
:mode="generateModel({
|
|
24
|
+
data: modelValue?.[$index],
|
|
25
|
+
index: $index,
|
|
26
|
+
})"
|
|
27
|
+
:modelValue="modelValue?.[$index]" :rowScope="{row: modelValue?.[$index], $index}"
|
|
28
|
+
@update:modelValues="onUpdateModelValue($event, $index)"
|
|
29
|
+
:config="pageMetaList.filter(config => !config.collapseSlot)"
|
|
30
|
+
></Renderer>
|
|
19
31
|
</ElRow>
|
|
20
32
|
</TabPane>
|
|
21
33
|
</template>
|
|
@@ -50,6 +62,11 @@ const onUpdateModelValue = (val, idx) => {
|
|
|
50
62
|
}
|
|
51
63
|
modelValue.value[idx] = val
|
|
52
64
|
}
|
|
65
|
+
const generateModel = computed(() => {
|
|
66
|
+
return (...arg) => {
|
|
67
|
+
return props?.config?.isDetail?.(...arg) === true ? 'detail' : null
|
|
68
|
+
}
|
|
69
|
+
})
|
|
53
70
|
|
|
54
71
|
/**
|
|
55
72
|
* 设置 multiPmPageMetaList 的值
|
package/src/renderer.jsx
CHANGED
|
@@ -46,6 +46,12 @@ export default {
|
|
|
46
46
|
const injectMode = inject('injectMode', '')
|
|
47
47
|
const mode = props.mode || injectMode
|
|
48
48
|
provide('injectMode', mode)
|
|
49
|
+
|
|
50
|
+
const indectModeRef = inject('indectModeRef', ref(''))
|
|
51
|
+
let modelRef = computed(() => {
|
|
52
|
+
return props.mode || indectModeRef.value
|
|
53
|
+
})
|
|
54
|
+
provide('indectModeRef', modelRef)
|
|
49
55
|
|
|
50
56
|
return () => {
|
|
51
57
|
const configs = (Array.isArray(props.config) ? props.config : [props.config])
|
|
@@ -56,12 +62,12 @@ export default {
|
|
|
56
62
|
if (config?.displayType == DISPLAY_HIDDEN) {
|
|
57
63
|
return null
|
|
58
64
|
}
|
|
59
|
-
const disabled = calcDisable(config,
|
|
65
|
+
const disabled = calcDisable(config, modelRef.value)
|
|
60
66
|
const component = getComponentForConfig({config, disabled, getNativeComps, isH5: _isH5?.value, loadModuleCache})
|
|
61
67
|
if (component) {
|
|
62
68
|
const layoutPolyfill = generateLayoutPolyfill(config, disabled, _isH5?.value) // // 生成布局框(col)的辅助函数
|
|
63
69
|
return layoutPolyfill(
|
|
64
|
-
<AnalysisComponent additionConfigs={props.additionConfigs} key={`${config.metaId}-${config.rowIndex}`} component={component} config={config} {...attrs} mode={
|
|
70
|
+
<AnalysisComponent additionConfigs={props.additionConfigs} key={`${config.metaId}-${config.rowIndex}`} component={component} config={config} {...attrs} mode={modelRef.value} rowScope={props.rowScope} v-model={modelValue.value}></AnalysisComponent>
|
|
65
71
|
)
|
|
66
72
|
}
|
|
67
73
|
})
|