设置 cookie.value 并设置属性

def set(self, key: str, value: str, opt: dict = None) -> None:
        """
        设置 cookie.value 并设置属性
        """
        self[key] = value
        if opt is not None:
            self[key].update(opt)