<template>
<div>
<p class="title-date" v-if="isTitle">Select Dates</p>
<vue-ctk-date-time-picker
:no-label="true"
:range="true"
:custom-shortcuts="shortcuts"
formatted="YYYY/MM/DD"
format="YYYy/MM/DD"
disabled-dates="disabledDates"
v-model="date"
@is-hidden="validateDate"
@validate="validateDate"
id="range"
>
</vue-ctk-date-time-picker>
</div>
</template>

bingzhichen 發表在 痞客邦 留言(0) 人氣()

1.取消縮進檢查、編輯器配置:
File > Settings >
Editor > Code Style >
取消Indents Detection和EditorConfig勾選

bingzhichen 發表在 痞客邦 留言(0) 人氣()

interface IEnteredExitedSubtotal {
Hour: number;
Today: number;
Total: number;
TotalInTimeSection: number;
}
interface IInsideSubtotal {
Total: number;
}
interface CameraData {
Channel: number;
EnteredSubtotal: IEnteredExitedSubtotal;
ExitedSubtotal: IEnteredExitedSubtotal;
InsideSubtotal: IInsideSubtotal;
RuleName: string;
UTC: number;
}
let data = `summary.Channel=123
summary.EnteredSubtotal.Hour=22
summary.EnteredSubtotal.Today=60
summary.EnteredSubtotal.Total=1769
summary.EnteredSubtotal.TotalInTimeSection=60
summary.ExitedSubtotal.Hour=19
summary.ExitedSubtotal.Today=52
summary.ExitedSubtotal.Total=1705
summary.ExitedSubtotal.TotalInTimeSection=52
summary.InsideSubtotal.Total=324
summary.RuleName=NumberStat
summary.UTC=1565870249`;

bingzhichen 發表在 痞客邦 留言(0) 人氣()

歌好聽!!
電影好看!!

bingzhichen 發表在 痞客邦 留言(0) 人氣()

// 注意:回傳值都為string格式,如果要日期格式,
請使用
new Date(this.getDateCount);
// 格式化日期
formatDate(dateArg: any): string {
const date = new Date(dateArg);
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const formatMonth = month < 10 ? `0${month}` : month;
const formatDay = day < 10 ? `0${day}` : day;
return `${year}-${formatMonth}-${formatDay}`

bingzhichen 發表在 痞客邦 留言(0) 人氣()

這篇文章受密碼保護,請輸入密碼後查看內容。

bingzhichen 發表在 痞客邦 留言(0) 人氣()

// 小時
for (let i = 0; i < 25; i++) {
const tempHour =
i === 24 ? "00" : i < 10 ? "0" + i.toString() : i.toString();
const tempValue =
tempHour + ":00" + (i < 12 || i > 23 ? " am" : " pm");
const tempObject = { value: i.toString(), text: tempValue };
this.dayRanges.hours.push(tempObject);
}
// 分鐘
for (let i = 0; i < 60; i++) {
const tempMinute =
i === 60 ? "00" : i < 10 ? "0" + i.toString() : i.toString();
const tempObject = { value: i.toString(), text: tempMinute };
this.dayRanges.minutes.push(tempObject);
}

bingzhichen 發表在 痞客邦 留言(0) 人氣()

這篇文章受密碼保護,請輸入密碼後查看內容。

bingzhichen 發表在 痞客邦 留言(0) 人氣()

連動式下選單,分三部份
1. templeate

bingzhichen 發表在 痞客邦 留言(0) 人氣()

驗證網址:https://www.regextester.com/22
const ipRegex =
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.)
{3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;
const portRegex =
/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|
65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/;

bingzhichen 發表在 痞客邦 留言(0) 人氣()

<form-string
:label="_('w_License_License_Key')"
v-model="inputLicenseData.licenseKey"
:placeholder="_('w_License_License_KeyPlaceholder')"
:maxlength="29"
></form-string>
// ts寫法
// 限輸入英文、數字,格式:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
@Watch("inputLicenseData.licenseKey")
valueChange(value) {
this.$nextTick(() => {
this.inputLicenseData.licenseKey = value
.replace(/\s/g, "") .replace(/[^0-9a-zA-Z]/g, "")
.replace(/([0-9a-zA-Z]{5})(?=[0-9a-zA-Z])/g, "$&-");
});
}

bingzhichen 發表在 痞客邦 留言(0) 人氣()

getTwoPointAngle(px1: number, py1: number, px2: number, py2: number) {
const x = Math.abs(px1 - px2);
const y = Math.abs(py1 - py2);
const z = Math.sqrt(x * x + y * y);
const angle = Math.round((Math.asin(y / z) / Math.PI) * 180); //最終角度
return angle;
}

bingzhichen 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。