vue create hello-world
// 1. 导入全局 TCICconst TCIC = window.TCIC;// 课堂加载成功后执行TCIC.SDK.instance.promiseState(TCIC.TMainState.Joined_Class, true).then(() => {// 这里实现业务逻辑const header = TCIC.SDK.instance.getComponent('header-component').getVueInstance().$refs.header;...});
./node_modules/.bin/vue-cli-service build --target lib --name myLib 'src/main.js'

const header = TCIC.SDK.instance.getComponent('header-component').getVueInstance().$refs.header;header.addMenu({name: 'classcode', //唯一IDclass: 'zhiqi-classcode-button', //自定义classlabel: '班级码',//组件名(hover时显示)icon: 'https://iph.href.lu/24x24?fg=666666&bg=cccccc',//图标资源URL也可以是base64enable: true, //是否可用active: false, //是否为激活态role: {teacher: {classType: ['interactive', 'live'], //角色及对应课型},},action: (event) => {//组件逻辑YOUR_WIDGET.toggleVisible(event); //点击回调},}, 0);
&debugjs=http://localhost:443/demo/dist/myLib.umd.min.js&debugcss=http://localhost:443/demo/dist/myLib.css文档反馈