提交 197b9845 编写于 作者: H hekun

add js attr

Signed-off-by: Nhekun <hekun18@huawei.com>
上级 c9149d1c
...@@ -35,4 +35,7 @@ ...@@ -35,4 +35,7 @@
<input id="function6" class="title" onclick="functionTest6"> <input id="function6" class="title" onclick="functionTest6">
set/delete test set/delete test
</input> </input>
<input id="function7" ref="refname" class="title" onclick="functionTest5">
watch test
</input>
</div> </div>
...@@ -22,6 +22,15 @@ export default { ...@@ -22,6 +22,15 @@ export default {
onInit() { onInit() {
this.$watch("watchVal", "onwatch") this.$watch("watchVal", "onwatch")
}, },
onConfigurationUpdated(configuration) {
console.info("the configuration is " + JSON.stringify(configuration));
let fontScale = configuration.fontScale;
let locate = configuration.locate;
let objectLocate = locate.unicodeSetting;
console.info("the fontScale " + fontScale);
console.info("the locate is " + JSON.stringify(locate));
console.info("the objectLocate is " + JSON.stringify(objectLocate));
},
functionTest1() { functionTest1() {
var function1 = this.$element('function1'); var function1 = this.$element('function1');
var result = function1.setStyle("font-size", "50px") var result = function1.setStyle("font-size", "50px")
...@@ -53,6 +62,15 @@ export default { ...@@ -53,6 +62,15 @@ export default {
this.$delete('Version'); this.$delete('Version');
// log print:Version = undefined // log print:Version = undefined
console.info("Version = " + this.Version); console.info("Version = " + this.Version);
// add new attr test
console.info("this app is = " + this.$app);
console.info("this def is = " + this.$app.$def);
},
functionTest7() {
let input = this.$refs.refname
console.info("this refs is = " + this.$refs);
console.info("this refs is = " + input);
}, },
onwatch(newVal, oldVal) { onwatch(newVal, oldVal) {
console.log("watch newVal = " + newVal + ",oldVal =" + oldVal) console.log("watch newVal = " + newVal + ",oldVal =" + oldVal)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册