打印机删除提示

This commit is contained in:
duan 2024-10-17 15:18:55 +08:00
parent 35223e9cdc
commit b80ce77096
1 changed files with 17 additions and 5 deletions

View File

@ -46,12 +46,15 @@
{{devicesName(data.contentType)}} {{devicesName(data.contentType)}}
</view> </view>
</view> </view>
<view class="u-m-t-32 u-flex u-row-right gap-20" > <view class="u-m-t-32 u-flex u-row-right gap-20">
<my-button v-if="data.connectionType == 'network'" shape="circle" :width="140" :height="56" type="cancel" @tap="delTableHandleEvent()" <my-button v-if="data.connectionType == 'network'" shape="circle" :width="140" :height="56"
plain>删除</my-button> type="cancel" @tap="delTableHandleEvent()" plain>删除</my-button>
<my-button v-if="data.connectionType == 'network'" shape="circle" @click="toUrl" :width="140" :height="56" plain>编辑</my-button> <my-button v-if="data.connectionType == 'network'" shape="circle" @click="toUrl" :width="140"
:height="56" plain>编辑</my-button>
</view> </view>
</view> </view>
<!-- 删除弹窗 -->
<my-model desc="确认删除?" ref="delModel" @confirm="delModelConfirm"></my-model>
</view> </view>
</template> </template>
@ -67,6 +70,9 @@
shopConfigprinter, shopConfigprinter,
delTableHandle delTableHandle
} from '@/http/yskApi/devices.js' } from '@/http/yskApi/devices.js'
import {
getCurrentInstance
} from 'vue';
const props = defineProps({ const props = defineProps({
data: { data: {
@ -106,10 +112,16 @@
}) })
emit('init', '') emit('init', '')
} }
const refs = getCurrentInstance()
// //
async function delTableHandleEvent() { function delTableHandleEvent() {
refs.ctx.$refs.delModel.open()
}
//
async function delModelConfirm() {
const res = await delTableHandle(props.data.id) const res = await delTableHandle(props.data.id)
emit('init', '') emit('init', '')
refs.ctx.$refs.delModel.close()
} }
</script> </script>