如何在 html 中引用 js 中定义的变量

<span>{{num}}</span>
function init(){
	this.template='#testId',
	this.data=function () {
		return {
			num : 1
		}
	},
	this.methods = {
		
	},
	this.mounted=function(){
		
	}
}

空格如何在 html 中表示

<span>{{num}}  &nbsp;&nbsp;  Test</span>

单纯在 html 加空格是没用的

Logo

前往低代码交流专区

更多推荐