updating page title prop
This commit is contained in:
parent
53dc3780fa
commit
02fac0774e
|
@ -71,18 +71,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: console.log("COMP INSTA NEW", componentInstanceNew)
|
|
||||||
|
|
||||||
const onStyleChanged = store.setComponentStyle
|
const onStyleChanged = store.setComponentStyle
|
||||||
|
|
||||||
function onPropChanged(key, value) {
|
function onPropChanged(key, value) {
|
||||||
if($store.currentFrontEndType === "page") {
|
if($store.currentFrontEndType === "page" || ($store.currentFrontEndType === "screen" && $store.currentView !== "component")) {
|
||||||
store.editPageOrScreen(key, value)
|
store.editPageOrScreen(key, value)
|
||||||
}else if($store.currentFrontEndType === "screen" && $store.currentView !== "component") {
|
return;
|
||||||
store.editPageOrScreen(key, value)
|
}
|
||||||
}else {
|
|
||||||
store.setComponentProp(key, value)
|
store.setComponentProp(key, value)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function walkProps(component, action) {
|
function walkProps(component, action) {
|
||||||
|
|
|
@ -9,12 +9,13 @@
|
||||||
export let componentInstance = {}
|
export let componentInstance = {}
|
||||||
export let onChange = () => {}
|
export let onChange = () => {}
|
||||||
|
|
||||||
let pageScreenProps = ["name", "favicon", "description", "route"]
|
let pageScreenProps = ["title", "favicon", "description", "route"]
|
||||||
|
|
||||||
const propExistsOnComponentDef = prop => pageScreenProps.includes(prop) || prop in componentDefinition.props
|
const propExistsOnComponentDef = prop => pageScreenProps.includes(prop) || prop in componentDefinition.props
|
||||||
|
|
||||||
function handleChange(key, data) {
|
function handleChange(key, data) {
|
||||||
data.target ? onChange(key, data.target.value) : onChange(key, data)
|
const value = data.target ? data.target.value : data
|
||||||
|
onChange(key, value)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const screen = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export const page = [
|
export const page = [
|
||||||
{ label: "Name", key: "name", control: Input },
|
{ label: "Title", key: "title", control: Input },
|
||||||
{ label: "Favicon", key: "favicon", control: Input },
|
{ label: "Favicon", key: "favicon", control: Input },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue