Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set properties of null (setting '__draggable_context') #145

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- main
- "releases/**"
- master
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# 拉取 github 仓库代码
- uses: actions/checkout@v3
# 设定 node 环境
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# 设置发包 npm 地址仓库
registry-url: https://registry.npmjs.org
# 安装依赖,相当于 npm ci
- name: Install dependencies 📦️
run: npm install
# 执行构建步骤
- name: 构建
run: |
npm run build
# 执行部署
- run: npm publish
env:
# 刚刚设置的 NPM_TOKEN
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@

Vue component (Vue.js 3.0) allowing drag-and-drop and synchronization with view model array.

For Vue 2 and Vue 1 version check: https://github.com/SortableJS/Vue.Draggable

Based on and offering all features of [Sortable.js](https://github.com/RubaXa/Sortable)
Based on and offering all features of [Sortable.js](https://github.com/RubaXa/Sortable) [vue.draggable.next](https://github.com/SortableJS/vue.draggable.next)

## Demo

![demo gif](https://raw.githubusercontent.com/SortableJS/vue.draggable.next/master/example.gif)

## Live Demos

https://sortablejs.github.io/vue.draggable.next/
https://zhyswan.github.io/vue3.draggable/

## Features

Expand Down Expand Up @@ -52,23 +50,12 @@ Find this project useful? You can buy me a :coffee: or a :beer:
### With npm or yarn

```bash
yarn add vuedraggable@next
yarn add zhyswan-vuedraggable

npm i -S vuedraggable@next
npm i zhyswan-vuedraggable
```

### with direct link
```html

<script src="//cdnjs.cloudflare.com/ajax/libs/vue/3.0.2/vue.min.js"></script>
<!-- CDNJS :: Sortable (https://cdnjs.com/) -->
<script src="//cdn.jsdelivr.net/npm/[email protected]/Sortable.min.js"></script>
<!-- CDNJS :: Vue.Draggable (https://cdnjs.com/) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/Vue.Draggable/4.0.0/vuedraggable.umd.min.js"></script>

```

[cf example section](https://github.com/SortableJS/Vue.Draggable/tree/master/example)


## Typical use:
Expand Down Expand Up @@ -105,7 +92,9 @@ The `item` slot should be used to display items of the list. It receives the ele
``` html
<draggable v-model="myArray" tag="transition-group" item-key="id">
<template #item="{element}">
<div>
<div> {{element.name}} </div>
</div>
</template>
</draggable>
```
Expand Down Expand Up @@ -137,7 +126,7 @@ The `item` slot should be used to display items of the list. It receives the ele

```html
<draggable v-model='myList'>
```
```

```javascript
computed: {
Expand Down
36 changes: 22 additions & 14 deletions dist/vuedraggable.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vuedraggable.common.js.map

Large diffs are not rendered by default.

36 changes: 22 additions & 14 deletions dist/vuedraggable.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vuedraggable.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vuedraggable.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vuedraggable.umd.min.js.map

Large diffs are not rendered by default.

File renamed without changes
Loading