Use patched pretty-checkbox-vue from do-vue
This commit is contained in:
parent
9046f07e30
commit
585bdaf554
|
@ -11,7 +11,7 @@
|
|||
"dependencies": {
|
||||
"clipboard": "^2.0.10",
|
||||
"clone": "^2.1.2",
|
||||
"do-bulma": "github:do-community/do-bulma",
|
||||
"do-bulma": "github:do-community/do-bulma#MattIPv4/vue-3",
|
||||
"do-vue": "github:do-community/do-vue#MattIPv4/vue-3",
|
||||
"escape-html": "^1.0.3",
|
||||
"files-diff": "0.0.6",
|
||||
|
@ -7885,7 +7885,7 @@
|
|||
},
|
||||
"node_modules/do-bulma": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+ssh://git@github.com/do-community/do-bulma.git#34bf700c5b4ef03e66b1acd5b9da3e3940cddcaf",
|
||||
"resolved": "git+ssh://git@github.com/do-community/do-bulma.git#663980a539ea6273259a1175cc755428656d52b8",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bulma": "^0.9.3"
|
||||
|
@ -7893,7 +7893,7 @@
|
|||
},
|
||||
"node_modules/do-vue": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+ssh://git@github.com/do-community/do-vue.git#ef164a59eb9b3961821265dd859272337ff3bb53",
|
||||
"resolved": "git+ssh://git@github.com/do-community/do-vue.git#b313ae4368f09d4c6bdce0da107a46d70dabb403",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"assert": "^2.0.0",
|
||||
|
@ -7915,6 +7915,7 @@
|
|||
"posthtml-expressions": "^1.9.0",
|
||||
"posthtml-extend": "^0.6.2",
|
||||
"posthtml-loader": "^2.0.1",
|
||||
"pretty-checkbox-vue": "^1.1.9",
|
||||
"process": "^0.11.10",
|
||||
"react-svg-loader": "^3.0.3",
|
||||
"request": "^2.88.2",
|
||||
|
@ -26081,15 +26082,15 @@
|
|||
}
|
||||
},
|
||||
"do-bulma": {
|
||||
"version": "git+ssh://git@github.com/do-community/do-bulma.git#34bf700c5b4ef03e66b1acd5b9da3e3940cddcaf",
|
||||
"from": "do-bulma@github:do-community/do-bulma",
|
||||
"version": "git+ssh://git@github.com/do-community/do-bulma.git#663980a539ea6273259a1175cc755428656d52b8",
|
||||
"from": "do-bulma@https://github.com/do-community/do-bulma#MattIPv4/vue-3",
|
||||
"requires": {
|
||||
"bulma": "^0.9.3"
|
||||
}
|
||||
},
|
||||
"do-vue": {
|
||||
"version": "git+ssh://git@github.com/do-community/do-vue.git#ef164a59eb9b3961821265dd859272337ff3bb53",
|
||||
"from": "do-vue@github:do-community/do-vue#MattIPv4/vue-3",
|
||||
"version": "git+ssh://git@github.com/do-community/do-vue.git#b313ae4368f09d4c6bdce0da107a46d70dabb403",
|
||||
"from": "do-vue@https://github.com/do-community/do-vue#MattIPv4/vue-3",
|
||||
"requires": {
|
||||
"assert": "^2.0.0",
|
||||
"babel-loader": "^8.2.3",
|
||||
|
@ -26110,6 +26111,7 @@
|
|||
"posthtml-expressions": "^1.9.0",
|
||||
"posthtml-extend": "^0.6.2",
|
||||
"posthtml-loader": "^2.0.1",
|
||||
"pretty-checkbox-vue": "^1.1.9",
|
||||
"process": "^0.11.10",
|
||||
"react-svg-loader": "^3.0.3",
|
||||
"request": "^2.88.2",
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"dependencies": {
|
||||
"clipboard": "^2.0.10",
|
||||
"clone": "^2.1.2",
|
||||
"do-bulma": "github:do-community/do-bulma",
|
||||
"do-bulma": "github:do-community/do-bulma#MattIPv4/vue-3",
|
||||
"do-vue": "github:do-community/do-vue#MattIPv4/vue-3",
|
||||
"escape-html": "^1.0.3",
|
||||
"files-diff": "0.0.6",
|
||||
|
|
|
@ -25,13 +25,21 @@ THE SOFTWARE.
|
|||
-->
|
||||
|
||||
<template>
|
||||
<PrettyInput type="checkbox">
|
||||
<PrettyCheck>
|
||||
<!-- Set the FontAwesome check as the default extra -->
|
||||
<template #extra>
|
||||
<slot name="extra">
|
||||
<i class="icon fas fa-check"></i>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<!-- Load in all other slots -->
|
||||
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
||||
<slot :name="slot" v-bind="scope || {}" />
|
||||
</template>
|
||||
</PrettyInput>
|
||||
</PrettyCheck>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import PrettyInput from './pretty_input';
|
||||
import PrettyCheck from 'do-vue/src/templates/pretty-checkbox-vue/pretty_check';
|
||||
</script>
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
<!--
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
https://github.com/digitalocean/nginxconfig.io/blob/master/LICENSE or https://mit-license.org/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<PrettyInput>
|
||||
<!-- Set the FontAwesome check as the default extra while we're here -->
|
||||
<template #extra>
|
||||
<slot name="extra">
|
||||
<i class="icon fas fa-check"></i>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<!-- Load in all other slots -->
|
||||
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
||||
<slot :name="slot" v-bind="scope || {}" />
|
||||
</template>
|
||||
</PrettyInput>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import PrettyInput from 'pretty-checkbox-vue/src/PrettyInput';
|
||||
|
||||
// Vue 3 fix: Remove top-level model as it's unused
|
||||
Reflect.deleteProperty(PrettyInput, 'model');
|
||||
|
||||
// Vue 3 fix: Patch in an empty vnode object as it doesn't exist
|
||||
PrettyInput.mounted = (original => function (...args) {
|
||||
return original.apply(new Proxy(this, {
|
||||
get: (target, key) => key === '$vnode'
|
||||
? {}
|
||||
: Reflect.get(target, key),
|
||||
}), args);
|
||||
})(PrettyInput.mounted);
|
||||
|
||||
// Vue 3 fix: Patch in firing update:modelValue event on input change
|
||||
PrettyInput.methods.updateInput = (original => function (...args) {
|
||||
return original.apply(new Proxy(this, {
|
||||
get: (target, key) => key === '$emit'
|
||||
? function (event, ...eventArgs) {
|
||||
return Reflect.get(target, key).apply(this, [event === 'change'
|
||||
? 'update:modelValue'
|
||||
: event].concat(eventArgs));
|
||||
}
|
||||
: Reflect.get(target, key),
|
||||
}), args);
|
||||
})(PrettyInput.methods.updateInput);
|
||||
</script>
|
|
@ -25,13 +25,21 @@ THE SOFTWARE.
|
|||
-->
|
||||
|
||||
<template>
|
||||
<PrettyInput type="radio">
|
||||
<PrettyRadio>
|
||||
<!-- Set the FontAwesome check as the default extra -->
|
||||
<template #extra>
|
||||
<slot name="extra">
|
||||
<i class="icon fas fa-check"></i>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<!-- Load in all other slots -->
|
||||
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
||||
<slot :name="slot" v-bind="scope || {}" />
|
||||
</template>
|
||||
</PrettyInput>
|
||||
</PrettyRadio>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import PrettyInput from './pretty_input';
|
||||
import PrettyRadio from 'do-vue/src/templates/pretty-checkbox-vue/pretty_radio';
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue