@didaoktv/didaoui-uniapp 1.3.7 → 1.3.8

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.
@@ -7,6 +7,7 @@
7
7
  {
8
8
  'dd-btn--block': block,
9
9
  'dd-btn--round': round,
10
+ 'dd-btn--plain': plain,
10
11
  'dd-btn--icon-right': iconPosition === 'right',
11
12
  'dd-btn--icon-only': isIconOnly,
12
13
  'dd-btn--loading': loading,
@@ -31,10 +32,11 @@ import { computed, useSlots } from 'vue'
31
32
  import DdIcon from '../dd-icon/dd-icon.vue'
32
33
 
33
34
  interface Props {
34
- type?: 'primary' | 'secondary' | 'ghost' | 'text' | 'success' | 'warning' | 'danger'
35
+ type?: 'default' | 'primary' | 'secondary' | 'ghost' | 'text' | 'success' | 'warning' | 'danger'
35
36
  size?: 'sm' | 'md' | 'lg'
36
37
  block?: boolean
37
38
  round?: boolean
39
+ plain?: boolean
38
40
  iconPosition?: 'left' | 'right'
39
41
  icon?: string
40
42
  loading?: boolean
@@ -46,6 +48,7 @@ const props = withDefaults(defineProps<Props>(), {
46
48
  size: 'md',
47
49
  block: false,
48
50
  round: false,
51
+ plain: false,
49
52
  iconPosition: 'left',
50
53
  icon: '',
51
54
  loading: false,
@@ -149,6 +152,11 @@ function onClick(e: Event) {
149
152
  }
150
153
  }
151
154
 
155
+ .dd-btn--default {
156
+ background: var(--dd-surface-container, #{$dd-surface-container});
157
+ color: var(--dd-text-primary, #{$dd-text-primary});
158
+ border-color: var(--dd-border-default, #{$dd-border-default});
159
+ }
152
160
  .dd-btn--primary {
153
161
  background: var(--dd-primary, #{$dd-primary});
154
162
  color: $dd-neutral-50;
@@ -190,6 +198,28 @@ function onClick(e: Event) {
190
198
  color: var(--dd-error-contrast, #{$dd-error-contrast});
191
199
  }
192
200
 
201
+ // plain:线框按钮,透明底 + 保留各 type 的主题色文字/描边(对齐 Vant 语义)
202
+ .dd-btn--plain {
203
+ background: transparent;
204
+ border-color: currentColor;
205
+ &.dd-btn--primary {
206
+ color: var(--dd-primary, #{$dd-primary});
207
+ }
208
+ &.dd-btn--secondary {
209
+ color: var(--dd-primary-400, #{$dd-primary-400});
210
+ border-color: var(--dd-primary-400, #{$dd-primary-400});
211
+ }
212
+ &.dd-btn--success {
213
+ color: var(--dd-success, #{$dd-success});
214
+ }
215
+ &.dd-btn--warning {
216
+ color: var(--dd-warning, #{$dd-warning});
217
+ }
218
+ &.dd-btn--danger {
219
+ color: var(--dd-error, #{$dd-error});
220
+ }
221
+ }
222
+
193
223
  .dd-btn--round {
194
224
  border-radius: $dd-radius-full;
195
225
  }
@@ -201,7 +231,8 @@ function onClick(e: Event) {
201
231
  opacity: 0.85;
202
232
  }
203
233
  .dd-btn--secondary.dd-btn--hover,
204
- .dd-btn--ghost.dd-btn--hover {
234
+ .dd-btn--ghost.dd-btn--hover,
235
+ .dd-btn--default.dd-btn--hover {
205
236
  opacity: 0.7;
206
237
  }
207
238
 
@@ -37,7 +37,7 @@ import DdIcon from '../dd-icon/dd-icon.vue'
37
37
 
38
38
  interface Props {
39
39
  modelValue?: string | number
40
- type?: 'text' | 'password' | 'search' | 'number'
40
+ type?: 'text' | 'password' | 'search' | 'number' | 'digit'
41
41
  placeholder?: string
42
42
  disabled?: boolean
43
43
  clearable?: boolean
@@ -70,7 +70,11 @@ const isFocused = ref(false)
70
70
  const visible = ref(false)
71
71
 
72
72
  // ponytail: search 在小程序降级为 text;password 用 uni 原生 password 布尔属性跨端
73
- const inputType = computed<'text' | 'number'>(() => (props.type === 'number' ? 'number' : 'text'))
73
+ const inputType = computed<'text' | 'number' | 'digit'>(() => {
74
+ if (props.type === 'number') return 'number'
75
+ if (props.type === 'digit') return 'digit'
76
+ return 'text'
77
+ })
74
78
  const isPassword = computed(() => props.type === 'password' && !visible.value)
75
79
  const confirmType = computed(() => (props.type === 'search' ? 'search' : 'done'))
76
80
  const showClear = computed(() => props.clearable && !!props.modelValue && !props.disabled)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didaoktv/didaoui-uniapp",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "帝到KTV UniApp 组件库",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -24,6 +24,7 @@
24
24
  "dev:h5": "cd ../DidaoUI-uniapp-docs/h5-demo && npm run dev:h5",
25
25
  "build:docs": "cd ../DidaoUI-uniapp-docs && npm run build",
26
26
  "type-check": "vue-tsc --noEmit",
27
+ "bump:consumers": "node scripts/bump-consumers.mjs",
27
28
  "prepublishOnly": "node -e \"const p=require('./package.json');if(p.publishConfig&&p.publishConfig.access==='public'){process.exit(0)}console.error('publishConfig.access must be public');process.exit(1)\""
28
29
  },
29
30
  "publishConfig": {