@netang/quasar 0.2.42 → 0.2.44
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.
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
<template v-if="! disable && ! readonly && ! rightSquareButton">
|
|
56
56
|
<slot
|
|
57
57
|
name="square-button"
|
|
58
|
-
:size="
|
|
58
|
+
:size="currentSquareButtonSize"
|
|
59
59
|
:show="showSquareButton"
|
|
60
60
|
v-if="$slots['square-button']"
|
|
61
61
|
/>
|
|
62
62
|
<div
|
|
63
63
|
class="n-uploader-query__button--square"
|
|
64
64
|
:style="{
|
|
65
|
-
width: toPx(
|
|
66
|
-
height: toPx(
|
|
65
|
+
width: toPx(currentSquareButtonSize),
|
|
66
|
+
height: toPx(currentSquareButtonSize),
|
|
67
67
|
}"
|
|
68
68
|
v-show="showSquareButton"
|
|
69
69
|
v-else-if="! noButton && currentButtonType === 'square'"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
>
|
|
76
76
|
<q-icon
|
|
77
77
|
name="add"
|
|
78
|
-
:size="toPx(
|
|
78
|
+
:size="toPx(currentSquareButtonSize / 2)"
|
|
79
79
|
/>
|
|
80
80
|
<div class="n-uploader-query__button--square-button__text" v-if="buttonText">{{buttonText}}</div>
|
|
81
81
|
</div>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
>
|
|
89
89
|
<q-icon
|
|
90
90
|
name="cloud_upload"
|
|
91
|
-
:size="toPx(
|
|
91
|
+
:size="toPx(currentSquareButtonSize / 3)"
|
|
92
92
|
/>
|
|
93
93
|
<div class="n-uploader-query__button--square-button__text" v-if="buttonText">{{buttonText}}</div>
|
|
94
94
|
</div>
|
|
@@ -489,6 +489,8 @@ export default {
|
|
|
489
489
|
buttonProps: Object,
|
|
490
490
|
// 图片/按钮/文件 尺寸
|
|
491
491
|
size: Number,
|
|
492
|
+
// 方块按钮尺寸
|
|
493
|
+
squareButtonSize: Number,
|
|
492
494
|
// 是否开启拖拽
|
|
493
495
|
drag: {
|
|
494
496
|
type: Boolean,
|
|
@@ -625,6 +627,16 @@ export default {
|
|
|
625
627
|
return uploaderProps.type === 'image' ? 70 : 50
|
|
626
628
|
})
|
|
627
629
|
|
|
630
|
+
/**
|
|
631
|
+
* 当前方块尺寸
|
|
632
|
+
*/
|
|
633
|
+
const currentSquareButtonSize = computed(function () {
|
|
634
|
+
if (props.squareButtonSize) {
|
|
635
|
+
return props.squareButtonSize
|
|
636
|
+
}
|
|
637
|
+
return currentSize.value
|
|
638
|
+
})
|
|
639
|
+
|
|
628
640
|
/**
|
|
629
641
|
* 是否显示方块按钮
|
|
630
642
|
*/
|
|
@@ -688,6 +700,8 @@ export default {
|
|
|
688
700
|
currentButtonType,
|
|
689
701
|
// 当前尺寸
|
|
690
702
|
currentSize,
|
|
703
|
+
// 当前方块尺寸
|
|
704
|
+
currentSquareButtonSize,
|
|
691
705
|
// 是否显示方块按钮
|
|
692
706
|
showSquareButton,
|
|
693
707
|
|
package/package.json
CHANGED
package/utils/$power.js
CHANGED
|
@@ -1128,13 +1128,15 @@ async function request(options) {
|
|
|
1128
1128
|
// 如果验证表单
|
|
1129
1129
|
if ($n_get(o.powerBtn.data, 'validate') !== false) {
|
|
1130
1130
|
|
|
1131
|
-
if (
|
|
1131
|
+
if (
|
|
1132
|
+
! o.$form.formRef
|
|
1133
|
+
|| ! o.$form.formRef?.value?.validate
|
|
1134
|
+
) {
|
|
1132
1135
|
throw new Error('没有绑定 fromRef')
|
|
1133
1136
|
}
|
|
1134
1137
|
|
|
1135
1138
|
// 验证表单
|
|
1136
1139
|
if (! await o.$form.formRef.value.validate()) {
|
|
1137
|
-
|
|
1138
1140
|
// 轻提示
|
|
1139
1141
|
$n_toast({
|
|
1140
1142
|
message: '表单中有无效值',
|