code: function timeout() {
                      if (attrs.duration) {
                          timeout.timer = setTimeout(function() {
                              controller.close(true);
                          }, Number(attrs.duration));
                      }
                  }
docs: 定时关闭