核心内容摘要
Qwen3与AIGC工作流结合:自动为生成式视频添加字幕
函数class构造自定义类格式class 自定义函数名{}constructor:初始化设置函数格式constructor(参数值,参数值...){}
自定义类示例class zidinyihanshu{//初始化设置,只要被激活先运行初始化内容保存结果。
constructor(Rngs
{//初始化设置函数constructorthis.RngsRngs1,this.NumRngs
Cells.Count;//表达式返回属性值this.arrRngs
Value().flat();//表达式返回属性值this.Maxthis.arr.reduce((x,y)(xy)?x:y);//表达式返回属性值this.Minfunction(){return this.arr.reduce((x,y)(xy)?y:x)}//可以有函数}//需要时在调用Sum1(){return this.arr.reduce((x,y)xy)};//有返回值(函数)Rngcolor(color){this.Rngs.Interior.Colorlndexcolor}; //无返回值(函数)}function test(){var Diaoyonnew zidinyihanshu(Range(a1:c
);Console.log(Diaoyon.Max);Console.log(Diaoyon.Sum1());Diaoyon.Rngcolor(
;}class zidinyihanshu{ //初始化设置,只要被激活先运行初始化内容保存结果。
constructor(Rngs