resolver-egretimp-plus 0.0.165 → 0.0.167
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
|
@@ -143,6 +143,7 @@ export default {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
const { vModelObjs, initVmodels, modelValue } = useVmodels(props, emit) // 过个v-model绑定对象,实现可以组件过赋值
|
|
146
|
+
|
|
146
147
|
definePrivatelyProp(props.config, 'refValue', modelValue)
|
|
147
148
|
// onBeforeMount(() => {
|
|
148
149
|
// defaultVal(props.config, modelValue) // 设置默认值
|
|
@@ -150,7 +151,6 @@ export default {
|
|
|
150
151
|
|
|
151
152
|
|
|
152
153
|
// 获取组件中定义的props,赋值对应的属性====start====
|
|
153
|
-
const componentProps = ref({})
|
|
154
154
|
const fnComponentkeys = ref([])
|
|
155
155
|
function getFncomponentProps() {
|
|
156
156
|
const obj = {}
|
|
@@ -167,14 +167,6 @@ export default {
|
|
|
167
167
|
initVmodels(res?.default?.emits)
|
|
168
168
|
}
|
|
169
169
|
fnComponentkeys.value = getComponentPropsKeys(res?.default || res)
|
|
170
|
-
// const obj = {}
|
|
171
|
-
// const propsKeys = getComponentPropsKeys(res?.default)
|
|
172
|
-
// propsKeys.forEach(key => {
|
|
173
|
-
// if (hasOwn(props.config, key)) {
|
|
174
|
-
// obj[key] = props.config[key]
|
|
175
|
-
// }
|
|
176
|
-
// })
|
|
177
|
-
// componentProps.value = obj
|
|
178
170
|
})
|
|
179
171
|
} else {
|
|
180
172
|
if (props.component?.emits) {
|
|
@@ -57,6 +57,8 @@ export default {
|
|
|
57
57
|
const pagenationEvents = computed(() => {
|
|
58
58
|
return getCompEvents(ElPagination)
|
|
59
59
|
})
|
|
60
|
+
|
|
61
|
+
const parentRootValue = inject('_parentRootValue', {})
|
|
60
62
|
const selectionsObj = inject('_selectionsObj', {})
|
|
61
63
|
const rootStore = inject('_rootStore', {})
|
|
62
64
|
const lang = inject('lang')
|
|
@@ -180,7 +182,11 @@ export default {
|
|
|
180
182
|
props.selectable = (row, index) => {
|
|
181
183
|
let orginRet = true
|
|
182
184
|
if (orginSelectable && typeof orginSelectable === 'function') {
|
|
183
|
-
orginRet = orginSelectable(row, index
|
|
185
|
+
orginRet = orginSelectable(row, index, {
|
|
186
|
+
tableConfig: props.config,
|
|
187
|
+
rootValue: rootValue,
|
|
188
|
+
parentRootValue
|
|
189
|
+
})
|
|
184
190
|
}
|
|
185
191
|
let parentSelectionsRet = true
|
|
186
192
|
if (selectionsObj.selections && selectionsObj.selections.length && selectionsObj.primaryKeys && selectionsObj.primaryKeys.length) {
|
|
@@ -75,9 +75,15 @@ const allInitEvents = {
|
|
|
75
75
|
const targetConfig = dynamicMapComp?.[matchs[1]]
|
|
76
76
|
val = targetConfig?.bindValue || ''
|
|
77
77
|
} else {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
const _assginKey = /^_assgin:(.+)$/
|
|
79
|
+
const matchs = val.match(_assginKey)
|
|
80
|
+
if (matchs?.[1]) {
|
|
81
|
+
val = matchs?.[1]
|
|
82
|
+
} else {
|
|
83
|
+
const curVal = getConfigValue.call(this, targetObj, true)
|
|
84
|
+
if (curVal || curVal == '0') {
|
|
85
|
+
val = curVal
|
|
86
|
+
}
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
}
|
package/src/rules/ruleUtils.js
CHANGED
|
@@ -43,7 +43,19 @@ export function setFormVal(pathStr, val) {
|
|
|
43
43
|
const { config } = this
|
|
44
44
|
const configs = getRelateConfigs.call(this, pathStr, config)
|
|
45
45
|
configs.forEach(cg => {
|
|
46
|
-
hasOwn(cg, 'refValue')
|
|
46
|
+
if (hasOwn(cg, 'refValue')) {
|
|
47
|
+
cg.refValue = val
|
|
48
|
+
} else {
|
|
49
|
+
const { _mapComp } = this
|
|
50
|
+
if (_mapComp?.value?.[cg.hireRelat]) {
|
|
51
|
+
if (!penddingRules[cg.hireRelat]) {
|
|
52
|
+
penddingRules[cg.hireRelat] = []
|
|
53
|
+
}
|
|
54
|
+
if (!penddingRules[cg.hireRelat].some((item) => item?.rules === this?.rules && item?.config === this?.config)) {
|
|
55
|
+
penddingRules[cg.hireRelat].push(this)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
47
59
|
})
|
|
48
60
|
}
|
|
49
61
|
|