// scss样式 // import styleText from "data-text:./content.scss" import styleText from "data-text:antd/dist/antd.css" import type { PlasmoCSConfig, PlasmoGetInlineAnchor, PlasmoGetStyle } from "plasmo" export {} import { Button, Space,message,Rate } from 'antd'; // import 'antd/dist/antd.css'; export const getStyle: PlasmoGetStyle = () => { const style = document.createElement("style") style.textContent = styleText return style } export const config: PlasmoCSConfig = { matches: [""], //所有网页 // all_frames: true, //所有iframe world: "MAIN" //所有windows } // 定位的内连root export const getInlineAnchor: PlasmoGetInlineAnchor = async () => document.querySelector("#collect_left") // javascript console.log( "You may find that having is 1not so pleasing a thing as wanting. This is not logical, but it is often true." ) // window全局变量 // window.alert(window.location.href) // 定义UI元素 const CustomButton = () => { const [messageApi, contextHolder] = message.useMessage() return (
{contextHolder} {/* */}
) } export default CustomButton