mirror of
https://github.com/JOYCEQL/magic-resume.git
synced 2026-07-03 14:07:11 +02:00
feat: add zustand
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
"react-dom": "^18",
|
||||
"react-resizable-panels": "^2.0.20",
|
||||
"tailwind-merge": "^2.3.0",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zustand": "^4.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
|
||||
@@ -10,17 +10,19 @@ import {
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { CalendarIcon } from "lucide-react";
|
||||
import { format } from "date-fns";
|
||||
import useBaseInfoStore from "@/store/useBaseInfoStore";
|
||||
|
||||
const BasicInfo = () => {
|
||||
const [date, setDate] = useState<Date>();
|
||||
const [isDateOpen, setIsDateOpen] = useState<boolean>(false);
|
||||
const { name } = useBaseInfoStore();
|
||||
return (
|
||||
<div className="flex items-center flex-wrap gap-[16px]">
|
||||
<div className="flex items-center flex-[48%] ">
|
||||
<Label htmlFor="name" className="w-[80px]">
|
||||
姓名
|
||||
</Label>
|
||||
<Input id="name" className="w-[200px] flex-1" />
|
||||
<Input id="name" value={name} className="w-[200px] flex-1" />
|
||||
</div>
|
||||
<div className="flex items-center flex-[48%]">
|
||||
<Label htmlFor="phone" className="w-[80px]">
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
GraduationCap,
|
||||
BookOpen
|
||||
} from "lucide-react";
|
||||
import useBaseInfoStore from "@/store/useBaseInfoStore";
|
||||
const Editor = () => {
|
||||
const [activeTab, setActiveTab] = useState("basic");
|
||||
const basicRef = useRef(null);
|
||||
@@ -22,7 +23,6 @@ const Editor = () => {
|
||||
const educationRef = useRef(null);
|
||||
const certRef = useRef(null);
|
||||
const empolymentRef = useRef(null);
|
||||
|
||||
const tabList = [
|
||||
{
|
||||
value: "basic",
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
const Preview = () => {
|
||||
return (
|
||||
<div className="flex-1 p-[12px]">
|
||||
{/* 简历编辑表单 */}
|
||||
预览区域
|
||||
<div className="flex-1 p-[12px] h-[100vh] ">
|
||||
<div className="p-[12px] h-[100%] rounded-[6px] bg-[#fff]">预览区域</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
const useBaseInfoStore = create((set) => ({
|
||||
name: "001"
|
||||
}));
|
||||
|
||||
export default useBaseInfoStore;
|
||||
Reference in New Issue
Block a user