我正在使用 V-data-table 和 vuex 存储。以下是我如何配置 v-data-table 的要点
问题: 当我拖放 v-data-table 中的行时,我正在更新 vuex 存储(使用表行索引值更新数组中对象的索引值)。Vuex 正在正确更新,但在 v-data-table 中呈现的数据与它们在 vuex 状态存储中的顺序不一致
有人可以帮助我吗
我试图克服这个问题的最好方法是强制重新渲染 v-data-table 组件,但是当我这样做时,我不能再拖放了
使用以下模板强制渲染
<template>
<component-to-re-render :key="componentKey" />
</template>
// script
export default {
data() {
return {
componentKey: 0,
};
},
methods: {
forceRerender() {
this.componentKey += 1;
}
}
}
Run Code Online (Sandbox Code Playgroud) 我们最近将 ASP.NET Core Web API 项目的日志记录框架从 log4net 更新为 NLog,当我们进行性能测试时,与 NLog 相比,NLog 的请求/秒速服务要少得多。下面是我的 NLog 配置文件。
请就使用 NLog 的性能问题提出任何想法。
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="info"
internalLogFile="C:\temp\internal-nlog.txt">
<!-- enable asp.net core layout renderers -->
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
<add assembly="SumoLogic.Logging.NLog"/>
</extensions>
<!-- the targets to write to -->
<targets>
<!-- write logs to console -->
<target xsi:type="ColoredConsole" name="allConsole" formatMessage="false" layout="${longdate}|${level:uppercase=true}|${message}" />
<target name="sumoLogic" type="SumoLogicTarget" formatMessage="false" layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff} ${level}, ${message}${exception:format=tostring}${newline}">
<Url>#{Logging__SumoLogic__EndpointUrl}</Url>
<ConnectionTimeout>30000</ConnectionTimeout>
<SourceName>#{Logging__SumoLogic__SourceName}</SourceName>
<SourceCategory>#{Logging__SumoLogic__SourceCategory}</SourceCategory>
<UseConsoleLog>true</UseConsoleLog>
</target>
<target name="bufferedSumoLogic" type="BufferedSumoLogicTarget" formatMessage="false" layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff} …Run Code Online (Sandbox Code Playgroud)