修改样式
This commit is contained in:
parent
6c3b9fb936
commit
b9d571a55d
|
@ -51,7 +51,7 @@ const ListItemWithCheckbox = ({
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
className="text-2xl"
|
fontSize="22"
|
||||||
value={formData.superSingle[superSingle.key].price}
|
value={formData.superSingle[superSingle.key].price}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
const newFormData = { ...formData };
|
const newFormData = { ...formData };
|
||||||
|
@ -61,7 +61,7 @@ const ListItemWithCheckbox = ({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="text-[#ffffffae] mr-2">|</span>
|
<span className="text-[#ffffff26] mr-2">|</span>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
block
|
block
|
||||||
checked={formData.superSingle[superSingle.key].wechatFree}
|
checked={formData.superSingle[superSingle.key].wechatFree}
|
||||||
|
@ -71,7 +71,7 @@ const ListItemWithCheckbox = ({
|
||||||
setFormData(newFormData);
|
setFormData(newFormData);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<p className="text-sm">赠送微信</p>
|
<p className="text-sm whitespace-nowrap">赠送微信</p>
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -238,14 +238,16 @@ export default function CreateProfile() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-base text-center leading-9">空间付费设置</p>
|
<p className="text-base text-center leading-9 whitespace-nowrap">
|
||||||
|
空间付费设置
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/* 内容 */}
|
{/* 内容 */}
|
||||||
<div className="pt-16 p-4">
|
<div className="pt-16 p-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
<span>空间介绍</span>
|
<span className="whitespace-nowrap">空间介绍</span>
|
||||||
<span className="text-[#f00]">*</span>
|
<span className="text-[#f00]">*</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#ffffffae] text-xs"></p>
|
<p className="text-[#ffffffae] text-xs"></p>
|
||||||
|
@ -262,7 +264,7 @@ export default function CreateProfile() {
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm">
|
<p className="text-sm whitespace-nowrap">
|
||||||
<span>解锁空间价格</span>
|
<span>解锁空间价格</span>
|
||||||
<span className="text-[#f00]">*</span>
|
<span className="text-[#f00]">*</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -273,20 +275,17 @@ export default function CreateProfile() {
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!spacePriceAble ? (
|
|
||||||
<span className="text-2xl">{formData.spacePrice}</span>
|
|
||||||
) : (
|
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
value={formData.spacePrice}
|
value={formData.spacePrice}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, spacePrice: value }))
|
setFormData((old) => ({ ...old, spacePrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffffae] text-xs whitespace-nowrap"
|
||||||
onClick={() => setSpacePriceAble(true)}
|
onClick={() => setSpacePriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
@ -295,7 +294,7 @@ export default function CreateProfile() {
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm">
|
<p className="text-sm whitespace-nowrap">
|
||||||
<span>铁粉价格</span>
|
<span>铁粉价格</span>
|
||||||
<span className="text-[#f00]">*</span>
|
<span className="text-[#f00]">*</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -306,20 +305,17 @@ export default function CreateProfile() {
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!tiefenPriceAble ? (
|
|
||||||
<span className="text-2xl">{formData.ironFanPrice}</span>
|
|
||||||
) : (
|
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
value={formData.ironFanPrice}
|
value={formData.ironFanPrice}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, ironFanPrice: value }))
|
setFormData((old) => ({ ...old, ironFanPrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffffae] text-xs whitespace-nowrap"
|
||||||
onClick={() => setTiefenPriceAble(true)}
|
onClick={() => setTiefenPriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
|
|
@ -622,20 +622,17 @@ export default function EditHome() {
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!spacePriceAble ? (
|
|
||||||
<span className="text-2xl">{formData.wechatPrice}</span>
|
|
||||||
) : (
|
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
value={formData.wechatPrice}
|
value={formData.wechatPrice}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, wechatPrice: value }))
|
setFormData((old) => ({ ...old, wechatPrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffffae] text-xs whitespace-nowrap"
|
||||||
onClick={() => setSpacePriceAble(true)}
|
onClick={() => setSpacePriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
|
|
@ -12,7 +12,6 @@ const My = () => {
|
||||||
const [userInfo, setUserInfo] = useState({});
|
const [userInfo, setUserInfo] = useState({});
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [streamerNavigates, setStreamerNavigates] = useState([]);
|
const [streamerNavigates, setStreamerNavigates] = useState([]);
|
||||||
const [isInJoinProgress, setIsInJoinProgress] = useState(false);
|
|
||||||
const [userNavigates, setUserNavigates] = useState([]);
|
const [userNavigates, setUserNavigates] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const userInfo = get("account");
|
const userInfo = get("account");
|
||||||
|
@ -391,7 +390,7 @@ const My = () => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{/* 普通用户 */}
|
{/* 普通用户 */}
|
||||||
{!!streamerNavigates.length && (
|
{!!userNavigates.length && (
|
||||||
<div className="rounded-xl p-2 border-2 border-[#2c2b2f]">
|
<div className="rounded-xl p-2 border-2 border-[#2c2b2f]">
|
||||||
<ul>
|
<ul>
|
||||||
{userNavigates.map((item) => (
|
{userNavigates.map((item) => (
|
||||||
|
|
|
@ -897,20 +897,17 @@ export default function CompleteStreamerInformation() {
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!spacePriceAble ? (
|
|
||||||
<span className="text-2xl">{formData.wechatPrice}</span>
|
|
||||||
) : (
|
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
value={formData.wechatPrice}
|
value={formData.wechatPrice}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, wechatPrice: value }))
|
setFormData((old) => ({ ...old, wechatPrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffffae] text-xs whitespace-nowrap"
|
||||||
onClick={() => setSpacePriceAble(true)}
|
onClick={() => setSpacePriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
|
|
@ -672,7 +672,12 @@ export default function PersonSpace() {
|
||||||
<p className="mt-2">发视频</p>
|
<p className="mt-2">发视频</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="pt-4 text-center border-t border-[#ffffff40]">取消</p>
|
<p
|
||||||
|
className="pt-4 text-center border-t border-[#ffffff40]"
|
||||||
|
onClick={() => setCreatePostMask(false)}
|
||||||
|
>
|
||||||
|
取消
|
||||||
|
</p>
|
||||||
</Popup>
|
</Popup>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -288,7 +288,7 @@ export default function CreateImagePost() {
|
||||||
setPriceEditData((old) => ({ ...old, price: value }))
|
setPriceEditData((old) => ({ ...old, price: value }))
|
||||||
}
|
}
|
||||||
value={priceEditData.price}
|
value={priceEditData.price}
|
||||||
className="flex-1 bg-[#FFFFFF1A] text-white rounded-2xl px-4 h-8 mx-2"
|
className="flex-1 bg-transparent text-white rounded-2xl h-8 mx-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
|
@ -319,7 +319,7 @@ export default function CreateImagePost() {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
value={priceEditData.imageVisibleRange}
|
value={priceEditData.imageVisibleRange}
|
||||||
className="bg-[#FFFFFF1A] text-white rounded-2xl px-4 mx-2 h-8"
|
// className="bg-transparent text-white rounded-2xl px-4 mx-2 h-8"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-white text-base font-medium">张</span>
|
<span className="text-white text-base font-medium">张</span>
|
||||||
|
@ -348,6 +348,9 @@ export default function CreateImagePost() {
|
||||||
isCreatingPaidText: value,
|
isCreatingPaidText: value,
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
|
style={{
|
||||||
|
"--checked-color": "#FF669E",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center my-1">
|
<div className="flex items-center my-1">
|
||||||
|
@ -362,6 +365,9 @@ export default function CreateImagePost() {
|
||||||
isFreeForIronfan: value,
|
isFreeForIronfan: value,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
style={{
|
||||||
|
"--checked-color": "#FF669E",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -277,7 +277,7 @@ export default function CreateVideoPost() {
|
||||||
setPriceEditData((old) => ({ ...old, price: value }))
|
setPriceEditData((old) => ({ ...old, price: value }))
|
||||||
}
|
}
|
||||||
value={priceEditData.price}
|
value={priceEditData.price}
|
||||||
className="flex-1 bg-[#FFFFFF1A] text-white rounded-2xl px-4 h-8 mx-2"
|
className="flex-1 bg-transparent text-white rounded-2xl h-8 mx-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
|
@ -303,6 +303,9 @@ export default function CreateVideoPost() {
|
||||||
isCreatingPaidText: value,
|
isCreatingPaidText: value,
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
|
style={{
|
||||||
|
"--checked-color": "#FF669E",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center my-1">
|
<div className="flex items-center my-1">
|
||||||
|
@ -317,6 +320,9 @@ export default function CreateVideoPost() {
|
||||||
blurCover: value,
|
blurCover: value,
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
|
style={{
|
||||||
|
"--checked-color": "#FF669E",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center my-1">
|
<div className="flex items-center my-1">
|
||||||
|
@ -331,6 +337,9 @@ export default function CreateVideoPost() {
|
||||||
isFreeForIronfan: value,
|
isFreeForIronfan: value,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
style={{
|
||||||
|
"--checked-color": "#FF669E",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -61,7 +61,7 @@ const ListItemWithCheckbox = ({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="text-[#ffffffae] mr-2">|</span>
|
<span className="text-[#ffffff26] mr-2">|</span>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
block
|
block
|
||||||
checked={formData.superSingle[superSingle.key].wechatFree}
|
checked={formData.superSingle[superSingle.key].wechatFree}
|
||||||
|
@ -71,7 +71,7 @@ const ListItemWithCheckbox = ({
|
||||||
setFormData(newFormData);
|
setFormData(newFormData);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<p className="text-sm">赠送微信</p>
|
<p className="text-sm whitespace-nowrap">赠送微信</p>
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -263,18 +263,18 @@ export default function spacePaymentSetting() {
|
||||||
<div className="pt-16 p-4">
|
<div className="pt-16 p-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm">
|
<p className="text-sm whitespace-nowrap">
|
||||||
<span>解锁空间价格</span>
|
<span>解锁空间价格</span>
|
||||||
<span className="text-[#f00]">*</span>
|
<span className="text-[#f00]">*</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#ffffffae] text-xs">
|
<p className="text-[#ffffffb3] text-xs">
|
||||||
(成为空间成员,可查看免费帖)
|
(成为空间成员,可查看免费帖)
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!spacePriceAble ? (
|
{/* {!spacePriceAble ? (
|
||||||
<span className="text-2xl">{formData.spacePrice}</span>
|
<span className="text-2xl">{formData.spacePrice}</span>
|
||||||
) : (
|
) : (
|
||||||
<OwnInput
|
<OwnInput
|
||||||
|
@ -284,10 +284,18 @@ export default function spacePaymentSetting() {
|
||||||
setFormData((old) => ({ ...old, spacePrice: value }))
|
setFormData((old) => ({ ...old, spacePrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)} */}
|
||||||
|
<OwnInput
|
||||||
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
|
value={formData.spacePrice}
|
||||||
|
onChange={(value) =>
|
||||||
|
setFormData((old) => ({ ...old, spacePrice: value }))
|
||||||
|
}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffff40] text-xs whitespace-nowrap"
|
||||||
onClick={() => setSpacePriceAble(true)}
|
onClick={() => setSpacePriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
@ -296,31 +304,33 @@ export default function spacePaymentSetting() {
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm">
|
<p className="text-sm whitespace-nowrap">
|
||||||
<span>铁粉价格</span>
|
<span>铁粉价格</span>
|
||||||
<span className="text-[#f00]">*</span>
|
<span className="text-[#f00]">*</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#ffffffae] text-xs">
|
<p className="text-[#ffffffb3] text-xs">
|
||||||
(累计空间内消费达标可成为,铁粉可查看相关帖)
|
(累计空间内消费达标可成为,铁粉可查看相关帖)
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
<div className="mt-2 px-4 py-3 h-12 rounded-[0.8rem] bg-[#FFFFFF1a] flex justify-between items-center">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
<span className="mr-1 text-[#ffffffae] text-sm">¥</span>
|
||||||
{!tiefenPriceAble ? (
|
{/* {!tiefenPriceAble ? (
|
||||||
<span className="text-2xl">{formData.ironFanPrice}</span>
|
<span className="text-2xl">{formData.ironFanPrice}</span>
|
||||||
) : (
|
) : (
|
||||||
|
|
||||||
|
)} */}
|
||||||
<OwnInput
|
<OwnInput
|
||||||
type="number"
|
type="number"
|
||||||
|
fontSize="22"
|
||||||
value={formData.ironFanPrice}
|
value={formData.ironFanPrice}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
setFormData((old) => ({ ...old, ironFanPrice: value }))
|
setFormData((old) => ({ ...old, ironFanPrice: value }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className="text-[#ffffffae] text-xs"
|
className="text-[#ffffff40] text-xs whitespace-nowrap"
|
||||||
onClick={() => setTiefenPriceAble(true)}
|
onClick={() => setTiefenPriceAble(true)}
|
||||||
>
|
>
|
||||||
点击编辑
|
点击编辑
|
||||||
|
|
|
@ -13,6 +13,7 @@ export default function OwnInput({
|
||||||
clearable,
|
clearable,
|
||||||
disabled,
|
disabled,
|
||||||
className,
|
className,
|
||||||
|
fontSize,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className={`flex flex-1 relative ${className}`}>
|
<div className={`flex flex-1 relative ${className}`}>
|
||||||
|
@ -24,7 +25,8 @@ export default function OwnInput({
|
||||||
maxLength={11}
|
maxLength={11}
|
||||||
onChange={(e) => onChange(e.target?.value)}
|
onChange={(e) => onChange(e.target?.value)}
|
||||||
value={value}
|
value={value}
|
||||||
className="text-[#ffffff] w-full text-[16px] placeholder:text-[#FFFFFF80]"
|
className={`w-full placeholder:text-[#FFFFFF80]`}
|
||||||
|
style={{ fontSize: `${fontSize || 16}px` }}
|
||||||
/>
|
/>
|
||||||
{clearable && value != "" && (
|
{clearable && value != "" && (
|
||||||
<div className="w-4 h-4 absolute right-2 top-[2px] flex justify-center items-center bg-[#ffffff33] p-1 rounded-full">
|
<div className="w-4 h-4 absolute right-2 top-[2px] flex justify-center items-center bg-[#ffffff33] p-1 rounded-full">
|
||||||
|
|
|
@ -20,6 +20,7 @@ export default function PostItem({
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [isOpenText, setIsOpenText] = useState(false);
|
const [isOpenText, setIsOpenText] = useState(false);
|
||||||
|
const [popoverVisible, setPopoverVisible] = useState(false);
|
||||||
const [isFollow, setIsFollow] = useState(data.is_followed);
|
const [isFollow, setIsFollow] = useState(data.is_followed);
|
||||||
const [isThumbsUp, setIsThumbsUp] = useState(
|
const [isThumbsUp, setIsThumbsUp] = useState(
|
||||||
data?.is_thumbed_up || data?.is_zone_moment_thumbed_up
|
data?.is_thumbed_up || data?.is_zone_moment_thumbed_up
|
||||||
|
@ -96,6 +97,37 @@ export default function PostItem({
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
setPopoverVisible(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//置顶
|
||||||
|
const handleTop = async () => {
|
||||||
|
try {
|
||||||
|
const body = {
|
||||||
|
zone_moment_ids: [data.id],
|
||||||
|
op_type: data.is_headed ? 0 : 1,
|
||||||
|
};
|
||||||
|
const _data = await requireAPI("POST", "/api/zone_moment/head", {
|
||||||
|
body,
|
||||||
|
});
|
||||||
|
if (_data.ret === -1) {
|
||||||
|
Toast.show({
|
||||||
|
icon: "fail",
|
||||||
|
content: _data.msg,
|
||||||
|
position: "top",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Toast.show({
|
||||||
|
icon: "success",
|
||||||
|
content: "操作成功,请刷新页面查看",
|
||||||
|
position: "top",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
setPopoverVisible(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
@ -332,9 +364,16 @@ export default function PostItem({
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Popover
|
<Popover
|
||||||
|
visible={popoverVisible}
|
||||||
|
stopPropagation={["click", "touchstart"]}
|
||||||
|
destroyOnHide={true}
|
||||||
style={{ "--background": "#1E1C29" }}
|
style={{ "--background": "#1E1C29" }}
|
||||||
content={
|
content={
|
||||||
<ul>
|
<ul>
|
||||||
|
<li className="py-1 px-4" onClick={handleTop}>
|
||||||
|
{data.is_headed ? "取消置顶" : "置顶"}
|
||||||
|
</li>
|
||||||
|
<hr className="border-[#ffffff2b] my-1" />
|
||||||
<li
|
<li
|
||||||
className="py-1 px-4"
|
className="py-1 px-4"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -365,7 +404,9 @@ export default function PostItem({
|
||||||
trigger="click"
|
trigger="click"
|
||||||
placement="left"
|
placement="left"
|
||||||
>
|
>
|
||||||
<span className="mr-2">···</span>
|
<span className="mr-2" onClick={() => setPopoverVisible(true)}>
|
||||||
|
···
|
||||||
|
</span>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -110,6 +110,8 @@ export default function UploadImgs({
|
||||||
const url = URL.createObjectURL(file);
|
const url = URL.createObjectURL(file);
|
||||||
videoD.src = url;
|
videoD.src = url;
|
||||||
videoD.addEventListener("loadeddata", function () {
|
videoD.addEventListener("loadeddata", function () {
|
||||||
|
videoD.currentTime = 0;
|
||||||
|
videoD.pause(); // 可选:确保视频在重置后不会自动播放
|
||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement("canvas");
|
||||||
canvas.width = videoD.videoWidth;
|
canvas.width = videoD.videoWidth;
|
||||||
canvas.height = videoD.videoHeight;
|
canvas.height = videoD.videoHeight;
|
||||||
|
|
Loading…
Reference in New Issue