@truenewx/tnxvue3 3.0.0-alpha.13 → 3.0.0-alpha.14
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/package.json +2 -3
- package/src/element-plus/date-picker/DatePicker.vue +1 -1
- package/src/element-plus/dialog/Dialog.vue +14 -14
- package/src/element-plus/query-table/QueryTable.vue +1 -1
- package/src/element-plus/steps-nav/StepsNav.vue +2 -2
- package/src/element-plus/submit-form/SubmitForm.vue +5 -5
- package/src/element-plus/upload/Upload.vue +23 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truenewx/tnxvue3",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.14",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,10 +24,9 @@
|
|
|
24
24
|
"vue-router": "~4.4.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@truenewx/tnxcore": "3.0.0-alpha.
|
|
27
|
+
"@truenewx/tnxcore": "3.0.0-alpha.8",
|
|
28
28
|
"@element-plus/icons-vue": "2.3.1",
|
|
29
29
|
"async-validator": "4.2.5",
|
|
30
|
-
"crypto-es": "2.1.0",
|
|
31
30
|
"mitt": "3.0.1"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog :data-v-id="id"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
class="tnxel-dialog"
|
|
4
|
+
v-model="visible"
|
|
5
|
+
destroy-on-close
|
|
6
|
+
append-to-body
|
|
7
|
+
:modal="options.modal"
|
|
8
|
+
:close-on-click-modal="options['close-on-click-modal']"
|
|
9
|
+
:close-on-press-escape="options['close-on-press-escape']"
|
|
10
|
+
:show-close="options['show-close']"
|
|
11
|
+
:center="options.center"
|
|
12
|
+
:before-close="beforeClose"
|
|
13
|
+
@closed="onClosed">
|
|
14
14
|
<template #header>
|
|
15
15
|
<div class="tnxel-dialog-title" :class="mergeClass({'border-bottom': title})" v-html="title"
|
|
16
|
-
|
|
16
|
+
v-if="title || options['show-close']"></div>
|
|
17
17
|
</template>
|
|
18
18
|
<template v-if="$slots.default">
|
|
19
19
|
<slot></slot>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<template #footer v-if="buttons && buttons.length">
|
|
24
24
|
<div class="tnxel-dialog-footer" :class="mergeClass()">
|
|
25
25
|
<el-button v-for="(button, index) in buttons" :type="button.type" :key="index"
|
|
26
|
-
|
|
26
|
+
:loading="buttonLoadings[index]" @click="btnClick(index)">{{ button.caption || button.text }}
|
|
27
27
|
</el-button>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
|
-
import
|
|
34
|
+
import $ from 'cash-dom';
|
|
35
35
|
import DialogContent from './DialogContent.vue';
|
|
36
36
|
|
|
37
37
|
const util = window.tnx.util;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-steps class="w-fit-content tnxel-steps-nav" :id="id" direction="vertical" :space="space">
|
|
3
3
|
<el-step status="finish" v-for="item in items" :key="item.target" :data-target="item.target"
|
|
4
|
-
|
|
4
|
+
:title="item.title"/>
|
|
5
5
|
</el-steps>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
9
|
-
import
|
|
9
|
+
import $ from 'cash-dom';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
name: 'TnxelStepsNav',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form ref="form" :id="id" :label-width="labelWidth" :label-position="vertical ? 'top' : 'right'"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
:model="model" :rules="validationRules" :validate-on-rule-change="false"
|
|
4
|
+
:inline="inline" :inline-message="!vertical" :disabled="disabled"
|
|
5
|
+
:class="theme ? ('theme-' + theme) : null" :size="size" :status-icon="statusIcon">
|
|
6
6
|
<slot></slot>
|
|
7
7
|
<el-form-item class="w-100 mb-0" :label="vertical ? undefined : ' '"
|
|
8
|
-
|
|
8
|
+
v-if="submit !== undefined && submit !== null">
|
|
9
9
|
<el-button :type="theme || 'primary'" :size="size" @click="toSubmit" v-if="submit !== false">
|
|
10
10
|
{{ _submitText }}
|
|
11
11
|
</el-button>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script>
|
|
18
|
-
import
|
|
18
|
+
import $ from 'cash-dom';
|
|
19
19
|
import AsyncValidator from 'async-validator';
|
|
20
20
|
|
|
21
21
|
export default {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-upload ref="upload" name="file" class="tnxel-upload-container"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
:class="{center: center, 'hide-file-list': !showFileList}"
|
|
4
|
+
:id="id"
|
|
5
|
+
:action="actionUrl"
|
|
6
|
+
:before-upload="_beforeUpload"
|
|
7
|
+
:on-progress="_onProgress"
|
|
8
|
+
:on-success="_onSuccess"
|
|
9
|
+
:on-error="_onError"
|
|
10
|
+
:with-credentials="true"
|
|
11
|
+
:list-type="listType"
|
|
12
|
+
:file-list="fileList"
|
|
13
|
+
:show-file-list="true"
|
|
14
|
+
:headers="uploadHeaders"
|
|
15
|
+
:multiple="uploadOptions && uploadOptions.number !== 1"
|
|
16
|
+
:accept="uploadAccept" :disabled="disabled" v-if="uploadOptions">
|
|
17
17
|
<template #file="{file}">
|
|
18
18
|
<div class="el-upload-list__panel" :data-file-id="getFileId(file)" :style="itemPanelStyle"
|
|
19
|
-
|
|
19
|
+
v-if="showFileList">
|
|
20
20
|
<img class="el-upload-list__item-thumbnail" :src="file.url" v-if="imageable">
|
|
21
21
|
<div class="el-upload-list__item-name" v-else>
|
|
22
22
|
<tnxel-icon :value="getFileIcon(file)"/>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</span>
|
|
28
28
|
<label class="el-upload-list__item-status-label">
|
|
29
29
|
<el-progress type="circle" :percentage="file.percentage" :width="16" :stroke-width="3"
|
|
30
|
-
|
|
30
|
+
:show-text="false" v-if="isUploading(file)"/>
|
|
31
31
|
<tnxel-icon value="CircleCheck" class="text-success" v-else-if="listType === 'text'"/>
|
|
32
32
|
<tnxel-icon value="Check" style="margin-top: 8px;" v-else/>
|
|
33
33
|
</label>
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
<template #trigger>
|
|
41
41
|
<el-tooltip :content="tipContent" placement="top" :disabled="tip !== 'tooltip'">
|
|
42
42
|
<div class="upload-trigger" :title="tip === 'title' ? tipContent : undefined"
|
|
43
|
-
|
|
43
|
+
:class="{'text-placeholder': disabled}" v-if="$slots.trigger">
|
|
44
44
|
<slot name="trigger"></slot>
|
|
45
45
|
</div>
|
|
46
46
|
<el-button class="upload-trigger" :title="tip === 'title' ? tipContent : undefined"
|
|
47
|
-
|
|
47
|
+
:disabled="disabled" v-else-if="listType === 'text'">
|
|
48
48
|
<tnxel-icon :value="triggerIcon" :size="uploadIconSize"/>
|
|
49
49
|
<div class="upload-trigger-text" v-if="triggerText">{{ triggerText }}</div>
|
|
50
50
|
</el-button>
|
|
51
51
|
<div class="upload-trigger" :title="tip === 'title' ? tipContent : undefined"
|
|
52
|
-
|
|
52
|
+
:class="{'text-placeholder': disabled}" v-else>
|
|
53
53
|
<tnxel-icon :value="triggerIcon" :size="uploadIconSize"/>
|
|
54
54
|
<div class="upload-trigger-text" v-if="triggerText">{{ triggerText }}</div>
|
|
55
55
|
</div>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script>
|
|
70
|
-
import
|
|
70
|
+
import $ from 'cash-dom';
|
|
71
71
|
import Alert from '../alert/Alert.vue';
|
|
72
72
|
import Icon from '../icon/Icon.vue';
|
|
73
73
|
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
233
233
|
},
|
|
234
234
|
uploadAccept() {
|
|
235
235
|
if (this.uploadOptions && !this.uploadOptions.extensionsRejected && this.uploadOptions.extensions
|
|
236
|
-
|
|
236
|
+
&& this.uploadOptions.extensions.length) {
|
|
237
237
|
let accept = '';
|
|
238
238
|
for (let extension of this.uploadOptions.extensions) {
|
|
239
239
|
accept += ',.' + extension;
|
|
@@ -342,7 +342,7 @@ export default {
|
|
|
342
342
|
} else {
|
|
343
343
|
// 没有URL的文件,通过文件类型+文件名+文件大小+最后修改时间,几乎可以唯一区分一个文件,重复的概率极低,即使重复也不破坏业务一致性和完整性
|
|
344
344
|
file.id = this.tnx.util.string.md5(
|
|
345
|
-
|
|
345
|
+
file.type + '-' + file.name + '-' + file.size + '-' + file.lastModified);
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
return file.id;
|
|
@@ -382,7 +382,7 @@ export default {
|
|
|
382
382
|
const capacity = this.tnx.util.string.getCapacityCaption(this.uploadOptions.capacity);
|
|
383
383
|
let message = this.tipMessages.capacity.format(capacity, 2);
|
|
384
384
|
message += ',文件"' + file.name + '"大小为' + this.tnx.util.string.getCapacityCaption(file.size, 2)
|
|
385
|
-
|
|
385
|
+
+ ',不符合要求,未加入上传队列';
|
|
386
386
|
this.handleErrors([{
|
|
387
387
|
code: 'error.upload.capacity',
|
|
388
388
|
message: message,
|