![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
文章平均质量分 69
MooreLxr
这个作者很懒,什么都没留下…
展开
-
web端文字转语音播放的几种方式
以下列举几种js文字转语音播放的三种方式:一、百度文字转语音开放API本方式一定要有外网,可以访问百度,不然无法远程调用百度接口。接口:http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=2&text=你要转换的文字lan=zh:语言是中文,如果改为lan=en,则语言是英文。ie=UTF-8:文字格式。spd=2:语速,可以是1-9的数字,数字越大,语速越快。text=**:这个就是你要转换的文字。const te原创 2021-12-02 15:50:06 · 8443 阅读 · 3 评论 -
SpeechSynthesisUtterance文字转语音播报
一、介绍SpeechSynthesisUtterance是HTML5中新增的API,用于将指定文字合成为对应的语音.也包含一些配置项,指定如何去阅读(语言,音量,音调)等二、基本属性var speech = new SpeechSynthesisUtterance()speech.lang 获取并设置话语的语言(en-US、zh-CN)speech.pitch 获取并设置话语的音调 (值越大越尖锐,range:0-2, default:1, float)speech.rate 获取并设置说话原创 2021-10-20 09:41:00 · 5320 阅读 · 5 评论 -
vue.js小笔记
1. 多层组件参数传递vue组件之间通信使用props和$emit的方式:多级组件中传参太麻烦vuex:较复杂使用v-bind="$attrs",将父组件中非props的绑定的属性传入子组件中。provide和inject接下来着重介绍③和④1.1 v-bind=“attrs"和v−on="attrs" 和 v-on="attrs"和v−on="listeners”举个例子top组件:<template> <div> <centers原创 2021-07-07 13:49:23 · 100 阅读 · 0 评论 -
vs code小工具
生成步骤:{ // Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope ...原创 2020-11-26 14:02:09 · 193 阅读 · 0 评论 -
vue+node.js跨域问题的解决
vue默认是运行在localhost:8080上,而node.js可能运行在其他端口,而前台去请求后台的api时就存在跨域问题。另外,我们经常会去访问其他网站的数据,比如http://google.com/...,此时也存在跨域问题。解决跨域问题的方法:利用vue-cli自带的解决跨域的问题1.在config/index.js中利用proxy代理的方法dev: { // Paths ...原创 2018-02-11 16:35:14 · 4330 阅读 · 0 评论