@pisell/materials 6.8.9 → 6.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.js +16 -16
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/es/components/PisellProcedure/PisellProcedure.stories.js +1611 -0
- package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/es/components/PisellScrollView/PisellScrollView.stories.js +772 -0
- package/es/components/PisellScrollView/hooks/useScrollEvents.js +18 -3
- package/es/components/PisellScrollView/index.d.ts +2 -1
- package/es/components/PisellScrollView/index.js +2 -1
- package/es/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/es/components/PisellSteps/PisellSteps.stories.js +851 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +6 -10
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +28 -8
- package/es/components/PisellSuperTabs/types.d.ts +1 -0
- package/es/components/PisellTabbar/PisellTabbar.d.ts +2 -19
- package/es/components/PisellTabbar/PisellTabbar.js +2 -1
- package/es/components/PisellTabbar/constants.d.ts +4 -4
- package/es/components/PisellTabbar/constants.js +5 -5
- package/es/components/PisellTabbar/index.d.ts +2 -0
- package/es/components/PisellTabbar/index.js +2 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +20 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +426 -0
- package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
- package/es/components/PisellTabbar/template/Template1/constants.js +33 -0
- package/es/components/PisellTabbar/template/Template1/index.d.ts +6 -0
- package/es/components/PisellTabbar/template/Template1/index.js +7 -0
- package/es/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
- package/es/components/PisellTabbar/template/Template1/utils/index.js +96 -0
- package/es/components/PisellTabbar/utils/index.d.ts +33 -0
- package/es/components/PisellTabbar/utils/index.js +3 -2
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/lib/components/PisellProcedure/PisellProcedure.stories.js +925 -0
- package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/lib/components/PisellScrollView/PisellScrollView.stories.js +535 -0
- package/lib/components/PisellScrollView/hooks/useScrollEvents.js +13 -3
- package/lib/components/PisellScrollView/index.d.ts +2 -1
- package/lib/components/PisellScrollView/index.js +2 -5
- package/lib/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/lib/components/PisellSteps/PisellSteps.stories.js +570 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +6 -10
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +25 -6
- package/lib/components/PisellSuperTabs/types.d.ts +1 -0
- package/lib/components/PisellTabbar/PisellTabbar.d.ts +2 -19
- package/lib/components/PisellTabbar/PisellTabbar.js +2 -1
- package/lib/components/PisellTabbar/constants.d.ts +4 -4
- package/lib/components/PisellTabbar/constants.js +5 -5
- package/lib/components/PisellTabbar/index.d.ts +2 -0
- package/lib/components/PisellTabbar/index.js +6 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +20 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +437 -0
- package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
- package/lib/components/PisellTabbar/template/Template1/constants.js +60 -0
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +6 -0
- package/lib/components/PisellTabbar/template/Template1/index.js +36 -0
- package/lib/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
- package/lib/components/PisellTabbar/template/Template1/utils/index.js +68 -0
- package/lib/components/PisellTabbar/utils/index.d.ts +33 -0
- package/lib/components/PisellTabbar/utils/index.js +4 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +5 -2
- package/package.json +21 -2
|
@@ -0,0 +1,1611 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import { expect, within } from '@storybook/test';
|
|
6
|
+
import { Button, Card, Space, Divider, Form, Input, Select } from 'antd';
|
|
7
|
+
import { ArrowLeftOutlined, CloseOutlined, ShoppingCartOutlined, HomeOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
|
8
|
+
import PisellProcedure from "./PisellProcedure";
|
|
9
|
+
/**
|
|
10
|
+
* PisellProcedure 流程容器组件
|
|
11
|
+
*
|
|
12
|
+
* 用于管理多步骤流程的复合容器组件,基于 PisellLayout 实现三段式布局
|
|
13
|
+
* 包含头部区域(步骤条)、主体区域(内容区+信息区)、底部区域(操作按钮)
|
|
14
|
+
*/
|
|
15
|
+
var meta = {
|
|
16
|
+
title: 'Pro Components/PisellProcedure',
|
|
17
|
+
component: PisellProcedure,
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'fullscreen',
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component: '流程容器组件,用于管理多步骤流程的复合容器,支持步骤控制、区域配置和响应式布局。'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
tags: ['autodocs'],
|
|
27
|
+
argTypes: {
|
|
28
|
+
mode: {
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: ['page', 'modal'],
|
|
31
|
+
description: '组件使用模式'
|
|
32
|
+
},
|
|
33
|
+
showHeader: {
|
|
34
|
+
control: 'boolean',
|
|
35
|
+
description: '是否显示头部区域'
|
|
36
|
+
},
|
|
37
|
+
showSidebar: {
|
|
38
|
+
control: 'boolean',
|
|
39
|
+
description: '是否显示信息区(侧边栏)'
|
|
40
|
+
},
|
|
41
|
+
showFooter: {
|
|
42
|
+
control: 'boolean',
|
|
43
|
+
description: '是否显示底部区域'
|
|
44
|
+
},
|
|
45
|
+
defaultCurrent: {
|
|
46
|
+
control: 'number',
|
|
47
|
+
description: '默认当前步骤'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export default meta;
|
|
52
|
+
// ========== 基础用法 ==========
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 基础用法
|
|
56
|
+
* @description 默认流程容器,包含头部、主体、底部三个区域
|
|
57
|
+
*/
|
|
58
|
+
export var Default = {
|
|
59
|
+
args: {
|
|
60
|
+
headerProps: {
|
|
61
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
62
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null)
|
|
63
|
+
}, "\u8FD4\u56DE"),
|
|
64
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
65
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null)
|
|
66
|
+
}, "\u5173\u95ED"),
|
|
67
|
+
stepsProps: {
|
|
68
|
+
items: [{
|
|
69
|
+
title: '第一步',
|
|
70
|
+
description: '基础信息'
|
|
71
|
+
}, {
|
|
72
|
+
title: '第二步',
|
|
73
|
+
description: '详细配置'
|
|
74
|
+
}, {
|
|
75
|
+
title: '第三步',
|
|
76
|
+
description: '确认提交'
|
|
77
|
+
}]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
bodyProps: {
|
|
81
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
style: {
|
|
83
|
+
padding: 24,
|
|
84
|
+
minHeight: 400
|
|
85
|
+
}
|
|
86
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9\u533A\u57DF"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u91CC\u662F\u6B65\u9AA4\u7684\u4E3B\u8981\u5185\u5BB9\uFF0C\u53EF\u4EE5\u653E\u7F6E\u8868\u5355\u3001\u5217\u8868\u7B49\u4EFB\u4F55\u5185\u5BB9\u3002")),
|
|
87
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
style: {
|
|
89
|
+
padding: 24
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"), /*#__PURE__*/React.createElement("p", null, "\u8FD9\u91CC\u662F\u4FE1\u606F\u6458\u8981\u533A\u57DF\uFF0C\u53EF\u4EE5\u663E\u793A\u8BA2\u5355\u4FE1\u606F\u3001\u914D\u7F6E\u9884\u89C8\u7B49\u3002"))
|
|
92
|
+
},
|
|
93
|
+
footerProps: {
|
|
94
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
95
|
+
type: "primary"
|
|
96
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// ========== 组件模式 ==========
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 页面模式
|
|
105
|
+
* @description 默认模式,支持响应式和移动端适配
|
|
106
|
+
*/
|
|
107
|
+
export var PageMode = {
|
|
108
|
+
args: {
|
|
109
|
+
mode: 'page',
|
|
110
|
+
headerProps: {
|
|
111
|
+
stepsProps: {
|
|
112
|
+
items: [{
|
|
113
|
+
title: '第一步'
|
|
114
|
+
}, {
|
|
115
|
+
title: '第二步'
|
|
116
|
+
}, {
|
|
117
|
+
title: '第三步'
|
|
118
|
+
}]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
bodyProps: {
|
|
122
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
style: {
|
|
124
|
+
padding: 24,
|
|
125
|
+
minHeight: 400
|
|
126
|
+
}
|
|
127
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u9875\u9762\u6A21\u5F0F"), /*#__PURE__*/React.createElement("p", null, "\u652F\u6301\u54CD\u5E94\u5F0F\u5E03\u5C40\uFF0C\u79FB\u52A8\u7AEF\u4F1A\u81EA\u52A8\u8C03\u6574")),
|
|
128
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
style: {
|
|
130
|
+
padding: 24
|
|
131
|
+
}
|
|
132
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
133
|
+
},
|
|
134
|
+
footerProps: {
|
|
135
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
136
|
+
type: "primary"
|
|
137
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 弹窗模式
|
|
144
|
+
* @description 用于弹窗场景,不应用移动端适配
|
|
145
|
+
*/
|
|
146
|
+
export var ModalMode = {
|
|
147
|
+
args: {
|
|
148
|
+
mode: 'modal',
|
|
149
|
+
headerProps: {
|
|
150
|
+
stepsProps: {
|
|
151
|
+
items: [{
|
|
152
|
+
title: '第一步'
|
|
153
|
+
}, {
|
|
154
|
+
title: '第二步'
|
|
155
|
+
}, {
|
|
156
|
+
title: '第三步'
|
|
157
|
+
}]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
bodyProps: {
|
|
161
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
style: {
|
|
163
|
+
padding: 24,
|
|
164
|
+
minHeight: 300
|
|
165
|
+
}
|
|
166
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u5F39\u7A97\u6A21\u5F0F"), /*#__PURE__*/React.createElement("p", null, "\u4E0D\u5E94\u7528\u79FB\u52A8\u7AEF\u6A21\u5F0F\uFF0C\u4FDD\u6301\u56FA\u5B9A\u5E03\u5C40")),
|
|
167
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
style: {
|
|
169
|
+
padding: 24
|
|
170
|
+
}
|
|
171
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
172
|
+
},
|
|
173
|
+
footerProps: {
|
|
174
|
+
position: 'float-sidebar',
|
|
175
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
176
|
+
type: "primary"
|
|
177
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
decorators: [function (Story) {
|
|
181
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
182
|
+
style: {
|
|
183
|
+
width: 800,
|
|
184
|
+
height: 600,
|
|
185
|
+
border: '1px solid #d9d9d9',
|
|
186
|
+
borderRadius: 8,
|
|
187
|
+
overflow: 'hidden',
|
|
188
|
+
margin: '20px auto'
|
|
189
|
+
}
|
|
190
|
+
}, /*#__PURE__*/React.createElement(Story, null));
|
|
191
|
+
}]
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// ========== 步骤控制 ==========
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* 步骤控制
|
|
198
|
+
* @description 使用 onStepsChange 监听步骤变化
|
|
199
|
+
*/
|
|
200
|
+
export var StepControl = {
|
|
201
|
+
args: {
|
|
202
|
+
defaultCurrent: 0,
|
|
203
|
+
headerProps: {
|
|
204
|
+
stepsProps: {
|
|
205
|
+
items: [{
|
|
206
|
+
title: '基础信息'
|
|
207
|
+
}, {
|
|
208
|
+
title: '详细配置'
|
|
209
|
+
}, {
|
|
210
|
+
title: '确认提交'
|
|
211
|
+
}]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
bodyProps: {
|
|
215
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
style: {
|
|
217
|
+
padding: 24,
|
|
218
|
+
minHeight: 400
|
|
219
|
+
}
|
|
220
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u6B65\u9AA4\u63A7\u5236\u6F14\u793A"), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u53EF\u4EE5\u5207\u6362\u6B65\u9AA4")),
|
|
221
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
222
|
+
style: {
|
|
223
|
+
padding: 24
|
|
224
|
+
}
|
|
225
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"), /*#__PURE__*/React.createElement("p", null, "\u6B65\u9AA4\u76F8\u5173\u4FE1\u606F"))
|
|
226
|
+
},
|
|
227
|
+
footerProps: {
|
|
228
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
229
|
+
type: "primary"
|
|
230
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
231
|
+
},
|
|
232
|
+
onStepsChange: function onStepsChange(result) {
|
|
233
|
+
console.log('步骤变化:', result);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* 步骤拦截
|
|
240
|
+
* @description 通过 onNext/onPrev 返回 false 阻止步骤切换
|
|
241
|
+
*/
|
|
242
|
+
export var StepIntercept = {
|
|
243
|
+
args: {
|
|
244
|
+
defaultCurrent: 0,
|
|
245
|
+
headerProps: {
|
|
246
|
+
stepsProps: {
|
|
247
|
+
items: [{
|
|
248
|
+
title: '第一步'
|
|
249
|
+
}, {
|
|
250
|
+
title: '第二步'
|
|
251
|
+
}, {
|
|
252
|
+
title: '第三步'
|
|
253
|
+
}]
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
bodyProps: {
|
|
257
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
258
|
+
style: {
|
|
259
|
+
padding: 24,
|
|
260
|
+
minHeight: 400
|
|
261
|
+
}
|
|
262
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u6B65\u9AA4\u62E6\u622A\u6F14\u793A"), /*#__PURE__*/React.createElement("p", null, "\u53EF\u4EE5\u901A\u8FC7 onNext/onPrev \u8FD4\u56DE false \u6765\u963B\u6B62\u6B65\u9AA4\u5207\u6362"), /*#__PURE__*/React.createElement("p", {
|
|
263
|
+
style: {
|
|
264
|
+
color: '#ff4d4f'
|
|
265
|
+
}
|
|
266
|
+
}, "\u63D0\u793A\uFF1A\u5728\u63A7\u5236\u53F0\u4E2D\u53D6\u6D88\u6CE8\u91CA return false \u6765\u6D4B\u8BD5\u62E6\u622A\u529F\u80FD")),
|
|
267
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
268
|
+
style: {
|
|
269
|
+
padding: 24
|
|
270
|
+
}
|
|
271
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
272
|
+
},
|
|
273
|
+
footerProps: {
|
|
274
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
275
|
+
type: "primary"
|
|
276
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
277
|
+
},
|
|
278
|
+
onNext: function onNext(current) {
|
|
279
|
+
console.log('下一步,当前步骤:', current);
|
|
280
|
+
// 返回 false 可以阻止步骤切换
|
|
281
|
+
// return false;
|
|
282
|
+
},
|
|
283
|
+
onPrev: function onPrev(current) {
|
|
284
|
+
console.log('上一步,当前步骤:', current);
|
|
285
|
+
// return false;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
// ========== 区域显示控制 ==========
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* 无侧边栏
|
|
294
|
+
*/
|
|
295
|
+
export var WithoutSidebar = {
|
|
296
|
+
args: {
|
|
297
|
+
showSidebar: false,
|
|
298
|
+
headerProps: {
|
|
299
|
+
stepsProps: {
|
|
300
|
+
items: [{
|
|
301
|
+
title: '第一步'
|
|
302
|
+
}, {
|
|
303
|
+
title: '第二步'
|
|
304
|
+
}, {
|
|
305
|
+
title: '第三步'
|
|
306
|
+
}]
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
bodyProps: {
|
|
310
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
311
|
+
style: {
|
|
312
|
+
padding: 24,
|
|
313
|
+
minHeight: 400
|
|
314
|
+
}
|
|
315
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u4E0D\u663E\u793A\u4FA7\u8FB9\u680F\u65F6\u7684\u5E03\u5C40\uFF0C\u5185\u5BB9\u533A\u5C06\u5360\u6EE1\u6574\u4E2A\u4E3B\u4F53\u533A\u57DF"))
|
|
316
|
+
},
|
|
317
|
+
footerProps: {
|
|
318
|
+
position: 'fixed-bottom',
|
|
319
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
320
|
+
type: "primary"
|
|
321
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 无头部
|
|
328
|
+
*/
|
|
329
|
+
export var WithoutHeader = {
|
|
330
|
+
args: {
|
|
331
|
+
showHeader: false,
|
|
332
|
+
bodyProps: {
|
|
333
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
334
|
+
style: {
|
|
335
|
+
padding: 24,
|
|
336
|
+
minHeight: 400
|
|
337
|
+
}
|
|
338
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u4E0D\u663E\u793A\u5934\u90E8\u65F6\u7684\u5E03\u5C40")),
|
|
339
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
340
|
+
style: {
|
|
341
|
+
padding: 24
|
|
342
|
+
}
|
|
343
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
344
|
+
},
|
|
345
|
+
footerProps: {
|
|
346
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
347
|
+
type: "primary"
|
|
348
|
+
}, "\u63D0\u4EA4")
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* 无底部
|
|
355
|
+
*/
|
|
356
|
+
export var WithoutFooter = {
|
|
357
|
+
args: {
|
|
358
|
+
showFooter: false,
|
|
359
|
+
headerProps: {
|
|
360
|
+
stepsProps: {
|
|
361
|
+
items: [{
|
|
362
|
+
title: '第一步'
|
|
363
|
+
}, {
|
|
364
|
+
title: '第二步'
|
|
365
|
+
}, {
|
|
366
|
+
title: '第三步'
|
|
367
|
+
}]
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
bodyProps: {
|
|
371
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
372
|
+
style: {
|
|
373
|
+
padding: 24,
|
|
374
|
+
minHeight: 400
|
|
375
|
+
}
|
|
376
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u4E0D\u663E\u793A\u5E95\u90E8\u64CD\u4F5C\u533A\u65F6\u7684\u5E03\u5C40")),
|
|
377
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
378
|
+
style: {
|
|
379
|
+
padding: 24
|
|
380
|
+
}
|
|
381
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* 最小配置
|
|
388
|
+
* @description 仅显示主体内容
|
|
389
|
+
*/
|
|
390
|
+
export var MinimalConfig = {
|
|
391
|
+
args: {
|
|
392
|
+
showHeader: false,
|
|
393
|
+
showSidebar: false,
|
|
394
|
+
showFooter: false,
|
|
395
|
+
bodyProps: {
|
|
396
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
397
|
+
style: {
|
|
398
|
+
padding: 24,
|
|
399
|
+
minHeight: 400
|
|
400
|
+
}
|
|
401
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u6700\u5C0F\u914D\u7F6E"), /*#__PURE__*/React.createElement("p", null, "\u4EC5\u663E\u793A\u4E3B\u4F53\u5185\u5BB9\u533A\u57DF"))
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// ========== 头部区域配置 ==========
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* 头部插槽顺序 - 默认
|
|
410
|
+
* @description left 在左,right 在右
|
|
411
|
+
*/
|
|
412
|
+
export var HeaderSlotDefault = {
|
|
413
|
+
args: {
|
|
414
|
+
headerProps: {
|
|
415
|
+
slotOrder: 'default',
|
|
416
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
417
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null),
|
|
418
|
+
type: "text"
|
|
419
|
+
}, "\u8FD4\u56DE"),
|
|
420
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
421
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
|
422
|
+
type: "text"
|
|
423
|
+
}, "\u5173\u95ED"),
|
|
424
|
+
stepsProps: {
|
|
425
|
+
items: [{
|
|
426
|
+
title: '第一步'
|
|
427
|
+
}, {
|
|
428
|
+
title: '第二步'
|
|
429
|
+
}, {
|
|
430
|
+
title: '第三步'
|
|
431
|
+
}]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
bodyProps: {
|
|
435
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
436
|
+
style: {
|
|
437
|
+
padding: 24,
|
|
438
|
+
minHeight: 400
|
|
439
|
+
}
|
|
440
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u5934\u90E8\u63D2\u69FD\u9ED8\u8BA4\u987A\u5E8F"), /*#__PURE__*/React.createElement("p", null, "\u8FD4\u56DE\u6309\u94AE\u5728\u5DE6\uFF0C\u5173\u95ED\u6309\u94AE\u5728\u53F3")),
|
|
441
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
442
|
+
style: {
|
|
443
|
+
padding: 24
|
|
444
|
+
}
|
|
445
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
446
|
+
},
|
|
447
|
+
footerProps: {
|
|
448
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
449
|
+
type: "primary"
|
|
450
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* 头部插槽顺序 - 反转
|
|
457
|
+
* @description left 在右,right 在左
|
|
458
|
+
*/
|
|
459
|
+
export var HeaderSlotReverse = {
|
|
460
|
+
args: {
|
|
461
|
+
headerProps: {
|
|
462
|
+
slotOrder: 'reverse',
|
|
463
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
464
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null),
|
|
465
|
+
type: "text"
|
|
466
|
+
}, "\u8FD4\u56DE"),
|
|
467
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
468
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
|
469
|
+
type: "text"
|
|
470
|
+
}, "\u5173\u95ED"),
|
|
471
|
+
stepsProps: {
|
|
472
|
+
items: [{
|
|
473
|
+
title: '第一步'
|
|
474
|
+
}, {
|
|
475
|
+
title: '第二步'
|
|
476
|
+
}, {
|
|
477
|
+
title: '第三步'
|
|
478
|
+
}]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
bodyProps: {
|
|
482
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
483
|
+
style: {
|
|
484
|
+
padding: 24,
|
|
485
|
+
minHeight: 400
|
|
486
|
+
}
|
|
487
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u5934\u90E8\u63D2\u69FD\u53CD\u8F6C\u987A\u5E8F"), /*#__PURE__*/React.createElement("p", null, "\u8FD4\u56DE\u6309\u94AE\u5728\u53F3\uFF0C\u5173\u95ED\u6309\u94AE\u5728\u5DE6")),
|
|
488
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
489
|
+
style: {
|
|
490
|
+
padding: 24
|
|
491
|
+
}
|
|
492
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
493
|
+
},
|
|
494
|
+
footerProps: {
|
|
495
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
496
|
+
type: "primary"
|
|
497
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* 隐藏步骤条
|
|
504
|
+
* @description 仅显示头部插槽,不显示步骤条
|
|
505
|
+
*/
|
|
506
|
+
export var HideSteps = {
|
|
507
|
+
args: {
|
|
508
|
+
headerProps: {
|
|
509
|
+
showSteps: false,
|
|
510
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
511
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null)
|
|
512
|
+
}, "\u8FD4\u56DE"),
|
|
513
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
514
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null)
|
|
515
|
+
}, "\u5173\u95ED")
|
|
516
|
+
},
|
|
517
|
+
bodyProps: {
|
|
518
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
519
|
+
style: {
|
|
520
|
+
padding: 24,
|
|
521
|
+
minHeight: 400
|
|
522
|
+
}
|
|
523
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u9690\u85CF\u6B65\u9AA4\u6761"), /*#__PURE__*/React.createElement("p", null, "\u5934\u90E8\u53EA\u663E\u793A\u8FD4\u56DE\u548C\u5173\u95ED\u6309\u94AE")),
|
|
524
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
525
|
+
style: {
|
|
526
|
+
padding: 24
|
|
527
|
+
}
|
|
528
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
529
|
+
},
|
|
530
|
+
footerProps: {
|
|
531
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
532
|
+
type: "primary"
|
|
533
|
+
}, "\u63D0\u4EA4")
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* 第一步显示返回按钮
|
|
540
|
+
* @description 通过 showBackOnFirstStep 控制
|
|
541
|
+
*/
|
|
542
|
+
export var ShowBackOnFirstStep = {
|
|
543
|
+
args: {
|
|
544
|
+
defaultCurrent: 0,
|
|
545
|
+
headerProps: {
|
|
546
|
+
showBackOnFirstStep: true,
|
|
547
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
548
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null)
|
|
549
|
+
}, "\u8FD4\u56DE"),
|
|
550
|
+
stepsProps: {
|
|
551
|
+
items: [{
|
|
552
|
+
title: '第一步'
|
|
553
|
+
}, {
|
|
554
|
+
title: '第二步'
|
|
555
|
+
}, {
|
|
556
|
+
title: '第三步'
|
|
557
|
+
}]
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
bodyProps: {
|
|
561
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
562
|
+
style: {
|
|
563
|
+
padding: 24,
|
|
564
|
+
minHeight: 400
|
|
565
|
+
}
|
|
566
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u7B2C\u4E00\u6B65\u663E\u793A\u8FD4\u56DE\u6309\u94AE"), /*#__PURE__*/React.createElement("p", null, "\u5373\u4F7F\u5728\u7B2C\u4E00\u6B65\uFF0C\u4E5F\u663E\u793A\u8FD4\u56DE\u6309\u94AE")),
|
|
567
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
568
|
+
style: {
|
|
569
|
+
padding: 24
|
|
570
|
+
}
|
|
571
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
572
|
+
},
|
|
573
|
+
footerProps: {
|
|
574
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
575
|
+
type: "primary"
|
|
576
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
577
|
+
},
|
|
578
|
+
onFirstStepBack: function onFirstStepBack() {
|
|
579
|
+
console.log('点击了第一步的返回按钮');
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
// ========== 确认弹窗 ==========
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* 返回确认弹窗
|
|
588
|
+
* @description 点击返回时弹出确认弹窗
|
|
589
|
+
*/
|
|
590
|
+
export var BackConfirmModal = {
|
|
591
|
+
args: {
|
|
592
|
+
defaultCurrent: 1,
|
|
593
|
+
headerProps: {
|
|
594
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
595
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null)
|
|
596
|
+
}, "\u8FD4\u56DE"),
|
|
597
|
+
stepsProps: {
|
|
598
|
+
items: [{
|
|
599
|
+
title: '第一步'
|
|
600
|
+
}, {
|
|
601
|
+
title: '第二步'
|
|
602
|
+
}, {
|
|
603
|
+
title: '第三步'
|
|
604
|
+
}]
|
|
605
|
+
},
|
|
606
|
+
backConfirmModal: {
|
|
607
|
+
enabled: true,
|
|
608
|
+
title: '确认返回',
|
|
609
|
+
describe: '确定要返回上一步吗?当前填写的内容将不会保存'
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
bodyProps: {
|
|
613
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
614
|
+
style: {
|
|
615
|
+
padding: 24,
|
|
616
|
+
minHeight: 400
|
|
617
|
+
}
|
|
618
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u8FD4\u56DE\u786E\u8BA4\u5F39\u7A97"), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u8FD4\u56DE\u6309\u94AE\u6216\u4E0A\u4E00\u6B65\u4F1A\u5F39\u51FA\u786E\u8BA4\u5F39\u7A97")),
|
|
619
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
620
|
+
style: {
|
|
621
|
+
padding: 24
|
|
622
|
+
}
|
|
623
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
624
|
+
},
|
|
625
|
+
footerProps: {
|
|
626
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
627
|
+
type: "primary"
|
|
628
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
629
|
+
},
|
|
630
|
+
onBackConfirm: function onBackConfirm(action) {
|
|
631
|
+
console.log('返回确认:', action);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* 关闭确认弹窗
|
|
638
|
+
* @description 点击关闭时弹出确认弹窗
|
|
639
|
+
*/
|
|
640
|
+
export var CloseConfirmModal = {
|
|
641
|
+
args: {
|
|
642
|
+
headerProps: {
|
|
643
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
644
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null)
|
|
645
|
+
}, "\u5173\u95ED"),
|
|
646
|
+
stepsProps: {
|
|
647
|
+
items: [{
|
|
648
|
+
title: '第一步'
|
|
649
|
+
}, {
|
|
650
|
+
title: '第二步'
|
|
651
|
+
}, {
|
|
652
|
+
title: '第三步'
|
|
653
|
+
}]
|
|
654
|
+
},
|
|
655
|
+
closeConfirmModal: {
|
|
656
|
+
enabled: true,
|
|
657
|
+
title: '确认关闭',
|
|
658
|
+
describe: '确定要关闭吗?所有未保存的数据将丢失'
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
bodyProps: {
|
|
662
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
663
|
+
style: {
|
|
664
|
+
padding: 24,
|
|
665
|
+
minHeight: 400
|
|
666
|
+
}
|
|
667
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u5173\u95ED\u786E\u8BA4\u5F39\u7A97"), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u5173\u95ED\u6309\u94AE\u4F1A\u5F39\u51FA\u786E\u8BA4\u5F39\u7A97")),
|
|
668
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
669
|
+
style: {
|
|
670
|
+
padding: 24
|
|
671
|
+
}
|
|
672
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
673
|
+
},
|
|
674
|
+
footerProps: {
|
|
675
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
676
|
+
type: "primary"
|
|
677
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
678
|
+
},
|
|
679
|
+
onCloseConfirm: function onCloseConfirm(action) {
|
|
680
|
+
console.log('关闭确认:', action);
|
|
681
|
+
},
|
|
682
|
+
onClose: function onClose() {
|
|
683
|
+
console.log('关闭按钮被点击');
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
// ========== 主体区域布局 ==========
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* 主体布局 - 比例布局
|
|
692
|
+
* @description 使用比例分配内容区和侧边栏宽度
|
|
693
|
+
*/
|
|
694
|
+
export var BodyRatioLayout = {
|
|
695
|
+
args: {
|
|
696
|
+
headerProps: {
|
|
697
|
+
stepsProps: {
|
|
698
|
+
items: [{
|
|
699
|
+
title: '第一步'
|
|
700
|
+
}, {
|
|
701
|
+
title: '第二步'
|
|
702
|
+
}, {
|
|
703
|
+
title: '第三步'
|
|
704
|
+
}]
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
bodyProps: {
|
|
708
|
+
layoutMode: 'ratio',
|
|
709
|
+
layoutRatio: '6:4',
|
|
710
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
711
|
+
style: {
|
|
712
|
+
padding: 24,
|
|
713
|
+
minHeight: 400
|
|
714
|
+
}
|
|
715
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9\uFF0860%\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4F7F\u7528\u6BD4\u4F8B\u5E03\u5C40\uFF0C\u5185\u5BB9\u533A\u5360 60%")),
|
|
716
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
717
|
+
style: {
|
|
718
|
+
padding: 24
|
|
719
|
+
}
|
|
720
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981\uFF0840%\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u5360 40%"))
|
|
721
|
+
},
|
|
722
|
+
footerProps: {
|
|
723
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
724
|
+
type: "primary"
|
|
725
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* 主体布局 - 固定宽度
|
|
732
|
+
* @description 侧边栏使用固定宽度
|
|
733
|
+
*/
|
|
734
|
+
export var BodyFixedLayout = {
|
|
735
|
+
args: {
|
|
736
|
+
headerProps: {
|
|
737
|
+
stepsProps: {
|
|
738
|
+
items: [{
|
|
739
|
+
title: '第一步'
|
|
740
|
+
}, {
|
|
741
|
+
title: '第二步'
|
|
742
|
+
}, {
|
|
743
|
+
title: '第三步'
|
|
744
|
+
}]
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
bodyProps: {
|
|
748
|
+
layoutMode: 'fixed',
|
|
749
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
750
|
+
style: {
|
|
751
|
+
padding: 24,
|
|
752
|
+
minHeight: 400
|
|
753
|
+
}
|
|
754
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9\uFF08\u81EA\u9002\u5E94\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4F7F\u7528\u56FA\u5B9A\u5E03\u5C40\uFF0C\u5185\u5BB9\u533A\u81EA\u9002\u5E94\u5BBD\u5EA6")),
|
|
755
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
756
|
+
style: {
|
|
757
|
+
padding: 24
|
|
758
|
+
}
|
|
759
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981\uFF08\u56FA\u5B9A\u5BBD\u5EA6\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u4F7F\u7528\u56FA\u5B9A\u5BBD\u5EA6"))
|
|
760
|
+
},
|
|
761
|
+
footerProps: {
|
|
762
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
763
|
+
type: "primary"
|
|
764
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* 主体布局 - 垂直布局
|
|
771
|
+
* @description 内容区和侧边栏上下排列
|
|
772
|
+
*/
|
|
773
|
+
export var BodyVerticalLayout = {
|
|
774
|
+
args: {
|
|
775
|
+
headerProps: {
|
|
776
|
+
stepsProps: {
|
|
777
|
+
items: [{
|
|
778
|
+
title: '第一步'
|
|
779
|
+
}, {
|
|
780
|
+
title: '第二步'
|
|
781
|
+
}, {
|
|
782
|
+
title: '第三步'
|
|
783
|
+
}]
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
bodyProps: {
|
|
787
|
+
direction: 'vertical',
|
|
788
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
789
|
+
style: {
|
|
790
|
+
padding: 24,
|
|
791
|
+
minHeight: 300
|
|
792
|
+
}
|
|
793
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9\uFF08\u4E0A\u65B9\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u5782\u76F4\u5E03\u5C40\uFF0C\u5185\u5BB9\u533A\u5728\u4E0A\u65B9")),
|
|
794
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
795
|
+
style: {
|
|
796
|
+
padding: 24
|
|
797
|
+
}
|
|
798
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981\uFF08\u4E0B\u65B9\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u5728\u4E0B\u65B9"))
|
|
799
|
+
},
|
|
800
|
+
footerProps: {
|
|
801
|
+
position: 'fixed-bottom',
|
|
802
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
803
|
+
type: "primary"
|
|
804
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* 主体布局 - 内容顺序反转
|
|
811
|
+
* @description 侧边栏在左/上,内容区在右/下
|
|
812
|
+
*/
|
|
813
|
+
export var BodyContentOrderReverse = {
|
|
814
|
+
args: {
|
|
815
|
+
headerProps: {
|
|
816
|
+
stepsProps: {
|
|
817
|
+
items: [{
|
|
818
|
+
title: '第一步'
|
|
819
|
+
}, {
|
|
820
|
+
title: '第二步'
|
|
821
|
+
}, {
|
|
822
|
+
title: '第三步'
|
|
823
|
+
}]
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
bodyProps: {
|
|
827
|
+
contentOrder: 'sidebar-first',
|
|
828
|
+
layoutMode: 'ratio',
|
|
829
|
+
layoutRatio: '7:3',
|
|
830
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
831
|
+
style: {
|
|
832
|
+
padding: 24,
|
|
833
|
+
minHeight: 400
|
|
834
|
+
}
|
|
835
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9\uFF08\u53F3\u4FA7\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u5728\u524D\uFF08\u5DE6\u4FA7\uFF09\uFF0C\u5185\u5BB9\u533A\u5728\u540E\uFF08\u53F3\u4FA7\uFF09")),
|
|
836
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
837
|
+
style: {
|
|
838
|
+
padding: 24
|
|
839
|
+
}
|
|
840
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981\uFF08\u5DE6\u4FA7\uFF09"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u5360 30%"))
|
|
841
|
+
},
|
|
842
|
+
footerProps: {
|
|
843
|
+
position: 'float-content',
|
|
844
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
845
|
+
type: "primary"
|
|
846
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
// ========== 底部区域位置 ==========
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* 底部位置 - 悬浮在侧边栏
|
|
855
|
+
* @description 默认位置,底部悬浮在侧边栏区域
|
|
856
|
+
*/
|
|
857
|
+
export var FooterFloatSidebar = {
|
|
858
|
+
args: {
|
|
859
|
+
headerProps: {
|
|
860
|
+
stepsProps: {
|
|
861
|
+
items: [{
|
|
862
|
+
title: '第一步'
|
|
863
|
+
}, {
|
|
864
|
+
title: '第二步'
|
|
865
|
+
}, {
|
|
866
|
+
title: '第三步'
|
|
867
|
+
}]
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
bodyProps: {
|
|
871
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
872
|
+
style: {
|
|
873
|
+
padding: 24,
|
|
874
|
+
minHeight: 600
|
|
875
|
+
}
|
|
876
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u60AC\u6D6E\u5728\u4FA7\u8FB9\u680F\u533A\u57DF")),
|
|
877
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
878
|
+
style: {
|
|
879
|
+
padding: 24
|
|
880
|
+
}
|
|
881
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"), /*#__PURE__*/React.createElement("p", null, "\u4FA7\u8FB9\u680F\u5185\u5BB9"))
|
|
882
|
+
},
|
|
883
|
+
footerProps: {
|
|
884
|
+
position: 'float-sidebar',
|
|
885
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
886
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
887
|
+
type: "primary"
|
|
888
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* 底部位置 - 固定在整体底部
|
|
895
|
+
*/
|
|
896
|
+
export var FooterFixedBottom = {
|
|
897
|
+
args: {
|
|
898
|
+
headerProps: {
|
|
899
|
+
stepsProps: {
|
|
900
|
+
items: [{
|
|
901
|
+
title: '第一步'
|
|
902
|
+
}, {
|
|
903
|
+
title: '第二步'
|
|
904
|
+
}, {
|
|
905
|
+
title: '第三步'
|
|
906
|
+
}]
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
bodyProps: {
|
|
910
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
911
|
+
style: {
|
|
912
|
+
padding: 24,
|
|
913
|
+
minHeight: 600
|
|
914
|
+
}
|
|
915
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u56FA\u5B9A\u5728\u6574\u4F53\u5E95\u90E8")),
|
|
916
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
917
|
+
style: {
|
|
918
|
+
padding: 24
|
|
919
|
+
}
|
|
920
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
921
|
+
},
|
|
922
|
+
footerProps: {
|
|
923
|
+
position: 'fixed-bottom',
|
|
924
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
925
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
926
|
+
type: "primary"
|
|
927
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* 底部位置 - 悬浮在整体区域
|
|
934
|
+
* @description 移动端默认使用此模式
|
|
935
|
+
*/
|
|
936
|
+
export var FooterFloatAll = {
|
|
937
|
+
args: {
|
|
938
|
+
headerProps: {
|
|
939
|
+
stepsProps: {
|
|
940
|
+
items: [{
|
|
941
|
+
title: '第一步'
|
|
942
|
+
}, {
|
|
943
|
+
title: '第二步'
|
|
944
|
+
}, {
|
|
945
|
+
title: '第三步'
|
|
946
|
+
}]
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
bodyProps: {
|
|
950
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
951
|
+
style: {
|
|
952
|
+
padding: 24,
|
|
953
|
+
minHeight: 600
|
|
954
|
+
}
|
|
955
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u60AC\u6D6E\u5728\u6574\u4F53\u533A\u57DF\uFF08\u79FB\u52A8\u7AEF\u9ED8\u8BA4\uFF09")),
|
|
956
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
957
|
+
style: {
|
|
958
|
+
padding: 24
|
|
959
|
+
}
|
|
960
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
961
|
+
},
|
|
962
|
+
footerProps: {
|
|
963
|
+
position: 'float-all',
|
|
964
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
965
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
966
|
+
type: "primary"
|
|
967
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* 底部位置 - 悬浮在内容区
|
|
974
|
+
*/
|
|
975
|
+
export var FooterFloatContent = {
|
|
976
|
+
args: {
|
|
977
|
+
headerProps: {
|
|
978
|
+
stepsProps: {
|
|
979
|
+
items: [{
|
|
980
|
+
title: '第一步'
|
|
981
|
+
}, {
|
|
982
|
+
title: '第二步'
|
|
983
|
+
}, {
|
|
984
|
+
title: '第三步'
|
|
985
|
+
}]
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
bodyProps: {
|
|
989
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
990
|
+
style: {
|
|
991
|
+
padding: 24,
|
|
992
|
+
minHeight: 600
|
|
993
|
+
}
|
|
994
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u60AC\u6D6E\u5728\u5185\u5BB9\u533A\u57DF")),
|
|
995
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
996
|
+
style: {
|
|
997
|
+
padding: 24
|
|
998
|
+
}
|
|
999
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1000
|
+
},
|
|
1001
|
+
footerProps: {
|
|
1002
|
+
position: 'float-content',
|
|
1003
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
1004
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1005
|
+
type: "primary"
|
|
1006
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* 底部位置 - 内嵌在内容区底部
|
|
1013
|
+
*/
|
|
1014
|
+
export var FooterFixedContentBottom = {
|
|
1015
|
+
args: {
|
|
1016
|
+
headerProps: {
|
|
1017
|
+
stepsProps: {
|
|
1018
|
+
items: [{
|
|
1019
|
+
title: '第一步'
|
|
1020
|
+
}, {
|
|
1021
|
+
title: '第二步'
|
|
1022
|
+
}, {
|
|
1023
|
+
title: '第三步'
|
|
1024
|
+
}]
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
bodyProps: {
|
|
1028
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1029
|
+
style: {
|
|
1030
|
+
padding: 24,
|
|
1031
|
+
minHeight: 400
|
|
1032
|
+
}
|
|
1033
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u5185\u5D4C\u5728\u5185\u5BB9\u533A\u5E95\u90E8")),
|
|
1034
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1035
|
+
style: {
|
|
1036
|
+
padding: 24
|
|
1037
|
+
}
|
|
1038
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1039
|
+
},
|
|
1040
|
+
footerProps: {
|
|
1041
|
+
position: 'fixed-content-bottom',
|
|
1042
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
1043
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1044
|
+
type: "primary"
|
|
1045
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* 底部位置 - 内嵌在侧边栏底部
|
|
1052
|
+
*/
|
|
1053
|
+
export var FooterFixedSidebarBottom = {
|
|
1054
|
+
args: {
|
|
1055
|
+
headerProps: {
|
|
1056
|
+
stepsProps: {
|
|
1057
|
+
items: [{
|
|
1058
|
+
title: '第一步'
|
|
1059
|
+
}, {
|
|
1060
|
+
title: '第二步'
|
|
1061
|
+
}, {
|
|
1062
|
+
title: '第三步'
|
|
1063
|
+
}]
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
bodyProps: {
|
|
1067
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1068
|
+
style: {
|
|
1069
|
+
padding: 24,
|
|
1070
|
+
minHeight: 400
|
|
1071
|
+
}
|
|
1072
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5E95\u90E8\u64CD\u4F5C\u533A\u5185\u5D4C\u5728\u4FA7\u8FB9\u680F\u5E95\u90E8")),
|
|
1073
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1074
|
+
style: {
|
|
1075
|
+
padding: 24
|
|
1076
|
+
}
|
|
1077
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1078
|
+
},
|
|
1079
|
+
footerProps: {
|
|
1080
|
+
position: 'fixed-sidebar-bottom',
|
|
1081
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
1082
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1083
|
+
type: "primary"
|
|
1084
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1089
|
+
// ========== 移动端特性 ==========
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* 移动端总结按钮
|
|
1093
|
+
* @description 移动端显示总结按钮,点击可查看侧边栏内容
|
|
1094
|
+
*/
|
|
1095
|
+
export var MobileSummaryButton = {
|
|
1096
|
+
args: {
|
|
1097
|
+
headerProps: {
|
|
1098
|
+
stepsProps: {
|
|
1099
|
+
items: [{
|
|
1100
|
+
title: '第一步'
|
|
1101
|
+
}, {
|
|
1102
|
+
title: '第二步'
|
|
1103
|
+
}, {
|
|
1104
|
+
title: '第三步'
|
|
1105
|
+
}]
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
bodyProps: {
|
|
1109
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1110
|
+
style: {
|
|
1111
|
+
padding: 24,
|
|
1112
|
+
minHeight: 400
|
|
1113
|
+
}
|
|
1114
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u79FB\u52A8\u7AEF\uFF08\u5BBD\u5EA6 < 744px\uFF09\u4F1A\u663E\u793A\u603B\u7ED3\u6309\u94AE"), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u603B\u7ED3\u6309\u94AE\u53EF\u4EE5\u5728\u5F39\u7A97\u4E2D\u67E5\u770B\u4FA7\u8FB9\u680F\u5185\u5BB9")),
|
|
1115
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1116
|
+
style: {
|
|
1117
|
+
padding: 24
|
|
1118
|
+
}
|
|
1119
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u8BA2\u5355\u6458\u8981"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("p", null, "\u5546\u54C1\uFF1AiPhone 15 Pro"), /*#__PURE__*/React.createElement("p", null, "\u6570\u91CF\uFF1A1"), /*#__PURE__*/React.createElement("p", null, "\u5355\u4EF7\uFF1A\xA57999"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("p", {
|
|
1120
|
+
style: {
|
|
1121
|
+
fontSize: 18,
|
|
1122
|
+
fontWeight: 'bold'
|
|
1123
|
+
}
|
|
1124
|
+
}, "\u603B\u8BA1\uFF1A\xA57999"))
|
|
1125
|
+
},
|
|
1126
|
+
footerProps: {
|
|
1127
|
+
position: 'float-all',
|
|
1128
|
+
summaryButton: /*#__PURE__*/React.createElement(Button, {
|
|
1129
|
+
icon: /*#__PURE__*/React.createElement(ShoppingCartOutlined, null)
|
|
1130
|
+
}, "\u67E5\u770B\u8BE6\u60C5"),
|
|
1131
|
+
summaryModalTitle: '订单详情',
|
|
1132
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A", /*#__PURE__*/React.createElement("strong", null, "\xA57999")),
|
|
1133
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1134
|
+
type: "primary"
|
|
1135
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
parameters: {
|
|
1139
|
+
viewport: {
|
|
1140
|
+
defaultViewport: 'mobile1'
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
};
|
|
1144
|
+
|
|
1145
|
+
// ========== 溢出收纳 ==========
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* 溢出收纳功能
|
|
1149
|
+
* @description 当宽度不足时,按钮会被收纳到 More 菜单中
|
|
1150
|
+
*/
|
|
1151
|
+
export var OverflowActions = {
|
|
1152
|
+
args: {
|
|
1153
|
+
headerProps: {
|
|
1154
|
+
stepsProps: {
|
|
1155
|
+
items: [{
|
|
1156
|
+
title: '第一步'
|
|
1157
|
+
}, {
|
|
1158
|
+
title: '第二步'
|
|
1159
|
+
}, {
|
|
1160
|
+
title: '第三步'
|
|
1161
|
+
}]
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
bodyProps: {
|
|
1165
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1166
|
+
style: {
|
|
1167
|
+
padding: 24,
|
|
1168
|
+
minHeight: 400
|
|
1169
|
+
}
|
|
1170
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u5F53\u5BBD\u5EA6\u4E0D\u8DB3\u65F6\uFF0C\u6B21\u8981\u6309\u94AE\u4F1A\u88AB\u6536\u7EB3\u5230 More \u83DC\u5355\u4E2D"), /*#__PURE__*/React.createElement("p", null, "\u7F29\u5C0F\u7A97\u53E3\u5BBD\u5EA6\u53EF\u4EE5\u770B\u5230\u6548\u679C")),
|
|
1171
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1172
|
+
style: {
|
|
1173
|
+
padding: 24
|
|
1174
|
+
}
|
|
1175
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1176
|
+
},
|
|
1177
|
+
footerProps: {
|
|
1178
|
+
enableOverflow: true,
|
|
1179
|
+
moreText: '更多',
|
|
1180
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
1181
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4FDD\u5B58\u8349\u7A3F"), /*#__PURE__*/React.createElement(Button, null, "\u9884\u89C8"), /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1182
|
+
type: "primary"
|
|
1183
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* 禁用溢出收纳
|
|
1190
|
+
* @description 不启用溢出收纳,按钮会换行显示
|
|
1191
|
+
*/
|
|
1192
|
+
export var DisableOverflow = {
|
|
1193
|
+
args: {
|
|
1194
|
+
headerProps: {
|
|
1195
|
+
stepsProps: {
|
|
1196
|
+
items: [{
|
|
1197
|
+
title: '第一步'
|
|
1198
|
+
}, {
|
|
1199
|
+
title: '第二步'
|
|
1200
|
+
}, {
|
|
1201
|
+
title: '第三步'
|
|
1202
|
+
}]
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
bodyProps: {
|
|
1206
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1207
|
+
style: {
|
|
1208
|
+
padding: 24,
|
|
1209
|
+
minHeight: 400
|
|
1210
|
+
}
|
|
1211
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u4E3B\u8981\u5185\u5BB9"), /*#__PURE__*/React.createElement("p", null, "\u7981\u7528\u6EA2\u51FA\u6536\u7EB3\uFF0C\u6309\u94AE\u4E0D\u4F1A\u88AB\u6536\u7EB3")),
|
|
1212
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1213
|
+
style: {
|
|
1214
|
+
padding: 24
|
|
1215
|
+
}
|
|
1216
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1217
|
+
},
|
|
1218
|
+
footerProps: {
|
|
1219
|
+
enableOverflow: false,
|
|
1220
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A\xA5999"),
|
|
1221
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4FDD\u5B58\u8349\u7A3F"), /*#__PURE__*/React.createElement(Button, null, "\u9884\u89C8"), /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1222
|
+
type: "primary"
|
|
1223
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
};
|
|
1227
|
+
|
|
1228
|
+
// ========== 完整示例 ==========
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* 完整示例 - 购物流程
|
|
1232
|
+
* @description 模拟真实的购物流程
|
|
1233
|
+
*/
|
|
1234
|
+
export var ShoppingFlow = {
|
|
1235
|
+
args: {
|
|
1236
|
+
defaultCurrent: 1,
|
|
1237
|
+
headerProps: {
|
|
1238
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
1239
|
+
icon: /*#__PURE__*/React.createElement(ArrowLeftOutlined, null),
|
|
1240
|
+
type: "text"
|
|
1241
|
+
}, "\u8FD4\u56DE"),
|
|
1242
|
+
right: /*#__PURE__*/React.createElement(Button, {
|
|
1243
|
+
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
|
1244
|
+
type: "text"
|
|
1245
|
+
}),
|
|
1246
|
+
stepsProps: {
|
|
1247
|
+
items: [{
|
|
1248
|
+
title: '选择商品',
|
|
1249
|
+
description: '选择您要购买的商品'
|
|
1250
|
+
}, {
|
|
1251
|
+
title: '填写信息',
|
|
1252
|
+
description: '填写收货信息'
|
|
1253
|
+
}, {
|
|
1254
|
+
title: '确认订单',
|
|
1255
|
+
description: '确认订单信息'
|
|
1256
|
+
}, {
|
|
1257
|
+
title: '支付',
|
|
1258
|
+
description: '完成支付'
|
|
1259
|
+
}]
|
|
1260
|
+
},
|
|
1261
|
+
backConfirmModal: {
|
|
1262
|
+
enabled: true,
|
|
1263
|
+
title: '确认返回',
|
|
1264
|
+
describe: '返回上一步将清除当前填写的信息,确定要返回吗?'
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
bodyProps: {
|
|
1268
|
+
layoutMode: 'ratio',
|
|
1269
|
+
layoutRatio: '7:3',
|
|
1270
|
+
contentSlot: /*#__PURE__*/React.createElement(Card, {
|
|
1271
|
+
style: {
|
|
1272
|
+
margin: 24
|
|
1273
|
+
}
|
|
1274
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u586B\u5199\u6536\u8D27\u4FE1\u606F"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Form, {
|
|
1275
|
+
layout: "vertical"
|
|
1276
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
1277
|
+
label: "\u6536\u8D27\u4EBA",
|
|
1278
|
+
required: true
|
|
1279
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1280
|
+
placeholder: "\u8BF7\u8F93\u5165\u6536\u8D27\u4EBA\u59D3\u540D"
|
|
1281
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1282
|
+
label: "\u8054\u7CFB\u7535\u8BDD",
|
|
1283
|
+
required: true
|
|
1284
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1285
|
+
placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"
|
|
1286
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1287
|
+
label: "\u6536\u8D27\u5730\u5740",
|
|
1288
|
+
required: true
|
|
1289
|
+
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
1290
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740",
|
|
1291
|
+
rows: 4
|
|
1292
|
+
})))),
|
|
1293
|
+
sidebarSlot: /*#__PURE__*/React.createElement(Card, {
|
|
1294
|
+
style: {
|
|
1295
|
+
margin: 24
|
|
1296
|
+
}
|
|
1297
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u8BA2\u5355\u6458\u8981"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u5546\u54C1\uFF1AiPhone 15 Pro"), /*#__PURE__*/React.createElement("p", null, "\u6570\u91CF\uFF1A1"), /*#__PURE__*/React.createElement("p", null, "\u5355\u4EF7\uFF1A\xA57999"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("p", {
|
|
1298
|
+
style: {
|
|
1299
|
+
fontSize: 18,
|
|
1300
|
+
fontWeight: 'bold'
|
|
1301
|
+
}
|
|
1302
|
+
}, "\u603B\u8BA1\uFF1A\xA57999")))
|
|
1303
|
+
},
|
|
1304
|
+
footerProps: {
|
|
1305
|
+
position: 'float-sidebar',
|
|
1306
|
+
enableOverflow: true,
|
|
1307
|
+
summaryButton: /*#__PURE__*/React.createElement(Button, {
|
|
1308
|
+
icon: /*#__PURE__*/React.createElement(ShoppingCartOutlined, null)
|
|
1309
|
+
}, "\u8D2D\u7269\u8F66"),
|
|
1310
|
+
summaryModalTitle: '订单详情',
|
|
1311
|
+
leftSlot: /*#__PURE__*/React.createElement("div", null, "\u603B\u4EF7\uFF1A", /*#__PURE__*/React.createElement("strong", {
|
|
1312
|
+
style: {
|
|
1313
|
+
fontSize: 18,
|
|
1314
|
+
color: '#ff4d4f'
|
|
1315
|
+
}
|
|
1316
|
+
}, "\xA57999")),
|
|
1317
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1318
|
+
type: "primary"
|
|
1319
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1320
|
+
},
|
|
1321
|
+
onStepsChange: function onStepsChange(result) {
|
|
1322
|
+
console.log('步骤变化:', result);
|
|
1323
|
+
},
|
|
1324
|
+
onBackConfirm: function onBackConfirm(action) {
|
|
1325
|
+
console.log('返回确认:', action);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* 完整示例 - 注册流程
|
|
1332
|
+
* @description 模拟用户注册流程
|
|
1333
|
+
*/
|
|
1334
|
+
export var RegistrationFlow = {
|
|
1335
|
+
args: {
|
|
1336
|
+
defaultCurrent: 0,
|
|
1337
|
+
headerProps: {
|
|
1338
|
+
left: /*#__PURE__*/React.createElement(Button, {
|
|
1339
|
+
icon: /*#__PURE__*/React.createElement(HomeOutlined, null),
|
|
1340
|
+
type: "text"
|
|
1341
|
+
}, "\u9996\u9875"),
|
|
1342
|
+
stepsProps: {
|
|
1343
|
+
items: [{
|
|
1344
|
+
title: '基本信息',
|
|
1345
|
+
description: '填写账户信息'
|
|
1346
|
+
}, {
|
|
1347
|
+
title: '身份验证',
|
|
1348
|
+
description: '验证您的身份'
|
|
1349
|
+
}, {
|
|
1350
|
+
title: '完成注册',
|
|
1351
|
+
description: '设置完成'
|
|
1352
|
+
}],
|
|
1353
|
+
labelPlacement: 'vertical'
|
|
1354
|
+
},
|
|
1355
|
+
showBackOnFirstStep: true
|
|
1356
|
+
},
|
|
1357
|
+
bodyProps: {
|
|
1358
|
+
layoutMode: 'fixed',
|
|
1359
|
+
contentSlot: /*#__PURE__*/React.createElement(Card, {
|
|
1360
|
+
style: {
|
|
1361
|
+
margin: 24,
|
|
1362
|
+
maxWidth: 600
|
|
1363
|
+
}
|
|
1364
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u521B\u5EFA\u60A8\u7684\u8D26\u6237"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Form, {
|
|
1365
|
+
layout: "vertical"
|
|
1366
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
1367
|
+
label: "\u7528\u6237\u540D",
|
|
1368
|
+
required: true
|
|
1369
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1370
|
+
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D"
|
|
1371
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1372
|
+
label: "\u90AE\u7BB1",
|
|
1373
|
+
required: true
|
|
1374
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1375
|
+
placeholder: "\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740"
|
|
1376
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1377
|
+
label: "\u5BC6\u7801",
|
|
1378
|
+
required: true
|
|
1379
|
+
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
1380
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801"
|
|
1381
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1382
|
+
label: "\u786E\u8BA4\u5BC6\u7801",
|
|
1383
|
+
required: true
|
|
1384
|
+
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
1385
|
+
placeholder: "\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801"
|
|
1386
|
+
})))),
|
|
1387
|
+
sidebarSlot: /*#__PURE__*/React.createElement(Card, {
|
|
1388
|
+
style: {
|
|
1389
|
+
margin: 24
|
|
1390
|
+
}
|
|
1391
|
+
}, /*#__PURE__*/React.createElement("h3", null, /*#__PURE__*/React.createElement(InfoCircleOutlined, {
|
|
1392
|
+
style: {
|
|
1393
|
+
marginRight: 8
|
|
1394
|
+
}
|
|
1395
|
+
}), "\u6CE8\u518C\u987B\u77E5"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("ul", {
|
|
1396
|
+
style: {
|
|
1397
|
+
paddingLeft: 20
|
|
1398
|
+
}
|
|
1399
|
+
}, /*#__PURE__*/React.createElement("li", null, "\u7528\u6237\u540D\u957F\u5EA6 4-20 \u4E2A\u5B57\u7B26"), /*#__PURE__*/React.createElement("li", null, "\u5BC6\u7801\u957F\u5EA6\u81F3\u5C11 8 \u4E2A\u5B57\u7B26"), /*#__PURE__*/React.createElement("li", null, "\u5BC6\u7801\u9700\u5305\u542B\u6570\u5B57\u548C\u5B57\u6BCD"), /*#__PURE__*/React.createElement("li", null, "\u90AE\u7BB1\u5C06\u7528\u4E8E\u8D26\u6237\u9A8C\u8BC1")))
|
|
1400
|
+
},
|
|
1401
|
+
footerProps: {
|
|
1402
|
+
position: 'float-sidebar',
|
|
1403
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
1404
|
+
type: "primary",
|
|
1405
|
+
size: "large",
|
|
1406
|
+
block: true
|
|
1407
|
+
}, "\u4E0B\u4E00\u6B65")
|
|
1408
|
+
},
|
|
1409
|
+
onFirstStepBack: function onFirstStepBack() {
|
|
1410
|
+
console.log('返回首页');
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* 完整示例 - 表单向导
|
|
1417
|
+
* @description 多步表单向导
|
|
1418
|
+
*/
|
|
1419
|
+
export var FormWizard = {
|
|
1420
|
+
args: {
|
|
1421
|
+
defaultCurrent: 0,
|
|
1422
|
+
showSidebar: false,
|
|
1423
|
+
headerProps: {
|
|
1424
|
+
stepsProps: {
|
|
1425
|
+
items: [{
|
|
1426
|
+
title: '个人信息'
|
|
1427
|
+
}, {
|
|
1428
|
+
title: '工作信息'
|
|
1429
|
+
}, {
|
|
1430
|
+
title: '教育背景'
|
|
1431
|
+
}, {
|
|
1432
|
+
title: '提交申请'
|
|
1433
|
+
}],
|
|
1434
|
+
size: 'small'
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
bodyProps: {
|
|
1438
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1439
|
+
style: {
|
|
1440
|
+
padding: 24,
|
|
1441
|
+
maxWidth: 800,
|
|
1442
|
+
margin: '0 auto'
|
|
1443
|
+
}
|
|
1444
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("h2", null, "\u4E2A\u4EBA\u4FE1\u606F"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Form, {
|
|
1445
|
+
layout: "vertical"
|
|
1446
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
1447
|
+
direction: "vertical",
|
|
1448
|
+
style: {
|
|
1449
|
+
width: '100%'
|
|
1450
|
+
},
|
|
1451
|
+
size: "large"
|
|
1452
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
1453
|
+
size: "large",
|
|
1454
|
+
wrap: true
|
|
1455
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
1456
|
+
label: "\u59D3\u540D",
|
|
1457
|
+
required: true,
|
|
1458
|
+
style: {
|
|
1459
|
+
marginBottom: 0
|
|
1460
|
+
}
|
|
1461
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1462
|
+
placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D",
|
|
1463
|
+
style: {
|
|
1464
|
+
width: 200
|
|
1465
|
+
}
|
|
1466
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1467
|
+
label: "\u6027\u522B",
|
|
1468
|
+
required: true,
|
|
1469
|
+
style: {
|
|
1470
|
+
marginBottom: 0
|
|
1471
|
+
}
|
|
1472
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
1473
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
1474
|
+
style: {
|
|
1475
|
+
width: 120
|
|
1476
|
+
}
|
|
1477
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
1478
|
+
value: "male"
|
|
1479
|
+
}, "\u7537"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
1480
|
+
value: "female"
|
|
1481
|
+
}, "\u5973"))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1482
|
+
label: "\u51FA\u751F\u65E5\u671F",
|
|
1483
|
+
required: true,
|
|
1484
|
+
style: {
|
|
1485
|
+
marginBottom: 0
|
|
1486
|
+
}
|
|
1487
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1488
|
+
type: "date",
|
|
1489
|
+
style: {
|
|
1490
|
+
width: 160
|
|
1491
|
+
}
|
|
1492
|
+
}))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1493
|
+
label: "\u8054\u7CFB\u7535\u8BDD",
|
|
1494
|
+
required: true
|
|
1495
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1496
|
+
placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",
|
|
1497
|
+
style: {
|
|
1498
|
+
width: 300
|
|
1499
|
+
}
|
|
1500
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1501
|
+
label: "\u7535\u5B50\u90AE\u7BB1",
|
|
1502
|
+
required: true
|
|
1503
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1504
|
+
placeholder: "\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1",
|
|
1505
|
+
style: {
|
|
1506
|
+
width: 300
|
|
1507
|
+
}
|
|
1508
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1509
|
+
label: "\u73B0\u5C45\u4F4F\u5730\u5740"
|
|
1510
|
+
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
1511
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740",
|
|
1512
|
+
rows: 3
|
|
1513
|
+
}))))))
|
|
1514
|
+
},
|
|
1515
|
+
footerProps: {
|
|
1516
|
+
position: 'fixed-bottom',
|
|
1517
|
+
leftSlot: /*#__PURE__*/React.createElement("div", {
|
|
1518
|
+
style: {
|
|
1519
|
+
color: '#999'
|
|
1520
|
+
}
|
|
1521
|
+
}, "\u7B2C 1 \u6B65\uFF0C\u5171 4 \u6B65"),
|
|
1522
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
1523
|
+
disabled: true
|
|
1524
|
+
}, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1525
|
+
type: "primary"
|
|
1526
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1527
|
+
},
|
|
1528
|
+
onStepsChange: function onStepsChange(result) {
|
|
1529
|
+
console.log('步骤变化:', result);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
// ========== 交互测试 ==========
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* 交互测试 - 组件渲染
|
|
1538
|
+
*/
|
|
1539
|
+
export var InteractionTest = {
|
|
1540
|
+
args: {
|
|
1541
|
+
defaultCurrent: 0,
|
|
1542
|
+
headerProps: {
|
|
1543
|
+
stepsProps: {
|
|
1544
|
+
items: [{
|
|
1545
|
+
title: '第一步'
|
|
1546
|
+
}, {
|
|
1547
|
+
title: '第二步'
|
|
1548
|
+
}, {
|
|
1549
|
+
title: '第三步'
|
|
1550
|
+
}]
|
|
1551
|
+
}
|
|
1552
|
+
},
|
|
1553
|
+
bodyProps: {
|
|
1554
|
+
contentSlot: /*#__PURE__*/React.createElement("div", {
|
|
1555
|
+
style: {
|
|
1556
|
+
padding: 24,
|
|
1557
|
+
minHeight: 400
|
|
1558
|
+
}
|
|
1559
|
+
}, /*#__PURE__*/React.createElement("h2", null, "\u6B65\u9AA4\u5185\u5BB9")),
|
|
1560
|
+
sidebarSlot: /*#__PURE__*/React.createElement("div", {
|
|
1561
|
+
style: {
|
|
1562
|
+
padding: 24
|
|
1563
|
+
}
|
|
1564
|
+
}, /*#__PURE__*/React.createElement("h3", null, "\u4FE1\u606F\u6458\u8981"))
|
|
1565
|
+
},
|
|
1566
|
+
footerProps: {
|
|
1567
|
+
actions: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, null, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement(Button, {
|
|
1568
|
+
type: "primary"
|
|
1569
|
+
}, "\u4E0B\u4E00\u6B65"))
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
play: function () {
|
|
1573
|
+
var _play = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1574
|
+
var canvasElement, canvas, procedure, steps;
|
|
1575
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1576
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1577
|
+
case 0:
|
|
1578
|
+
canvasElement = _ref.canvasElement;
|
|
1579
|
+
canvas = within(canvasElement); // 验证组件渲染
|
|
1580
|
+
procedure = canvasElement.querySelector('[data-component="pisell-procedure"]');
|
|
1581
|
+
_context.next = 5;
|
|
1582
|
+
return expect(procedure).toBeInTheDocument();
|
|
1583
|
+
case 5:
|
|
1584
|
+
// 验证步骤条存在
|
|
1585
|
+
steps = canvasElement.querySelectorAll('.ant-steps-item');
|
|
1586
|
+
_context.next = 8;
|
|
1587
|
+
return expect(steps.length).toBeGreaterThan(0);
|
|
1588
|
+
case 8:
|
|
1589
|
+
_context.next = 10;
|
|
1590
|
+
return expect(canvas.getByText('步骤内容')).toBeInTheDocument();
|
|
1591
|
+
case 10:
|
|
1592
|
+
_context.next = 12;
|
|
1593
|
+
return expect(canvas.getByText('信息摘要')).toBeInTheDocument();
|
|
1594
|
+
case 12:
|
|
1595
|
+
_context.next = 14;
|
|
1596
|
+
return expect(canvas.getByText('上一步')).toBeInTheDocument();
|
|
1597
|
+
case 14:
|
|
1598
|
+
_context.next = 16;
|
|
1599
|
+
return expect(canvas.getByText('下一步')).toBeInTheDocument();
|
|
1600
|
+
case 16:
|
|
1601
|
+
case "end":
|
|
1602
|
+
return _context.stop();
|
|
1603
|
+
}
|
|
1604
|
+
}, _callee);
|
|
1605
|
+
}));
|
|
1606
|
+
function play(_x) {
|
|
1607
|
+
return _play.apply(this, arguments);
|
|
1608
|
+
}
|
|
1609
|
+
return play;
|
|
1610
|
+
}()
|
|
1611
|
+
};
|