1.0.0 • Published 2 years ago

qh-ai-chat v1.0.0

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

潜海AI聊天框组件

本项目依赖promise,如果需要在不支持promise的浏览器中使用,请安装polyfill 本项目仅在浏览器端可以运行

使用步骤

  1. npm install qh-ai-chat
  2. import QhAiChat from 'qh-ai-chat'
    customElements.define("qh-ai-chat", QhAiChat);
    vite框架可能不会识别自定义元素,请在vite.config.js中添加如下代码:
    export default defineConfig({
      plugins: [vue({
        template: {
          compilerOptions: {
            isCustomElement: tag => tag.startsWith('qh-')
          }
        }
      })],
    })
    如果是通过script标签引入需要引入axios库
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="./qh-ai-chat.min.js"></script>
1.0.0

2 years ago