0.3.4 • Published 2 years ago

tool-search v0.3.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

预览

1642577220971

安装

在Vue中使用

npm i tool-search
#引入
import ToolSearch from 'tool-search/lib/tool-search.common'
import 'tool-search/lib/tool-search.css'
Vue.use(ToolSearch)
#使用
<tool-search :groupData=group_data @submitEvent="submitEvent" :autoSubmit="true" :pageNew="true"/>

事件

名称描述item
submitEvent获取用户搜索内容{"name": "百度","color": "#2100E0","url": "https://www.baidu.com","keyword": "wd","description": "百度一下","content": "用户搜索" }

配置

名称描述默认
groupData自定义搜索引擎[{"group":"常用","list":{"name":"百度","color":"#2100E0","url":"https://www.baidu.com","keyword":"wd","description":"百度一下"}}]
autoSubmit是否自动提交true
pageNew搜索时,是否打开新页面true

在html中使用

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tool-search/dist/tool-search.min.js"></script>
<tool-search groupData=''></tool-search>

自定义搜索列表参考:

const groupData = [
    {
      "group": "常用",      //分组名称
      "list": [
        {
          "name": "百度",
          "color": "#2100E0",    //字体颜色
          "url": "https://www.baidu.com",
          "keyword": "wd",
          "description": "百度一下"
        }
      ]
    }
  ]

开发

git clone https://github.com/ToolSites/tool-search.git

npm install

npm run serve

项目说明

有问题直接 issue ,可以一起讨论。最后,如果对你有帮助请 star。

github地址: https://github.com/ToolSites/tool-search

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago