绿萝

文章 评论 浏览 30

绿萝 2025-02-21 00:43:02

continue

If your input is indeed a string, and the only thing that may differ in the pattern you want to replace is the numbers that occur between parentheses, then you might want to use a regular expression to do the replacements:

import re

s = "{'Y': [('A', 'X', datetime.datetime(2022, 3, 20, 22, 58, 30, 128000))]}"

s = re.sub(r"\b((?<!['\"])datetime.datetime\([\s,\d]+\))", r"'\1'", s)

The downside is that if this pattern occurs also in encoded string literals, they will also get replaced, like here:

"{'Y': 'A X datetime.datetime(2022, 3, 20, 22, 58, 30, 128000) hello'}"

But if you find it unlikely to have such input, this might be the easiest solution.

如何在字符串中找到字符串并在其中添加单引号

绿萝 2025-02-20 22:54:26

您遇到的主要问题是服务器行为是由客户端驱动的,这应该是相反的...

为什么您的客户要求新问题?您的服务器应随时发送新问题。如果您真的需要提出客户请求问题,则应将当前问题存储在房间中,并发送当前问题,而不是生成它。

我认为您的房间应该保持某种状态,例如游戏开始,等待客户等...客户都准备好了,一旦所有客户准备就绪,就会生成问题并将其发送给所有客户。像这样。

The main problem you are having is that the server behaviour is driven by the client, which should be the opposite...

Why should your client request a new question? Your server should send the new question whenever it is available. If really you need to have your client request question, you should store the current question in your room and send the currentQuestion, not generate it.

I think your room should keep some state, like game started, waiting for clients etc... Clients all send a ready, once all clients are ready room generates a question and sends it to all clients. Something like so.

从客户端到所有房间的发射功能一次,socket.io

绿萝 2025-02-20 10:31:10

如果您需要使用测试键进行测试,则需要替换 val testDeviceIds = arrays.aslist(“ asomeids”)
使用测试设备ID,您可以在运行应用程序后从日志中获取它
这样
I/ADS:使用requestConfiguration.builder.settestdeviceids(arrays.aslist(“ 33BE222550B43518CCDA7DE426D04EE231”)))))
要在此设备上获取测试广告。”

或者您可以在模拟器上进行测试,因为Android模拟器会自动配置为测试设备。

https://developers.google.com/admob/android/test-ads 检查一下。

If you need to test it with a test key you need to replace the val testDeviceIds = Arrays.asList("ASOMEIDS")
with your test device id, you can get it from your log once you run your app
as this
I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList("33BE2250B43518CCDA7DE426D04EE231"))
to get test ads on this device."

or simply you can test it on an emulator because Android emulators are automatically configured as test devices.

https://developers.google.com/admob/android/test-ads check this out.

Admob本地广告视频未显示

绿萝 2025-02-20 10:01:43

cycle(规则)只是一个重复的功能集,例如:

def multiply(x,y):
   return x*y
def divide(x,y):
   return x/y

rules = (multiply, divide)
lst = [range(100)]

def reduce_by_rules(lst, rules):
  rs = cycle(rules) # -> multiply, divide, multiply, divide, ...repeats forever
  # reduce applies the function to each number and return a number reduce(foo, [1,2,3,4]) => foo(foo(foo(1,2),3),4) 
  return reduce(lambda x, y: next(rs)(x, y), lst)

reduce_by_rules(lst, rules)

如果它有助于Lemme定义我自己的周期函数:

def my_cyle(lst):
   while True:
      for element in lst:
           yield element

并且我自己的降低:

def my_reduce(function, lst):
   res = lst[0]
   for e in lst[1:]:
       res = function(res, e)
   return res     

cycle(rules) is just a repeating set of functions, for instance:

def multiply(x,y):
   return x*y
def divide(x,y):
   return x/y

rules = (multiply, divide)
lst = [range(100)]

def reduce_by_rules(lst, rules):
  rs = cycle(rules) # -> multiply, divide, multiply, divide, ...repeats forever
  # reduce applies the function to each number and return a number reduce(foo, [1,2,3,4]) => foo(foo(foo(1,2),3),4) 
  return reduce(lambda x, y: next(rs)(x, y), lst)

reduce_by_rules(lst, rules)

if it helps lemme define my own cycle function:

def my_cyle(lst):
   while True:
      for element in lst:
           yield element

And my own reduce:

def my_reduce(function, lst):
   res = lst[0]
   for e in lst[1:]:
       res = function(res, e)
   return res     

python的dred()如何起作用?函数上周期的组合并减少列表(Python,功能)

绿萝 2025-02-19 15:03:43

您没有Activestorage服务集。

ActionMailbox取决于Activestorage来保存入站邮件。
确保 ActivEstorage已正确设置使用ActionAilbox。

You do not have an ActiveStorage service set.

ActionMailbox depends on ActiveStorage to save inbound mail.
Ensure ActiveStorage is set up correctly to use Actionailbox.

Rails ActionMailbox:422无法处理的实体“服务名称可以是空白的”

绿萝 2025-02-19 13:32:49

我最终遵循Mathiew的答案来创建所需的设计。这就是我看的方式:

对于有兴趣的人,这里是我最终使用的代码:

 class _MonthCellDecoration extends Decoration {
  const _MonthCellDecoration(this.showIndicator,
      {this.borderColor, this.backgroundColor, this.indicatorColor});

  final Color borderColor;
  final Color backgroundColor;
  final bool showIndicator;
  final Color indicatorColor;

  @override
  BoxPainter createBoxPainter([VoidCallback onChanged]) {
    return _MonthCellDecorationPainter(showIndicator,
        borderColor: borderColor,
        backgroundColor: backgroundColor,
        indicatorColor: indicatorColor);
  }
}

class _MonthCellDecorationPainter extends BoxPainter {
  _MonthCellDecorationPainter(this.showIndicator,
      {this.borderColor, this.backgroundColor, this.indicatorColor});

  final Color borderColor;
  final Color backgroundColor;
  final bool showIndicator;
  final Color indicatorColor;

  @override
  void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
    final Rect bounds = offset & configuration.size;
    _drawDecoration(canvas, bounds);
  }

  void _drawDecoration(Canvas canvas, Rect bounds) {
    final Paint paint = Paint()..color = backgroundColor;
    canvas.drawRRect(
        RRect.fromRectAndRadius(bounds, const Radius.circular(5)), paint);
    paint.style = PaintingStyle.stroke;
    paint.strokeWidth = 3;
    paint.strokeCap = StrokeCap.round;
    if (borderColor != null) {
      paint.color = borderColor;
      canvas.drawRRect(
          RRect.fromRectAndRadius(bounds, const Radius.circular(5)), paint);
    }

    if (showIndicator) {
      paint.color = indicatorColor;
      paint.style = PaintingStyle.fill;
      canvas.drawLine(Offset(bounds.left + 18, bounds.bottom - 7),
          Offset(bounds.right - 18, bounds.bottom - 7), paint);
    }
  }
}

要使用它,只需将此代码添加到月类属性

specialDatesDecoration: _MonthCellDecoration(true,
   backgroundColor: Colors.transparent,
   indicatorColor: Colors.red),

I ended up following Mathiew's answer to create the design i needed. This is how i got it to look:
enter image description here

For anyone interested here is the code i ended up using:

 class _MonthCellDecoration extends Decoration {
  const _MonthCellDecoration(this.showIndicator,
      {this.borderColor, this.backgroundColor, this.indicatorColor});

  final Color borderColor;
  final Color backgroundColor;
  final bool showIndicator;
  final Color indicatorColor;

  @override
  BoxPainter createBoxPainter([VoidCallback onChanged]) {
    return _MonthCellDecorationPainter(showIndicator,
        borderColor: borderColor,
        backgroundColor: backgroundColor,
        indicatorColor: indicatorColor);
  }
}

class _MonthCellDecorationPainter extends BoxPainter {
  _MonthCellDecorationPainter(this.showIndicator,
      {this.borderColor, this.backgroundColor, this.indicatorColor});

  final Color borderColor;
  final Color backgroundColor;
  final bool showIndicator;
  final Color indicatorColor;

