@ctoweb/plugin-link-vue
TypeScript icon, indicating that this package has built-in type declarations

3.5.3 • Public • Published

@ctoweb/plugin-link-vue

链接插件

安装

$ yarn add @ctoweb/plugin-link-vue

添加到引擎

import Engine, { EngineInterface } from '@ctoweb/engine';
import Link from '@ctoweb/plugin-link';

new Engine(...,{ plugins:[Link] })

可选项

快捷键

默认快捷键为 mod+k,默认参数为 ["_blank"]

//快捷键,key 组合键,args,执行参数,[target?:string,href?:string,text?:string] 打开模式:可选,默认链接:可选,默认文本:可选
hotkey?:string | {key:string,args:Array<string>};

//使用配置
new Engine(...,{
    config:{
        "link":{
            //修改快捷键
            hotkey:{
                key:"mod+k",
                args:["_balnk_","https://www.aomao.com","ITELLYOU"]
            }
        }
    }
 })

命令

可传入三个参数[target?:string,href?:string,text?:string] 打开模式:可选,默认链接:可选,默认文本:可选

//target:'_blank', '_parent', '_top', '_self',href:链接,text:文字
engine.command.execute('link', '_blank', 'https://www.aomao.com', 'ITELLYOU');
//使用 command 执行查询当前状态,返回 boolean | undefined
engine.command.queryState('link');

Readme

Keywords

none

Package Sidebar

Install

npm i @ctoweb/plugin-link-vue

Weekly Downloads

49

Version

3.5.3

License

MIT

Unpacked Size

104 kB

Total Files

20

Last publish

Collaborators

  • ctoweb