GithubHelp home page GithubHelp logo

issuse's People

Stargazers

 avatar

Watchers

 avatar

issuse's Issues

uni.$off 未执行

// 我的页面    
onLoad(){    
    // 监听事件    
    uni.$on('scancode',this.callback) ;  
},    
onUnload() {    
    // 移除监听事件    
     uni.$off('scancode',this.callback);    
    },  
methods: {  
callback(data) {  
todo.....  
}  
}

image

uniapp ios 多语言 国际化 异常

手机系统为英文
系统提示的内容是英文的,下面的确认取消按钮为中文,在某些情况下,内容也是中文(已经配置了locales ->ios -> privacyDescription)。

需求:国外客户正常使用英文的应用,不需要考虑手动切换语言的情况,保证在他第一次使用的语言是正确的。

下面是解决方法:

  1. hbuild 版本为3.8.3

  2. 细心看文档,配置全部能配置的(https://uniapp.dcloud.net.cn/tutorial/i18n.html#uni-framework)
    "locale" : "auto",
    "fallbackLocale" : "en" (这里回退语言有坑,为en时,微信小程序的名字和tabbar会变成英文,我明明不允许微信小程序的多语言,在打包小程序时删掉fallbackLocale或者改为中文)
    注意: (locale/uni-app.语言地区代码.json,如:uni-app.en.json,uni-app.zh-Hans.json,uni-app.zh-Hant.json)一定要配置,配置了这个才是成功的必要途径,而且配置成功才可以在设置里直接选择语言(但这样切换也会出问题)

  3. 重中之重,注意步骤(删除应用->切换语言->重启手机->下载应用),不这样做的话切换语言会有缓存问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.