当我用熨斗页面更改页面时,我想在新页面上设置值。属性具有正确的值,但html没有正确更新。
这是我的页面。当我切换到此页面时,orderconfirmation值是正确的值。中的值
<td>
仍然是空字符串tho。
<dom-module id="pn-bookpickup-confirmation">
<template>
<style include="main-styles">
</style>
<div class="confirmation-wrapper">
<h3 class="center-header">{{localize("thankYou")}}</h3>
<table>
<tr>
<td>{{localize("orderReference")}}:</td>
<td class="font-weight-bold" id="orederRefId">{{orderconfirmation.orderreference}}</td>
</tr>
</table>
</div>
</template>
<script>
Polymer({
is: "pn-bookpickup-confirmation",
behaviors: [
PnLocalizeBehavior
],
properties: {
language: {
type: String,
notify: true
},
orderconfirmation: {
type: Object,
notify: true,
value: function () {
return {
pickuptime: "",
orderreference: ""
}
}
},
},
});
</script>
</dom-module>
在我的主页中,在设置正确的值后,我切换到另一个页面:
handleResponse: function (data) {
console.log(data.detail.response);
var response = data.detail.response.Item;
this.orderconfirmation.orderreference = response.order.orderReference;
this.orderconfirmation.pickuptime = response.order.operationDate;
this.selectedpage = "booking-confirmation";
},
因此,我想在重新保存数据时更改HTML中的orderconfirmation值。
谁知道我该怎么处理?
非常感谢。