ylwl-cpscoms 1.0.0 → 1.2.0

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.
Files changed (48) hide show
  1. package/es/DtTable/index.vue.js +379 -0
  2. package/es/DtTable/index.vue2.js +719 -0
  3. package/es/DtTable/index.vue3.js +6 -0
  4. package/es/SlAlert/index.vue.js +1 -1
  5. package/es/SlAlert/index.vue3.js +1 -1
  6. package/es/SlForm/index.vue.js +1 -1
  7. package/es/SlForm/index.vue3.js +1 -1
  8. package/es/SlPage/index.vue.js +2 -2
  9. package/es/SlPage/index.vue3.js +1 -1
  10. package/es/index.js +3 -1
  11. package/package.json +2 -3
  12. package/src/SlAlert/SlAlert.stories.js +0 -108
  13. package/src/SlAlert/index.vue +0 -54
  14. package/src/SlAlert/remark.md +0 -16
  15. package/src/SlDescriptions/SlDescriptions.stories.js +0 -119
  16. package/src/SlDescriptions/index.vue +0 -60
  17. package/src/SlDescriptions/renderOptions.vue +0 -27
  18. package/src/SlDialog/README-PLUS.md +0 -74
  19. package/src/SlDialog/README.md +0 -114
  20. package/src/SlDialog/dialogPlus.js +0 -160
  21. package/src/SlDialog/index.js +0 -170
  22. package/src/SlDrawer/SlDrawer.stories.js +0 -154
  23. package/src/SlDrawer/index.js +0 -62
  24. package/src/SlForm/SlForm.stories.js +0 -120
  25. package/src/SlForm/index.css +0 -141
  26. package/src/SlForm/index.vue +0 -365
  27. package/src/SlForm/mixinRender.js +0 -228
  28. package/src/SlForm/otherItem/titleItem.vue +0 -31
  29. package/src/SlForm/remark.md +0 -607
  30. package/src/SlGuide/SlGuide.stories.js +0 -100
  31. package/src/SlGuide/index.vue +0 -166
  32. package/src/SlGuide/remark.md +0 -90
  33. package/src/SlMessageBox/index.js +0 -35
  34. package/src/SlPage/README.md +0 -515
  35. package/src/SlPage/SlPage.stories.js +0 -125
  36. package/src/SlPage/index.css +0 -38
  37. package/src/SlPage/index.vue +0 -266
  38. package/src/SlPage/remark.md +0 -283
  39. package/src/SlTable/SlTable.stories.js +0 -118
  40. package/src/SlTable/components/colSetting.vue +0 -86
  41. package/src/SlTable/index.vue +0 -541
  42. package/src/SlTitle/SlTitle.stories.js +0 -98
  43. package/src/SlTitle/index.vue +0 -49
  44. package/src/global.css +0 -5
  45. package/src/index.js +0 -47
  46. package/src/store/index.js +0 -20
  47. package/src/utils/index.js +0 -47
  48. package/src/utils/tableConfig.js +0 -33
