如何解决如何访问主题工具栏的断点属性?
我正在使用material-ui themeProvider并尝试以一种样式访问默认主题中的所有高度值:
makeStyles(theme => createStyles({
...
marginTop: -theme.mixins.toolbar.minHeight,// works
[`${theme.breakpoints.up('xs')} and (orientation: landscape)`]: {
marginTop: -theme.mixins.toolbar.@media___????.minHeight },[theme.breakpoints.up('sm')]: {
marginTop: -theme.mixins.toolbar.@media___????.minHeight },
如何访问@media值?
解决方法
与使用括号表示法访问对象属性相同
import json
from locust import User,HttpUser,task,between,SequentialTaskSet,HttpLocust
USER_CREDENTIALS = [
("abc@xyz.com","Yahoo@123"),("xyz@xyz.com","Yahh-69-Wrap")
]
class CLMLoginTaskSet(SequentialTaskSet):
hostname_app2 = "http://app2.stage.cloud.local"
hostname_app1 = "http://app1.stage.cloud.local"
port = "8090"
username = "NOT_FOUND"
password = "NOT_FOUND"
access_token_value1 = None
@task
def userlist(self):
if len(USER_CREDENTIALS) > 0:
self.username,self.password = USER_CREDENTIALS.pop()
@task
def generate_clm_token(self):
print("username",self.username)
print("password",self.password)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
clm_response =
self.client.post(self.hostname_app2+":"+self.port+"/oauth2/access?
grant_type=password&username="+self.username+"&password="+self.password",headers=headers)
print("CLM Response",clm_response.text)
json_clm_response = clm_response.json()
access_token_value = json_clm_response['access_token']
print("This is the access token value",access_token_value)
self.access_token_value1 = access_token_value
class CLMLogin(HttpUser):
tasks = [CLMLoginTaskSet]
host = ""
wait_time = between(1,2)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。