init
This commit is contained in:
@@ -4,20 +4,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">
|
||||
<circle cx="8" cy="8" r="6" stroke-width="1.5"/>
|
||||
<path d="M8 4v1M8 7v4" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i v-if="toastType === 'error'" class="fas fa-circle-exclamation"></i>
|
||||
<i v-else class="fas fa-circle-info"></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>
|
||||
@@ -60,8 +52,12 @@
|
||||
<div class="input-header">
|
||||
<label class="input-label">RGB</label>
|
||||
<div class="copy-paste-buttons">
|
||||
<button @click="copyRgb" class="copy-btn" title="复制RGB">复制</button>
|
||||
<button @click="pasteRgb" class="paste-btn" title="粘贴RGB">粘贴</button>
|
||||
<button @click="copyRgb" class="copy-btn" title="复制RGB">
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
<button @click="pasteRgb" class="paste-btn" title="粘贴RGB">
|
||||
<i class="far fa-paste"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rgb-inputs">
|
||||
@@ -109,8 +105,12 @@
|
||||
<div class="input-header">
|
||||
<label class="input-label">十六进制</label>
|
||||
<div class="copy-paste-buttons">
|
||||
<button @click="copyHex" class="copy-btn" title="复制十六进制">复制</button>
|
||||
<button @click="pasteHex" class="paste-btn" title="粘贴十六进制">粘贴</button>
|
||||
<button @click="copyHex" class="copy-btn" title="复制十六进制">
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
<button @click="pasteHex" class="paste-btn" title="粘贴十六进制">
|
||||
<i class="far fa-paste"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hex-input-wrapper">
|
||||
@@ -131,8 +131,12 @@
|
||||
<div class="input-header">
|
||||
<label class="input-label">HSL</label>
|
||||
<div class="copy-paste-buttons">
|
||||
<button @click="copyHsl" class="copy-btn" title="复制HSL">复制</button>
|
||||
<button @click="pasteHsl" class="paste-btn" title="粘贴HSL">粘贴</button>
|
||||
<button @click="copyHsl" class="copy-btn" title="复制HSL">
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
<button @click="pasteHsl" class="paste-btn" title="粘贴HSL">
|
||||
<i class="far fa-paste"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hsl-inputs">
|
||||
@@ -822,20 +826,29 @@ loadHistoryList()
|
||||
|
||||
.copy-paste-buttons {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.copy-btn,
|
||||
.paste-btn {
|
||||
padding: 0.375rem 0.75rem;
|
||||
padding: 0.375rem;
|
||||
border: 1px solid #d0d0d0;
|
||||
border-radius: 6px;
|
||||
background: #f5f5f5;
|
||||
color: #333333;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.copy-btn i,
|
||||
.paste-btn i {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.copy-btn:hover,
|
||||
@@ -1024,7 +1037,8 @@ loadHistoryList()
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.toast-content svg {
|
||||
.toast-content svg,
|
||||
.toast-content i {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -1065,8 +1079,10 @@ loadHistoryList()
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.toast-close-btn svg {
|
||||
.toast-close-btn svg,
|
||||
.toast-close-btn i {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Toast动画 */
|
||||
|
||||
@@ -4,20 +4,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">
|
||||
<circle cx="8" cy="8" r="6" stroke-width="1.5"/>
|
||||
<path d="M8 4v1M8 7v4" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i v-if="toastType === 'error'" class="fas fa-circle-exclamation"></i>
|
||||
<i v-else class="fas fa-circle-info"></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>
|
||||
@@ -87,31 +79,19 @@
|
||||
</button>
|
||||
</div>
|
||||
<button @click="copyInputToClipboard" class="toolbar-icon-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 11V3a2 2 0 0 1 2-2h8" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
<button @click="pasteFromClipboard" class="toolbar-icon-btn" title="粘贴">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<path d="M5 7h6M5 10h4" stroke-width="1.5" stroke-linecap="round"/>
|
||||
<rect x="3" y="3" width="10" height="10" rx="1" stroke-width="1.5"/>
|
||||
</svg>
|
||||
<i class="far fa-paste"></i>
|
||||
</button>
|
||||
<button @click="encode" class="toolbar-icon-btn" title="编码">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<path d="M4 6l4 4 4-4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<i class="fa-solid fa-code"></i>
|
||||
</button>
|
||||
<button @click="decode" class="toolbar-icon-btn" title="解码">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<path d="M4 10l4-4 4 4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg viewBox="150 -50 1100 1250" xmlns="http://www.w3.org/2000/svg" width="17" height="17"><path d="M285.352637 0.003641h111.956538v114.687184h-111.956538v282.621991a110.682235 110.682235 0 0 1-33.313896 81.282266 110.682235 110.682235 0 0 1-81.282266 33.313896 110.682235 110.682235 0 0 1 81.282266 33.313897 110.682235 110.682235 0 0 1 33.313896 81.282266v282.621991h111.956538v114.687184h-111.956538a188.050574 188.050574 0 0 1-80.007964-40.049493 93.570179 93.570179 0 0 1-34.67922-74.637691v-226.643722a110.682235 110.682235 0 0 0-33.313896-81.282267 110.682235 110.682235 0 0 0-81.282267-33.313896H0v-111.956537h55.978269a110.682235 110.682235 0 0 0 81.282266-33.313897 110.682235 110.682235 0 0 0 33.313896-81.282266V114.690825A113.776969 113.776969 0 0 1 285.261616 0.003641z m794.61835 0a113.776969 113.776969 0 0 1 114.687184 114.687184v226.643722a113.776969 113.776969 0 0 0 114.687185 114.687184H1365.323624v111.956538h-55.978268a113.776969 113.776969 0 0 0-114.687185 114.687184v226.643722a113.776969 113.776969 0 0 1-114.687184 114.687184h-111.956537V909.309175h111.956537V626.687184a113.776969 113.776969 0 0 1 114.687184-114.687184 113.776969 113.776969 0 0 1-114.687184-114.687184V114.690825h-111.956537V0.003641h111.956537zM682.661812 682.665453a54.612945 54.612945 0 0 1 55.978269 55.978269 58.799937 58.799937 0 0 1-16.019797 41.323795 54.612945 54.612945 0 0 1-80.007965 0 58.799937 58.799937 0 0 1-16.019797-41.323795 54.612945 54.612945 0 0 1 55.978269-55.978269z m-226.643721 0a54.612945 54.612945 0 0 1 55.978268 55.978269 58.799937 58.799937 0 0 1-16.019797 41.323795 52.246384 52.246384 0 0 1-40.049493 17.294099 59.164024 59.164024 0 0 1-58.708916-58.708916 52.246384 52.246384 0 0 1 17.294099-40.049493 58.799937 58.799937 0 0 1 41.505839-15.837754z m453.287443 0a58.799937 58.799937 0 0 1 41.323795 16.019797 52.246384 52.246384 0 0 1 17.294099 40.049493 59.164024 59.164024 0 0 1-58.708916 58.708916 52.246384 52.246384 0 0 1-40.049493-17.294099 58.799937 58.799937 0 0 1-16.019797-41.323795 54.612945 54.612945 0 0 1 55.978269-55.978269z" fill="#666666" p-id="26339"></path></svg>
|
||||
</button>
|
||||
<button @click="clearAll" class="toolbar-icon-btn" title="清空">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor">
|
||||
<path d="M3 3l10 10M3 13L13 3" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i class="far fa-trash-can"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,10 +128,7 @@
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<button @click="copyOutputToClipboard" class="toolbar-icon-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 11V3a2 2 0 0 1 2-2h8" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -641,7 +618,8 @@ onUnmounted(() => {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.toast-content svg {
|
||||
.toast-content svg,
|
||||
.toast-content i {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -685,8 +663,10 @@ onUnmounted(() => {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.toast-close-btn svg {
|
||||
.toast-close-btn svg,
|
||||
.toast-close-btn i {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 浮层提示动画 */
|
||||
@@ -991,8 +971,10 @@ onUnmounted(() => {
|
||||
background: #e5e5e5;
|
||||
}
|
||||
|
||||
.toolbar-icon-btn svg {
|
||||
.toolbar-icon-btn svg,
|
||||
.toolbar-icon-btn i {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.editor-container {
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<p class="tool-description">{{ tool.description }}</p>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<p class="icp-info">苏ICP备2022013040号-1</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -155,5 +158,18 @@ const tools = ref([
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-section {
|
||||
text-align: center;
|
||||
padding: 2rem 0;
|
||||
margin-top: 3rem;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.icp-info {
|
||||
color: #999999;
|
||||
font-size: 0.875rem;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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