  @override
  void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
    final Rect bounds = offset & configuration.size;
    _drawDecoration(canvas, bounds);
  }

  void _drawDecoration(Canvas canvas, Rect bounds) {
    final Paint paint = Paint()..color = backgroundColor;
    canvas.drawRRect(
        RRect.fromRectAndRadius(bounds, const Radius.circular(5)), paint);
    paint.style = PaintingStyle.stroke;
    paint.strokeWidth = 3;
    paint.strokeCap = StrokeCap.round;
    if (borderColor != null) {
      paint.color = borderColor;
      canvas.drawRRect(
          RRect.fromRectAndRadius(bounds, const Radius.circular(5)), paint);
    }

    if (showIndicator) {
      paint.color = indicatorColor;
      paint.style = PaintingStyle.fill;
      canvas.drawLine(Offset(bounds.left + 18, bounds.bottom - 7),
          Offset(bounds.right - 18, bounds.bottom - 7), paint);
    }
  }
}

And to use it just add this code to the monthCellStyle property

specialDatesDecoration: _MonthCellDecoration(true,
   backgroundColor: Colors.transparent,
   indicatorColor: Colors.red),

Flutter-如何在日历中的日期进行自定义下划线?

绿萝 2025-02-19 07:54:26

由于以前的答案意味着将数据存储在本地存储中,因此我想根据魔术链接公开我在项目中使用的另一个解决方案。

tldr :使用JWT。没有存储,但不能手工复制。

条件

只有要求用户手工键入代码时才能工作。使用电子邮件或QRCode中的HTML按钮。

取决于与手动复制代码相比,UX更好的情况。

设置

  • 生成JWT 包含用户ID 用于识别的到期日期 签名JWT。
  • 构建URL 用jwt in params 将服务器或密码重置页面定位为
  • 通过电子邮件将链接发送给用户。
  • 打开链接时,用户将使用JWT提出请求,然后您可以验证并检索关联的用户ID。

生成的URL示例: https://your.app/pass-pass-reset-reset? token = {jwt}

Since the previous answer implies storing data in the local storage, I would like to expose another solution that I am using in a project, based on magic links.

TLDR: Use a JWT. No storage but can't copy by hand.

Conditions

Can only work if the user is not asked to type the code by hand. Use an Html button in email or QRCode instead.

Depending on the situation that can be better UX than copying a code by hand.

Setup

  • Generate a JWT containing the user ID for identification, and sign the JWT with an expiration date.
  • Construct an URL targeting your server or password reset page with JWT in params.
  • Send the link to the user by email.
  • When opening the link, the user will make a request with the JWT, you can then validate it and retrieve the user ID associated.

Generated URL example: https://your.app/password-reset?token={JWT}

验证OTP而无需将其存储在数据库和会话之类的任何地方

绿萝 2025-02-19 07:28:48

现在,对于另一个条件,我希望我的映射重置并释放其所有数据,我希望它是一个空的映射。

重置映射的唯一方法是迭代所有键并将值设置为零。这在牢固性上是不切实际的。

取而代之的是,您可能需要将映射与第三层使用,并具有的数据元组(版本,键,值)。然后,当您要进行完整重置时,请增加版本。

另外,您可以执行(键,版本,值)并每次读取键时都会比较版本。这种方法可能会更有效,因为您在重写值时使用相同的存储批。

Now for another condition I want my mapping to reset and loose all of its data , i want it to be where it was in the beginning a empty mapping.

The only way to reset mapping is to iterate through all the keys and set values to zero. This is not practical in Solidity.

Instead, you probably want to use mapping with the third layer and having data tuple of (version, key, value). Then just increment version when you want to do a full reset.

Alternatively you can do (key, version, value) and compare the version every time the key is read. This approach could be more gas efficient, as you are using the same storage lot when rewriting values.

有什么方法可以重新初始化映射

绿萝 2025-02-19 01:55:13

这不是做到这一点的好方法。您正在迭代期间从列表中删除项目。

当您在循环中从列表中删除项目时。它将影响列表的索引。这就是为什么您看到代码跳过一些项目的原因。

使用列表综合很容易:

list1 = [47, 48, 49, 50, 51, 52, 53, 54]


list2 = [i for i in list1 if i>=50]
list1 = [i for i in list1 if i<50]

This is not a good way doing it. you are removing items from list during iteration.

