init
This commit is contained in:
@@ -36,10 +36,7 @@
|
||||
class="input-field"
|
||||
/>
|
||||
<button @click="showDateTimePicker = true" class="calendar-btn" title="选择日期时间">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<rect x="2" y="3" width="12" height="11" rx="1" stroke-width="1.5"/>
|
||||
<path d="M5 1v4M11 1v4M2 7h12" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i class="far fa-calendar"></i>
|
||||
</button>
|
||||
|
||||
<!-- 日期时间选择器组件 -->
|
||||
@@ -58,10 +55,7 @@
|
||||
class="input-field readonly"
|
||||
/>
|
||||
<button @click="copyToClipboard(timestampOutput)" class="copy-btn" title="复制">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<rect x="5" y="5" width="8" height="8" rx="1" stroke-width="1.5"/>
|
||||
<path d="M3 11V5a2 2 0 0 1 2-2h6" stroke-width="1.5"/>
|
||||
</svg>
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,10 +79,7 @@
|
||||
class="input-field readonly"
|
||||
/>
|
||||
<button @click="copyToClipboard(dateStringOutput)" class="copy-btn" title="复制">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<rect x="5" y="5" width="8" height="8" rx="1" stroke-width="1.5"/>
|
||||
<path d="M3 11V5a2 2 0 0 1 2-2h6" stroke-width="1.5"/>
|
||||
</svg>
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,10 +89,12 @@
|
||||
<div class="conversion-label">当前时间戳:</div>
|
||||
<div class="current-timestamp-controls">
|
||||
<span class="current-timestamp-value">{{ currentTimestampDisplay }}</span>
|
||||
<button @click="togglePause" class="control-btn" :title="isPaused ? '继续' : '暂停'">
|
||||
{{ isPaused ? '▶' : 'II' }} {{ isPaused ? '继续' : '暂停' }}
|
||||
<button @click="togglePause" class="control-btn-icon" :title="isPaused ? '继续' : '暂停'">
|
||||
<i :class="isPaused ? 'fas fa-play' : 'fas fa-pause'"></i>
|
||||
</button>
|
||||
<button @click="resetData" class="control-btn-icon" title="重置数据">
|
||||
<i class="fas fa-rotate-right"></i>
|
||||
</button>
|
||||
<button @click="resetData" class="control-btn" title="重置数据">C 重置数据</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,19 +109,12 @@
|
||||
<Transition name="toast">
|
||||
<div v-if="toastMessage" class="toast-notification" :class="toastType">
|
||||
<div class="toast-content">
|
||||
<svg v-if="toastType === 'error'" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<circle cx="8" cy="8" r="6" stroke-width="1.5"/>
|
||||
<path d="M8 5v3M8 11h.01" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<svg v-else width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<path d="M13 4L6 11L3 8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<i v-if="toastType === 'error'" class="fas fa-circle-exclamation"></i>
|
||||
<i v-else class="fas fa-circle-check"></i>
|
||||
<span>{{ toastMessage }}</span>
|
||||
</div>
|
||||
<button @click="closeToast" class="toast-close-btn" title="关闭">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor">
|
||||
<path d="M3 3l8 8M11 3l-8 8" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i class="fas fa-xmark"></i>
|
||||
</button>
|
||||
</div>
|
||||
</Transition>
|
||||
@@ -617,7 +603,7 @@ onUnmounted(() => {
|
||||
.current-timestamp-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.current-timestamp-value {
|
||||
@@ -651,6 +637,33 @@ onUnmounted(() => {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.control-btn-icon {
|
||||
padding: 0.375rem;
|
||||
background: transparent;
|
||||
border: 1px solid #d0d0d0;
|
||||
border-radius: 6px;
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
flex-shrink: 0;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.control-btn-icon:hover {
|
||||
background: #f5f5f5;
|
||||
border-color: #1a1a1a;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.control-btn-icon:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.input-field {
|
||||
flex: 1;
|
||||
padding: 0.75rem;
|
||||
@@ -789,7 +802,8 @@ onUnmounted(() => {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.toast-content svg {
|
||||
.toast-content svg,
|
||||
.toast-content i {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -876,16 +890,18 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.current-timestamp-controls {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.current-timestamp-value {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
width: 100%;
|
||||
.control-btn-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.toast-notification {
|
||||
|
||||
Reference in New Issue
Block a user