18 lines
3.8 KiB
JavaScript
18 lines
3.8 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var tslib_1 = require("tslib");
|
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
var tdesign_react_1 = require("tdesign-react");
|
|
var tdesign_icons_react_1 = require("tdesign-icons-react");
|
|
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
|
var FormItem = tdesign_react_1.Form.FormItem;
|
|
function render() {
|
|
var _this = this;
|
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
var PickArea = ((0, jsx_runtime_1.jsx)(tdesign_react_1.Button, { variant: "text", icon: (0, jsx_runtime_1.jsx)(tdesign_icons_react_1.ChevronRightIcon, {}), onClick: function () { return _this.callAreaPicker(); } }));
|
|
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsxs)(tdesign_react_1.Form, tslib_1.__assign({ colon: false, labelAlign: "top", labelWidth: "100px", layout: "vertical", preventSubmitDefault: true, resetType: "empty", showErrorMessage: true, submitWithWarningMessage: false }, { children: [(0, jsx_runtime_1.jsx)(FormItem, tslib_1.__assign({ label: this.t('address:attr.name'), name: "name" }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.Input, { placeholder: "\u59D3\u540D", onChange: function (data) { return _this.setUpdateData('name', data); }, value: this.state.name, "data-attr": "name", tips: ((_a = this.state.oakFocused) === null || _a === void 0 ? void 0 : _a.attr) === 'name' ? this.state.oakFocused.message : undefined, status: ((_b = this.state.oakFocused) === null || _b === void 0 ? void 0 : _b.attr) === 'name' ? 'error' : undefined }) })), (0, jsx_runtime_1.jsx)(FormItem, tslib_1.__assign({ label: this.t('address:attr.phone'), name: "phone" }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.Input, { placeholder: "\u624B\u673A\u53F7", onChange: function (data) { return _this.setUpdateData('phone', data); }, value: this.state.phone, "data-attr": "phone", tips: ((_c = this.state.oakFocused) === null || _c === void 0 ? void 0 : _c.attr) === 'phone' ? this.state.oakFocused.message : undefined, status: ((_d = this.state.oakFocused) === null || _d === void 0 ? void 0 : _d.attr) === 'phone' ? 'error' : undefined }) })), (0, jsx_runtime_1.jsx)(FormItem, tslib_1.__assign({ label: this.t('address:attr.area'), name: "areaText" }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.InputAdornment, tslib_1.__assign({ append: PickArea, style: { width: '100%' } }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.Input, { placeholder: "\u6240\u5728\u5730\u533A", onChange: this.setValue, value: this.state.areaText, "data-attr": "areaText", disabled: true, tips: ((_e = this.state.oakFocused) === null || _e === void 0 ? void 0 : _e.attr) === 'areaId' ? this.state.oakFocused.message : undefined, status: ((_f = this.state.oakFocused) === null || _f === void 0 ? void 0 : _f.attr) === 'areaId' ? 'error' : undefined }) })) })), (0, jsx_runtime_1.jsx)(FormItem, tslib_1.__assign({ label: this.t('address:attr.detail'), name: "detail" }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.Textarea, { maxlength: 100, onChange: function (data) { return _this.setUpdateData('detail', data); }, value: this.state.detail, "data-attr": "detail", placeholder: "\u8BE6\u7EC6\u5730\u5740", tips: ((_g = this.state.oakFocused) === null || _g === void 0 ? void 0 : _g.attr) === 'detail' ? this.state.oakFocused.message : undefined, status: ((_h = this.state.oakFocused) === null || _h === void 0 ? void 0 : _h.attr) === 'detail' ? 'error' : undefined }) }))] })), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } }), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ block: true, disabled: this.state.oakAllowExecuting !== true, theme: "primary", onClick: function () {
|
|
_this.confirm();
|
|
} }, { children: this.t('common:action.confirm') }))] })));
|
|
}
|
|
exports.default = render;
|