🔀 基础合并 三天后上传新版本
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
# Nuxt-Whois
|
||||
|
||||
Nuxt-Whois 是一个基于 Nuxt3、Tailwind CSS 和 Xep-Whois 构建的Whois查询工具。它提供了一个简洁、响应式的界面,用于查询域名的Whois信息,包括域名所有者、注册状态、到期时间等信息。
|
||||
|
||||
## 特性
|
||||
|
||||
- **主题切换**:支持深色和浅色模式,可根据用户偏好或系统设置自动切换。
|
||||
- **语言切换**:提供多语言支持,方便不同语言用户使用。
|
||||
- **时区切换**:支持时区设置,确保时间信息的准确性。
|
||||
- **Dns查询**:支持Dns查询,方便用户查看域名的Dns信息。
|
||||
- **自定义后缀**:支持自定义Whois服务器后缀,方便用户查询不同后缀的域名。
|
||||
|
||||
## 更新说明
|
||||
|
||||
- 2024.3.25 抛弃原来 NuxtUi 改用 NaiveUi 重构中 后台增加中 当前版本无法上线使用
|
||||
- 2024.3.18 重构V2版本 预计三天内完成。
|
||||
|
||||
### 内容修改
|
||||
|
||||
大部分多语言文字都在lang文件夹下或者.env文件,可以自行修改。
|
||||
|
||||
### 环境要求
|
||||
|
||||
- Node.js 18.x 或更高版本
|
||||
- NPM 或 Yarn
|
||||
|
||||
### 交流群组
|
||||
|
||||

|
||||
|
||||
## 图片预览
|
||||
|
||||

|
||||
|
||||
### 安装
|
||||
|
||||
克隆项目到本地:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/7836246/Nuxt-Whois.git
|
||||
cd Nuxt-Whois
|
||||
|
||||
# 使用 PNPM
|
||||
|
||||
pnpm install
|
||||
|
||||
# 或使用 NPM
|
||||
|
||||
npm install
|
||||
|
||||
# 或使用 Yarn
|
||||
|
||||
yarn
|
||||
```
|
||||
|
||||
### 运行
|
||||
|
||||
```bash
|
||||
|
||||
# 使用 PNPM
|
||||
|
||||
pnpm dev
|
||||
|
||||
|
||||
```
|
||||
|
||||
# 免责声明
|
||||
|
||||
本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与本人无关。使用请保留项目地址谢谢。
|
||||
@@ -0,0 +1,26 @@
|
||||
// composables/useCurrentServer.js 或者在一个组件中
|
||||
export const useCurrentServer = () => {
|
||||
// 使用useHydration
|
||||
useHydration('currentServer',
|
||||
// 服务端执行的逻辑,返回初始值
|
||||
() => {
|
||||
return {
|
||||
currentServer: {
|
||||
whois: 'nuxt',
|
||||
dns: 'nuxt',
|
||||
domain: 'nuxt',
|
||||
}
|
||||
};
|
||||
},
|
||||
// 客户端执行的逻辑,接收服务端设置的值
|
||||
(serverValue) => {
|
||||
// 在客户端处理或使用服务端传来的值
|
||||
console.log('Received from server:', serverValue);
|
||||
|
||||
// 这里你可以根据需要将serverValue设置到Pinia store或Vue响应式状态中
|
||||
// 例如,更新Pinia store中的状态
|
||||
const configStore = useConfigStore();
|
||||
configStore.setCurrentServer(serverValue);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {useCurrentServer} from "~/composables/useCurrentServer";
|
||||
|
||||
definePageMeta({
|
||||
stylePage: true,
|
||||
})
|
||||
|
||||
@@ -41,6 +41,9 @@ export const useConfigStore = defineStore('useConfig', {
|
||||
this.configServer.domainArr = []
|
||||
}
|
||||
},
|
||||
setCurrentServer(configServer: any) {
|
||||
this.currentServer = configServer
|
||||
},
|
||||
setCurrentServerWhois(whois: any) {
|
||||
this.currentServer.whois = whois
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user