|
@@ -37,22 +37,24 @@
|
|
|
</div>
|
|
|
|
|
|
<van-popup v-model:show="showMorePopup" position="right" :style="{ width: '50%', height: '100%' }">
|
|
|
- <van-cell-group :style="{ marginTop: '16px' }">
|
|
|
- <van-cell title="编辑工程名称" clickable @click="handleEditName" :title-style="{ color: '#07c160' }" />
|
|
|
- <van-cell title="编译文件" @click="get_c_code" clickable :title-style="{ color: '#1989fa' }" />
|
|
|
- <van-cell clickable v-show="crtProject?.isCompiled">
|
|
|
- <template #title>
|
|
|
- <div v-html="wxtag"></div>
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-cell title="删除工程" @click="delProject" clickable :title-style="{ color: '#fd5632' }" />
|
|
|
- <van-cell clickable v-if="isInWx">
|
|
|
- <template #title>
|
|
|
- <div v-html="wxShareTag"></div>
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <!-- <van-cell title="分享" @click="shareProject" clickable /> -->
|
|
|
- </van-cell-group>
|
|
|
+ <template v-if="showMorePopup">
|
|
|
+ <van-cell-group :style="{ marginTop: '16px' }">
|
|
|
+ <van-cell title="编辑工程名称" clickable @click="handleEditName" :title-style="{ color: '#07c160' }" />
|
|
|
+ <van-cell title="编译文件" @click="get_c_code" clickable :title-style="{ color: '#1989fa' }" />
|
|
|
+ <van-cell clickable v-show="crtProject?.isCompiled">
|
|
|
+ <template #title>
|
|
|
+ <div v-html="wxtag"></div>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ <van-cell title="删除工程" @click="delProject" clickable :title-style="{ color: '#fd5632' }" />
|
|
|
+ <van-cell clickable v-if="isInWx">
|
|
|
+ <template #title>
|
|
|
+ <div v-html="wxShareTag"></div>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ <!-- <van-cell title="分享" @click="shareProject" clickable /> -->
|
|
|
+ </van-cell-group>
|
|
|
+ </template>
|
|
|
</van-popup>
|
|
|
|
|
|
<van-popup v-model:show="showEditPopup" round :style="{ width: '80%' }">
|
|
@@ -186,6 +188,9 @@ const onSubmit = (values: Record<string, string>) => {
|
|
|
return
|
|
|
} else {
|
|
|
crtProject.value!.name = values.newProjectName
|
|
|
+ wxShareTag.value = `<wx-open-launch-weapp appid="wx4c5a777c71f2981c" path="pages/sharefile/index?content=${encodeURIComponent(JSON.stringify({ ...crtProject.value, qrcodeType: 'worldflying_plc_editor' }))}&filename=${crtProject.value?.name}.jmpec"><template><text style="color: #896ef4">分享</text></template></wx-open-launch-weapp>`
|
|
|
+ console.log(wxShareTag.value)
|
|
|
+
|
|
|
handleCancel()
|
|
|
}
|
|
|
}
|
|
@@ -201,6 +206,7 @@ const handleDelete = (val: string) => {
|
|
|
if (project) {
|
|
|
if (project.commandList.length === 1) return showFailToast('请至少保留一个任务!')
|
|
|
project.commandList = project.commandList.filter((item) => item.id !== val)
|
|
|
+ crtProject.value!.commandList = crtProject.value!.commandList.filter((item) => item.id !== val)
|
|
|
if (crtProject.value?.isCompiled) {
|
|
|
crtProject.value.isCompiled = false
|
|
|
localStorage.removeItem('imgobj' + crtProject.value!.id)
|