1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| <template>
| <div class="page-list-container">
| <!--数据Table-->
| <yrt-data-list :ref="dataListRef" :editor-ref="editorRef" :data-options="dataOptions" :fields.sync="dataListOptions.fields" :buttons="dataListOptions.buttons" :button-click="buttonClick" :data-list-selections.sync="dataListSelections" :auth-nodes="authNodes">
| </yrt-data-list>
|
| <!--数据编辑器Editor-->
| <yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :action.sync="editorOptions.action" :top.sync="editorOptions.top" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes" :btn-read-only="btnReadOnly" :on-save-before="onSaveBefore" :default-value="defaultValue">
|
| </yrt-editor>
|
| </div>
| </template>
|
| <script>
| import baseLayout from "@/components/common/base-layout.vue";
|
| export default {
| name: "storage-setting-storage",
| components: {},
| mixins: [baseLayout],
| data() {
| return {
| // 编辑新建时表单默认值
| defaultValue: {
| parentId: 0
| }
| };
| },
| methods: {
| onSaveBefore(formData) {
| // 保存前设置parentId=0
| if (formData.parentId === undefined) {
| this.$set(formData, "parentId", 0);
| }
| }
| }
| };
| </script>
|
|