我已经开始使用angular-tools/ng-jsoneditor中的JSON编辑库和angular包装器。
当切换到代码视图时,这个bug看起来非常烦人。有没有人有类似的东西?
Situation image
仅当该行上出现引号时才会发生。这几乎就是JSON的每一行。
使用standart lib,没有任何变化。我的想法快用完了。
控制器
$scope.obj = { data: null, options: { mode: 'code' } };
$scope.onLoad = function (instance) {
instance.expandAll();
};视图
<!DOCTYPE html>
<html ng-app="jsonapp" ng-controller="jsonController">
<head>
<meta charset="utf-8" />
<!-- when using the mode "code", it's important to specify charset utf-8 -->
<meta content="charset=utf-8">
<link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css">
<script src="jsoneditor/dist/jsoneditor.min.js"></script>
</head>
<body>
<div ng-jsoneditor="onLoad" ng-model="obj.data" options="obj.options" style="height:800px"></div>
</body>
</html>发布于 2021-08-08 14:54:56
我也有类似的问题,经过几个小时的调查,我终于发现是字体家族风格造成的(我在所有的应用程序上都有全局字体)。所以我用ng-deep::to font-family: monospace覆盖了它。对我来说,这是一个解决方案!
https://stackoverflow.com/questions/39739801
复制相似问题