improve generation of slugs
This commit is contained in:
parent
1048cbc5c9
commit
3efe3a7f61
|
|
@ -5,7 +5,6 @@
|
|||
/public/js
|
||||
/public/vendor
|
||||
/public/themes
|
||||
/storage/*.key
|
||||
/vendor
|
||||
/.idea
|
||||
/.vscode
|
||||
|
|
@ -21,3 +20,5 @@ yarn.lock
|
|||
package-lock.json
|
||||
yarn.lock
|
||||
.php_cs.cache
|
||||
storage/
|
||||
storage/*.key
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
<script>
|
||||
export default {
|
||||
bind(el, binding, vnode) {
|
||||
let handler = function(e) {
|
||||
setTimeout(function() {
|
||||
e.target.value = e.target.value.toString().toLowerCase()
|
||||
.replace(/[^\w- ]+/g,'')
|
||||
.trim()
|
||||
.replace(/ +/g,'-');
|
||||
let handler = function (e) {
|
||||
setTimeout(function () {
|
||||
e.target.value = e.target.value
|
||||
.toString()
|
||||
.toLowerCase()
|
||||
.replace(/[^\w- ]+/g, '')
|
||||
.replace(/ +/g, '-')
|
||||
.replace('![-\s]+!u', '-')
|
||||
.trim();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue