feat:你可以这样问我提示词组件封装
This commit is contained in:
40
components/ServiceTipsWord/index.vue
Normal file
40
components/ServiceTipsWord/index.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<view class="service-prompt">
|
||||
<view class="service-header">
|
||||
<text class="header-text">你可以这样问我</text>
|
||||
<image
|
||||
class="header-icon"
|
||||
src="./images/icon_refresh.png"
|
||||
@click="handleRefresh"
|
||||
></image>
|
||||
</view>
|
||||
<view class="service-buttons">
|
||||
<text class="service-button" @click="handleClick('bed')">
|
||||
帮我加一张床
|
||||
</text>
|
||||
<text class="service-button" @click="handleClick('hotWater')">
|
||||
房间热水不够热
|
||||
</text>
|
||||
<text class="service-button" @click="handleClick('mahjong')">
|
||||
帮忙加一台麻将机
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const handleRefresh = (type) => {
|
||||
console.log(`Button clicked: ${type}`);
|
||||
};
|
||||
|
||||
const handleClick = (type) => {
|
||||
console.log(`Button clicked: ${type}`);
|
||||
// Add your logic here based on the type (e.g., 'bed', 'hotWater', 'mahjong')
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user