From 635ada4e9db8c14fa2eb556d2b0550e383901c52 Mon Sep 17 00:00:00 2001 From: fzk <458813868@qq.com> Date: Thu, 1 Aug 2024 16:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5antd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + options.tsx | 121 +++++++++++++++++++++++++++++++-------------------- package.json | 7 ++- popup.tsx | 65 ++++++++++++++++----------- theme.tsx | 13 ++++++ 5 files changed, 132 insertions(+), 75 deletions(-) create mode 100644 theme.tsx diff --git a/.gitignore b/.gitignore index 65b7c28..169f94c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ dist/ .idea .vscode pnpm-lock.yaml +/example.env diff --git a/options.tsx b/options.tsx index b503084..f5569cd 100644 --- a/options.tsx +++ b/options.tsx @@ -12,10 +12,12 @@ import { sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable" -import { useStorage } from "@plasmohq/storage/dist/hook" import React, { useState } from "react" +import { useStorage } from "@plasmohq/storage/dist/hook" + import SortableItem from "~component/sortableItem" +import { ThemeProvider } from "~theme" import "./index.css" @@ -25,49 +27,49 @@ export default function IndexOptions() { id: "1", value: "csdn", label: "csdn", - isShow: true, + isShow: true }, { id: "2", value: "zhihu", label: "知乎", - isShow: true, + isShow: true }, { id: "3", value: "jianshu", label: "简书", - isShow: true, + isShow: true }, { id: "4", value: "jb51", label: "脚本之家", - isShow: true, + isShow: true }, { id: "5", value: "cnblogs", label: "博客园", - isShow: true, + isShow: true }, { id: "6", value: "51cto", label: "51CTO", - isShow: true, + isShow: true }, { id: "7", value: "php", label: "php中文网", - isShow: true, + isShow: true }, { id: "8", value: "custom", label: "自定义", - isShow: true, + isShow: true } ] const [items, setItems] = useStorage("app-items", itemsInit) @@ -100,52 +102,77 @@ export default function IndexOptions() { } function handleReset() { - if (confirm('确认重置配置?')) { + if (confirm("确认重置配置?")) { setItems([...itemsInit]) } } + console.log("version") + return ( -
更方便操作网页代码
-更方便操作网页代码
更方便操作网页代码
-更方便操作网页代码