|
@@ -55,23 +55,6 @@ export default {
|
|
|
return prop.required;
|
|
|
}
|
|
|
},
|
|
|
- //
|
|
|
- getFormItemDisabled(prop, value) {
|
|
|
- if (typeof prop.disabled === "function") {
|
|
|
- return prop.disabled(value);
|
|
|
- }
|
|
|
- if (typeof prop.disabled === "boolean") {
|
|
|
- return prop.disabled;
|
|
|
- }
|
|
|
- },
|
|
|
- //
|
|
|
- getPickerOptions(prop, value) {
|
|
|
- if (typeof prop.disabled === "function") {
|
|
|
- return prop.pickerOptions(value);
|
|
|
- } else {
|
|
|
- return prop.pickerOptions;
|
|
|
- }
|
|
|
- },
|
|
|
// 继承el-table的Method
|
|
|
extendMethod() {
|
|
|
const refMethod = Object.entries(this.$refs["superForm"]);
|
|
@@ -159,19 +142,9 @@ export default {
|
|
|
>
|
|
|
</component>
|
|
|
<component
|
|
|
- v-else-if="attr.is === 'el-date-picker'"
|
|
|
- v-bind="attr"
|
|
|
- v-model="innerValue[item.key]"
|
|
|
- :disabled="getFormItemDisabled(attr, innerValue)"
|
|
|
- :pickerOptions="getPickerOptions(attr, innerValue)"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- </component>
|
|
|
- <component
|
|
|
v-else
|
|
|
v-bind="attr"
|
|
|
v-model="innerValue[item.key]"
|
|
|
- :disabled="getFormItemDisabled(attr, innerValue)"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
</component>
|