@didaoktv/didaoui-uniapp 2.12.0 → 2.14.0
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/README.md +7 -7
- package/components/dd-album/dd-album.vue +280 -228
- package/components/dd-avatar/dd-avatar.vue +132 -75
- package/components/dd-avatar-group/dd-avatar-group.vue +52 -30
- package/components/dd-barcode/dd-barcode.vue +884 -947
- package/components/dd-button/dd-button.vue +47 -21
- package/components/dd-canvas/dd-canvas.vue +1156 -985
- package/components/dd-car-keyboard/dd-car-keyboard.vue +12 -12
- package/components/dd-champion-card/dd-champion-card.vue +49 -21
- package/components/dd-checkbox-group/dd-checkbox-group.vue +2 -0
- package/components/dd-copy/dd-copy.vue +51 -56
- package/components/dd-cropper/dd-cropper.vue +1224 -1135
- package/components/dd-divider/dd-divider.vue +9 -2
- package/components/dd-fold/dd-fold.vue +133 -0
- package/components/dd-form/dd-form.vue +2 -0
- package/components/dd-icon/dd-icon.vue +1 -1
- package/components/dd-keyboard/dd-keyboard.vue +95 -46
- package/components/dd-link/dd-link.vue +72 -49
- package/components/dd-markdown/dd-markdown.vue +154 -154
- package/components/dd-number-keyboard/dd-number-keyboard.vue +109 -94
- package/components/dd-parse/dd-parse.vue +473 -442
- package/components/dd-poster/dd-poster.vue +579 -567
- package/components/dd-pull-refresh/dd-pull-refresh.vue +1 -9
- package/components/dd-qrcode/dd-qrcode.vue +431 -405
- package/components/dd-radio-group/dd-radio-group.vue +1 -1
- package/components/dd-segmented-tab/dd-segmented-tab.vue +22 -14
- package/components/dd-signature/dd-signature.vue +377 -357
- package/components/dd-step/dd-step.vue +1 -1
- package/components/dd-sticky/dd-sticky.vue +5 -10
- package/components/dd-swipe-action/dd-swipe-action.vue +1 -9
- package/components/dd-swipe-item/dd-swipe-item.vue +2 -0
- package/components/dd-swipeable-tab/dd-swipeable-tab.vue +1 -5
- package/components/dd-switch/dd-switch.vue +1 -1
- package/components/dd-text/dd-text.vue +304 -82
- package/components/dd-waterfall/dd-waterfall.vue +89 -0
- package/index.ts +8 -6
- package/libs/function/index.d.ts +88 -0
- package/libs/function/index.js +14 -0
- package/libs/function/test.d.ts +65 -0
- package/package.json +1 -1
- package/scss/_mixins.scss +8 -0
- package/scss/_theme-tokens.scss +7 -0
- package/scss/_variables.scss +283 -156
- package/components/dd-album/album.js +0 -19
- package/components/dd-album/props.js +0 -89
- package/components/dd-avatar/avatar.js +0 -19
- package/components/dd-avatar/props.js +0 -84
- package/components/dd-avatar-group/avatarGroup.js +0 -14
- package/components/dd-avatar-group/props.js +0 -57
- package/components/dd-keyboard/keyboard.js +0 -19
- package/components/dd-keyboard/props.js +0 -79
- package/components/dd-link/link.js +0 -17
- package/components/dd-link/props.js +0 -44
- package/components/dd-number-keyboard/numberKeyboard.js +0 -8
- package/components/dd-number-keyboard/props.js +0 -24
- package/components/dd-parse/props.js +0 -57
- package/components/dd-text/props.js +0 -120
- package/components/dd-text/text.js +0 -30
- package/components/dd-text/value.js +0 -87
- package/scss/_dd-shared.scss +0 -40
|
@@ -28,41 +28,52 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup lang="ts">
|
|
31
|
-
import { computed, useSlots } from
|
|
32
|
-
import DdIcon from
|
|
31
|
+
import { computed, useSlots } from "vue";
|
|
32
|
+
import DdIcon from "../dd-icon/dd-icon.vue";
|
|
33
33
|
|
|
34
34
|
interface Props {
|
|
35
|
-
type?:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
type?:
|
|
36
|
+
| "default"
|
|
37
|
+
| "primary"
|
|
38
|
+
| "secondary"
|
|
39
|
+
| "ghost"
|
|
40
|
+
| "text"
|
|
41
|
+
| "success"
|
|
42
|
+
| "warning"
|
|
43
|
+
| "danger";
|
|
44
|
+
/** 尺寸:xxs 行内附属最小号(复制等)/ xs 最小号 / sm 小号 / md 常规 / lg 大号;默认 md */
|
|
45
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg";
|
|
46
|
+
block?: boolean;
|
|
47
|
+
round?: boolean;
|
|
48
|
+
plain?: boolean;
|
|
49
|
+
iconPosition?: "left" | "right";
|
|
50
|
+
icon?: string;
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
disabled?: boolean;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
const props = withDefaults(defineProps<Props>(), {
|
|
47
|
-
type:
|
|
48
|
-
size:
|
|
56
|
+
type: "primary",
|
|
57
|
+
size: "md",
|
|
49
58
|
block: false,
|
|
50
59
|
round: false,
|
|
51
60
|
plain: false,
|
|
52
|
-
iconPosition:
|
|
53
|
-
icon:
|
|
61
|
+
iconPosition: "left",
|
|
62
|
+
icon: "",
|
|
54
63
|
loading: false,
|
|
55
64
|
disabled: false,
|
|
56
|
-
})
|
|
65
|
+
});
|
|
57
66
|
|
|
58
|
-
const emit = defineEmits<{ (e:
|
|
67
|
+
const emit = defineEmits<{ (e: "click", val: Event): void }>();
|
|
59
68
|
|
|
60
|
-
const slots = useSlots()
|
|
61
|
-
const isIconOnly = computed(
|
|
69
|
+
const slots = useSlots();
|
|
70
|
+
const isIconOnly = computed(
|
|
71
|
+
() => !slots.default && (!!props.icon || !!slots.icon),
|
|
72
|
+
);
|
|
62
73
|
|
|
63
74
|
function onClick(e: Event) {
|
|
64
|
-
if (props.disabled || props.loading) return
|
|
65
|
-
emit(
|
|
75
|
+
if (props.disabled || props.loading) return;
|
|
76
|
+
emit("click", e);
|
|
66
77
|
}
|
|
67
78
|
</script>
|
|
68
79
|
|
|
@@ -126,6 +137,21 @@ function onClick(e: Event) {
|
|
|
126
137
|
}
|
|
127
138
|
}
|
|
128
139
|
|
|
140
|
+
.dd-btn--xxs {
|
|
141
|
+
height: $dd-size-control-xxs;
|
|
142
|
+
padding: 0 $dd-space-1;
|
|
143
|
+
font-size: $dd-font-size-overline;
|
|
144
|
+
border-radius: $dd-radius-sm;
|
|
145
|
+
&.dd-btn--icon-only {
|
|
146
|
+
width: $dd-size-control-xxs;
|
|
147
|
+
}
|
|
148
|
+
.dd-btn__loading {
|
|
149
|
+
width: 14rpx;
|
|
150
|
+
height: 14rpx; // size-exempt: loading 圈内部件,非控件高度
|
|
151
|
+
border-width: 2rpx;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
129
155
|
.dd-btn--xs {
|
|
130
156
|
height: $dd-size-control-xs;
|
|
131
157
|
padding: 0 $dd-space-2;
|