购物车历史订单增加,代码优化
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, reactive } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
@@ -85,7 +85,7 @@
|
||||
value: 'custom'
|
||||
}
|
||||
]
|
||||
const currentInstance = getCurrentInstance()
|
||||
const datePicker = ref()
|
||||
onShow((options) => {
|
||||
let iToken = uni.getStorageSync('iToken').tokenValue
|
||||
if (iToken) {
|
||||
@@ -185,7 +185,7 @@
|
||||
function changeTime(e) {
|
||||
selected.value = e
|
||||
if (e == 'custom') {
|
||||
currentInstance.ctx.$refs.datePicker.toggle()
|
||||
datePicker.value.toggle()
|
||||
} else {
|
||||
getlist()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user