在我的应用程序中,我使用了角度ui-tree.
现在添加我在代码下面使用的新节点
<button class="btn btn-info btn-circle btn-sm" type="button" ng-click='x.tasks.push({task: "New Task",depth:"2", tasks:[]})' style="margin-top:15px" data-nodrag><i class="fa fa-plus"></i></button>
<script type="text/ng-template" id="nodes_renderer.html">
<div ui-tree-handle class="tree-node tree-node-content">
<div style="width:100%">
<div style="width:87%;display: inline-block">
<a class="" style="color:#c1c1c1" data-nodrag ng-click="toggle(this)"><span class="fa" ng-class="{'fa-plus': collapsed, 'fa-minus': !collapsed}"></span>
<span class="label label-info"><i class="fa fa-tasks"></i></span> </a>
<span style="width:80%;word-wrap: break-word" class="remove-editable-click cursor-pointer" editable-text="node.task" buttons="no" e-ng-model="WBSData.task" e-ng-blur="changeFieldEdit(this)" e-required data-nodrag e-style="border:1px solid #DDDDDD;width:90px">
{{node.task}}
</span>
</div>
<div style="width:10%;display: inline-block">
<input icheck type="checkbox" ng-model="node.WBSDataSelectedTask" checklist-value="node.task" style="float:right" value="none">
</div>
</div>
</div>
<ol ui-tree-nodes="" ng-model="node.subtasks" ng-class="{hidden: collapsed}">
<li …Run Code Online (Sandbox Code Playgroud) 我已集成创建的一个加载项以集成到Outlook Mail中.
我已经使用了Office内置代码(Javascript代码).
现在要测试加载项我在微软注册了我的个人电子邮件ID.注册后我发现在Outlook Mail中,Profile中有两个不同的Mail Ids.
喜欢
现在我需要第一个验证,但我每次都得到第二个.
我使用下面的代码.
Office.initialize = function (reason) {
item = Office.context.mailbox.item;
console.log(Office.context.mailbox.userProfile.displayName);
console.log(Office.context.mailbox.userProfile.emailAddress);
}
Run Code Online (Sandbox Code Playgroud)
请建议我以其他方式获取用户的电子邮件ID.
在我的应用程序中,所有列表页面上都有过滤器。现在根据要求,我想在浏览器后退按钮上保留应用的过滤器。例如,说用户在销售列表页面上应用了过滤器。之后,他点击一条记录进入销售编辑页面。现在,如果用户点击浏览器后退按钮,那么那些应用的过滤器应该保留。为了做到这一点,我喜欢下面。在销售列表页面上,
componentWillMount() {
const { list, checkReportClose,
updateReportCloseStatus } = this.props;
const { inPopState } = this.state;
window.onpopstate = () => {
if (!_.isEmpty(list)) {
this.setState({ filters: JSON.parse(list.input.filters),
inPopState: true}, this.loadList);
}
}
if(!inPopState && inPopState != undefined &&
checkReportClose == false) {
this.loadList();
}
}
Run Code Online (Sandbox Code Playgroud)
使用上面的代码它工作正常,但是当返回按钮时它会调用 lis 页面 api (this.loadList) twise。
请提出一些新的解决方案或对现有解决方案的修改。
谢谢。
javascript ×2
angularjs ×1
office-js ×1
react-native ×1
react-redux ×1
react-router ×1
reactjs ×1