小编Pet*_*len的帖子

Vue 3 通过双向绑定将响应式对象传递给组件

我在使用组合 API 在 vue 3 中双向绑定反应式组件时遇到问题。

设置:

父调用代码是:

<template>
  <h1>{{ message.test }}</h1>
  <Message v-model="message" />
</template>

<script>
import Message from '@/components/Message.vue';
import { reactive } from 'vue';

export default {
  name: 'Home',
  components: { Message },

  setup() {
    const message = reactive({ test: '123' });

    return {
      message
    };
  }
};
</script>
Run Code Online (Sandbox Code Playgroud)

子组件代码为:

<template>
  <label>
    <input v-model="message" type="text" />
  </label>
</template>

<script>
import { computed } from 'vue';

export default {
  props: {
    messageObj: {
      type: Object,
      default: () => …
Run Code Online (Sandbox Code Playgroud)

vue.js vue-component vuejs3

14
推荐指数
3
解决办法
3万
查看次数

pyinstaller 启动服务时出错:服务没有及时响应启动或控制请求

几天以来,我一直在寻找解决方案,但没有成功。我们有一个 Windows 服务构建来将一些文件从一个位置复制到另一个位置。

所以我用 Python 3.7 构建了如下所示的代码。完整的代码可以在Github上找到。

当我使用 python 运行服务时一切正常,我可以安装服务并启动服务。

这使用命令:

安装服务:

  • python jis53_backup.py 安装

运行服务:

  • python jis53_backup.py 开始

当我现在使用 pyinstaller 和命令编译此代码时:

  • pyinstaller -F --hidden-import=win32timezone jis53_backup.py

创建 exe 后,我可以安装该服务,但在尝试启动该服务时出现错误:

启动服务出错:服务没有及时响应启动或控制请求

我已经在 Stackoverflow 和 Google 上浏览了多篇与此错误相关的帖子,但都没有成功。我没有选择在需要运行此服务的 PC 上安装 python 3.7 程序。这就是我们试图获得 .exe 版本的原因。

我已确保根据我在不同问题中找到的信息更新路径。

路径定义的图像:

在此处输入图片说明

我还复制了 pywintypes37.dll 文件。

从 -> Python37\Lib\site-packages\pywin32_system32

到 -> Python37\Lib\site-packages\win32

有没有人对如何让这个工作有任何其他建议?

'''
    Windows service to copy a file from one location to another
    at a certain interval.
'''
import sys
import time
from distutils.dir_util import …
Run Code Online (Sandbox Code Playgroud)

python pyinstaller python-3.x

5
推荐指数
1
解决办法
821
查看次数

标签 统计

pyinstaller ×1

python ×1

python-3.x ×1

vue-component ×1

vue.js ×1

vuejs3 ×1