cthep-ui-vue3

Vue 3 试题组件库
4,110
Install
npm install cthep-ui-vue3
Latest Version:1.1.1
Vue:3
License:MIT
Last Updated:Aug 3, 2026
Links: npm
Maintainer: zsc1678593083

cthep-ui-vue3

Vue 3 试题组件库

安装

npm install cthep-ui-vue3

使用

import { createApp } from 'vue'
import CthepUI from 'cthep-ui-vue3'
import 'cthep-ui-vue3/dist/cthep-ui-vue3.css'
import 'element-plus/dist/index.css'

const app = createApp(App)
app.use(CthepUI)

讯飞语音评测配置

组件通过 xfyunCredentialsProvider 在开始录音时动态获取配置:

<CthepUI :xfyun-credentials-provider="getXfyunCredentials" />
import CryptoJS from 'crypto-js'

async function getXfyunCredentials() {
  const result = await platform_encryption()
  const decrypted = CryptoJS.AES.decrypt(
    result.data,
    CryptoJS.enc.Utf8.parse('前后端约定的临时解密 Key'),
    {
      mode: CryptoJS.mode.ECB,
      padding: CryptoJS.pad.Pkcs7
    }
  )

  return JSON.parse(decrypted.toString(CryptoJS.enc.Utf8))
}

返回值必须包含 APPID、API_SECRET、API_KEY。这是兼容性的临时方案,浏览器仍可读取解密后的凭据,后续应改为后端返回短时签名 URL。

依赖

  • Vue 3
  • Element Plus
  • vue-uuid

Related Packages

seeroad-ui

seeroad project ui library

3,733
ui
smart-ui

High Quality Mobile UI Componets by Vue.js 2.

1,883 11
ui
hea-ui

hea-ui is a h5 ui component for vue

1,520 14
ui
canna-ui-vue

shims-vue.d.ts declare module 'canna-ui-vue'

567
ui

Version History

Version Released Vue License
1.1.1 ^3.0.0 MIT
1.1.0 ^3.0.0 MIT
1.0.30 ^3.0.0 MIT
1.0.29 ^3.0.0 MIT
1.0.28 ^3.0.0 MIT