mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
docs: update faq to include valid version of qmpc #52
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
Box,
|
||||
Code,
|
||||
Heading,
|
||||
Link,
|
||||
ListItem,
|
||||
OrderedList,
|
||||
Text,
|
||||
@@ -19,6 +18,7 @@ import hljsStyleGitHub from 'react-syntax-highlighter/dist/esm/styles/hljs/githu
|
||||
|
||||
import PowerShellAdbDumpCommandTemplate from './adb_dump.ps1?raw';
|
||||
import ShellAdbDumpCommandTemplate from './adb_dump.sh?raw';
|
||||
import { ExtLink } from '../ExtLink';
|
||||
|
||||
const applyTemplate = (tpl: string, values: Record<string, unknown>) => {
|
||||
return tpl.replace(/\{\{\s*(\w+)\s*\}\}/g, (_, key) => (Object.hasOwn(values, key) ? String(values[key]) : '<nil>'));
|
||||
@@ -96,9 +96,9 @@ export function AndroidADBPullInstruction({ dir, file }: AndroidADBPullInstructi
|
||||
</Text>
|
||||
<Text>
|
||||
💡 如果没有,可以
|
||||
<Link href="https://scoop.sh/#/apps?q=adb" isExternal>
|
||||
<ExtLink href="https://scoop.sh/#/apps?q=adb">
|
||||
使用 Scoop 安装 <ExternalLinkIcon />
|
||||
</Link>
|
||||
</ExtLink>
|
||||
。
|
||||
</Text>
|
||||
</ListItem>
|
||||
|
||||
12
src/components/ExtLink.tsx
Normal file
12
src/components/ExtLink.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { AnchorHTMLAttributes } from 'react';
|
||||
import { ExternalLinkIcon } from '@chakra-ui/icons';
|
||||
import { Link } from '@chakra-ui/react';
|
||||
|
||||
export function ExtLink({ children, ...props }: AnchorHTMLAttributes<HTMLAnchorElement>) {
|
||||
return (
|
||||
<Link isExternal {...props} rel="noreferrer noopener nofollow">
|
||||
{children}
|
||||
<ExternalLinkIcon />
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user