-- 修复排序bug

This commit is contained in:
Julyp
2020-02-03 12:12:37 +08:00
parent b04dd45782
commit bf15c5c2d2
4 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

BIN
examples/assets/fav.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="./assets/fav.ico"> <link rel="icon" href="./assets/fav.ico">
<title>Smart Example</title> <title>Smart Table Examples</title>
<style> <style>
body { body {
@@ -44,7 +44,7 @@
</head> </head>
<body> <body>
<h1 class="title">Smart Table Example<a href="https://github.com/peng92055/smart-table" target="_blank" rel="noopener noreferrer" class="repo-link"> <h1 class="title">Smart Table Examples<a href="https://github.com/peng92055/smart-table" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub</a></h1> GitHub</a></h1>
<div class="container"> <div class="container">
<div id="smartTable1"> <div id="smartTable1">

View File

@@ -364,7 +364,7 @@ function initData(vm, tbody) {
$fixedRightEl: fixedRightRows && fixedRightRows[index], $fixedRightEl: fixedRightRows && fixedRightRows[index],
$key: '$$rowkey' + index $key: '$$rowkey' + index
}; };
querySelectorAll(row, "td .cell").forEach((cell, index) => { querySelectorAll(row, "td .smart-table_cell").forEach((cell, index) => {
rowData["field-" + index] = cell.innerHTML; rowData["field-" + index] = cell.innerHTML;
}) })
data.push(rowData) data.push(rowData)