搭建PVB架构,实现前端的基础布局、菜单、表格、图示等功能

This commit is contained in:
lixiaoyuan
2025-08-20 19:00:22 +08:00
parent 5de7687bcc
commit 7e965b6fb4
142 changed files with 28270 additions and 411 deletions

View File

@@ -39,19 +39,22 @@ public:
memcpy_s(&dest[start], len, &src, len);
}
static int64_t timeNow();
static int64_t timeNowMS();
static int64_t timeNowDate();
static string timeNowStr(std::string fmt = "%Y-%m-%d %H:%M:%S");
static string timeNowStrMS(std::string fmt = "%Y-%m-%d %H:%M:%S");
static string timeStr(int64_t ts, std::string fmt = "%Y-%m-%d %H:%M:%S");
// 获取当前时间的时间戳(毫秒)
static int64_t time();
// 获取当前时间的格式字符串
static string timeStr(std::string fmt = "%Y-%m-%d %H:%M:%S");
// 获取当前日期的时间戳(毫秒)
static int64_t date();
// 获取当前日期的格式字符串
static string dateStr(std::string fmt = "%Y-%m-%d %H:%M:%S");
static int64_t time(string dt="", int zone = 0);
static string time_to_string(int64_t dt, std::string fmt="%Y-%m-%d %H:%M:%S");
static bool time_string_to_tm(string dt, std::tm& t);
static string timeStrMS(std::string fmt = "%Y-%m-%d %H:%M:%S");
//static string timeStr(int64_t ts, std::string fmt = "%Y-%m-%d %H:%M:%S");
//static int64_t time(string dt="", int zone = 0);
//static string time_to_string(int64_t dt, std::string fmt="%Y-%m-%d %H:%M:%S");
//static bool time_string_to_tm(string dt, std::tm& t);
std::string duration_str(int64_t t)
{
@@ -89,12 +92,12 @@ public:
TimeTick()
{
tickMS_ = Utils::timeNowMS();
tickMS_ = Utils::time();
}
bool elapse(int64_t ms, bool reset = true)
{
auto tick_now = Utils::timeNowMS();
auto tick_now = Utils::time();
bool res = tick_now - tickMS_ > ms;
if (res && reset)
{
@@ -105,7 +108,7 @@ public:
void reset()
{
tickMS_ = Utils::timeNowMS();
tickMS_ = Utils::time();
}
};