<commit_before>define(['ui/datagrid/td.datagrid'], function () {
	var vdatagrid = avalon.define({
		$id: 'datagrid02',
		info: '',
		$tab_opt: {
			tabs: [{title: 'UI界面'}, {title: 'HTML代码'}, {title: 'JS代码'}]
		},
		$datagrid_opt: {
			loadUrl: 'data/td.datagrid.json',
			loadParam: {
				//...
			},
			cols: [
				{name: 'id', display: '编号', width: 100, type: 'text', disabled: true}, 
				{name: 'name', display: '名称', width: 150, type: 'text'}, 
				{name: 'price', display: '价格', width: 120, type: 'text'},
				{name: 'category', display: '类别', width: 150, type: 'select', option: {
					'A1': '游戏', 'A2' : '电影', 'A3' : '音乐'
				}}
			],
			onloaded: function(dat, vm) {
				vdatagrid.info = '加载数据 ' + dat;
			},
			onreloaded: function(dat, vm) {
				vdatagrid.info = '重新加载数据 ' + dat;
			},
			onrowclicked: function(row, vm) {
				vdatagrid.info = '点击行 ' + row;
			},
			onrowdbclicked: function(row, vm) {
				vdatagrid.info = '双击行 ' + row;
			},
			onrowselected: function(row, vm) {
				vdatagrid.info = '已选中行索引 ' + vm.getSelectedIdx();
			},
			actions: [{title: '新增', icon: 'glyphicon glyphicon-plus', fun: function(ev, vm) {
				vdatagrid.info = '新增游戏999 GAME $999 A1';
				vm.addRows([{id:'999', name:'GAME', price:'$999', category:'A1', selected:false}]);
			}}, {title: '修改', icon: 'glyphicon glyphicon-pencil', fun: function(ev, vm) {
				vdatagrid.info = '修改选中行名称为NEW';
				vm.modifySelectRow({name: 'NEW'});
			}}, {title: '删除', icon: 'glyphicon glyphicon-remove', fun: function(ev, vm) {
				vdatagrid.info = '点击删除[已选中行：' + vm.getSelectedIdx() + ']';<commit_msg>change addRows to addRow<commit_after>define(['ui/datagrid/td.datagrid'], function () {
	var vdatagrid = avalon.define({
		$id: 'datagrid02',
		info: '',
		$tab_opt: {
			tabs: [{title: 'UI界面'}, {title: 'HTML代码'}, {title: 'JS代码'}]
		},
		$datagrid_opt: {
			loadUrl: 'data/td.datagrid.json',
			loadParam: {
				//...
			},
			cols: [
				{name: 'id', display: '编号', width: 100, type: 'text', disabled: true}, 
				{name: 'name', display: '名称', width: 150, type: 'text'}, 
				{name: 'price', display: '价格', width: 120, type: 'text'},
				{name: 'category', display: '类别', width: 150, type: 'select', option: {
					'A1': '游戏', 'A2' : '电影', 'A3' : '音乐'
				}}
			],
			onloaded: function(dat, vm) {
				vdatagrid.info = '加载数据 ' + dat;
			},
			onreloaded: function(dat, vm) {
				vdatagrid.info = '重新加载数据 ' + dat;
			},
			onrowclicked: function(row, vm) {
				vdatagrid.info = '点击行 ' + row;
			},
			onrowdbclicked: function(row, vm) {
				vdatagrid.info = '双击行 ' + row;
			},
			onrowselected: function(row, vm) {
				vdatagrid.info = '已选中行索引 ' + vm.getSelectedIdx();
			},
			actions: [{title: '新增', icon: 'glyphicon glyphicon-plus', fun: function(ev, vm) {
				vdatagrid.info = '新增游戏999 GAME $999 A1';
				vm.addRow([{id:'999', name:'GAME', price:'$999', category:'A1', selected:false}]);
			}}, {title: '修改', icon: 'glyphicon glyphicon-pencil', fun: function(ev, vm) {
				vdatagrid.info = '修改选中行名称为NEW';
				vm.modifySelectRow({name: 'NEW'});
			}}, {title: '删除', icon: 'glyphicon glyphicon-remove', fun: function(ev, vm) {
				vdatagrid.info = '点击删除[已选中行：' + vm.getSelectedIdx() + ']';
{'fraction_non_alphanumeric': 0.21676118462507876, 'fraction_numerical': 0.019533711405166982, 'mean_word_length': 3.497167138810198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3094020', 'n_tokens_mistral': 1570, 'n_tokens_neox': 1375, 'n_words': 271}