rb-document-form-constructor 0.9.16 → 0.9.17

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.
@@ -1,63 +1,63 @@
1
- <template>
2
- <b-modal id="rb-doc-template-section-modal" modal-class="rb-doc-template-section-modal"
3
- ok-title="Сохранить изменения"
4
- cancel-variant="outline-gray"
5
- cancel-title="Отмена"
6
- @ok.prevent="onOk"
7
- :title="title">
8
- <b-form @submit.prevent="onOk">
9
- <b-form-row>
10
- <b-col lg="12">
11
- <b-form-group label="Наименование секции">
12
- <rb-multi-lang-input v-model="label" />
13
- </b-form-group>
14
- </b-col>
15
- </b-form-row>
16
- </b-form>
17
- </b-modal>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- name: 'DocTemplateSectionModal',
23
- props: {
24
- section: Object,
25
- mode: {type: String, default: 'ins'},
26
- onAfterOk: {type: Function, default: () => {}}
27
- },
28
- data() {
29
- return {
30
- id: 'rb-doc-template-section-modal',
31
- label: {}
32
- }
33
- },
34
- computed: {
35
- title() {
36
- return this.mode === 'ins' ? 'Добавление секции' : 'Редактирование секции';
37
- }
38
- },
39
- watch: {
40
- section() {
41
- if(this.section) {
42
- this.label = this.section;
43
- }
44
- }
45
- },
46
- methods: {
47
- onOk() {
48
- this.section = this.label;
49
- if(this.onAfterOk) {
50
- this.onAfterOk();
51
- }
52
- this.$nextTick(() => {
53
- this.$bvModal.hide(this.id);
54
- });
55
- }
56
- },
57
- created() {
58
- if(this.section) {
59
- this.label = this.section;
60
- }
61
- }
62
- }
63
- </script>
1
+ <template>
2
+ <b-modal id="rb-doc-template-section-modal" modal-class="rb-doc-template-section-modal"
3
+ ok-title="Сохранить изменения"
4
+ cancel-variant="outline-gray"
5
+ cancel-title="Отмена"
6
+ @ok.prevent="onOk"
7
+ :title="title">
8
+ <b-form @submit.prevent="onOk">
9
+ <b-form-row>
10
+ <b-col lg="12">
11
+ <b-form-group label="Наименование секции">
12
+ <rb-multi-lang-input v-model="label" />
13
+ </b-form-group>
14
+ </b-col>
15
+ </b-form-row>
16
+ </b-form>
17
+ </b-modal>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ name: 'DocTemplateSectionModal',
23
+ props: {
24
+ section: Object,
25
+ mode: {type: String, default: 'ins'},
26
+ onAfterOk: {type: Function, default: () => {}}
27
+ },
28
+ data() {
29
+ return {
30
+ id: 'rb-doc-template-section-modal',
31
+ label: {}
32
+ }
33
+ },
34
+ computed: {
35
+ title() {
36
+ return this.mode === 'ins' ? 'Добавление секции' : 'Редактирование секции';
37
+ }
38
+ },
39
+ watch: {
40
+ section() {
41
+ if(this.section) {
42
+ this.label = this.section;
43
+ }
44
+ }
45
+ },
46
+ methods: {
47
+ onOk() {
48
+ this.section = this.label;
49
+ if(this.onAfterOk) {
50
+ this.onAfterOk();
51
+ }
52
+ this.$nextTick(() => {
53
+ this.$bvModal.hide(this.id);
54
+ });
55
+ }
56
+ },
57
+ created() {
58
+ if(this.section) {
59
+ this.label = this.section;
60
+ }
61
+ }
62
+ }
63
+ </script>