This commit is contained in:
yumoqing 2024-06-29 20:01:09 +08:00
parent af8ae4c961
commit e8d6d40375
3 changed files with 10 additions and 10 deletions

View File

@ -189,7 +189,7 @@ bricks.AudioRecorder = class extends bricks.HBox {
});
this.recClose();
}
upload = async function(){
async upload(){
var running = new bricks.Running({target:this});
if(!this.recordData){
bricks.debug("DUTn::请先录音,然后停止后再上传");

View File

@ -35,10 +35,10 @@ bricks.MdWidget = class extends bricks.JsWidget {
show_scroll(event){
bricks.debug('scrollY=', window.scrollY);
}
build = async function(){
async build(){
this._build(this.opts.md_url);
}
_build = async function(md_url){
async _build(md_url){
var md_content = await (bricks.tget(md_url));
this.md_content = md_content;
this._build1();
@ -100,7 +100,7 @@ bricks.MarkdownViewer = class extends bricks.VBox {
show_scroll(event){
bricks.debug('scrollY=', window.scrollY);
}
createBackButton = async function(){
async createBackButton(){
var desc = {
"widgettype":"HBox",
"options":{},
@ -126,7 +126,7 @@ bricks.MarkdownViewer = class extends bricks.VBox {
var url = event.params.url;
this.back_stack.push(url);
}
go_back = async function(event){
async go_back(event){
if (this.back_stack.length < 2){
return;
}
@ -137,10 +137,10 @@ bricks.MarkdownViewer = class extends bricks.VBox {
await this.mdtext._build(url);
}
build = async function(){
this._build(this.opts.md_url);
async build(){
await this._build(this.opts.md_url);
}
_build = async function(md_url){
assync _build(md_url){
var md_content = await (bricks.tget(md_url));
this.md_el.innerHTML = marked.parse(md_content);
// this.md_el.baseURI = md_url;

View File

@ -42,7 +42,7 @@ bricks.Toolbar = class extends bricks.Layout {
}));
}
}
createTools = async function(){
async createTools(){
var l = this.opts.tools.length;
for (var i=0;i<l; i++){
await this.createTool(this.opts.tools[i]);
@ -51,7 +51,7 @@ bricks.Toolbar = class extends bricks.Layout {
}
}
}
createTool = async function(desc){
async createTool(desc){
var options = {
"widgettype":"Button",
"options":{