Titanium mobile SDK中不支持.jss功能吗?[英] Does .jss feature is not supported in Titanium mobile SDK

本文是小编为大家收集整理的关于Titanium mobile SDK中不支持.jss功能吗?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在尝试使用.jss.但我不知道它为什么不工作.我有一个mywindow.js文件,我已经创建了一个mywindow.jss文件.

在mywindow.jss文件

#b 
{
 width: 40;
 height: 50;
 color: '#324f85';
 font: {fontFamily: 'Helvetica-Bold', fontSize: 15};
}

在mywindow.js

var myButton = Titanium.UI.createButton({
id : "b",
title: 'clickME'

});

我不知道我在这里做错了什么.

.js和.jss文件位于同一位置.使用SDK 1.8.1

推荐答案

每当更改(或创建)任何JSS类时,您都需要在样式更改之前清理您的项目.

钛菜单栏>项目>清洁...

其他推荐答案

是它可以使用,您可以在厨房水槽,它是人们更喜欢以正常方式(编码UI和风格在一起编码),而不是JSS

本文地址:https://www.itbaoku.cn/post/1938209.html

问题描述

I am trying to use .jss. but i dont know why it is not working. I have a mywindow.js file and i have created a mywindow.jss file.

in mywindow.jss file

#b 
{
 width: 40;
 height: 50;
 color: '#324f85';
 font: {fontFamily: 'Helvetica-Bold', fontSize: 15};
}

in mywindow.js

var myButton = Titanium.UI.createButton({
id : "b",
title: 'clickME'

});

I dont know what i am doing wrong here.

Both .js and .jss file are in same location. Using sdk 1.8.1

推荐答案

Whenever you change (or create) any JSS classes, you need to clean your project before the style changes come through.

Titanium Menu bar > Project > Clean...

其他推荐答案

yes it can be used, you can see the sample at Kitchen sink, its that people prefer to do it the normal way(coding both the UI & styles together) than with JSS