Full view mode (#6636)

* wuip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update folder.vue

* wip

* Update size.ts

* wip

* wip

* Update index.vue

* wip
This commit is contained in:
syuilo
2020-08-09 15:51:02 +09:00
committed by GitHub
parent 13683780cd
commit 69d9aa71f2
31 changed files with 853 additions and 334 deletions

View File

@@ -8,7 +8,8 @@ export default function <T extends Form>(data: {
return Vue.extend({
props: {
widget: {
type: Object
type: Object,
required: false
},
isCustomizeMode: {
type: Boolean,
@@ -16,19 +17,13 @@ export default function <T extends Form>(data: {
}
},
data() {
return {
bakedOldProps: null
};
},
computed: {
id(): string {
return this.widget.id;
return this.widget ? this.widget.id : null;
},
props(): Record<string, any> {
return this.widget.data;
return this.widget ? this.widget.data : {};
}
},
@@ -67,7 +62,9 @@ export default function <T extends Form>(data: {
},
save() {
this.$store.commit('deviceUser/updateWidget', this.widget);
if (this.widget) {
this.$store.commit('deviceUser/updateWidget', this.widget);
}
}
}
});