Skip to content

Commit ee5b25f

Browse files
fix: 🐛 修复在template中使用readonly无法通过vue-ts校验的问题
1 parent ef7c98b commit ee5b25f

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

scripts/release.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ inquirer
4646
default: 'Y'
4747
}
4848
])
49-
.then((answers) => {
49+
.then((answers: any) => {
5050
if (!answers['release'] || answers['release'].toLowerCase() != 'y') {
5151
console.log('🚨 操作取消')
5252
return
@@ -92,7 +92,7 @@ inquirer
9292
const tip = 'Run `git push --follow-tags origin ' + branch + '` ' + 'to publish'
9393
console.log(tip.replace(/\n/g, ''))
9494
})
95-
.catch((error) => {
95+
.catch((error: any) => {
9696
if (error.isTtyError) {
9797
// Prompt couldn't be rendered in the current environment
9898
} else {

src/pages/configProvider/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const promotionlist = ref<any[]>([
163163
])
164164
const threshold = ref<string>('')
165165
const price = ref<string>('')
166-
const date = ref<Date>(new Date())
166+
const date = ref<number>(new Date().getTime())
167167
const address = ref<any[]>([])
168168
169169
const count = ref<number>(1)

src/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<slot v-if="$slots.default"></slot>
55
<view
66
v-else
7-
:class="`wd-calendar__cell ${disabled ? 'is-disabled' : ''} ${readonly ? 'is-readonly' : ''} ${alignRight ? 'is-align-right' : ''} ${
7+
:class="`wd-calendar__cell ${disabled ? 'is-disabled' : ''} ${props.readonly ? 'is-readonly' : ''} ${alignRight ? 'is-align-right' : ''} ${
88
error ? 'is-error' : ''
99
} ${size ? 'is-' + size : ''} ${center ? 'is-center' : ''}`"
1010
>

src/uni_modules/wot-design-uni/components/wd-col-picker/wd-col-picker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<slot v-if="useDefaultSlot"></slot>
55
<view
66
v-else
7-
:class="`wd-col-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${alignRight && 'is-align-right'} ${
7+
:class="`wd-col-picker__cell ${disabled && 'is-disabled'} ${props.readonly && 'is-readonly'} ${alignRight && 'is-align-right'} ${
88
error && 'is-error'
99
} ${size && 'is-' + size}`"
1010
>

src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
@confirm="handleConfirm"
5151
@keyboardheightchange="handleKeyboardheightchange"
5252
/>
53-
<view v-if="readonly" class="wd-input__readonly-mask" />
53+
<view v-if="props.readonly" class="wd-input__readonly-mask" />
5454
<view v-if="showClear || showPassword || suffixIcon || showWordCount || $slots.suffix" class="wd-input__suffix">
5555
<wd-icon v-if="showClear" custom-class="wd-input__clear" name="error-fill" @click="handleClear" />
5656
<wd-icon v-if="showPassword" custom-class="wd-input__icon" :name="isPwdVisible ? 'view' : 'eye-close'" @click="togglePwdVisible" />

src/uni_modules/wot-design-uni/components/wd-select-picker/wd-select-picker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<slot v-if="useDefaultSlot"></slot>
55
<view
66
v-else
7-
:class="`wd-select-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${alignRight && 'is-align-right'} ${
7+
:class="`wd-select-picker__cell ${disabled && 'is-disabled'} ${props.readonly && 'is-readonly'} ${alignRight && 'is-align-right'} ${
88
error && 'is-error'
99
} ${size && 'is-' + size}`"
1010
>

src/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/>
4848
<view v-if="errorMessage" class="wd-textarea__error-message">{{ errorMessage }}</view>
4949

50-
<view v-if="readonly" class="wd-textarea__readonly-mask" />
50+
<view v-if="props.readonly" class="wd-textarea__readonly-mask" />
5151
<view class="wd-textarea__suffix">
5252
<wd-icon v-if="showClear" custom-class="wd-textarea__clear" name="error-fill" @click="handleClear" />
5353
<view v-if="showWordCount" class="wd-textarea__count">

0 commit comments

Comments
 (0)