How to use the @alifd/next.Dialog.alert function in @alifd/next

To help you get started, we’ve selected a few @alifd/next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / nacos / console / src / main / resources / static / src / components / ValidateDialog / ValidateDialog.js View on Github external
success: res => {
				this.setState({
					submitDisabled: false
				});
				this.submitDisabled = false;
				if (res && res.code === 200) {
					// window.location.reload && window.location.reload();
					this.onClose();
					this.initBtn();
					typeof preSucess === "function" && preSucess(res);
				} else {
					Dialog.alert({
						content: res.code === 400 ? window.aliwareIntl.get("nacos.component.validateDialog.verification_code_error") : res.message,
						language: window.aliwareIntl.currentLanguageCode
					});
				}
			}
		}));
github alibaba / nacos / console / src / main / resources / static / src / components / ValidateDialog / ValidateDialog.js View on Github external
onValidateVerifyCode() {
		if (!this.state.verifyCode) {
			Dialog.alert({
				content: window.aliwareIntl.get("nacos.component.validateDialog.fill_the_code"),
				language: window.aliwareIntl.currentLanguageCode
			});
			return;
		}
		let config = this.state.config;
		let data = Object.assign({}, config.data, {
			codeType: this.state.codeType,
			verifyCode: this.state.verifyCode,
			requestId: this.state.requestId
		});
		let preSucess = config.success;
		this.setState({
			submitDisabled: true
		});
		this.submitDisabled = true;
github alibaba / nacos / console / src / main / resources / static / console-fe / src / components / NameSpaceList / NameSpaceList.js View on Github external
success: res => {
          if (res.code === 200) {
            this.handleNameSpaces(res.data);
          } else {
            Dialog.alert({
              language: aliwareIntl.currentLanguageCode || 'zh-cn',
              title: aliwareIntl.get('com.alibaba.nacos.component.NameSpaceList.Prompt'),
              content: res.message,
            });
          }
        },
        error: () => {
github alibaba / nacos / console / src / main / resources / static / src / pages / EdasConfigdetail.js View on Github external
success: function (result) {
                if (result.code === 200) {
                    let data = result.data;
                    self.valueMap['normal'] = data;
                    self.field.setValue('dataId', data.dataId);
                    self.field.setValue('content', data.content);
                    self.field.setValue('appName', self.inApp ? self.edasAppName : data.appName);
                    self.field.setValue('envs', self.serverId);
                    self.field.setValue('group', data.group);
                    self.field.setValue('config_tags', data.config_tags);
                    self.field.setValue('desc', data.desc);
                    self.field.setValue('md5', data.md5);
                } else {
                    Dialog.alert({
                        title: aliwareIntl.get('com.alibaba.cspupcloud.page.configdetail.error'),
                        content: result.message,
                        language: aliwareIntl.currentLanguageCode
                    });
                }
            },
            complete: function () {
github alibaba / nacos / console / src / main / resources / static / console-fe / src / pages / ConfigurationManagement / ConfigurationManagement / ConfigurationManagement.js View on Github external
cloneSelectedDataConfirm() {
    const { locale = {} } = this.props;
    const self = this;
    self.field.setValue('sameConfigPolicy', 'ABORT');
    self.field.setValue('cloneTargetSpace', undefined);
    if (configsTableSelected.size === 0) {
      Dialog.alert({
        title: locale.cloneSelectedAlertTitle,
        content: locale.cloneSelectedAlertContent,
      });
      return;
    }
    request({
      url: 'v1/console/namespaces?namespaceId=',
      beforeSend() {
        self.openLoading();
      },
      success(data) {
        if (!data || data.code !== 200 || !data.data) {
          Dialog.alert({
            title: locale.getNamespaceFailed,
            content: locale.getNamespaceFailed,
          });