北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2024-05-08 10ecfd0b60442d209d1ab4b749580ffb638d1992
src/components/menu/bottom-menu.vue
@@ -141,13 +141,23 @@
        </el-form-item>
      </el-form>
    </div>
    <div class="textAreaBox" v-if="isShowTextArea">
      <el-input
        v-model="input"
        placeholder="请输入内容"
        clearable
        @keyup.enter.native="sendCommand($event)"
      ></el-input>
    <!-- 数组人文字输入弹框 -->
    <div class="SZRtextAreaBox" v-if="isShowTextArea">
      <el-row :gutter="10">
        <el-col :span="19">
          <el-input
            v-model="input"
            placeholder="请输入内容"
            clearable
            @keyup.enter.native="sendCommand($event)"
          ></el-input>
        </el-col>
        <el-col :span="4">
          <el-button type="primary" @click="sendCommand('click')"
            >搜索</el-button
          >
        </el-col>
      </el-row>
    </div>
  </div>
</template>
@@ -165,22 +175,24 @@
  display: flex;
  justify-content: space-between;
}
.textAreaBox {
.SZRtextAreaBox {
  background: rgba(5, 39, 126, 0.7);
  padding: 10px;
  /* width: 375px; */
  width: 375px;
  position: absolute;
  /* display: flex; */
  /* justify-content: space-around; */
  bottom: 165px;
  color: #fff;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
}
.textAreaBox .el-form-item {
.SZRtextAreaBox .el-form-item {
  margin: 0;
}
.textAreaBox .el-input {
  width: 300px;
.SZRtextAreaBox .el-input {
  /* width: 300px; */
}
.specialTool .bottomwrapper:nth-of-type(3) {
  /* background: red; */
@@ -527,10 +539,13 @@
      }
    },
    sendCommand(event) {
      mapMsg.testMsg(event.target.value);
      // 阻止默认行为(如果需要的话)
      event.preventDefault();
      // if (event == "click") {
      mapMsg.testMsg(this.input);
      // } else {
      // // 阻止默认行为(如果需要的话)
      // mapMsg.testMsg(this.input);
      // event.preventDefault();
      // }
    },
    handleCommand(command) {
      switch (command) {