/** * 自动根据当前面板所处的 App 环境获取对应的静态资源地址。 * * @public * @since @ray-js/ray 0.5.10 * @returns 静态资源地址字符串,如 `https://images.tuyacn.com` * @example 基础用法 * ```tsx * import React, { useState } from 'react'; * import { View, Button, Text, getAssetHostname } from '@ray-js/ray'; * * export default function Demo() { * const [hostname, setHostname] = useState(''); * * const handleGetHostname = async () => { * try { * const result = await getAssetHostname(); * setHostname(result); * console.log('静态资源地址:', result); * } catch (err) { * console.error('获取失败:', err); * } * }; * * return ( * * * {hostname && {hostname}} * * ); * } * ``` */ declare const getAssetHostname: () => Promise; export { getAssetHostname };