npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lyx-ai-word

v1.0.7

Published

```js import LyxAiWord from 'lyx-ai-word' import 'lyx-ai-word/dist/lyxAiWord.css'

Downloads

14

Readme

lyx-ai-word 乐易学ai解析word组件库文档

安装

1. main.js 中引入 LyxAiWord

import LyxAiWord from 'lyx-ai-word'
import 'lyx-ai-word/dist/lyxAiWord.css'

createApp(App)
    .use(LyxAiWord)
    .mount("#app")

2. 在vue模板中使用

import { AiWordResult } from 'lyx-ai-word'

<ai-word-result
    :html="html"
    :logs="logs"
    :log-id="logId"
    @open="getQuestions"
    :questions="questions"
    @save="saveMyResource"
    @analyse="handleAnalyse"
/>

3.组件中提供的函数和接口

(1).LyxAiLogProps 日志列表

export interface LyxAiLogProps {
    logId: string
    logTime: string
}

(2).LyxAiQuestionProps ai解析试题列表

export interface LyxAiQuestionProps {
    id: string
    year: string // 试题年份
    index: number // 试题序号
    title: string // 题干
    answer: string // 答案
    parse: string // 试题解析(富文本)
    status: 0 | 1 | 2 // 题目状态(0:未操作 1:编辑过 2:已录进题库)
    subjectId: string // 科目id
    questionId: string // 科目id
    selectType: 1 | 2 // 判断题类型 1 √×类型判断题 2 TF类型判断题 | 选择题类型 1 ABC类型选择题 2 123类型选择题
    subjectName: string // 科目名称
    schoolPhase: string // 学段编码
    questionTypeId: string // 试题类型id
    schoolPhaseName: string // 学段名称
    questionTypeName: string // 试题类型名称
    hardLevel: 1 | 2 | 3 | 4 | 5 // 难易度(1简单 2一般 3中等 4困难 5特难)
    knowledge: { id: string; name: string }[] // 知识点
}

(3).assembleQuestion函数,用于解析接口返回的试题数据,返回LyxAiQuestionProps数组

{
    "QuestionDetail": {
        "Title": "<div>课题1金属材料拔尖检测<div>",
        "Answer": "",
        "QuestionTypeId": "F3E3DA08DC5D4308FC687FAB0E3EA653",
        "QuestionTypeName": "其他",
        "KnowLedges": [],
        "HardLevel": 0
    },
    "QuestionAnalysisDetailId": "C670DC089362679256F2286B9B246BF4",
    "QuestionState": 0,
    "Sort": 1
}

(4).AiWordResult 组件中的参数及方法

| 参数及事件名 | 含义 | |-----------|--------------------------------| | html | word解析后的字符串 | | logs | 解析日志列表(LyxAiLogProps格式) | | log-id | 当前展示的日志id | | questions | 解析后的试题列表(LyxAiQuestionProps格式) | | @open | 点击对应的日志文件 | | @save | 批量存入“我的资源” | | @save | 批量存入“我的资源” | | @analyse | 全局解析和局部解析 |