|
@@ -6,7 +6,7 @@
|
|
|
</slot>
|
|
</slot>
|
|
|
</div>
|
|
</div>
|
|
|
<Popup v-model:show="show" position="bottom" round>
|
|
<Popup v-model:show="show" position="bottom" round>
|
|
|
- <DatePicker v-model="currentDate" title="选择日期" @cancel="onCancel" @confirm="onConfirm" />
|
|
|
|
|
|
|
+ <DatePicker v-model="currentDate" :title="t('common.date')" @cancel="onCancel" @confirm="onConfirm" />
|
|
|
</Popup>
|
|
</Popup>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -15,6 +15,7 @@
|
|
|
import { ref, onMounted, computed, PropType } from 'vue'
|
|
import { ref, onMounted, computed, PropType } from 'vue'
|
|
|
import { Popup, DatePicker } from 'vant'
|
|
import { Popup, DatePicker } from 'vant'
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
|
|
+import { i18n } from '@/stores'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
modelValue: {
|
|
modelValue: {
|
|
@@ -29,12 +30,12 @@ const props = defineProps({
|
|
|
// 占位符文本
|
|
// 占位符文本
|
|
|
placeholder: {
|
|
placeholder: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: '日期选择'
|
|
|
|
|
|
|
+ default: i18n.global.t('common.date')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:modelValue', 'confirm'])
|
|
const emit = defineEmits(['update:modelValue', 'confirm'])
|
|
|
-
|
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
const show = ref(false)
|
|
const show = ref(false)
|
|
|
|
|
|
|
|
const currentDate = computed({
|
|
const currentDate = computed({
|