Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Jul 23, 2020
2 parents 44a9185 + cec1720 commit fb1488d
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@
"contributions": [
"code"
]
},
{
"login": "zenghao1203",
"name": "PopupDialog",
"avatar_url": "https://avatars0.githubusercontent.com/u/22702128?v=4",
"profile": "https://github.com/zenghao1203",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: node_js
node_js:
- lts/*
git:
depth: 15
depth: 30
install:
- yarn --frozen-lockfile
- yarn test
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://4ark.me"><img src="https://avatars0.githubusercontent.com/u/27952659?v=4" width="100px;" alt=""/><br /><sub><b>4Ark</b></sub></a><br /><a href="https://github.com/FEMessage/el-data-table/commits?author=gd4Ark" title="Code">💻</a> <a href="https://github.com/FEMessage/el-data-table/commits?author=gd4Ark" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Htongbing"><img src="https://avatars2.githubusercontent.com/u/36433396?v=4" width="100px;" alt=""/><br /><sub><b>Htongbing</b></sub></a><br /><a href="https://github.com/FEMessage/el-data-table/commits?author=Htongbing" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/PPPenny"><img src="https://avatars3.githubusercontent.com/u/20984729?v=4" width="100px;" alt=""/><br /><sub><b>PPPenny</b></sub></a><br /><a href="https://github.com/FEMessage/el-data-table/commits?author=PPPenny" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/zenghao1203"><img src="https://avatars0.githubusercontent.com/u/22702128?v=4" width="100px;" alt=""/><br /><sub><b>PopupDialog</b></sub></a><br /><a href="https://github.com/FEMessage/el-data-table/issues?q=author%3Azenghao1203" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand Down
17 changes: 17 additions & 0 deletions netlify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
echo "is netlify: $NETLIFY"
echo "in branch: $BRANCH"
echo "head: $HEAD"

if [ "$NETLIFY" != "true" ]
then
echo "this script only runs in netlify, bye"
exit 1
fi

if [ "$BRANCH" != "dev" ] && [ "$HEAD" != "dev" ]
then
yarn doc
else
echo "this script only runs in targeting dev's PR deploy preview, bye"
fi
10 changes: 7 additions & 3 deletions notify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ then
exit 1
fi

git remote add github https://$GITHUB_TOKEN@github.com/FEMessage/el-data-table.git > /dev/null 2>&1
ORG_NAME=$(cut -d '/' -f 1 <<< "$TRAVIS_REPO_SLUG")

REPO_NAME=$(cut -d '/' -f 2 <<< "$TRAVIS_REPO_SLUG")

git remote add github https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG.git > /dev/null 2>&1
git push github HEAD:master --follow-tags

GREN_GITHUB_TOKEN=$GITHUB_TOKEN yarn release

url=https://api.github.com/repos/FEMessage/el-data-table/releases/latest
url=https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases/latest
resp_tmp_file=resp.tmp

curl -H "Authorization: token $GITHUB_TOKEN" $url > $resp_tmp_file
Expand All @@ -19,7 +23,7 @@ html_url=$(sed -n 5p $resp_tmp_file | sed 's/\"html_url\"://g' | awk -F '"' '{pr
body=$(grep body < $resp_tmp_file | sed 's/\"body\"://g;s/\"//g')
version=$(echo $html_url | awk -F '/' '{print $NF}')

msg='{"msgtype": "markdown", "markdown": {"title": "el-data-table更新", "text": "@所有人\n# [el-data-table('$version')]('$html_url')\n'$body'"}}'
msg='{"msgtype": "markdown", "markdown": {"title": "$REPO_NAME更新", "text": "@所有人\n# [$REPO_NAME('$version')]('$html_url')\n'$body'"}}'

curl -X POST https://oapi.dingtalk.com/robot/send\?access_token\=$DINGTALK_ROBOT_TOKEN -H 'Content-Type: application/json' -d "$msg"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"publishConfig": {
"access": "public"
},
"vue-sfc-cli": "1.10.6",
"vue-sfc-cli": "1.11.3",
"engines": {
"node": ">= 8.3.0",
"npm": ">= 3.0.0"
Expand Down
14 changes: 13 additions & 1 deletion src/el-data-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
ref="searchForm"
:content="_searchForm"
inline
@submit.native.prevent
class="search-form-container"
@submit.native.prevent
>
<slot
v-for="slot in searchLocatedSlotKeys"
Expand Down Expand Up @@ -977,6 +977,18 @@ export default {
const newUrl = queryUtil.set(location.href, query, this.routerMode)
history.replaceState(history.state, 'el-data-table search', newUrl)
}
// 当查询参数为数组时,需要将参数转化为字符串才发送请求
query = Object.keys(query).reduce(
(obj, k) => (
(obj[k] = Array.isArray(query[k])
? query[k].toString().trim()
: query[k]),
obj
),
{}
)
const config = {
...this.axiosConfig,
params: {
Expand Down

0 comments on commit fb1488d

Please sign in to comment.