free-fe-core-modules 0.0.55 → 0.1.2

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,47 +1,23 @@
1
1
  <template>
2
2
  <div class="admin-dictionary-mgmt-wrapper full-height q-pa-md">
3
- <q-tree
4
- :nodes="(data && data.total) ? data.docs : []"
5
- ref="dictTree"
6
- accordion
7
- no-connectors
8
- node-key="id"
9
- label-key="Label"
10
- @lazy-load="loadSubDicts"
11
- @update:expanded="onNodeExpanded"
12
- >
3
+ <q-tree :nodes="(data && data.total) ? data.docs : []" ref="dictTree" accordion no-connectors node-key="id"
4
+ label-key="Label" @lazy-load="loadSubDicts" @update:expanded="onNodeExpanded">
13
5
  <template v-slot:default-header="prop">
14
- <div
15
- class="dictionary-head row items-center full-width"
16
- style="border-bottom: solid 1px grey;"
17
- >
6
+ <div class="dictionary-head row items-center full-width" style="border-bottom: solid 1px grey;">
18
7
  <div>
19
8
  {{ dictLabel(prop.node) }}
20
- <span
21
- v-if="prop.node.level === 1 && prop.node.Name"
22
- class="dictionary-data-name"
23
- >({{prop.node.Name}})</span>
24
- <div
25
- v-if="prop.node.Description"
26
- caption
27
- class="description ellipsis-3-lines"
28
- v-html="prop.node.Description"
29
- ></div>
9
+ <span v-if="prop.node.level === 1 && prop.node.Name" class="dictionary-data-name">({{ prop.node.Name
10
+ }})</span>
11
+ <div v-if="prop.node.Description" caption class="description ellipsis-3-lines"
12
+ v-html="prop.node.Description"></div>
30
13
  </div>
31
14
  <q-space></q-space>
32
15
 
33
16
  <span class="flex justify-start action-buttons">
34
- <q-btn v-if="prop.node.addingNew" flat icon="add"
35
- @click.stop="addNode(prop.node)"></q-btn>
36
- <q-btn v-if="!prop.node.addingNew" flat icon="edit"
37
- @click.stop="editNode(prop.node)"></q-btn>
38
- <q-btn
39
- v-if="!prop.node.addingNew"
40
- :disabled="prop.node.BuiltIn"
41
- flat
42
- icon="delete"
43
- @click.stop="deleteNode(prop.node)"
44
- ></q-btn>
17
+ <q-btn v-if="prop.node.addingNew" flat icon="add" @click.stop="addNode(prop.node)"></q-btn>
18
+ <q-btn v-if="!prop.node.addingNew" flat icon="edit" @click.stop="editNode(prop.node)"></q-btn>
19
+ <q-btn v-if="!prop.node.addingNew" :disabled="prop.node.BuiltIn" flat icon="delete"
20
+ @click.stop="deleteNode(prop.node)"></q-btn>
45
21
  </span>
46
22
  </div>
47
23
  </template>
@@ -49,12 +25,8 @@
49
25
  <template v-slot:default-body="prop">
50
26
  <div v-if="prop.node.id === selectedDictNode.id" class="full-width">
51
27
  <div v-for="(field, fIndex) in dictFields || []" :key="fIndex">
52
- <free-field
53
- v-if="field.Name !== 'Name' || !selectedDictNode.Parent"
54
- :values="editingDict"
55
- :Field="field"
56
- ref="fieldsToValidate"
57
- ></free-field>
28
+ <free-field v-if="field.Name !== 'Name' || !selectedDictNode.Parent" :values="editingDict" :Field="field"
29
+ ref="fieldsToValidate"></free-field>
58
30
  </div>
59
31
 
60
32
  <div class="action-btns full-width row justify-center q-gutter-md">
@@ -62,20 +34,17 @@
62
34
  <q-btn :label="$t('cancelButtonText')" class="btn-secondary" @click="onCancelClick" />
63
35
  </div>
64
36
 
65
- <sticky-buttons
66
- :actions="[
67
- {
37
+ <sticky-buttons :actions="[
38
+ {
68
39
  Action: 'cancel',
69
- icon:'cancel',
40
+ icon: 'cancel',
70
41
  Label: $t('cancelButtonText')
71
- },{
72
- Action: 'save',
73
- icon: 'save',
74
- Label:$t('saveButtonText')
75
- }
76
- ]"
77
- @click="stickyButtonClicked"
78
- ></sticky-buttons>
42
+ }, {
43
+ Action: 'save',
44
+ icon: 'save',
45
+ Label: $t('saveButtonText')
46
+ }
47
+ ]" @click="stickyButtonClicked"></sticky-buttons>
79
48
  </div>
80
49
  </template>
81
50
  </q-tree>
@@ -85,12 +54,7 @@
85
54
  <q-btn flat @click="importTranslates" class="btn-primary">导入翻译</q-btn>
86
55
 
87
56
  <div class="row full-width q-mt-md">
88
- <q-input v-if="showImportTextArea"
89
- class="full-width"
90
- type="textarea"
91
- autogrow
92
- v-model="importText"
93
- placeholder="请输入要导入的内容(tab键分割),如:
57
+ <q-input v-if="showImportTextArea" class="full-width" type="textarea" autogrow v-model="importText" placeholder="请输入要导入的内容(tab键分割),如:
94
58
  xxx类型 类型一 en-us Type One
95
59
  xxx类型 类型二 en-us Type Two"></q-input>
96
60
  </div>
@@ -99,11 +63,11 @@
99
63
  </template>
100
64
 
101
65
  <script>
102
- import { defineComponent, watch } from 'vue';
66
+ import { defineComponent } from 'vue';
103
67
  import { copyToClipboard } from 'quasar';
104
68
  import { requests } from '@/boot/axios';
105
- import { useObjectData, objectDataProps } from '../../composible/useObjectData';
106
- import { useFormValidator} from '../../composible/useFormValidator';
69
+ import { useObjectData, objectDataProps } from '../../composible/useObjectData.js';
70
+ import { useFormValidator} from '../../composible/useFormValidator.js';
107
71
 
108
72
  export default defineComponent({
109
73
  name: 'DictionaryPage',
@@ -138,7 +102,7 @@ export default defineComponent({
138
102
  };
139
103
  },
140
104
  watch: {
141
- // eslint-disable-next-line func-names
105
+
142
106
  'editingDict.Type': function (v) {
143
107
  const valueField = this.dictFields.find((f) => f.Name === 'Value');
144
108
  if (valueField) {
@@ -393,7 +357,6 @@ export default defineComponent({
393
357
  } else {
394
358
  // do the i
395
359
  this.postRequest('/dict/import/trans', {c: this.importText}).then((d) => {
396
- const data = d && d.data;
397
360
  if (d && d.msg === 'OK') {
398
361
  this.$q.notify('导入成功!');
399
362
  }
@@ -403,8 +366,6 @@ export default defineComponent({
403
366
  exportTranslates() {
404
367
  this.showImportTextArea = false;
405
368
  this.getRequest('/dict/export/trans').then((d) => {
406
- const data = (d && d.data) || {};
407
-
408
369
  if (d.data.c) {
409
370
  copyToClipboard(d.data.c);
410
371
  this.$q.notify('已拷贝到剪切板,可直接粘贴至excel等工具!');