when you remove items from a list during a loop. it will effect the indexing of the list. that is why you see your code jumps through some of items.

it is easier to use list comprehensions:

list1 = [47, 48, 49, 50, 51, 52, 53, 54]


list2 = [i for i in list1 if i>=50]
list1 = [i for i in list1 if i<50]

对于循环/if语句跳过列表中的元素?

绿萝 2025-02-18 08:56:29

备份已配置,最后备份状态正在警告(初始备份
待处理)。

您会收到此警告,因为根据官方 Microsoft文档它已经提到了相同的内容。

启用备份后,初始备份运行。你可以开始
立即初始备份,或等到按照
备份时间表。

直到初始备份完成,最后一个备份状态显示为
警告(初始备份待处理)

Backup is configured and Last Backup Status is Warning (Initial backup
pending).

You will get this warning because as per official Microsoft Document its already mentioned the same things.

After enabling backup, an initial backup runs. You can start the
initial backup immediately, or wait until it starts in accordance with
the backup schedule.

Until the initial backup completes, the Last backup status shows as
Warning (Initial backup pending).

如何使用azurerm_backup_protected_vm Terraform资源立即备份VM备份

绿萝 2025-02-18 03:14:56
chrome.storage.local.set({key: value}, function() {
   console.log('Value is set to ' + value);
});

chrome.storage.local.get(['key'], function(result) {
  console.log('Value currently is ' + result.key);
});

正如您在使用字符串键时在代码中看到的那样,您不使用“”,如果使用变量,则将其放入[] ['key']中的[]中
我希望这是问题

document.addEventListener('DOMContentLoaded', function () {
    chrome.storage.local.get(['enabled'], function (result) {
        if (result.enabled != null) {
            a.checked = result.enabled;
        }
    });

    chrome.storage.local.set({
        enabled: a.getAttribute('aria-checked') === 'true'
    }, function () {


    });
});
chrome.storage.local.set({key: value}, function() {
   console.log('Value is set to ' + value);
});

chrome.storage.local.get(['key'], function(result) {
  console.log('Value currently is ' + result.key);
});

as you see in the code when you use a string key you don't use "" and if use a variable you put it in [] like this ['key']
I hope this is the problem

document.addEventListener('DOMContentLoaded', function () {
    chrome.storage.local.get(['enabled'], function (result) {
        if (result.enabled != null) {
            a.checked = result.enabled;
        }
    });

    chrome.storage.local.set({
        enabled: a.getAttribute('aria-checked') === 'true'
    }, function () {


    });
});

chrome.local.score get设置 - 关闭弹出窗口时,保存复选框状态和功能

绿萝 2025-02-18 01:40:36

除了 @kavyasaraboju-mt的答案之外,如果您使用的是自定义策略,则必须在 jwtissuer 中将 IssuanceClaimpattern 设置为 pertivere> epertionalwithtfp per

例如,在,添加元素&lt; item key =“ issuanceclaimpattern”&gt; pertiatewithtfp&lt;/item gt; 代码>

In addition to the answer by @kavyasaraboju-MT, if you're using custom policies, you must set the IssuanceClaimPattern to AuthorityWithTfp in the JwtIssuer Tehcnical Profile per these docs.

e.g. using the LocalAccounts pack in active-directory-b2c-custom-policy-starterpack, add the element <Item Key="IssuanceClaimPattern">AuthorityWithTfp</Item> to the <Metadata> element

Azure AD B2C破坏OIDC规格

绿萝 2025-02-18 00:59:18

背景标识符要用于表格和列标识符,但只有在标识符为a mysql保留关键字,或者当标识符包含有限集(见下文)以外的空格字符或字符时,通常建议避免在可能的情况下将保留的关键字作为列或表格标识符,避免引用问题。

单语引号应用于 values()列表中的字符串值。 MySQL也支持双引号的字符串值,但是单引号被其他RDBMS更广泛地接受,因此使用单引号而不是双重引号是一个很好的习惯。

MySQL还期望 date datetime 字面值将被单击为字符串,例如'2001-01-01-01 001 00:00:00:00''。请咨询日期和时间文字文档有关更多详细信息,特别是使用连字符 - 作为日期字符串中的细分定界符的替代方法。

