mofron-comp-appheader
Advanced tools
Comparing version 0.5.6 to 0.5.7
33
index.js
@@ -20,6 +20,6 @@ /** | ||
* | ||
* @param mixed: title config parameter | ||
* dict: component config list | ||
* @param mixed: image config parameter | ||
* @param component: navi config parameter | ||
* @param (mixed) mixed: title config parameter | ||
* dict: component config list | ||
* @param (mixed) image config parameter | ||
* @param (component) navi config parameter | ||
* @short title,image,navi | ||
@@ -75,7 +75,7 @@ * @type private | ||
*/ | ||
title (txt, cnf) { | ||
text (txt, cnf) { | ||
try { | ||
let ret = this.text(txt, cnf); | ||
let ret = super.text(txt, cnf); | ||
if (undefined !== txt) { | ||
this.text().style({ "margin-left" : "0.2rem" }); | ||
this.text().style({ "margin-left" : "0.2rem" }, { passive: true}); | ||
} | ||
@@ -90,2 +90,20 @@ return ret; | ||
/** | ||
* header title, same as text | ||
* | ||
* @param (mixed) string: header title | ||
* mofron-comp-text: replace title component of header | ||
* @param (key-value) text config | ||
* @return (mofron-comp-text) text contents | ||
* @type parameter | ||
*/ | ||
title (txt, cnf) { | ||
try { | ||
return this.text(txt,cnf); | ||
} catch (e) { | ||
console.error(e.stack); | ||
throw e; | ||
} | ||
} | ||
/** | ||
* setter/getter logo image | ||
@@ -111,2 +129,3 @@ * insert logo image to left side of title | ||
prm.config({ effect : new Synhei(this) }); | ||
prm.style({ "margin-left" : "0.1rem" }, { passive: true}); | ||
} | ||
@@ -113,0 +132,0 @@ return this.innerComp('image', prm, Image); |
{ | ||
"name": "mofron-comp-appheader", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"description": "app header component for mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,5 +6,3 @@ # mofron-comp-appheader | ||
title area has a link function that is specified by url parameter | ||
# Install | ||
@@ -22,5 +20,4 @@ ``` | ||
<Header image="./logo.png" imgpos=(0.2rem,-0.05rem)> | ||
<Header image="./logo.png"> | ||
<text>App Header</text> | ||
<txtpos>(0.1rem,-0.2rem)</txtpos> | ||
<navi> | ||
@@ -36,2 +33,5 @@ <Text size=0.3rem>≡</Text> | ||
|:-------------:|:---------------|:-----|:------------| | ||
| | text | mixed | string: header title | | ||
| | | | mofron-comp-text: replace title component of header | | ||
| | | key-value | text config | | ||
| ◯ | title | mixed | string: header title | | ||
@@ -46,4 +46,5 @@ | | | | mofron-comp-text: replace title component of header | | ||
| | | string (size) | height offset position | | ||
| | | | | | ||
| | url | mixed | string: jump url | | ||
| | | | null: not jump | | ||
Sorry, the diff of this file is not supported yet
21296
211
47