Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Jun 30, 2024
2 parents 0dfedc6 + 74037c7 commit 44d8c5b
Show file tree
Hide file tree
Showing 21 changed files with 189 additions and 275 deletions.
2 changes: 1 addition & 1 deletion assets/js/template.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
window._config = {
isDebug: location.hash.slice(1) === 'is-debug' ||
['localhost', '127.0.0.1', 'dev.bootstrap-table.com'].indexOf(location.hostname) > -1,
cdnUrl: 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.6/dist/',
cdnUrl: 'https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/',
localUrl: '../bootstrap-table/src/',
testUrl: '/src/'
}
Expand Down
4 changes: 2 additions & 2 deletions crud/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.6/dist/bootstrap-table.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/bootstrap-table.min.css">
<style>
.mr10 { margin-right: 10px; }
.alert {
Expand All @@ -17,7 +17,7 @@
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.6/dist/bootstrap-table.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/bootstrap-table.min.js"></script>
</head>
<body>
<div class="container">
Expand Down
2 changes: 1 addition & 1 deletion options/table-locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
links: ['bootstrap-table.min.css'],
scripts: [
'bootstrap-table.min.js',
'https://cdn.jsdelivr.net/npm/bootstrap-table@1.22.6/dist/bootstrap-table-locale-all.min.js'
'https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.0/dist/bootstrap-table-locale-all.min.js'
]
})
</script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-table-examples",
"version": "1.22.6",
"version": "1.23.0",
"description": "bootstrap-table-examples",
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions vue-starter/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
23 changes: 4 additions & 19 deletions vue-starter/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
# vue-starter

## Create

```
vue create vue-starter
yarn add jquery bootstrap popper.js bootstrap-table
```

## Project setup
```
yarn install
yarn
```

### Compiles and hot-reloads for development
```
yarn run serve
yarn serve
```

### Compiles and minifies for production
```
yarn run build
```

### Run your tests
```
yarn run test
yarn build
```

### Lints and fixes files
```
yarn run lint
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 0 additions & 5 deletions vue-starter/babel.config.js

This file was deleted.

14 changes: 14 additions & 0 deletions vue-starter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="logo.png">
<title>vue-starter</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
61 changes: 17 additions & 44 deletions vue-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,25 @@
{
"name": "vue-starter",
"version": "0.1.0",
"private": true,
"version": "2.0.0",
"type": "module",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"serve": "vite",
"build": "vite build",
"lint": "eslint ."
},
"dependencies": {
"bootstrap": "^4.5.0",
"bootstrap-table": "^1.22.6",
"bootstrap-vue": "^2.15.0",
"core-js": "^3.6.5",
"jquery": "^3.5.1",
"popper.js": "^1.16.1",
"tableexport.jquery.plugin": "^1.10.20",
"vue": "^2.6.11"
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"bootstrap-table": "^1.23.0",
"jquery": "^3.7.1",
"tableexport.jquery.plugin": "^1.30.0",
"vue": "^3.4.27"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.4.4",
"@vue/cli-plugin-eslint": "^4.4.4",
"@vue/cli-service": "^4.4.4",
"babel-eslint": "^10.1.0",
"eslint": "^7.3.0",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
"@vitejs/plugin-vue": "^5.0.4",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.26.0",
"vite": "^5.2.11"
}
}
18 changes: 0 additions & 18 deletions vue-starter/public/index.html

This file was deleted.

19 changes: 8 additions & 11 deletions vue-starter/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<template>
<div id="app">
<img alt="Bootstrap Table logo" src="./assets/logo.png" width="64" height="64">
<HelloWorld msg="Welcome to Bootstrap Table App"/>
<img
src="./assets/logo.png"
width="64"
height="64"
>
<HelloTable />
</div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'app',
components: {
HelloWorld
}
}
<script setup>
import HelloTable from './components/HelloTable.vue'
</script>

<style>
Expand Down
81 changes: 81 additions & 0 deletions vue-starter/src/components/HelloTable.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<template>
<div>
<BootstrapTable
ref="table"
:columns="columns"
:data="data"
:options="options"
/>
</div>
</template>

<script setup>
import { ref } from 'vue'
const columns = [
{
field: 'state',
checkbox: true
},
{
title: 'Item ID',
field: 'id'
},
{
field: 'name',
title: 'Item Name'
},
{
field: 'price',
title: 'Item Price'
},
{
field: 'actions',
title: 'Actions',
align: 'center',
formatter: () => '<button class="btn btn-primary">Click</button>',
events: {
'click .btn-primary': (e, index, row) => {
alert(JSON.stringify(row))
}
}
}
]
const data = ref({
total: 5,
rows: [
{
id: 1,
name: 'Item 1',
price: '$1'
},
{
id: 2,
name: 'Item 2',
price: '$2'
},
{
id: 3,
name: 'Item 3',
price: '$3'
},
{
id: 4,
name: 'Item 4',
price: '$4'
},
{
id: 5,
name: 'Item 5',
price: '$5'
}
]
})
const options = ref({
search: true,
showColumns: true,
showExport: true
})
</script>
Loading

0 comments on commit 44d8c5b

Please sign in to comment.