因此,使用您的示例,我将双引号php字符串并在值'val1','val2'上使用单引号。 null 是一个mysql关键字,也是一个特殊(非)值,因此未引用。

这些表格或列标识符都不是保留单词或使用需要引用的字符,但是我无论如何都引用了它们(稍后再详细介绍...)。

不应引用rdbms的原生函数(例如,mySQL中的 now()),尽管它们的参数受到已经提到的相同字符串或标识符的规则的约束。

Backtick (`)
table & column ───────┬─────┬──┬──┬──┬────┬──┬────┬──┬────┬──┬───────┐
                      ↓     ↓  ↓  ↓  ↓    ↓  ↓    ↓  ↓    ↓  ↓       ↓
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`, `updated`) 
                       VALUES (NULL, 'val1', 'val2', '2001-01-01', NOW())";
                               ↑↑↑↑  ↑    ↑  ↑    ↑  ↑          ↑  ↑↑↑↑↑ 
Unquoted keyword          ─────┴┴┴┘  │    │  │    │  │          │  │││││
Single-quoted (') strings ───────────┴────┴──┴────┘  │          │  │││││
Single-quoted (') DATE    ───────────────────────────┴──────────┘  │││││
Unquoted function         ─────────────────────────────────────────┴┴┴┴┘    

可变插值

变量的引号不会改变,尽管如果您打算直接在字符串中插入变量,则必须在PHP中倍增。只需确保您已正确逃脱了用于SQL中的变量即可。 (建议使用API​​支持准备的陈述,作为保护SQL注入的保护)。

// Same thing with some variable replacements
// Here, a variable table name $table is backtick-quoted, and variables
// in the VALUES list are single-quoted 
$query = "INSERT INTO `$table` (`id`, `col1`, `col2`, `date`) VALUES (NULL, '$val1', '$val2', '$date')";

准备好陈述时准备的陈述

,请咨询文档,以确定是否必须引用陈述的占位符。 PHP,PDO和MySQLI中最受欢迎的API期望 占位符,其他语言中最准备好的语句API也是如此:

// PDO example with named parameters, unquoted
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`) VALUES (:id, :col1, :col2, :date)";

// MySQLi example with ? parameters, unquoted
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`) VALUES (?, ?, ?, ?)";

字符重新定价在标识符中引用:

根据mySQL文档,您无需使用以下字符集来引用(backtick)标识符:

ascii: [0-9,AZ,AZ $ _] (基本拉丁字母,数字0-9,美元,下划线)

您可以使用该字符以外的字符作为表格或列标识符,包括whitespace例如,但是您必须 Quote(Backtick)它们。

同样,尽管数字是标识符的有效字符,但标识符不能仅由数字组成。如果他们这样做,他们必须将其包裹在背部。

Backticks are to be used for table and column identifiers, but are only necessary when the identifier is a MySQL reserved keyword, or when the identifier contains whitespace characters or characters beyond a limited set (see below) It is often recommended to avoid using reserved keywords as column or table identifiers when possible, avoiding the quoting issue.

Single quotes should be used for string values like in the VALUES() list. Double quotes are supported by MySQL for string values as well, but single quotes are more widely accepted by other RDBMS, so it is a good habit to use single quotes instead of double.

MySQL also expects DATE and DATETIME literal values to be single-quoted as strings like '2001-01-01 00:00:00'. Consult the Date and Time Literals documentation for more details, in particular alternatives to using the hyphen - as a segment delimiter in date strings.

So using your example, I would double-quote the PHP string and use single quotes on the values 'val1', 'val2'. NULL is a MySQL keyword, and a special (non)-value, and is therefore unquoted.

None of these table or column identifiers are reserved words or make use of characters requiring quoting, but I've quoted them anyway with backticks (more on this later...).

Functions native to the RDBMS (for example, NOW() in MySQL) should not be quoted, although their arguments are subject to the same string or identifier quoting rules already mentioned.

Backtick (`)
table & column ───────┬─────┬──┬──┬──┬────┬──┬────┬──┬────┬──┬───────┐
                      ↓     ↓  ↓  ↓  ↓    ↓  ↓    ↓  ↓    ↓  ↓       ↓
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`, `updated`) 
                       VALUES (NULL, 'val1', 'val2', '2001-01-01', NOW())";
                               ↑↑↑↑  ↑    ↑  ↑    ↑  ↑          ↑  ↑↑↑↑↑ 
Unquoted keyword          ─────┴┴┴┘  │    │  │    │  │          │  │││││
Single-quoted (') strings ───────────┴────┴──┴────┘  │          │  │││││
Single-quoted (') DATE    ───────────────────────────┴──────────┘  │││││
Unquoted function         ─────────────────────────────────────────┴┴┴┴┘    

Variable interpolation

The quoting patterns for variables do not change, although if you intend to interpolate the variables directly in a string, it must be double-quoted in PHP. Just make sure that you have properly escaped the variables for use in SQL. (It is recommended to use an API supporting prepared statements instead, as protection against SQL injection).

// Same thing with some variable replacements
// Here, a variable table name $table is backtick-quoted, and variables
// in the VALUES list are single-quoted 
$query = "INSERT INTO `$table` (`id`, `col1`, `col2`, `date`) VALUES (NULL, '$val1', '$val2', '$date')";

Prepared statements

When working with prepared statements, consult the documentation to determine whether or not the statement's placeholders must be quoted. The most popular APIs available in PHP, PDO and MySQLi, expect unquoted placeholders, as do most prepared statement APIs in other languages:

// PDO example with named parameters, unquoted
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`) VALUES (:id, :col1, :col2, :date)";

// MySQLi example with ? parameters, unquoted
$query = "INSERT INTO `table` (`id`, `col1`, `col2`, `date`) VALUES (?, ?, ?, ?)";

Characters requring backtick quoting in identifiers:

According to MySQL documentation, you do not need to quote (backtick) identifiers using the following character set:

ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)

You can use characters beyond that set as table or column identifiers, including whitespace for example, but then you must quote (backtick) them.

Also, although numbers are valid characters for identifiers, identifiers cannot consist solely of numbers. If they do they must be wrapped in backticks.

何时在MySQL中使用单语引号,双引号和反击

绿萝 2025-02-17 23:36:44

如错误所述,您不能两次使用Coroutine。

有一种方法可以解决这个问题。您可以使用自定义 __调用__ 创建一个类,该类别在试图调用时会改变行为。

class CoroutineCaller:
    def __call__(*args, **kwargs):
        # you can also use `asyncio.get_event_loop().create_task` if this doesn't work
        client.loop.create_task(send(*args, **kwargs))

sender = CoroutineCaller()

当您执行 sender()时,它将创建 new coroutine并将其添加到客户端循环中。

然后,您可以执行类似的操作:

bt_Send = tk.Button(text="Send", command=sender)

这是一个更新的版本,可以多次调用任何 coroutine。

class CoroutineCaller:
    def __call__(coro, *args, **kwargs):
        client.loop.create_task(coro(*args, **kwargs))

您可以像呼叫者(ctx.send,'Random Message',embed = discord.embed(title ='test'))

As the error states, you can't use a coroutine twice.

There's a way to get around this though. You can create a class with a custom __call__ that changes the behavior when it tries to be called.

class CoroutineCaller:
    def __call__(*args, **kwargs):
        # you can also use `asyncio.get_event_loop().create_task` if this doesn't work
        client.loop.create_task(send(*args, **kwargs))

sender = CoroutineCaller()

When you do sender(), it will create a new coroutine and add it to the client loop.

You can then do something like this:

bt_Send = tk.Button(text="Send", command=sender)

Here's an updated version that lets you call any coroutine multiple times.

class CoroutineCaller:
    def __call__(coro, *args, **kwargs):
        client.loop.create_task(coro(*args, **kwargs))

You can call this like caller(ctx.send, 'random message', embed=discord.Embed(title='test'))

通过Discord.py从TKINTER GUI发送Discord消息

绿萝 2025-02-17 15:56:14

您需要在解决之后委托。

在您当前的代码中,当创建组件时,您正在打印判断。要解决您的问题,您应该在中调用Console.log。

You need to console.log data after it's resolved.

In your current code you are printing judetes when component is created. To fix your issue you should call console.log in .then since it's resolved some time after component creation.

即使我使用异步代码

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文