This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<view class="card-header flex-row-sb">
|
||||
<view class="title">WiFi配置</view>
|
||||
<view class="btn-group">
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('modify')">修改</button>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="copyConfig">复制配置</button>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('modify')">修改配置</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wifi-info flex-col-g16 mt-30">
|
||||
@@ -12,25 +13,27 @@
|
||||
<view class="caption">网络名称</view>
|
||||
<view class="subtitle">{{ deviceInfo.ssidName }}</view>
|
||||
</view>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidName)">复制</button>
|
||||
</view>
|
||||
<view class="wifi-item flex-row-sb">
|
||||
<view class="wifi-details flex-col-g8">
|
||||
<view class="caption">连接密码</view>
|
||||
<view class="subtitle">{{ deviceInfo.ssidPwd }}</view>
|
||||
</view>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidPwd)">复制</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
deviceInfo: { type: Object, default: () => ({}) }
|
||||
});
|
||||
|
||||
defineEmits(['modify', 'copy']);
|
||||
const emit = defineEmits(['modify', 'copy-config']);
|
||||
|
||||
const copyConfig = () => {
|
||||
emit('copy-config', `网络名称: ${props.deviceInfo.ssidName || ''} 连接密码: ${props.deviceInfo.ssidPwd || ''}`);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user