@@ -1,120 +0,0 @@
1
- import SlForm from './index.vue'
2
-
3
- export default {
4
- title: 'Components/SlForm',
5
- component: SlForm,
6
- parameters: {
7
- docs: {
8
- description: {
9
- component: '动态表单组件,通过 data 配置数组驱动渲染。支持 input、select、datePicker、radio、switch、rangeInput、title、slot 等控件类型。支持表单校验、联动、重置等功能。'
10
- }
11
- }
12
- }
13
- }
14
-
15
- const codeBlock = (code) => `
16
- <div style="margin-top:24px;border-top:1px solid #eee;padding-top:16px">
17
- <p style="font-size:14px;font-weight:600;color:#666;margin-bottom:8px;">使用代码:</p>
18
- <pre style="background:#f5f5f5;padding:16px;border-radius:4px;overflow-x:auto;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-all"><code>${escapeHtml(code.trim())}</code></pre>
19
- </div>`
20
-
21
- function escapeHtml(str) {
22
- return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
23
- }
24
-
25
- // ---- 搜索表单 ----
26
- const searchCode = `<!-- 搜索表单(inline 模式) -->
27
- <sl-form v-model="form" :data="options"
28
- :showlabel="false"
29
- :form-props="{ inline: true, size: 'small' }" />`
30
-
31
- export const SearchForm = () => ({
32
- components: { SlForm },
33
- data() {
34
- return {
35
- form: {},
36
- options: [
37
- { label: '用户名', type: 'input', model: 'userName', privateAttrs: { placeholder: '请输入用户名' } },
38
- { label: '状态', type: 'select', model: 'status', options: [
39
- { label: '启用', value: 1 }, { label: '禁用', value: 0 }
40
- ], props: { placeholder: '请选择状态' } },
41
- { label: '创建时间', type: 'datePicker', model: 'createTime', privateProps: { type: 'daterange', valueFormat: 'yyyy-MM-dd' } }
42
- ]
43
- }
44
- },
45
- template: `
46
- <div>
47
- <sl-form ref="form" v-model="form" :data="options" :showlabel="false" :form-props="{ inline: true, size: 'small' }" />
48
- <div style="margin-top:12px;color:#666;font-size:13px">表单值:{{ form }}</div>
49
- ${codeBlock(searchCode)}
50
- </div>`
51
- })
52
-
53
- SearchForm.storyName = '搜索表单(inline)'
54
-
55
- // ---- 编辑表单 ----
56
- const editCode = `<!-- 编辑表单(非 inline) -->
57
- <sl-form v-model="form" :data="options" item-width="100%"
58
- :form-props="{ inline: false, size: 'small', labelWidth: '120px' }" />`
59
-
60
- export const EditForm = () => ({
61
- components: { SlForm },
62
- data() {
63
- return {
64
- form: { userName: '张三', status: 1 },
65
- options: [
66
- { label: '用户名', type: 'input', model: 'userName', rules: [
67
- { required: true, message: '请输入用户名', trigger: 'blur' }
68
- ]},
69
- { label: '状态', type: 'radio', model: 'status', options: [
70
- { label: '启用', value: 1 }, { label: '禁用', value: 0 }
71
- ], rules: [
72
- { required: true, message: '请选择状态', trigger: 'change' }
73
- ]},
74
- { label: '备注', type: 'input', model: 'remark', privateAttrs: { type: 'textarea', rows: 3 }, remark: '选填,最多200字' },
75
- { label: '开关', type: 'switch', model: 'enable', value: true }
76
- ]
77
- }
78
- },
79
- template: `
80
- <div style="max-width:600px">
81
- <sl-form ref="form" v-model="form" :data="options" item-width="100%" :form-props="{ inline: false, size: 'small', labelWidth: '120px' }" />
82
- <div style="margin-top:12px;color:#666;font-size:13px">表单值:{{ form }}</div>
83
- ${codeBlock(editCode)}
84
- </div>`
85
- })
86
-
87
- EditForm.storyName = '编辑表单'
88
-
89
- // ---- 带标题分组 ----
90
- const titleCode = `<!-- 使用 title 类型分组 -->
91
- <sl-form v-model="form" :data="options" item-width="100%"
92
- :form-props="{ inline: false, size: 'small', labelWidth: '120px' }">
93
- <el-button type="primary" size="small">保存</el-button>
94
- </sl-form>`
95
-
96
- export const WithTitle = () => ({
97
- components: { SlForm },
98
- data() {
99
- return {
100
- form: {},
101
- options: [
102
- { type: 'title', label: '基本信息', model: 'title1' },
103
- { label: '姓名', type: 'input', model: 'name' },
104
- { label: '年龄', type: 'input', model: 'age' },
105
- { type: 'title', label: '联系方式', model: 'title2' },
106
- { label: '手机号', type: 'input', model: 'phone' },
107
- { label: '邮箱', type: 'input', model: 'email' }
108
- ]
109
- }
110
- },
111
- template: `
112
- <div style="max-width:600px">
113
- <sl-form ref="form" v-model="form" :data="options" item-width="100%" :form-props="{ inline: false, size: 'small', labelWidth: '120px' }">
114
- <el-button type="primary" size="small">保存</el-button>
115
- </sl-form>
116
- ${codeBlock(titleCode)}
117
- </div>`
118
- })
119
-
120
- WithTitle.storyName = '带标题分组'
@@ -1,141 +0,0 @@
1
- .yl-form-item {
2
- display: flex;
3
- align-items: center;
4
-
5
- }
6
- ::v-deep .el-form-item__content {
7
- display: flex;
8
- flex: 1;
9
- margin: 0 !important;
10
- }
11
-
12
- .yl-form-fullitem .el-form-item__content {
13
- flex: 1;
14
- }
15
-
16
- .yl-form-item {
17
- display: inline-flex !important;
18
- /* margin-bottom: 20px; */
19
- }
20
- .yl-form-item .yl-form-item-grid .el-form-item__content {
21
- font-size: 0;
22
- }
23
- .content-box {
24
- position: absolute;
25
- right: 0;
26
- top: 0;
27
- background-color: rgba(255, 255, 255, 0.5);
28
- padding: 10px;
29
- height: 100%;
30
- box-shadow: 0 0 5px rgb(223, 222, 222);
31
- }
32
- .item-label {
33
- display: inline-block;
34
- width: auto;
35
- overflow: hidden;
36
- text-overflow: ellipsis;
37
- white-space: nowrap;
38
- vertical-align: middle;
39
- }
40
- .yl-form-box-shrink {
41
- padding: 10px;
42
- overflow: hidden;
43
- /* border: 1px solid #c1c1c1; */
44
- background-color: #f1f1f1;
45
- /* box-shadow: inset 0 0 5px #c1c1c1; */
46
- }
47
- .yl-form-drawericon {
48
- display: inline-block;
49
- vertical-align: top;
50
- }
51
- .yl-form-drawericon-float {
52
- position: absolute;
53
- right: 0;
54
- top: 0;
55
- /* transform: translateY(-50%); */
56
- padding: 10px;
57
- z-index: 10;
58
- background-image: linear-gradient(to left, #ffa140, rgba(255, 255, 255, 0));
59
- opacity: 0.9;
60
- padding-left: 80px;
61
- }
62
- .yl-i-lebel {
63
- line-height: 12px;
64
- font-size: 12px;
65
- z-index: 5;
66
- right: 0;
67
- background-color: #979797;
68
- /* background-image: linear-gradient(to right,#dcdfe6 ,#fff); */
69
- padding: 2px 8px 4px 10px;
70
- border-radius: 4px 4px 0 0;
71
- color: #fff;
72
- width: auto;
73
- position: absolute;
74
- right: 0;
75
- top: 0;
76
- /* border: 1px solid #dcdfe6; */
77
- /* transform: scale(0.7); */
78
- border-radius: 0 4px 0px 10px;
79
- transform-origin: 100% 0;
80
- transform: scale(0.8);
81
- }
82
- .yl-r-icon {
83
- color: red;
84
- position: absolute;
85
- left: 0;
86
- top: 50%;
87
- z-index: 5;
88
- padding: 5px;
89
- line-height: 35px;
90
- transform: translateY(-50%);
91
- }
92
- .yl-form-slider {
93
- border: 1px solid #dcdfe6;
94
- border-radius: 4px;
95
- display: flex;
96
- padding: 0 20px 0 10px;
97
- line-height: 35px;
98
- }
99
- .yl-form-slider-span {
100
- padding-right: 15px;
101
- color: #c0c4cc;
102
- }
103
- .yl-form-box {
104
- white-space: normal;
105
- position: relative;
106
- transition: all 0.2s ease-out;
107
- border-radius: 4px;
108
- }
109
- .yl-form-item {
110
- white-space: nowrap;
111
- position: relative;
112
- }
113
- .yl-form-range-input {
114
- border-radius: 4px;
115
- border: 1px solid #dcdfe6;
116
- padding: 0 10px;
117
- /* line-height: 38px; */
118
- }
119
- /* .yl-form-range-input input:nth-of-type(1){
120
- margin-right: 10px;
121
- } */
122
- .yl-form-range-input input {
123
- width: 70px;
124
- border: none;
125
- height: 100%;
126
- outline: none;
127
- /* background-color: #dcdfe6; */
128
- padding: 7px;
129
- text-align: center;
130
- border-radius: 4px;
131
- }
132
- .yl-form-range-input input:focus {
133
- /* box-shadow: inset 0 0 2px #5c85e6; */
134
- }
135
- .yl-form-range-input input::placeholder {
136
- color: #c0c4cc;
137
- }
138
-
139
- .el-radio {
140
- margin-bottom: 0px!important;
141
- }
@@ -1,365 +0,0 @@
1
- <script>
2
- import { typeOf, hasKey, filterKey, transformName } from '@/components/global/utils'
3
- import EL from 'element-ui'
4
- import mixinRender from './mixinRender'
5
-
6
- export default {
7
- name: 'SlForm',
8
- mixins: [mixinRender],
9
- props: {
10
- value: { type: Object, default: () => ({}) },
11
- itemWidth: { type: String, default: '' },
12
- data: { type: Array, default: () => [] },
13
- showlabel: { type: Boolean, default: true },
14
- drawer: { type: Boolean, default: false }, // 开启抽屉模式
15
- formProps: { type: Object, default: () => ({ inline: true }) },
16
- formItemProps: { type: Object, default: () => ({}) },
17
- pipe: { type: Object, default: () => ({}) }, // 动态管道
18
- freeData: { type: Object, default: () => ({}) }, // 游离的数据(将会合并到form一起返回)
19
- initItem: { type: Function, default: () => {} } // 初始化item的值
20
- },
21
- data() {
22
- const state = this.formateState()
23
- return {
24
- ...state,
25
- isDrawerOpen: true,
26
- boxHeight: 'auto',
27
- firstitemHeight: '0',
28
- selectOptions: {}, // 实时渲染的selectOptions
29
- selectAllOptions: {}, // 初始化好的Select的Options
30
- aggGameId: '123456'
31
- }
32
- },
33
- mounted() {
34
- // console.log('mounted', this.form)
35
- this.$emit('input', this.form)
36
- this.initFirstHieght()
37
- },
38
- methods: {
39
- // 重置
40
- reset() {
41
- const { form, transfer } = JSON.parse(
42
- JSON.stringify(this.catchInitValueData)
43
- )
44
- this.form = form
45
- this.transfer = transfer
46
- this.$emit('input', this.form)
47
- },
48
- initFirstHieght() {
49
- const { offsetHeight = 0 } = (this.$refs.firstItem || {}).$el || {}
50
- this.firstitemHeight = offsetHeight + 20 + 'px'
51
- },
52
- formateState() {
53
- const { data, freeData } = this.$props
54
- const form = { ...freeData }
55
- const transfer = {}
56
- const initData = data.reduce((pre, item) => {
57
- // debugger
58
- if (hasKey(item, ['model', 'type'])) {
59
- !item.props && (item.props = {})
60
- item = this.initItem(item) || item
61
- const { callback, model, value } = item
62
- const dispersed = typeOf(callback, 'function') // 是否离散键(拆分model键)
63
-
64
- const target = dispersed ? transfer : form //
65
- const valueSource = target[model] !== undefined ? target[model] : this.$props.value[model] !== undefined ? this.$props.value[model] : value !== undefined ? value : ''
66
- if (dispersed) {
67
- const res = callback(valueSource || '') || {}
68
- Object.keys(res).forEach((key) => {
69
- res[key] === undefined && (res[key] = '')
70
- // console.log(!hasKey(form, [key]), "form[key],", form, key, [key])
71
- !hasKey(form, [key]) && (form[key] = res[key] || '')
72
- })
73
- }
74
- // console.log(valueSource, "valueSource", !hasKey(target, [model]))
75
- !hasKey(target, [model]) && (target[model] = valueSource)
76
- pre.push(item)
77
- // if (item.show === undefined || item.show === null) pre.push(item)
78
- // else if (typeOf(item.show, 'function') && item.show()) pre.push(item)
79
- // else if (typeOf(item.show, 'boolean') && item.show) pre.push(item)
80
- }
81
- return pre
82
- }, [])
83
-
84
- // console.log(initData, "initData")
85
- setTimeout(() => {
86
- // 初始化后再watch
87
- initData.forEach((...p) => this.watchValue(...p))
88
- })
89
- // const aaa = {
90
- // form,
91
- // transfer,
92
- // initData,
93
- // catchInitValueData: {
94
- // form: JSON.parse(JSON.stringify(form)),
95
- // transfer: JSON.parse(JSON.stringify(transfer))
96
- // }
97
- // }
98
- // console.log(aaa, "zxckxzcnxzkjc")
99
- return {
100
- form,
101
- transfer,
102
- initData,
103
- catchInitValueData: {
104
- form: JSON.parse(JSON.stringify(form)),
105
- transfer: JSON.parse(JSON.stringify(transfer))
106
- }
107
- }
108
- },
109
- // 联动变化监听
110
- watchValue(item, i, ary) {
111
- const { callback, model, linkSet } = item
112
- if (typeOf(linkSet, 'function')) {
113
- const dispersed = typeOf(callback, 'function')
114
- const target = dispersed ? this.transfer : this.form
115
- const targetstr = dispersed ? 'transfer' : 'form'
116
- const watchCallback = async function(val) {
117
- let getInfo = (await linkSet(val || '')) || {}
118
- if (!Array.isArray(getInfo)) {
119
- getInfo = [getInfo]
120
- }
121
- getInfo.forEach((setItem) => {
122
-
123
- this.$set(this.selectOptions, setItem.model, setItem.options || [])
124
- let nextItem = {}
125
- const tindex = ary.findIndex((item1) => {
126
- const flag = item1.model === setItem.model
127
- flag && (nextItem = item1)
128
- return flag
129
- })
130
- console.log('watchCallback', setItem, nextItem, ary, tindex, '----', this.initData)
131
- const nextTarget = typeOf(nextItem.callback, 'function')
132
- ? this.transfer
133
- : this.form
134
- hasKey(setItem, 'value') &&
135
- (nextTarget[setItem.model] = setItem.value)
136
- tindex !== -1 && this.$set(
137
- ary,
138
- tindex,
139
- Object.assign(ary[tindex], setItem)
140
- )
141
- console.log('watchCallback22222', this.initData, ary)
142
- // this.initData = ary.filter((item) => {
143
- // console.log('watchCallback44444', item)
144
- // if ((item.show === undefined || item.show === null) || (typeOf(item.show, 'function') && item.show()) || (typeOf(item.show, 'boolean') && item.show)) {
145
- // nextTarget[setItem.model] = ''
146
- // return true
147
- // }
148
- // return false
149
- // })
150
- console.log('watchCallback333333', this.initData)
151
- })
152
-
153
- }
154
- this.$watch(`${targetstr}.${model}`, watchCallback)
155
- watchCallback.call(this, target[model]) // 首次进行绑定执行
156
- }
157
- },
158
- fomateValue(item, value = item.value) {
159
- const { callback } = item
160
- console.log('fomateValue', typeOf(callback, 'function'), this.form)
161
- if (typeOf(callback, 'function')) {
162
- this.transfer[item.model] = value
163
- const res = callback(value || '') || {}
164
- // console.log(res, 'res')
165
- Object.keys(res).forEach((key) => {
166
- res[key] === undefined && (res[key] = '')
167
- })
168
- Object.assign(this.form, res)
169
- console.log(this.form, 'this.form')
170
- } else {
171
- if (item.type === 'input') {
172
- this.form[item.model] = value.replace(/^[ \t]+|[ \t]+$/g, '');
173
- } else {
174
- this.form[item.model] = value
175
- }
176
- }
177
- },
178
- validate() {
179
- return this.$refs.form.validate()
180
- },
181
- // 提交表单
182
- submit() {
183
- return new Promise((res, rej) => {
184
- this.$refs.form.validate((isOk, msg) => {
185
- if (isOk) {
186
- res(this.form)
187
- } else {
188
- rej(msg)
189
- }
190
- })
191
- })
192
- },
193
-
194
- setItemValue(item) {
195
- const target = item.callback ? this.transfer : this.form
196
- target[item.model] = item.value
197
- },
198
- initCommonProps(item, filters = [], privateProps = {}, privateAttrs = {}) {
199
- const target = item.callback ? this.transfer : this.form
200
- // console.log('initCommonProps', item, target, this.value, item.callback ? '1' : '2', this.form)
201
- // this.form[item.model] = ''
202
- // console.log(this.form, 'this.form111', filterKey(item.props, filters), privateProps)
203
- const { itemWidth, showlabel } = this.$props
204
- return {
205
- style: `width:${showlabel ? '100%' : item.width || itemWidth};${
206
- item.style
207
- }`,
208
- props: Object.assign(
209
- {
210
- value: this.form[item.model],
211
- clearable: true,
212
- filterable: true,
213
- placeholder: showlabel ? '请输入' + item.label : item.label
214
- },
215
- filterKey(item.props, filters),
216
- privateProps
217
- ),
218
- attrs: { placeholder: showlabel ? '请输入' + item.label : item.label, ...privateAttrs },
219
- on: {
220
- input: (value) => {
221
- this.fomateValue(item, value)
222
- }
223
- }
224
- }
225
- },
226
- initOptions(item) {
227
- if (item.asycnOptions && typeOf(item.asycnOptions, 'function')) {
228
- // console.log(item.asycnOptions, 'it-----em')
229
- item.asycnOptions().then(result => {
230
- // console.log(result, "result")
231
- this.$set(this.selectOptions, item.model, result || [])
232
- })
233
- } else {
234
- this.$set(this.selectOptions, item.model, item.options || [])
235
- }
236
- }
237
- },
238
- created() {
239
- this.initData.forEach((item) => {
240
- if (['select', 'checkbox', 'radio'].includes(item.type)) {
241
- this.initOptions(item)
242
- }
243
- })
244
- },
245
-
246
- render(ce) {
247
- const { showlabel, itemWidth, drawer } = this.$props
248
- // console.log('render', this.initData)
249
- const updateInitData = this.initData.filter((item) => {
250
- if ((item.show === undefined || item.show === null) || (typeOf(item.show, 'function') && item.show()) || (typeOf(item.show, 'boolean') && item.show)) {
251
- return true
252
- }
253
- return false
254
- })
255
- const formItems = updateInitData.map((item, ii) => {
256
- const { label, model, rules, type, width, labelTips } = item
257
- if (type === 'title') {
258
- return this.renderTitle(ce, item)
259
- }
260
- // console.log(item, "itexxxxxxm", this)
261
- if (type === 'slot' && item.slotName && this.$slots[item.slotName]) {
262
- return ce('div', {
263
- class: 'yl-form-slot-container',
264
- style: item.style || ''
265
- }, this.$slots[item.slotName])
266
- }
267
-
268
- const itemBody = [this[`render${transformName(type)}`](ce, item)]
269
- const itemClass = `yl-form-item ${showlabel ? '' : 'yl-form-fullitem'} ${
270
- item.className || ''
271
- }`
272
- // if (!showlabel) {
273
- // itemBody.unshift(ce('div', { class: 'yl-i-lebel' }, label))
274
- // itemClass += 'yl-form-item-grid'
275
- // }
276
- if (
277
- item.rules &&
278
- item.rules.find(({ required }) => required) &&
279
- !showlabel
280
- ) {
281
- itemBody.unshift(ce('span', { class: 'yl-r-icon' }, '*'))
282
- }
283
- const itemSet = {
284
- class: itemClass,
285
- style: `width:${width || itemWidth};${item.style}`,
286
- props: Object.assign(
287
- { label: showlabel ? label : '', prop: model, rules },
288
- this.formItemProps
289
- ),
290
- scopedSlots: {
291
- label: () =>
292
- ce(
293
- 'span',
294
- { style: 'label-container' },
295
- [
296
- labelTips ? ce(
297
- 'el-tooltip',
298
- {
299
- props: {
300
- content: labelTips,
301
- placement: 'top'
302
- }
303
- },
304
- [
305
- ce(
306
- 'i',
307
- { class: 'el-icon-info' },
308
- []
309
- )
310
- ]
311
- ) : '',
312
- ce(
313
- 'span',
314
- { class: 'item-label', domProps: { title: label }, style: 'margin-left: 5px;' },
315
- label + ':'
316
- )
317
- ]
318
- )
319
- }
320
- }
321
- ii === 0 && (itemSet.ref = 'firstItem')
322
- const ft = ce(EL.FormItem, itemSet, itemBody)
323
- return ft
324
- })
325
- // console.log(this, "this.$scopedSlots.default")
326
- if (this.$slots.default || drawer) {
327
- const element = []
328
- // this.$slots.default &&
329
- // element.push(this.$slots.default(this.form))
330
- drawer && element.push(this.renderDrawer(ce))
331
- formItems.push(
332
- ce(
333
- 'div',
334
- {
335
- class: `yl-form-drawericon ${
336
- this.isDrawerOpen ? '' : 'yl-form-drawericon-float'
337
- }`
338
- },
339
- this.$slots.default
340
- )
341
- )
342
- }
343
- // console.log(this.formProps, "this.formProps")
344
- return ce(
345
- EL.Form,
346
- {
347
- class: {
348
- 'yl-form-box': true,
349
- 'yl-form-box-shrink': !this.isDrawerOpen,
350
- 'yl-form-box-inline': this.formProps.inline
351
- },
352
- style: `height:${this.boxHeight}`,
353
- props: Object.assign({ model: this.form }, this.formProps),
354
- ref: 'form',
355
- nativeOn: { submit: (e) => e.preventDefault() }
356
- },
357
- formItems
358
- )
359
- }
360
- }
361
- </script>
362
-
363
- <style scoped >
364
- @import url('./index.css');
365
- </style>