UNPKG

@jay.kou/rak-ssr

Version:

A react based UI components for admin system

55 lines (54 loc) 1.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); var _ = require("../../.."); var _columns = require("./columns"); var _antd = require("antd"); var _jsxRuntime = require("react/jsx-runtime"); var Readonly = function Readonly() { var formRef = (0, _react.useRef)(); var onFinish = function onFinish(values) { console.log({ values: values }); }; return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { style: { display: 'flex', justifyContent: 'space-between' }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, { onClick: function onClick() { var _formRef$current; (_formRef$current = formRef.current) === null || _formRef$current === void 0 || _formRef$current.setFieldsValue({ name: '马先生', id: 6, queryId: 60 }); }, children: "setFieldsBtn" }) }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.SchemaForm, { layout: "horizontal", grid: true, onFinish: onFinish, formRef: formRef, columns: _columns.columns, readonly: true, initialValues: { name: '王先生', phone: 1202228888, mail: 'mail.com', chargePerson: '1', chargePhone: '123456789', id: 8, queryId: 80 } })] }); }; var _default = exports.default = Readonly;