diff --git a/packages/schema-form/index.vue b/packages/schema-form/index.vue
index 4c17c0e..db9fc2e 100644
--- a/packages/schema-form/index.vue
+++ b/packages/schema-form/index.vue
@@ -4,14 +4,15 @@
-
+
-
+
+
@@ -32,10 +33,9 @@ export default {
render(h, context) {
const props = context.props;
const item = props.item || {};
- let content = [];
+ let content = props.value;
if (item.render && typeof item.render === 'function') {
- console.log('render');
- content = item.render(props.value, h);
+ content = [item.render(props.value, props.model, h)];
}
if (item.children) {
if (Array.isArray(item.children)) {
@@ -58,7 +58,11 @@ export default {
result[current] = item[current];
return result;
}, {});
- return h(item.is, { props: _props, on: _on, ...otherAttrs }, content);
+ if (item.is) {
+ return h(item.is, { props: _props, on: _on, ...otherAttrs }, content);
+ } else {
+ return content;
+ }
},
},
},
@@ -89,7 +93,7 @@ export default {
return this.size || (this.$ELEMENT || {}).size;
},
_schemaProps() {
- return { size: this._size, ...(this.schema.props || {}) };
+ return { size: this._size, ...(this.schema.props || {}), ...this.$attrs };
},
slotProps() {
return {
@@ -128,7 +132,7 @@ export default {
return item[key];
},
bindItemProps(item) {
- const { children, is, props, on, ...other } = item || {};
+ const { children, is, props, on, render, ...other } = item || {};
return Object.keys(other).reduce((result, current) => {
result = { ...result, [current]: this.bindParam(item, current, item[current]) };
return result;
diff --git a/packages/schema-transfer/index.vue b/packages/schema-transfer/index.vue
index ea32141..294b184 100644
--- a/packages/schema-transfer/index.vue
+++ b/packages/schema-transfer/index.vue
@@ -35,6 +35,7 @@
-
+
@@ -209,6 +210,7 @@ export default {
disabled: this.transferDisabled,
choose: this.onChoose,
remove: this.onRemove,
+ source: this.valueTable,
};
return [...methods].reduce((result, current) => {
result[current] = this[current];
@@ -237,6 +239,11 @@ export default {
}
return false;
},
+ search() {
+ if (this.$refs['schema-page']) {
+ this.$refs['schema-page'].search();
+ }
+ },
deselect(value) {
return value.filter(item => !this.valueKeys.includes(item[this.valueKey]));
},
--
libgit2 0.21.0