From 131d3d600e1dd2b01ca53d48ba9f72840662beda Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 20 Jan 2022 22:03:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- importer/importer.go | 4 ++-- importer/importer_test.go | 3 +++ spec.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/importer/importer.go b/importer/importer.go index c116dc58..cda93f7f 100644 --- a/importer/importer.go +++ b/importer/importer.go @@ -277,7 +277,7 @@ func (imp *Importer) DataSetting() map[string]interface{} { "hideEdit": true, "width": 120, "unfold": true, - "checkbox": map[string]interface{}{ + "checkbox": []map[string]interface{}{{ "value": ":__effected", "visible_label": false, "status": []map[string]interface{}{ @@ -290,7 +290,7 @@ func (imp *Importer) DataSetting() map[string]interface{} { "value": false, }, }, - }, + }}, }, }, }, diff --git a/importer/importer_test.go b/importer/importer_test.go index e9989991..5060f095 100644 --- a/importer/importer_test.go +++ b/importer/importer_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/yaoapp/kun/utils" "github.com/yaoapp/xiang/config" "github.com/yaoapp/xiang/importer/xlsx" ) @@ -145,11 +146,13 @@ func TestMappingSetting(t *testing.T) { imp := Select("order") setting := imp.MappingSetting(file) + utils.Dump(setting) assert.NotNil(t, setting) } func TestDataSetting(t *testing.T) { imp := Select("order") setting := imp.DataSetting() + utils.Dump(setting) assert.NotNil(t, setting) } diff --git a/spec.sh b/spec.sh index 43f50b8c..fdf39ed9 100755 --- a/spec.sh +++ b/spec.sh @@ -13,6 +13,7 @@ rm -rf ../xiang-spec/xiang/* cp dist/release/xiang-* ~/Code/bin/ rm -f ~/Code/bin/xiang ln -s ~/Code/bin/xiang-$VERSION-darwin-amd64 ~/Code/bin/xiang +ln -s ~/Code/bin/xiang-$VERSION-darwin-amd64 ~/Code/bin/yao # 更新 README.md 中的版本 # repace "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$VERSION]/g"